content stringlengths 40 137k |
|---|
"public void start(IFrameEvaluator evaluator, Camera camera, SurfaceHolder holder) {\n try {\n CameraPreviewing previewingState = new CameraPreviewing(camera, holder);\n camera.startPreview();\n mStateChanger.setState(previewingState);\n } catch (IOException e) {\n e.printStackTrace();\n camera.release();\n mStateChanger.setState(new CameraUninitialized());\n }\n}\n"
|
"private BaseMessage convert(Object payload) {\n BaseMessage ret = null;\n if (payload instanceof BaseMessage) {\n ret = (BaseMessage) payload;\n } else if (payload instanceof HasRequest) {\n ret = ((HasRequest) payload).getRequest();\n } else if (payload instanceof String) {\n try {\n ret = (BaseMessage) BindingManager.getDefaultBinding().fromOM((String) payload);\n } catch (Exception ex) {\n LOG.error(ex, ex);\n }\n } else {\n payload = RequestContext.getEvent().getMessage().getPayload();\n if (payload instanceof BaseMessage) {\n ret = (BaseMessage) payload;\n } else if (payload instanceof String) {\n try {\n ret = (BaseMessage) BindingManager.getBinding(\"String_Node_Str\").fromOM((String) payload);\n } catch (Exception ex) {\n LOG.error(ex, ex);\n }\n }\n }\n return ret;\n}\n"
|
"public void loadConfig() {\n YamlConfiguration config = (YamlConfiguration) this.getConfig();\n config.options().copyDefaults(true);\n config.addDefault(\"String_Node_Str\", \"String_Node_Str\");\n config.addDefault(\"String_Node_Str\", this.getServer().getWorlds().get(0).getName());\n config.addDefault(\"String_Node_Str\", 0);\n config.addDefault(\"String_Node_Str\", 0);\n config.addDefault(\"String_Node_Str\", 0);\n config.addDefault(\"String_Node_Str\", this.getServer().getWorlds().get(0).getName());\n config.addDefault(\"String_Node_Str\", 0);\n config.addDefault(\"String_Node_Str\", 0);\n config.addDefault(\"String_Node_Str\", 0);\n jailed = new YamlConfiguration();\n File f = new File(this.getDataFolder().getPath() + File.separator + \"String_Node_Str\");\n try {\n if (!f.exists())\n f.createNewFile();\n } catch (IOException ex) {\n }\n jailed = new YamlConfiguration();\n try {\n config.save(this.getConfig().getCurrentPath());\n jailed.load(f);\n } catch (Exception ex) {\n }\n}\n"
|
"private void addRelations(Set<Relation> lineageRelations) {\n for (Relation relation : lineageRelations) {\n String dataKey = makeDataKey(relation.getData());\n String programKey = makeProgramKey(relation.getProgram());\n RelationRecord relationRecord = new RelationRecord(dataKey, programKey, relation.getAccess().toString().toLowerCase(), convertRuns(relation.getRun()), convertComponents(relation.getComponents()));\n relations.add(relationRecord);\n programs.put(programKey, ImmutableMap.of(\"String_Node_Str\", toProgramRecord(relation.getProgram())));\n data.put(dataKey, ImmutableMap.of(\"String_Node_Str\", toDataRecord(relation.getData())));\n }\n}\n"
|
"public MeasureInfo[] getMeasureInfo() {\n if (computedMeasureInfo == null)\n produceComputedMeasureInfo();\n return computedMeasureInfo;\n}\n"
|
"public boolean setInt(int id, byte data, int value) {\n int intLocation = IntMap.getIntIndex(id, data);\n Bukkit.getServer().broadcastMessage(\"String_Node_Str\");\n if (hasDataValue(id) && data == (byte) 0) {\n setDataRange(id, (byte) 0, (byte) 15, value);\n Bukkit.getServer().broadcastMessage(\"String_Node_Str\" + id);\n } else {\n int intLocation = IntMap.getIntIndex(id, data);\n if (intLocation == -1) {\n return false;\n }\n mapData[intLocation] = value;\n Bukkit.getServer().broadcastMessage(\"String_Node_Str\" + mapData[intLocation] + \"String_Node_Str\");\n }\n mapData[intLocation] = value;\n Bukkit.getServer().broadcastMessage(\"String_Node_Str\" + mapData[intLocation] + \"String_Node_Str\");\n return true;\n}\n"
|
"protected void setRowCountAndNullCount(Map<ModelElement, List<Indicator>> elementToIndicator) {\n Set<ModelElement> analyzedElements = elementToIndicator.keySet();\n for (ModelElement modelElement : analyzedElements) {\n RowCountIndicator rowCount = IndicatorHelper.getRowCountIndicator(modelElement, elementToIndicator);\n NullCountIndicator nullCount = IndicatorHelper.getNullCountIndicator(modelElement, elementToIndicator);\n List<Indicator> list = elementToIndicator.get(modelElement);\n for (Indicator ind : list) {\n if (rowCount != null && needPercentage(ind)) {\n ind.setCount(rowCount.getCount());\n }\n if (nullCount != null) {\n ind.setNullCount(nullCount.getNullCount());\n }\n }\n }\n}\n"
|
"public String getAttribute(Attribute attribute) {\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(material.hasGravity()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(material.getId()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(material.isBlock()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(material.isBurnable()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(material.isEdible()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(material.isFlammable()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(material.isOccluding()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(material.isRecord()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(material.isSolid()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(material.isTransparent()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(material.getMaxDurability()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(material.getMaxStackSize()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\")) {\n dMaterial compared = dMaterial.valueOf(attribute.getContext(1));\n if (compared == null)\n return Element.FALSE.getAttribute(attribute.fulfill(1));\n else\n return new Element(material.name().equalsIgnoreCase(compared.forcedIdentity != null ? compared.forcedIdentity : compared.getMaterial().name())).getAttribute(attribute.fulfill(1));\n }\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(material.name()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(getData()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new dItem(this, 1).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.fulfill(0));\n}\n"
|
"public JsonObjectBase updateFile(ConfNewForm confNewForm, MultipartFile file) {\n LOG.info(confNewForm.toString());\n int fileSize = 1024 * 1024 * 4;\n String[] allowExtName = { \"String_Node_Str\", \"String_Node_Str\" };\n fileUploadValidator.validateFile(file, fileSize, allowExtName);\n String fileContent = \"String_Node_Str\";\n try {\n fileContent = new String(file.getBytes(), \"String_Node_Str\");\n LOG.info(\"String_Node_Str\" + fileContent);\n } catch (Exception e) {\n LOG.error(e.toString());\n throw new FileUploadException(\"String_Node_Str\", e);\n }\n ConfNewItemForm confNewItemForm = new ConfNewItemForm(confNewForm);\n confNewItemForm.setKey(file.getOriginalFilename());\n confNewItemForm.setValue(fileContent);\n configValidator.validateNew(confNewItemForm, DisConfigTypeEnum.FILE);\n configMgr.newConfig(confNewItemForm, DisConfigTypeEnum.FILE);\n return buildSuccess(\"String_Node_Str\");\n}\n"
|
"private static TurboLabel updateRandomLabel(String repoId) {\n int i = (int) (Math.random() * labelCounter);\n return labels.set(i, new TurboLabel(repoId, \"String_Node_Str\" + (i + 1) + \"String_Node_Str\" + Math.random()));\n}\n"
|
"public static long getUnitBytes(int unit) {\n long bytes;\n switch(unit) {\n case BYTE_UNIT:\n bytes = 1;\n break;\n case KILOBYTE_UNIT:\n bytes = KB_1;\n break;\n case MEGA_BYTE_UNIT:\n bytes = MB_1;\n break;\n case GIGA_BYTE_UNIT:\n bytes = GB_1;\n break;\n case TERA_BYTE_UNIT:\n bytes = TB_1;\n break;\n default:\n return 0;\n }\n return bytes;\n}\n"
|
"public void shouldNotLoadMultipleNullEntriesUsingLoadAll() throws Exception {\n NullValueCacheLoader<String, String> cacheLoader = new NullValueCacheLoader<>();\n cacheLoaderServer.setCacheLoader(cacheLoader);\n HashSet<String> keys = new HashSet<>();\n keys.add(\"String_Node_Str\");\n keys.add(\"String_Node_Str\");\n keys.add(\"String_Node_Str\");\n keys.add(\"String_Node_Str\");\n CompletionListenerFuture future = new CompletionListenerFuture();\n cache.loadAll(keys, false, future);\n future.get();\n assertThat(future.isDone(), is(true));\n for (String key : keys) {\n assertThat(cache.containsKey(key), is(false));\n }\n}\n"
|
"public void writeExternal(ObjectOutput out) throws IOException {\n out.writeObject(bitset);\n out.writeInt(bitSetSize);\n out.writeFloat(bitsPerElement);\n out.writeInt(numElements);\n out.writeShort(k);\n}\n"
|
"public CoordinateOperation createOperation(final CoordinateReferenceSystem sourceCRS, final CoordinateReferenceSystem targetCRS) throws OperationNotFoundException, FactoryException {\n ArgumentChecks.ensureNonNull(\"String_Node_Str\", sourceCRS);\n ArgumentChecks.ensureNonNull(\"String_Node_Str\", targetCRS);\n if (equalsIgnoreMetadata(sourceCRS, targetCRS))\n try {\n return createFromAffineTransform(AXIS_CHANGES, sourceCRS, targetCRS, CoordinateSystems.swapAndScaleAxes(sourceCRS.getCoordinateSystem(), targetCRS.getCoordinateSystem()));\n } catch (IllegalArgumentException | ConversionException e) {\n throw new FactoryException(Errors.format(Errors.Keys.CanNotInstantiate_1, new CRSPair(sourceCRS, targetCRS)), e);\n }\n final CRSPair key = new CRSPair(sourceCRS, targetCRS);\n if (previousSearches.put(key, Boolean.TRUE) != null) {\n throw new FactoryException(Errors.format(Errors.Keys.RecursiveCreateCallForCode_2, CoordinateOperation.class, key));\n }\n GeographicBoundingBox bbox = Extents.getGeographicBoundingBox(areaOfInterest);\n if (bbox == null) {\n bbox = Extents.intersection(CRS.getGeographicBoundingBox(sourceCRS), CRS.getGeographicBoundingBox(targetCRS));\n areaOfInterest = CoordinateOperationContext.setGeographicBoundingBox(areaOfInterest, bbox);\n }\n if (registry != null) {\n final CoordinateOperation op = super.createOperation(sourceCRS, targetCRS);\n if (op != null)\n return op;\n }\n if (sourceCRS instanceof GeneralDerivedCRS) {\n final GeneralDerivedCRS source = (GeneralDerivedCRS) sourceCRS;\n if (targetCRS instanceof GeneralDerivedCRS) {\n return createOperationStep(source, (GeneralDerivedCRS) targetCRS);\n }\n if (targetCRS instanceof SingleCRS) {\n return createOperationStep(source, (SingleCRS) targetCRS);\n }\n }\n if (targetCRS instanceof GeneralDerivedCRS) {\n final GeneralDerivedCRS target = (GeneralDerivedCRS) targetCRS;\n if (sourceCRS instanceof SingleCRS) {\n return createOperationStep((SingleCRS) sourceCRS, target);\n }\n }\n if (sourceCRS instanceof GeodeticCRS) {\n final GeodeticCRS source = (GeodeticCRS) sourceCRS;\n if (targetCRS instanceof GeodeticCRS) {\n return createOperationStep(source, (GeodeticCRS) targetCRS);\n }\n if (targetCRS instanceof VerticalCRS) {\n return createOperationStep(source, (VerticalCRS) targetCRS);\n }\n }\n if (sourceCRS instanceof VerticalCRS) {\n final VerticalCRS source = (VerticalCRS) sourceCRS;\n if (targetCRS instanceof VerticalCRS) {\n return createOperationStep(source, (VerticalCRS) targetCRS);\n }\n }\n if (sourceCRS instanceof TemporalCRS) {\n final TemporalCRS source = (TemporalCRS) sourceCRS;\n if (targetCRS instanceof TemporalCRS) {\n return createOperationStep(source, (TemporalCRS) targetCRS);\n }\n }\n if (sourceCRS instanceof CompoundCRS || targetCRS instanceof CompoundCRS) {\n return createOperationStep(sourceCRS, CRS.getSingleComponents(sourceCRS), targetCRS, CRS.getSingleComponents(targetCRS));\n }\n throw new OperationNotFoundException(notFoundMessage(sourceCRS, targetCRS));\n}\n"
|
"public boolean didFinishLaunching(UIApplication application, UIApplicationLaunchOptions launchOptions) {\n tabBarController = new UITabBarController();\n getLocationViewController = new GetLocationViewController();\n UINavigationController getLocationController = new UINavigationController(getLocationViewController);\n getLocationController.getTabBarItem().setTitle(\"String_Node_Str\");\n getLocationController.getTabBarItem().setImage(UIImage.create(\"String_Node_Str\"));\n tabBarController.addChildViewController(getLocationController);\n trackLocationViewController = new TrackLocationViewController();\n UINavigationController trackLocationController = new UINavigationController(trackLocationViewController);\n trackLocationController.getTabBarItem().setTitle(\"String_Node_Str\");\n trackLocationController.getTabBarItem().setImage(UIImage.createFromBundle(\"String_Node_Str\"));\n tabBarController.addChildViewController(trackLocationController);\n window = new UIWindow(UIScreen.getMainScreen().getBounds());\n window.setRootViewController(tabBarController);\n window.makeKeyAndVisible();\n if (!CLLocationManager.isLocationServicesEnabled()) {\n UIAlertView servicesDisabledAlert = new UIAlertView(\"String_Node_Str\", \"String_Node_Str\", null, \"String_Node_Str\");\n servicesDisabledAlert.show();\n }\n addStrongRef(window);\n return true;\n}\n"
|
"public void executeAsyncAction(Action action, ICommandListener listener) {\n final String type = action.getType();\n Bundle data = action.getData();\n switch(type) {\n case MissionActions.ACTION_GENERATE_DRONIE:\n final float bearing = CommonApiUtils.generateDronie(drone);\n if (bearing != -1) {\n Bundle bundle = new Bundle(1);\n bundle.putFloat(AttributeEventExtra.EXTRA_MISSION_DRONIE_BEARING, bearing);\n notifyDroneAttributeEvent(AttributeEvent.MISSION_DRONIE_CREATED, bundle);\n }\n break;\n case MissionActions.ACTION_BUILD_COMPLEX_MISSION_ITEM:\n CommonApiUtils.buildComplexMissionItem(drone, data);\n break;\n case FollowMeActions.ACTION_ENABLE_FOLLOW_ME:\n data.setClassLoader(FollowType.class.getClassLoader());\n FollowType followType = data.getParcelable(FollowMeActions.EXTRA_FOLLOW_TYPE);\n CommonApiUtils.enableFollowMe(this, handler, followType);\n break;\n case FollowMeActions.ACTION_UPDATE_FOLLOW_PARAMS:\n if (followMe != null) {\n data.setClassLoader(LatLong.class.getClassLoader());\n final FollowAlgorithm followAlgorithm = followMe.getFollowAlgorithm();\n if (followAlgorithm != null) {\n Map<String, Object> paramsMap = new HashMap<>();\n Set<String> dataKeys = data.keySet();\n for (String key : dataKeys) {\n if (FollowType.EXTRA_FOLLOW_ROI_TARGET.equals(key)) {\n LatLong target = data.getParcelable(key);\n if (target != null) {\n final Coord2D roiTarget;\n if (target instanceof LatLongAlt) {\n roiTarget = new Coord3D(target.getLatitude(), target.getLongitude(), ((LatLongAlt) target).getAltitude());\n } else {\n roiTarget = new Coord2D(target.getLatitude(), target.getLongitude());\n }\n paramsMap.put(key, roiTarget);\n }\n } else\n paramsMap.put(key, data.get(key));\n }\n followAlgorithm.updateAlgorithmParams(paramsMap);\n }\n }\n break;\n case FollowMeActions.ACTION_DISABLE_FOLLOW_ME:\n CommonApiUtils.disableFollowMe(getFollowMe());\n break;\n default:\n if (drone != null) {\n drone.executeAsyncAction(action, listener);\n } else {\n CommonApiUtils.postErrorEvent(CommandExecutionError.COMMAND_FAILED, listener);\n }\n break;\n }\n}\n"
|
"public String toString() {\n StringBuilder builder = new StringBuilder();\n builder.append(\"String_Node_Str\");\n if (_policyResource != null) {\n builder.append(\"String_Node_Str\");\n if (_policyResource.getValues() != null) {\n List<String> values = new ArrayList<String>(_policyResource.getValues());\n Collections.sort(values);\n builder.append(values);\n }\n builder.append(\"String_Node_Str\");\n if (_policyResource.getIsExcludes() == null) {\n builder.append(Boolean.FALSE);\n } else {\n builder.append(_policyResource.getIsExcludes());\n }\n builder.append(\"String_Node_Str\");\n if (_policyResource.getIsRecursive() == null) {\n builder.append(Boolean.FALSE);\n } else {\n builder.append(_policyResource.getIsRecursive());\n }\n }\n builder.append(\"String_Node_Str\");\n return builder.toString();\n}\n"
|
"public static ColumnSet findMatchedColumnSet(ColumnSet selectedColumnSet, Connection toMatchDataProvider) throws ReloadCompareException {\n Package parentCatalogOrSchema = ColumnSetHelper.getParentCatalogOrSchema(selectedColumnSet);\n Package toReloadPackage = DQStructureComparer.findMatchedPackage(parentCatalogOrSchema, toMatchDataProvider);\n TdTable oldTable = SwitchHelpers.TABLE_SWITCH.doSwitch(selectedColumnSet);\n ColumnSet toReloadcolumnSet = null;\n if (oldTable != null) {\n List<TdTable> tables = PackageHelper.getTables(toReloadPackage);\n for (TdTable table : tables) {\n if (oldTable.getName().equals(table.getName())) {\n toReloadcolumnSet = table;\n break;\n }\n }\n } else {\n List<TdView> views = PackageHelper.getViews(toReloadPackage);\n for (TdView view : views) {\n if (selectedColumnSet.getName().equals(view.getName()) && (ColumnSetHelper.getTableOwner(selectedColumnSet) == null || ColumnSetHelper.getTableOwner(selectedColumnSet).equals(ColumnSetHelper.getTableOwner(view)))) {\n toReloadcolumnSet = view;\n break;\n }\n }\n }\n if (toReloadcolumnSet == null) {\n throw new ReloadCompareException(DefaultMessagesImpl.getString(\"String_Node_Str\", selectedColumnSet.getName()));\n }\n return toReloadcolumnSet;\n}\n"
|
"public ItemStack getItemStack() {\n ItemStack item = new ItemStack(itemID, amount);\n item.setData(new MaterialData(itemID, (byte) data));\n return item;\n}\n"
|
"public ResponseEntity queryHelp(HttpServletRequest request, HttpServletResponse response) throws DecodeException {\n String lastSpliInURI = queryParser.getLastSplitInURI(request);\n if (!\"String_Node_Str\".equals(lastSpliInURI)) {\n return RestResponseUtil.createResponse400();\n }\n Help result = queryService.queryHelp(new HelpQueryParam(\"String_Node_Str\"));\n if (null != result) {\n responseDecorator.decorateResponseForHelp(result);\n return RestResponseUtil.createResponse200(result);\n }\n return RestResponseUtil.createResponse404();\n}\n"
|
"public void getReference(String id, IRpcServiceInvocationHandler<ReferenceBean> handler) {\n RemoteCallback<ReferenceBean> successCallback = new DelegatingRemoteCallback<ReferenceBean>(handler);\n ErrorCallback<?> errorCallback = new DelegatingErrorCallback(handler);\n try {\n String encodedId = com.google.gwt.http.client.URL.encode(id);\n remoteServicesService.call(successCallback, errorCallback).getReference(encodedId);\n } catch (UiException e) {\n errorCallback.error(null, e);\n }\n}\n"
|
"private boolean copyPart(PduPart part) {\n Uri uri = part.getDataUri();\n InputStream input = null;\n FileOutputStream fout = null;\n try {\n input = mContentResolver.openInputStream(uri);\n if (input instanceof FileInputStream) {\n FileInputStream fin = (FileInputStream) input;\n byte[] location = part.getName();\n if (location == null) {\n location = part.getFilename();\n }\n if (location == null) {\n location = part.getContentLocation();\n }\n String fileName = new String(location);\n String dir = \"String_Node_Str\";\n String extension;\n int index;\n if ((index = fileName.indexOf(\"String_Node_Str\")) == -1) {\n String type = new String(part.getContentType());\n extension = MimeTypeMap.getSingleton().getExtensionFromMimeType(type);\n } else {\n extension = fileName.substring(index + 1, fileName.length());\n fileName = fileName.substring(0, index);\n }\n File file = getUniqueDestination(dir + fileName, extension);\n File parentFile = file.getParentFile();\n if (!parentFile.exists() && !parentFile.mkdirs()) {\n Log.e(TAG, \"String_Node_Str\" + parentFile.getPath() + \"String_Node_Str\");\n return false;\n }\n fout = new FileOutputStream(file);\n byte[] buffer = new byte[8000];\n int size = 0;\n while ((size = fin.read(buffer)) != -1) {\n fout.write(buffer, 0, size);\n }\n sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.fromFile(file)));\n }\n } catch (IOException e) {\n Log.e(TAG, \"String_Node_Str\", e);\n return false;\n } finally {\n if (null != input) {\n try {\n input.close();\n } catch (IOException e) {\n Log.e(TAG, \"String_Node_Str\", e);\n return false;\n }\n }\n if (null != fout) {\n try {\n fout.close();\n } catch (IOException e) {\n Log.e(TAG, \"String_Node_Str\", e);\n return false;\n }\n }\n }\n return true;\n}\n"
|
"public static StateStreamRuntime parseInputStream(StateInputStream stateInputStream, ExecutionPlanContext executionPlanContext, MetaStateEvent metaStateEvent, Map<String, AbstractDefinition> streamDefinitionMap, Map<String, AbstractDefinition> tableDefinitionMap, Map<String, EventTable> eventTableMap, List<VariableExpressionExecutor> variableExpressionExecutors, LatencyTracker latencyTracker) {\n Map<String, ProcessStreamReceiver> processStreamReceiverMap = new HashMap<String, ProcessStreamReceiver>();\n StateStreamRuntime stateStreamRuntime = new StateStreamRuntime(executionPlanContext, metaStateEvent);\n for (String streamId : stateInputStream.getAllStreamIds()) {\n int streamCount = stateInputStream.getStreamCount(streamId);\n if (streamCount == 1) {\n if (stateInputStream.getStateType() == StateInputStream.Type.SEQUENCE) {\n processStreamReceiverMap.put(streamId, new SequenceSingleProcessStreamReceiver(streamId, stateStreamRuntime, defaultLockKey, latencyTracker));\n } else {\n processStreamReceiverMap.put(streamId, new PatternSingleProcessStreamReceiver(streamId, latencyTracker));\n }\n } else {\n if (stateInputStream.getStateType() == StateInputStream.Type.SEQUENCE) {\n processStreamReceiverMap.put(streamId, new SequenceMultiProcessStreamReceiver(streamId, streamCount, stateStreamRuntime, latencyTracker));\n } else {\n processStreamReceiverMap.put(streamId, new PatternMultiProcessStreamReceiver(streamId, streamCount, latencyTracker));\n }\n }\n }\n StateElement stateElement = stateInputStream.getStateElement();\n InnerStateRuntime innerStateRuntime = parse(stateElement, streamDefinitionMap, tableDefinitionMap, eventTableMap, metaStateEvent, executionPlanContext, variableExpressionExecutors, processStreamReceiverMap, null, null, stateInputStream.getStateType(), new ArrayList<Map.Entry<Long, Set<Integer>>>(), latencyTracker);\n stateStreamRuntime.setInnerStateRuntime(innerStateRuntime);\n return stateStreamRuntime;\n}\n"
|
"public String toString() {\n return this.fmn + \"String_Node_Str\" + this.args + \"String_Node_Str\" + this.roles + \"String_Node_Str\";\n}\n"
|
"private static boolean isGrandTotalOnEdge(List aggrOns, List dimLevelOnColumn) throws DataException {\n boolean flag = false;\n for (int i = 0; i < aggrOns.size(); i++) {\n String aggrExpr = aggrOns.get(i).toString();\n DimLevel target = OlapExpressionUtil.getTargetDimLevel(aggrExpr);\n if (!dimLevels.isEmpty() && dimLevels.get(dimLevels.size() - 1).equals(target)) {\n flag = true;\n break;\n }\n }\n return flag;\n}\n"
|
"public String toString() {\n StringBuilder b = new StringBuilder(100).append('[');\n for (int p = 0; p < phrase.length; p++) {\n if (p != 0) {\n b.append(':');\n }\n b.append(Arrays.toString(phrase[p]));\n }\n return b.append(\"String_Node_Str\").append(phraseSlop).append('\\u21D2').append(phraseWeight).append('(').append(wrapped).append(')').toString();\n}\n"
|
"public void createConnectionParam(String name, String paramName, String paramValue) {\n ConnectionDetails connectionDetails = connectionDetailsMap.get(name);\n connectionDetails.put(paramName, paramValue);\n}\n"
|
"protected void onPostExecute(Boolean hasNetwork) {\n if (hasNetwork) {\n if (type == InternetCheckType.LOGIN) {\n attemptLogin();\n } else if (type == InternetCheckType.SIGNUP) {\n Intent signupIntent = new Intent(LoginActivity.this, SignUpActivity.class);\n startActivity(signupIntent);\n }\n } else {\n CustomedDialog.showInternetNotConnectDialog(LoginActivity.this);\n }\n}\n"
|
"public void done(IJobChangeEvent event) {\n if (event.getResult().isOK()) {\n try {\n if (tmpLocation != null) {\n File sourceFiles = tmpLocation.append(\"String_Node_Str\").toFile();\n File[] fileList = sourceFiles.listFiles();\n if (fileList != null)\n for (File jars : fileList) {\n File destFile = location.append(jars.getName()).toFile();\n if (!destFile.exists()) {\n if (!destFile.createNewFile()) {\n throw new IOException(\"String_Node_Str\" + destFile);\n }\n }\n if (destination != null) {\n destination.close();\n }\n }\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n}\n"
|
"private String errorMessage(Object request, List<Object> recordedRequests) {\n StringBuilder msg = new StringBuilder();\n msg.append(\"String_Node_Str\").append(request).append(\"String_Node_Str\").append(\"String_Node_Str\").append(\"String_Node_Str\").append(\"String_Node_Str\").append(\"String_Node_Str\").append(\"String_Node_Str\").append(\"String_Node_Str\").append(\"String_Node_Str\");\n for (Object r : recordedRequests) {\n msg.append(\"String_Node_Str\").append(r.toString()).append(\"String_Node_Str\").append(\"String_Node_Str\");\n }\n msg.append(\"String_Node_Str\").append(request).append(\"String_Node_Str\");\n return msg.toString();\n}\n"
|
"public boolean setInstantiatedExpression(Expression expression) {\n int index = 0;\n for (RowCountIndicator rci : this.rowCountIndiSet) {\n TdExpression copySqlExpression = BooleanExpressionHelper.createTdExpression(expression.getLanguage(), expression.getBody());\n rci.setInstantiatedExpression(copySqlExpression);\n index++;\n }\n if (index == 0 || index != rowCountIndiSet.size()) {\n return false;\n }\n return super.setInstantiatedExpression(expression);\n}\n"
|
"public <T> JournalBulkReader<T> bulkReader(JournalKey<T> key) throws JournalException {\n String name = key.path();\n checkBlocked(name);\n JournalBulkReader<T> result = bulkReaders.get(name);\n if (result == null) {\n result = new JournalBulkReader<>(getOrCreateMetadata(key), key);\n result.setCloseListener(this);\n bulkReaders.put(name, result);\n journalList.add(result);\n }\n return result;\n}\n"
|
"public void draw() {\n background(32);\n lights();\n pushMatrix();\n translate(width / 2, height / 2, 0);\n rotateX(rotY);\n rotateY(rotX);\n scale(1.5f);\n for (int j = 0; j < model.getSegmentCount(); j++) {\n Segment segment = model.getSegment(j);\n Face[] faces = segment.getFaces();\n drawFaces(faces);\n }\n scale(3.0f);\n stroke(0, 0, 255);\n Collection<Edge> edges = model.getGraph().getEdges();\n for (Edge<Double> e : edges) {\n beginShape(LINES);\n Pair<Node> nodes = model.getGraph().getEndpoints(e);\n Node src = nodes.getFirst();\n Node dst = nodes.getSecond();\n if (drawDelaylines) {\n pushMatrix();\n beginShape(LINES);\n if (!e.visited) {\n if (src.type == Node.NodeType.wall) {\n stroke(255, 255, 255);\n } else if (dst.type == Node.NodeType.wall) {\n stroke(0, 255, 255);\n } else {\n stroke(255, 255, 0);\n }\n } else {\n stroke(255, 255, 0);\n }\n } else {\n stroke(255, 0, 0);\n }\n vertex(src.pos.x, src.pos.y, src.pos.z);\n vertex(dst.pos.x, dst.pos.y, dst.pos.z);\n endShape();\n if (dst.type == Node.NodeType.listener) {\n fill(255, 0, 0);\n pushMatrix();\n drawPoint(dst.pos);\n popMatrix();\n } else if (src.type == Node.NodeType.source) {\n fill(0, 255, 0);\n pushMatrix();\n drawPoint(src.pos);\n popMatrix();\n }\n }\n popMatrix();\n}\n"
|
"protected void resizeListView() {\n List<Long> displayedIDs = detailsList.stream().map(item -> item.getId()).collect(Collectors.toList());\n double height;\n int size = displayedIDs.size();\n if (size == 0) {\n height = 0;\n } else {\n Optional<Double> totalHeight = displayedIDs.stream().map(id -> getHeightOfCommentCell(id)).reduce((accum, val) -> accum + val);\n height = Math.min(totalHeight.get(), LIST_MAX_HEIGHT);\n }\n listView.setPrefHeight(height);\n}\n"
|
"private Bridge getOrCreateNetworkBridge(long networkID, long accountID) {\n Bridge netBridge = getNetworkBridge(networkID, accountID);\n if (netBridge == null) {\n String accountIdStr = String.valueOf(accountID);\n String networkUUIDStr = String.valueOf(networkID);\n netBridge = api.addBridge().tenantId(accountUuid).name(networkUUIDStr).create();\n }\n return netBridge;\n}\n"
|
"public void testPrivilegesManager() throws Exception {\n privilegesManager.grant(NS, ALICE, EnumSet.allOf(Action.class));\n privilegesManager.grant(APP, ALICE, Collections.singleton(Action.ADMIN));\n privilegesManager.grant(PROGRAM, ALICE, Collections.singleton(Action.EXECUTE));\n authorizer.enforce(NS, ALICE, Action.ALL);\n authorizer.enforce(APP, ALICE, Action.ADMIN);\n authorizer.enforce(PROGRAM, ALICE, Action.EXECUTE);\n try {\n authorizer.enforce(APP, ALICE, Action.ALL);\n Assert.fail(\"String_Node_Str\");\n } catch (UnauthorizedException e) {\n }\n privilegesManager.revoke(PROGRAM);\n privilegesManager.revoke(APP, ALICE, EnumSet.allOf(Action.class));\n privilegesManager.revoke(NS, ALICE, Collections.singleton(Action.ALL));\n Set<Privilege> privileges = authorizer.listPrivileges(ALICE);\n Assert.assertTrue(String.format(\"String_Node_Str\", privileges), privileges.isEmpty());\n}\n"
|
"public void onViewRecycled(ViewHolder holder) {\n RecentsTaskLoader loader = Recents.getTaskLoader();\n int position = holder.getAdapterPosition();\n if (position != RecyclerView.NO_POSITION) {\n Row row = mRows.get(position);\n int viewType = row.getViewType();\n if (viewType == TASK_ROW_VIEW_TYPE) {\n TaskRow taskRow = (TaskRow) row;\n loader.unloadTaskData(taskRow.task);\n holder.unbindFromTask();\n }\n }\n}\n"
|
"public boolean isEditable() {\n BranchState state = getBranchState();\n return (state.isCreated() || state.isModified() || state.isRebaselineInProgress()) && getArchiveState().isUnArchived();\n}\n"
|
"public void abortTask(TaskAttemptContext context) throws IOException {\n setup(context);\n FileSystem fileSystem = _newIndex.getFileSystem(_configuration);\n LOG.info(\"String_Node_Str\", _newIndex);\n fileSystem.delete(_newIndex, true);\n}\n"
|
"private void load(String dirName, String managerName) throws IOException, DataException {\n documentObjectMap = new HashMap();\n File file = new File(dirName + File.separatorChar + managerName + \"String_Node_Str\");\n objectAccessFile = new BufferedRandomAccessFile(file, \"String_Node_Str\", 1024, dataFileCacheSize / 5);\n if (!file.exists()) {\n throw new DataException(ResourceConstants.OLAPFILE_NOT_FOUND, file.getAbsolutePath());\n }\n file = new File(dirName + File.separatorChar + managerName + \"String_Node_Str\");\n if (!file.exists()) {\n throw new DataException(ResourceConstants.OLAPFILE_NOT_FOUND, file.getAbsolutePath());\n }\n oatAccessFile = new BufferedRandomAccessFile(file, \"String_Node_Str\", 1024);\n file = new File(dirName + File.separatorChar + managerName + \"String_Node_Str\");\n if (!file.exists()) {\n throw new DataException(ResourceConstants.OLAPFILE_NOT_FOUND, file.getAbsolutePath());\n }\n dataAccessFile = new BufferedRandomAccessFile(file, \"String_Node_Str\", 1024);\n objectAccessFile.seek(0);\n while (true) {\n try {\n ObjectStructure structure = readObjectStructure();\n if (structure.firstBlock >= 0)\n documentObjectMap.put(structure.name, structure);\n } catch (EOFException e) {\n return;\n }\n }\n}\n"
|
"public boolean evaluateStep(final StepInterpolator interpolator) throws DerivativeException, EventException, ConvergenceException {\n try {\n forward = interpolator.isForward();\n final double t1 = interpolator.getCurrentTime();\n final int n = Math.max(1, (int) Math.ceil(Math.abs(t1 - t0) / maxCheckInterval));\n final double h = (t1 - t0) / n;\n double ta = t0;\n double ga = g0;\n double tb = t0 + (interpolator.isForward() ? convergence : -convergence);\n for (int i = 0; i < n; ++i) {\n tb += h;\n interpolator.setInterpolatedTime(tb);\n final double gb = handler.g(tb, interpolator.getInterpolatedState());\n if (g0Positive ^ (gb >= 0)) {\n increasing = gb >= ga;\n final UnivariateRealFunction f = new UnivariateRealFunction() {\n public double value(final double t) throws FunctionEvaluationException {\n try {\n interpolator.setInterpolatedTime(t);\n return handler.g(t, interpolator.getInterpolatedState());\n } catch (DerivativeException e) {\n throw new FunctionEvaluationException(e, t);\n } catch (EventException e) {\n throw new FunctionEvaluationException(e, t);\n }\n }\n };\n final BrentSolver solver = new BrentSolver();\n solver.setAbsoluteAccuracy(convergence);\n solver.setMaximalIterationCount(maxIterationCount);\n final double root = (ta <= tb) ? solver.solve(f, ta, tb) : solver.solve(f, tb, ta);\n if ((Math.abs(root - ta) <= convergence) && (Math.abs(root - previousEventTime) <= convergence)) {\n ta = tb;\n ga = gb;\n } else if (Double.isNaN(previousEventTime) || (Math.abs(previousEventTime - root) > convergence)) {\n pendingEventTime = root;\n if (pendingEvent && (Math.abs(t1 - pendingEventTime) <= convergence)) {\n return false;\n }\n pendingEvent = true;\n return true;\n }\n } else {\n ta = tb;\n ga = gb;\n }\n }\n pendingEvent = false;\n pendingEventTime = Double.NaN;\n return false;\n } catch (FunctionEvaluationException e) {\n final Throwable cause = e.getCause();\n if ((cause != null) && (cause instanceof DerivativeException)) {\n throw (DerivativeException) cause;\n } else if ((cause != null) && (cause instanceof EventException)) {\n throw (EventException) cause;\n }\n throw new EventException(e);\n }\n}\n"
|
"private boolean filterZero(Position position) {\n return filterZero && position.getLatitude() == 0.0 && position.getLongitude() == 0.0;\n}\n"
|
"public void execute() {\n canExecute();\n if (connectionName == null) {\n final INodeConnector mainConnector;\n EConnectionType connecType;\n if (source.isELTComponent()) {\n connecType = EConnectionType.TABLE;\n } else {\n connecType = EConnectionType.FLOW_MAIN;\n }\n mainConnector = source.getConnectorFromType(connecType);\n if (source.getConnectorFromName(connectorName).isMultiSchema()) {\n boolean connectionOk = false;\n while (!connectionOk) {\n connectionName = askForConnectionName(source.getLabel(), connectionName);\n if (connectionName.equals(\"String_Node_Str\")) {\n creatingConnection = false;\n dispose();\n return;\n }\n metaName = connectionName;\n newMetadata = new MetadataTable();\n newMetadata.setTableName(connectionName);\n newMetadata.setLabel(connectionName);\n newMetadata.setAttachedConnector(connectorName);\n if ((connecType.equals(EConnectionType.TABLE) || source.getProcess().checkValidConnectionName(connectionName)) && (ConnectionManager.canConnectToTarget(source, null, target, source.getConnectorFromName(connectorName).getDefaultConnectionType(), connectorName, connectionName))) {\n connectionOk = true;\n } else {\n String message = Messages.getString(\"String_Node_Str\", connectionName);\n MessageDialog.openError(null, Messages.getString(\"String_Node_Str\"), message);\n }\n }\n IElementParameter elementParameter = source.getElementParameter(\"String_Node_Str\");\n if (elementParameter != null) {\n Map<String, Object> map = new HashMap<String, Object>();\n Object[] itemsValue = elementParameter.getListItemsValue();\n String[] items = elementParameter.getListItemsDisplayCodeName();\n map.put(IEbcdicConstant.FIELD_CODE, newMetadata.getTableName());\n map.put(IEbcdicConstant.FIELD_SCHEMA, newMetadata.getTableName());\n for (int i = 1; i < items.length; i++) {\n map.put(items[i], ((IElementParameter) itemsValue[i]).getValue());\n }\n Object value = elementParameter.getValue();\n if (value instanceof List) {\n List list = (List) value;\n list.add(map);\n }\n ComponentSettings.switchToCurComponentSettingsView();\n }\n } else {\n newMetadata = null;\n if (source.isELTComponent()) {\n if (source.getComponent().getName().equals(\"String_Node_Str\")) {\n connectionName = askForConnectionSchemaAndTableName(source.getLabel(), connectionName);\n } else {\n connectionName = askForConnectionName(source.getLabel(), connectionName);\n }\n } else {\n metaName = source.getMetadataFromConnector(mainConnector.getName()).getTableName();\n String baseName = source.getConnectionName();\n if (source.getProcess().checkValidConnectionName(baseName)) {\n connectionName = source.getProcess().generateUniqueConnectionName(baseName);\n }\n }\n }\n }\n if (insertTMap) {\n metaName = connectionName;\n newMetadata = new MetadataTable();\n newMetadata.setTableName(connectionName);\n newMetadata.setLabel(connectionName);\n newMetadata.setAttachedConnector(connectorName);\n }\n boolean monitorConnection = false;\n if (newLineStyle == null) {\n newLineStyle = source.getConnectorFromName(connectorName).getDefaultConnectionType();\n }\n if (connection == null) {\n if (newMetadata != null) {\n source.getMetadataList().add(newMetadata);\n this.connection = new Connection(source, target, newLineStyle, connectorName, metaName, connectionName, monitorConnection);\n } else {\n this.connection = new Connection(source, target, newLineStyle, connectorName, metaName, connectionName, metaName, monitorConnection);\n }\n } else {\n this.connection = new Connection(source, target, newLineStyle, connectorName, metaName, connectionName, metaName, monitorConnection);\n }\n INodeConnector nodeConnectorSource, nodeConnectorTarget;\n nodeConnectorSource = connection.getSourceNodeConnector();\n nodeConnectorSource.setCurLinkNbOutput(nodeConnectorSource.getCurLinkNbOutput() + 1);\n nodeConnectorTarget = connection.getTargetNodeConnector();\n nodeConnectorTarget.setCurLinkNbInput(nodeConnectorTarget.getCurLinkNbInput() + 1);\n creatingConnection = false;\n ((Process) source.getProcess()).checkStartNodes();\n source.checkAndRefreshNode();\n boolean isJoblet = false;\n if (PluginChecker.isJobLetPluginLoaded()) {\n IJobletProviderService jobletService = (IJobletProviderService) GlobalServiceRegister.getDefault().getService(IJobletProviderService.class);\n if (jobletService != null && jobletService.isJobletComponent(target)) {\n jobletService.upateJobletComonentList(target);\n isJoblet = true;\n }\n }\n if (!isJoblet) {\n target.checkAndRefreshNode();\n }\n}\n"
|
"public boolean filter(Executable elem) throws Exception {\n Executable equivalentMethod = null;\n sd = (SymbolType) expression.getScope().getSymbolData();\n if (sd == null) {\n expression.getScope().accept(typeResolver, ctx);\n sd = (SymbolType) expression.getScope().getSymbolData();\n if (!expression.getIdentifier().equals(\"String_Node_Str\")) {\n ArrayFilter<Method> filter = new ArrayFilter<Method>(sd.getClazz().getMethods());\n filter.appendPredicate(new MethodsByNamePredicate(expression.getIdentifier()));\n methodCallCandidates = filter.filter();\n }\n }\n boolean found = false;\n if (!expression.getIdentifier().equals(\"String_Node_Str\")) {\n Iterator<Method> it = methodCallCandidates.iterator();\n while (it.hasNext() && !found) {\n Method md = it.next();\n int mdParameterCount = md.getParameterTypes().length;\n int elemParameterCount = elem.getParameterTypes().length;\n FunctionalGenericsBuilder<MethodReferenceExpr> builder = new FunctionalGenericsBuilder<MethodReferenceExpr>(md, typeResolver, getTypeMapping());\n builder.build(expression);\n SymbolType[] args = builder.getArgs();\n if (!Modifier.isStatic(md.getModifiers())) {\n if (mdParameterCount == elemParameterCount - 1) {\n SymbolType[] staticArgs = new SymbolType[args.length + 1];\n for (int i = 0; i < args.length; i++) {\n staticArgs[i + 1] = args[i];\n }\n staticArgs[0] = (SymbolType) sd;\n args = staticArgs;\n setTypeArgs(args);\n found = super.filter(elem);\n } else {\n Expression scope = expression.getScope();\n SymbolType stype = (SymbolType) scope.getSymbolData();\n boolean isField = stype.getField() != null;\n boolean isVariable = false;\n if (!isField) {\n String name = scope.toString();\n isVariable = (symTable.findSymbol(name, ReferenceType.VARIABLE) != null);\n }\n if ((isField || isVariable) && mdParameterCount == elemParameterCount) {\n setTypeArgs(args);\n found = super.filter(elem);\n }\n }\n } else if (mdParameterCount == elemParameterCount) {\n setTypeArgs(args);\n found = super.filter(elem);\n }\n if (found) {\n equivalentMethod = md;\n }\n }\n } else {\n Constructor<?>[] constructors = sd.getClazz().getConstructors();\n for (int i = 0; i < constructors.length && !found; i++) {\n FunctionalGenericsBuilder<MethodReferenceExpr> builder = new FunctionalGenericsBuilder<MethodReferenceExpr>(constructors[i], typeResolver, getTypeMapping());\n builder.build(expression);\n SymbolType[] args = builder.getArgs();\n setTypeArgs(args);\n found = super.filter(elem);\n if (found) {\n equivalentMethod = constructors[i];\n }\n }\n }\n if (found && elem instanceof Method) {\n Map<String, SymbolType> mapping = getTypeMapping();\n SymbolType realResultType = null;\n if (equivalentMethod instanceof Method) {\n realResultType = SymbolType.valueOf((Method) equivalentMethod, mapping);\n java.lang.reflect.Type genericReturnType = ((Method) elem).getGenericReturnType();\n resolveTypeMapping(genericReturnType, realResultType, mapping);\n }\n realResultType = SymbolType.valueOf(elem.getDeclaringClass(), mapping);\n expression.setSymbolData(realResultType);\n SymbolType st = SymbolType.valueOf((Method) elem, mapping);\n expression.setReferencedMethodSymbolData(st);\n expression.setReferencedArgsSymbolData(getTypeArgs());\n }\n return found;\n}\n"
|
"public IHyperlinkDetector[] getHyperlinkDetectors(ISourceViewer sourceViewer) {\n if (sourceViewer == null) {\n return null;\n return new IHyperlinkDetector[] { new URLHyperlinkDetector(), new AsciiDoctorEditorHyperlinkDetector(adaptable) };\n}\n"
|
"public Response getBuildPlanInstances(final String plan, final UriInfo uriInfo) {\n return this.planService.getPlanInstances(plan, uriInfo, csarId, serviceTemplate, null, PLAN_TYPE);\n}\n"
|
"public boolean equals(Object o) {\n if (this == o)\n return true;\n if (o == null || getClass() != o.getClass())\n return false;\n Movie movie = (Movie) o;\n if (imdbId != null ? !imdbId.equals(movie.imdbId) : movie.imdbId != null)\n return false;\n return title != null ? title.equals(movie.title) : movie.title == null;\n}\n"
|
"public void onStart() {\n super.onStart();\n refresh();\n}\n"
|
"protected void doRun() {\n IStructuredSelection selection = (IStructuredSelection) getSelection();\n IProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();\n if (repositoryNode == null && selection != null) {\n repositoryNode = (RepositoryNode) selection.getFirstElement();\n }\n DatabaseConnectionItem dbConnectionItem = null;\n ConnectionParameters connParameters = new ConnectionParameters();\n if (repositoryNode.getObjectType() == ERepositoryObjectType.METADATA_CONNECTIONS) {\n dbConnectionItem = (DatabaseConnectionItem) repositoryNode.getObject().getProperty().getItem();\n connParameters.setRepositoryName(repositoryNode.getObject().getLabel());\n connParameters.setRepositoryId(repositoryNode.getObject().getId());\n connParameters.setQuery(\"String_Node_Str\");\n } else if (repositoryNode.getObjectType() == ERepositoryObjectType.METADATA_CON_QUERY) {\n QueryRepositoryObject queryRepositoryObject = (QueryRepositoryObject) repositoryNode.getObject();\n dbConnectionItem = (DatabaseConnectionItem) queryRepositoryObject.getProperty().getItem();\n connParameters.setRepositoryName(dbConnectionItem.getProperty().getLabel());\n connParameters.setRepositoryId(dbConnectionItem.getProperty().getId());\n connParameters.setQueryObject(queryRepositoryObject.getQuery());\n connParameters.setQuery(queryRepositoryObject.getQuery().getValue());\n connParameters.setFirstOpenSqlBuilder(true);\n }\n Display display = Display.getCurrent();\n if (display == null) {\n display = Display.getDefault();\n }\n Shell parentShell = new Shell(display);\n TextUtil.setDialogTitle(TalendTextUtils.SQL_BUILDER_TITLE_REP);\n Connection connection = dbConnectionItem.getConnection();\n String selectedContext = null;\n if (connection.isContextMode()) {\n ContextItem contextItem = ContextUtils.getContextItemById2(connection.getContextId());\n if (contextItem != null && connection.isContextMode()) {\n ContextSetsSelectionDialog setsDialog = new ContextSetsSelectionDialog(null, contextItem, false);\n setsDialog.open();\n selectedContext = setsDialog.getSelectedContext();\n }\n }\n SQLBuilderDialog dial = new SQLBuilderDialog(parentShell, repositoryNode, selectedContext);\n dial.setReadOnly(true);\n if (connection instanceof DatabaseConnection) {\n IMetadataConnection imetadataConnection = ConvertionHelper.convert(connection, true);\n connParameters.setSchema(imetadataConnection.getSchema() == null ? \"String_Node_Str\" : imetadataConnection.getSchema());\n }\n connParameters.setNodeReadOnly(true);\n connParameters.setFromRepository(true);\n dial.setConnParameters(connParameters);\n dial.open();\n refresh(repositoryNode);\n}\n"
|
"private void validateNamespaceUri() {\n if (getMed().isBuiltIn() || getMed().isImported()) {\n this.namespaceUriError.setStatus(ValidationStatus.OK_STATUS);\n } else {\n this.namespaceUriError.setStatus(ModelExtensionDefinitionValidator.validateNamespaceUri(getMed().getNamespaceUri(), getRegistry().getAllNamespaceUris()));\n }\n updateMessage(this.namespaceUriError);\n}\n"
|
"public static Iterable<OProperty<?>> parseProperties(XMLEventReader2 reader, StartElement2 propertiesElement, EdmDataServices metadata, EdmStructuralType structuralType) {\n List<OProperty<?>> rt = new ArrayList<OProperty<?>>();\n while (reader.hasNext()) {\n XMLEvent2 event = reader.nextEvent();\n if (event.isEndElement() && event.asEndElement().getName().equals(propertiesElement.getName())) {\n return rt;\n }\n if (event.isStartElement() && event.asStartElement().getName().getNamespaceUri().equals(NS_DATASERVICES)) {\n String name = event.asStartElement().getName().getLocalPart();\n Attribute2 typeAttribute = event.asStartElement().getAttributeByName(M_TYPE);\n Attribute2 nullAttribute = event.asStartElement().getAttributeByName(M_NULL);\n boolean isNull = nullAttribute != null && \"String_Node_Str\".equals(nullAttribute.getValue());\n OProperty<?> op = null;\n EdmType et = null;\n if (typeAttribute != null) {\n String type = typeAttribute.getValue();\n et = metadata.resolveType(type);\n if (et == null) {\n throw new RuntimeException(\"String_Node_Str\" + type);\n }\n } else {\n EdmProperty property = (EdmProperty) structuralType.findProperty(name);\n if (property != null)\n et = property.getType();\n else\n et = EdmSimpleType.STRING;\n }\n if (et != null && (!et.isSimple())) {\n EdmStructuralType est = (EdmStructuralType) et;\n op = OProperties.complex(name, (EdmComplexType) et, isNull ? null : Enumerable.create(parseProperties(reader, event.asStartElement(), metadata, est)).toList());\n } else {\n op = OProperties.parseSimple(name, (EdmSimpleType<?>) et, isNull ? null : reader.getElementText());\n }\n rt.add(op);\n }\n }\n throw new RuntimeException();\n}\n"
|
"protected BigDecimal convertObjectToBigDecimal(Object sourceObject) throws ConversionException {\n if (sourceObject instanceof String) {\n String sourceString = (String) sourceObject;\n if (sourceString.length() == 0) {\n return BigDecimal.ZERO;\n } else if (sourceString.charAt(0) == PLUS) {\n return super.convertObjectToBigDecimal(sourceString.substring(1));\n }\n }\n return super.convertObjectToBigDecimal(sourceObject);\n}\n"
|
"protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {\n FormLayoutContainer formLayoutVertical = FormLayoutContainer.createVerticalFormLayout(\"String_Node_Str\", getTranslator());\n formLayout.add(formLayoutVertical);\n setFormTitle(\"String_Node_Str\");\n List<List<String>> mergedDataChanges = new ArrayList<List<String>>();\n textContainer = FormLayoutContainer.createCustomFormLayout(\"String_Node_Str\", getTranslator(), this.velocity_root + \"String_Node_Str\");\n formLayoutVertical.add(textContainer);\n boolean validChange = (Boolean) getFromRunContext(\"String_Node_Str\");\n textContainer.contextPut(\"String_Node_Str\", validChange);\n if (!validChange)\n return;\n List<Identity> selectedIdentities = (List<Identity>) getFromRunContext(\"String_Node_Str\");\n HashMap<String, String> attributeChangeMap = (HashMap<String, String>) getFromRunContext(\"String_Node_Str\");\n HashMap<String, String> roleChangeMap = (HashMap<String, String>) getFromRunContext(\"String_Node_Str\");\n Roles roles = ureq.getUserSession().getRoles();\n boolean isAdministrativeUser = (roles.isAuthor() || roles.isGroupManager() || roles.isUserManager() || roles.isOLATAdmin());\n userPropertyHandlers = UserManager.getInstance().getUserPropertyHandlersFor(usageIdentifyer, isAdministrativeUser);\n String[] securityGroups = { Constants.GROUP_USERMANAGERS, Constants.GROUP_GROUPMANAGERS, Constants.GROUP_AUTHORS, Constants.GROUP_ADMIN };\n for (Identity identity : selectedIdentities) {\n List<String> userDataArray = new ArrayList<String>();\n userDataArray.add(identity.getName());\n if (attributeChangeMap.containsKey(UserBulkChangeManager.PWD_IDENTIFYER)) {\n userDataArray.add(attributeChangeMap.get(UserBulkChangeManager.PWD_IDENTIFYER));\n } else\n userDataArray.add(\"String_Node_Str\");\n String userLanguage = identity.getUser().getPreferences().getLanguage();\n if (attributeChangeMap.containsKey(UserBulkChangeManager.LANG_IDENTIFYER)) {\n String inputLanguage = attributeChangeMap.get(UserBulkChangeManager.LANG_IDENTIFYER);\n if (userLanguage.equals(inputLanguage)) {\n userDataArray.add(userLanguage);\n } else {\n userDataArray.add(\"String_Node_Str\" + inputLanguage + \"String_Node_Str\");\n }\n } else {\n userDataArray.add(userLanguage);\n }\n Context vcContext = new VelocityContext();\n ubcMan.setUserContext(identity, vcContext, isAdministrativeUser);\n for (int k = 0; k < userPropertyHandlers.size(); k++) {\n String propertyName = userPropertyHandlers.get(k).getName();\n String userValue = identity.getUser().getProperty(propertyName, null);\n String inputFieldValue = \"String_Node_Str\";\n if (attributeChangeMap.containsKey(propertyName)) {\n inputFieldValue = attributeChangeMap.get(propertyName);\n inputFieldValue = inputFieldValue.replace(\"String_Node_Str\", \"String_Node_Str\");\n String evaluatedInputFieldValue = ubcMan.evaluateValueWithUserContext(inputFieldValue, vcContext);\n if (evaluatedInputFieldValue.equals(userValue)) {\n userDataArray.add(userValue);\n } else {\n userDataArray.add(\"String_Node_Str\" + evaluatedInputFieldValue + \"String_Node_Str\");\n }\n } else {\n userDataArray.add(userValue);\n }\n }\n for (String securityGroup : securityGroups) {\n String roleStatus = getRoleStatusForIdentity(identity, securityGroup, roleChangeMap);\n userDataArray.add(roleStatus);\n }\n userDataArray.add(roleChangeMap.get(\"String_Node_Str\"));\n mergedDataChanges.add(userDataArray);\n }\n FlexiTableColumnModel tableColumnModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();\n int colPos = 0;\n tableColumnModel.addFlexiColumnModel(new DefaultFlexiColumnModel(\"String_Node_Str\", colPos++));\n tableColumnModel.addFlexiColumnModel(new DefaultFlexiColumnModel(\"String_Node_Str\", colPos++));\n tableColumnModel.addFlexiColumnModel(new DefaultFlexiColumnModel(\"String_Node_Str\", colPos++));\n for (int j = 0; j < userPropertyHandlers.size(); j++) {\n UserPropertyHandler userPropertyHandler = userPropertyHandlers.get(j);\n tableColumnModel.addFlexiColumnModel(new DefaultFlexiColumnModel(userPropertyHandler.i18nColumnDescriptorLabelKey(), colPos++));\n }\n tableColumnModel.addFlexiColumnModel(new DefaultFlexiColumnModel(\"String_Node_Str\", colPos++));\n tableColumnModel.addFlexiColumnModel(new DefaultFlexiColumnModel(\"String_Node_Str\", colPos++));\n tableColumnModel.addFlexiColumnModel(new DefaultFlexiColumnModel(\"String_Node_Str\", colPos++));\n tableColumnModel.addFlexiColumnModel(new DefaultFlexiColumnModel(\"String_Node_Str\", colPos++));\n tableColumnModel.addFlexiColumnModel(new DefaultFlexiColumnModel(\"String_Node_Str\", colPos++));\n FlexiTableDataModel tableDataModel = new FlexiTableDataModelImpl<List<String>>(new OverviewModel(mergedDataChanges, colPos), tableColumnModel);\n uifactory.addTableElement(ureq, getWindowControl(), \"String_Node_Str\", tableDataModel, formLayoutVertical);\n Set<Long> allGroups = new HashSet<Long>();\n List<Long> ownGroups = (List<Long>) getFromRunContext(\"String_Node_Str\");\n List<Long> partGroups = (List<Long>) getFromRunContext(\"String_Node_Str\");\n allGroups.addAll(ownGroups);\n allGroups.addAll(partGroups);\n List<Long> mailGroups = (List<Long>) getFromRunContext(\"String_Node_Str\");\n if (allGroups.size() != 0) {\n uifactory.addSpacerElement(\"String_Node_Str\", formLayout, true);\n uifactory.addStaticTextElement(\"String_Node_Str\", \"String_Node_Str\", formLayout);\n FlexiTableColumnModel groupColumnModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();\n groupColumnModel.addFlexiColumnModel(new DefaultFlexiColumnModel(\"String_Node_Str\", 0));\n groupColumnModel.addFlexiColumnModel(new DefaultFlexiColumnModel(\"String_Node_Str\", 1));\n groupColumnModel.addFlexiColumnModel(new DefaultFlexiColumnModel(\"String_Node_Str\", 2));\n groupColumnModel.addFlexiColumnModel(new DefaultFlexiColumnModel(\"String_Node_Str\", 3));\n List<BusinessGroup> groups = businessGroupService.loadBusinessGroups(allGroups);\n TableDataModel<BusinessGroup> model = new GroupAddOverviewModel(groups, ownGroups, partGroups, mailGroups, getTranslator());\n FlexiTableDataModel groupDataModel = new FlexiTableDataModelImpl<BusinessGroup>(model, groupColumnModel);\n uifactory.addTableElement(ureq, \"String_Node_Str\", groupDataModel, formLayout);\n }\n}\n"
|
"protected double calculateNumericalMean() {\n final double a = getAlpha();\n return a / (a + getBeta());\n}\n"
|
"public void setPaths(String... paths) {\n mp = new MultiLineProperties();\n List<NutResource> list = Scans.me().loadResource(\"String_Node_Str\", paths);\n try {\n if (utf8)\n for (NutResource nr : list) mp.load(nr.getReader(), false);\n else {\n Properties p = new Properties();\n for (NutResource nr : list) {\n p.load(nr.getInputStream());\n }\n mp.putAll(p);\n }\n } catch (IOException e) {\n throw Lang.wrapThrow(e);\n }\n}\n"
|
"public RenderPipelineTask generateTask() {\n if (enabled) {\n if (enablingTask == null) {\n enablingTask = new SetWireframeTask(true);\n }\n return enablingTask;\n } else {\n return new SetWireframeTask(DISABLED);\n }\n}\n"
|
"void loadPyFunc() throws InternalException {\n if (name.startsWith(\"String_Node_Str\"))\n pyname = name.substring(\"String_Node_Str\".length());\n else\n pyname = name;\n if (pyname.indexOf('.') >= 0)\n throw new InternalException(\"String_Node_Str\" + pyname);\n pyfunc = PyInterp.load(pyname);\n if (pyfunc == null)\n throw new InternalException(\"String_Node_Str\" + name);\n if (pyfunc.func_defaults != null && pyfunc.func_defaults.length > 0)\n throw new InternalException(\"String_Node_Str\" + pyname);\n CompilerFlags f = ((PyBaseCode) pyfunc.func_code).co_flags;\n if (f.isFlagSet(CodeFlag.CO_VARARGS) || f.isFlagSet(CodeFlag.CO_VARKEYWORDS)) {\n throw new InternalException(\"String_Node_Str\" + pyname);\n }\n if (!(pyfunc.func_code instanceof PyBaseCode)) {\n throw new InternalException(\"String_Node_Str\" + pyfunc.func_code.getClass().getSimpleName() + \"String_Node_Str\" + pyname);\n }\n int idx = PyInvoke.getRegisteredIdx(pyfunc);\n if (idx < 0) {\n if (pyfuncIdx < 0)\n pyfuncIdx = IdFactory.nextPyFuncId();\n PyInvoke.register(pyfuncIdx, pyfunc);\n } else {\n pyfuncIdx = idx;\n }\n}\n"
|
"public File getDestDirectory() {\n MavenSession session = legacySupport.getSession();\n MavenProject project = session.getCurrentProject();\n File location = new File(project.getBuild().getDirectory() + File.separator + project.getBuild().getFinalName());\n Plugin warPlugin = project.getPlugin(\"String_Node_Str\");\n if (warPlugin != null) {\n Xpp3Dom warPluginConfig = (Xpp3Dom) warPlugin.getConfiguration();\n if (warPluginConfig != null) {\n Xpp3Dom warConfigElement = warPluginConfig.getChild(\"String_Node_Str\");\n if (warConfigElement != null) {\n String webappDir = warConfigElement.getValue();\n if (webappDir != null && !webappDir.isEmpty()) {\n location = new File(webappDir);\n }\n }\n }\n }\n return location;\n}\n"
|
"public double getLongitude() {\n return Utils.getNative(lng, 0.0D);\n}\n"
|
"public boolean equals(Object other) {\n if (other == this)\n return true;\n if (other instanceof Post) {\n Post otherPost = (Post) other;\n return (this.localTablePostId == otherPost.localTablePostId && this.isPage == otherPost.isPage && this.localTableBlogId == otherPost.localTableBlogId);\n } else {\n return false;\n }\n}\n"
|
"private void putChild(String childName, ConfigNode newChild) {\n removeChild(childName);\n int index = 0;\n for (ConfigNode node : children) {\n int compare = node.toString().compareToIgnoreCase(id);\n if (compare >= 0) {\n break;\n } else {\n index++;\n }\n }\n children.add(index, newChild);\n}\n"
|
"public void init() {\n if (configuration == null || configuration.isDefaultConfiguration()) {\n if (dataSetDescription != null && dataSetDescription.isTransposeMatrix()) {\n if (configuration.isDefaultConfiguration()) {\n IDType.unregisterType(recordIDType);\n IDType.unregisterType(dimensionIDType);\n IDType.unregisterType(recordGroupIDType);\n IDType.unregisterType(dimensionGroupIDType);\n }\n createDefaultConfigurationWithColumnsAsRecords();\n } else\n createDefaultConfiguration();\n }\n boolean externalMappingLoaded = false;\n if (configuration.mappingFile != null) {\n IDMappingLoader.get().loadMappingFile(configuration.mappingFile);\n externalMappingLoaded = true;\n }\n if (externalMappingLoaded) {\n recordIDCategory = IDCategory.getIDCategory(configuration.recordIDCategory);\n dimensionIDCategory = IDCategory.getIDCategory(configuration.dimensionIDCategory);\n humanReadableRecordIDType = IDType.getIDType(configuration.humanReadableRecordIDType);\n humanReadableDimensionIDType = IDType.getIDType(configuration.humanReadableDimensionIDType);\n } else {\n recordIDCategory = IDCategory.registerCategory(configuration.recordIDCategory);\n dimensionIDCategory = IDCategory.registerCategory(configuration.dimensionIDCategory);\n humanReadableRecordIDType = IDType.registerType(configuration.humanReadableRecordIDType, recordIDCategory, EColumnType.STRING);\n humanReadableDimensionIDType = IDType.registerType(configuration.humanReadableDimensionIDType, dimensionIDCategory, EColumnType.STRING);\n }\n recordIDType = IDType.registerType(\"String_Node_Str\" + dataDomainID + \"String_Node_Str\" + hashCode(), recordIDCategory, EColumnType.INT);\n recordIDType.setInternalType(true);\n dimensionIDType = IDType.registerType(\"String_Node_Str\" + dataDomainID + \"String_Node_Str\" + hashCode(), dimensionIDCategory, EColumnType.INT);\n dimensionIDType.setInternalType(true);\n recordGroupIDCategory = IDCategory.registerCategory(recordIDCategory.getCategoryName() + \"String_Node_Str\");\n recordGroupIDType = IDType.registerType(\"String_Node_Str\" + dataDomainID + \"String_Node_Str\" + hashCode(), recordGroupIDCategory, EColumnType.INT);\n recordGroupIDType.setInternalType(true);\n dimensionGroupIDType = IDType.registerType(\"String_Node_Str\" + dataDomainID + \"String_Node_Str\" + hashCode(), dimensionIDCategory, EColumnType.INT);\n IDType primaryRecordMappingType;\n if (configuration.primaryRecordMappingType != null) {\n IDType.getIDType(configuration.primaryRecordMappingType);\n primaryRecordMappingType = IDType.getIDType(configuration.primaryRecordMappingType);\n } else\n primaryRecordMappingType = recordIDType;\n recordIDCategory.setPrimaryMappingType(primaryRecordMappingType);\n IDType primaryDimensionMappingType;\n if (configuration.primaryDimensionMappingType != null)\n primaryDimensionMappingType = IDType.getIDType(configuration.primaryDimensionMappingType);\n else\n primaryDimensionMappingType = dimensionIDType;\n dimensionIDCategory.setPrimaryMappingType(primaryDimensionMappingType);\n recordDenominationPlural = configuration.recordDenominationPlural;\n recordDenominationSingular = configuration.recordDenominationSingular;\n dimensionDenominationPlural = configuration.dimensionDenominationPlural;\n dimensionDenominationSingular = configuration.dimensionDenominationSingular;\n recordIDMappingManager = IDMappingManagerRegistry.get().getIDMappingManager(recordIDCategory);\n dimensionIDMappingManager = IDMappingManagerRegistry.get().getIDMappingManager(dimensionIDCategory);\n recordSelectionManager = new RecordSelectionManager(recordIDType);\n dimensionSelectionManager = new DimensionSelectionManager(dimensionIDType);\n recordGroupSelectionManager = new SelectionManager(recordGroupIDType);\n addIDCategory(dimensionIDCategory);\n addIDCategory(recordIDCategory);\n super.init();\n}\n"
|
"public Map<String, List<KafkaStream<byte[], byte[]>>> getConsumerMapWithMessageStreams() {\n if (consumerMetadata.getValueDecoder() != null && consumerMetadata.getKeyDecoder() != null) {\n return getConsumerConnector().createMessageStreams(consumerMetadata.getTopicStreamMap(), consumerMetadata.getKeyDecoder(), consumerMetadata.getValueDecoder());\n }\n return getConsumerConnector().createMessageStreams(consumerMetadata.getTopicStreamMap());\n}\n"
|
"public void onSurfaceCreated(GL10 gl, EGLConfig config) {\n gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_FASTEST);\n gl.glClearColor(0.1f, 0.1f, 0.1f, 1.0f);\n gl.glShadeModel(GL10.GL_FLAT);\n gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);\n gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);\n gl.glEnable(GL10.GL_TEXTURE_2D);\n gl.glEnable(GL10.GL_SCISSOR_TEST);\n gl.glDisable(GL10.GL_CULL_FACE);\n gl.glDisable(GL10.GL_DITHER);\n gl.glDisable(GL10.GL_LIGHTING);\n gl.glDisable(GL10.GL_DEPTH_TEST);\n gl.glDisable(GL10.GL_FOG);\n gl.glTexEnvx(GL10.GL_TEXTURE_ENV, GL10.GL_TEXTURE_ENV_MODE, GL10.GL_MODULATE);\n gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);\n gl.glEnable(GL10.GL_BLEND);\n gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);\n String extensions = gl.glGetString(GL10.GL_EXTENSIONS);\n String version = gl.glGetString(GL10.GL_VERSION);\n String renderer = gl.glGetString(GL10.GL_RENDERER);\n boolean isSoftwareRenderer = renderer.contains(\"String_Node_Str\");\n boolean isOpenGL10 = version.contains(\"String_Node_Str\");\n boolean supportsDrawTexture = extensions.contains(\"String_Node_Str\");\n boolean supportsVBOs = !isSoftwareRenderer && (!isOpenGL10 || extensions.contains(\"String_Node_Str\"));\n FP.supportsDrawTexture = supportsDrawTexture;\n FP.supportsVBOs = supportsVBOs;\n Log.d(TAG, \"String_Node_Str\" + version + \"String_Node_Str\" + renderer + \"String_Node_Str\" + (supportsDrawTexture ? \"String_Node_Str\" : \"String_Node_Str\") + (supportsVBOs ? \"String_Node_Str\" : \"String_Node_Str\"));\n if (mEngine == null) {\n try {\n mEngine = engine_class.getConstructor(Integer.TYPE, Integer.TYPE, Float.TYPE, Boolean.TYPE).newInstance(static_width, static_height, FP.assignedFrameRate, FP.fixed);\n } catch (IllegalArgumentException e) {\n e.printStackTrace();\n } catch (SecurityException e) {\n e.printStackTrace();\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n } else {\n mFPS.reload();\n mUpdate.reload();\n mRender.reload();\n }\n}\n"
|
"protected void paintTabBackground(final Graphics g, final int tabPlacement, final int tabIndex, final int x, final int y, final int w, final int h, final boolean isSelected) {\n final Graphics2D g2d = (Graphics2D) g;\n final Object aa = GraphicsUtils.setupAntialias(g2d);\n final GeneralPath borderShape = createTabShape(TabShapeType.border, tabPlacement, x, y, w, h, isSelected);\n if (tabbedPaneStyle.equals(TabbedPaneStyle.standalone)) {\n final GeneralPath shadeShape = createTabShape(TabShapeType.shade, tabPlacement, x, y, w, h, isSelected);\n GraphicsUtils.drawShade(g2d, shadeShape, StyleConstants.shadeColor, shadeWidth, new Rectangle2D.Double(0, 0, tabPane.getWidth(), y + h), round > 0);\n }\n final GeneralPath bgShape = createTabShape(TabShapeType.background, tabPlacement, x, y, w, h, isSelected);\n if (backgroundPainterAt.containsKey(tabIndex) && isSelected) {\n final Shape old = GraphicsUtils.intersectClip(g2d, bgShape);\n final Painter bp = backgroundPainterAt.get(tabIndex);\n bp.paint(g2d, new Rectangle(x, y, w, h), tabPane);\n GraphicsUtils.restoreClip(g2d, old);\n } else {\n final Point topPoint = getTopTabBgPoint(tabPlacement, x, y, w, h);\n final Point bottomPoint = getBottomTabBgPoint(tabPlacement, x, y, w, h);\n if (isSelected) {\n if (forceUseSelectedTabBgColors) {\n g2d.setPaint(new GradientPaint(topPoint.x, topPoint.y, selectedTopBg, bottomPoint.x, bottomPoint.y, selectedBottomBg));\n } else {\n Color bg = tabPane.getBackgroundAt(tabIndex);\n bg = bg != null ? bg : tabPane.getBackground();\n g2d.setPaint(new GradientPaint(topPoint.x, topPoint.y, selectedTopBg, bottomPoint.x, bottomPoint.y, bg));\n }\n } else {\n g2d.setPaint(new GradientPaint(topPoint.x, topPoint.y, topBg, bottomPoint.x, bottomPoint.y, bottomBg));\n }\n g2d.fill(isSelected ? borderShape : bgShape);\n }\n g2d.setPaint(tabBorderColor);\n g2d.draw(borderShape);\n final boolean drawFocus = isSelected && tabPane.isFocusOwner();\n if (tabbedPaneStyle.equals(TabbedPaneStyle.standalone)) {\n LafUtils.drawCustomWebFocus(g2d, null, StyleConstants.focusType, borderShape, null, drawFocus);\n }\n GraphicsUtils.restoreAntialias(g2d, aa);\n}\n"
|
"public void onViewCreated(View view, Bundle savedInstanceState) {\n super.onViewCreated(view, savedInstanceState);\n final Context context = getActivity().getApplicationContext();\n typeSpinner.setSelection(commandAdapter.getPosition(MissionItemType.SPLINE_WAYPOINT));\n SplineWaypoint item = (SplineWaypoint) this.itemRender.getMissionItem();\n final NumericWheelAdapter delayAdapter = new NumericWheelAdapter(context, 0, 60, \"String_Node_Str\");\n delayAdapter.setItemResource(R.layout.wheel_text_centered);\n final CardWheelHorizontalView delayPicker = (CardWheelHorizontalView) view.findViewById(R.id.waypointDelayPicker);\n delayPicker.setViewAdapter(delayAdapter);\n delayPicker.setCurrentValue((int) item.getDelay());\n delayPicker.addChangingListener(this);\n final NumericWheelAdapter altitudeAdapter = new NumericWheelAdapter(context, MIN_ALTITUDE, MAX_ALTITUDE, \"String_Node_Str\");\n altitudeAdapter.setItemResource(R.layout.wheel_text_centered);\n final CardWheelHorizontalView altitudePicker = (CardWheelHorizontalView) view.findViewById(R.id.altitudePicker);\n altitudePicker.setViewAdapter(altitudeAdapter);\n altitudePicker.setCurrentItem(altitudeAdapter.getItemIndex((int) item.getCoordinate().getAltitude().valueInMeters()));\n altitudePicker.addChangingListener(this);\n}\n"
|
"public int see(int fromIndex, int toIndex, int pieceMoved, int targetPiece) {\n int d = 0;\n long mayXray = pawns | bishops | rooks | queens;\n long fromSquare = 0x1L << fromIndex;\n long all = getAll();\n long attacks = bbAttacks.getIndexAttacks(this, toIndex);\n long fromCandidates;\n seeGain[d] = SEE_PIECE_VALUES[targetPiece];\n do {\n long side = (d & 1) == 0 ? getOthers() : getMines();\n d++;\n seeGain[d] = SEE_PIECE_VALUES[pieceMoved] - seeGain[d - 1];\n attacks ^= fromSquare;\n all ^= fromSquare;\n if ((fromSquare & mayXray) != 0) {\n attacks |= bbAttacks.getXrayAttacks(this, toIndex, all);\n }\n if ((fromCandidates = attacks & pawns & side) != 0) {\n pieceMoved = Move.PAWN;\n } else if ((fromCandidates = attacks & knights & side) != 0) {\n pieceMoved = Move.KNIGHT;\n } else if ((fromCandidates = attacks & bishops & side) != 0) {\n pieceMoved = Move.BISHOP;\n } else if ((fromCandidates = attacks & rooks & side) != 0) {\n pieceMoved = Move.ROOK;\n } else if ((fromCandidates = attacks & queens & side) != 0) {\n pieceMoved = Move.QUEEN;\n } else if ((fromCandidates = attacks & kings & side) != 0) {\n pieceMoved = Move.KING;\n }\n fromSquare = BitboardUtils.lsb(fromCandidates);\n } while (fromSquare != 0);\n while (--d != 0) {\n seeGain[d - 1] = -Math.max(-seeGain[d - 1], seeGain[d]);\n }\n return seeGain[0];\n}\n"
|
"public int hashCode() {\n return Objects.hash(interceptors, retriableExceptions, nonRetriableExceptions, retryInfo);\n}\n"
|
"public void go() throws Exception {\n final Channel.Enumerator enumerator = ioManager.createChannelEnumerator();\n List<Channel.ID> channelIDs = new ArrayList<Channel.ID>();\n outputSegments = memoryManager.allocate(UnilateralSortMerger.this.parent, 2, ioMemorySize / 2);\n freeSegmentsAtShutdown(outputSegments);\n CircularElement element = null;\n while (isRunning() && (element = queues.spill.take()) != SENTINEL) {\n Channel.ID channel = enumerator.next();\n channelIDs.add(channel);\n ChannelWriter writer = ioManager.createChannelWriter(channel, outputSegments);\n LOG.debug(\"String_Node_Str\" + element.id + \"String_Node_Str\");\n element.buffer.writeToChannel(writer);\n LOG.debug(\"String_Node_Str\" + element.id + \"String_Node_Str\");\n outputSegments = writer.close();\n element.buffer.reset();\n queues.empty.put(element);\n }\n LOG.debug(\"String_Node_Str\");\n LOG.debug(\"String_Node_Str\");\n memoryManager.release(outputSegments);\n LOG.debug(\"String_Node_Str\");\n while (!queues.empty.isEmpty()) {\n memoryManager.release(queues.empty.take().buffer.unbind());\n }\n while (channelIDs.size() > maxNumFileHandles) {\n channelIDs = mergeChannelList(channelIDs, ioMemorySize);\n }\n lazyIterator.setTarget(getMergingIterator(channelIDs, ioMemorySize));\n LOG.debug(\"String_Node_Str\");\n}\n"
|
"public void testEditSubmission() throws Exception {\n restoreTypicalDataInDatastore();\n String methodName = \"String_Node_Str\";\n Class<?>[] paramTypes = new Class<?>[] { SubmissionData.class };\n SubmissionData s = new SubmissionData();\n s.course = \"String_Node_Str\";\n s.evaluation = \"String_Node_Str\";\n s.reviewer = \"String_Node_Str\";\n Object[] params = new Object[] { s };\n loginAsAdmin(\"String_Node_Str\");\n EvaluationData evaluation = logic.getEvaluation(s.course, s.evaluation);\n assertEquals(EvalStatus.OPEN, evaluation.getStatus());\n logoutUser();\n verifyCannotAccess(USER_TYPE_NOT_LOGGED_IN, methodName, \"String_Node_Str\", paramTypes, params);\n verifyCannotAccess(USER_TYPE_UNREGISTERED, methodName, \"String_Node_Str\", paramTypes, params);\n verifyCannotAccess(USER_TYPE_STUDENT, methodName, \"String_Node_Str\", paramTypes, params);\n verifyCanAccess(USER_TYPE_STUDENT, methodName, \"String_Node_Str\", paramTypes, params);\n verifyCannotAccess(USER_TYPE_COORD, methodName, \"String_Node_Str\", paramTypes, params);\n verifyCanAccess(USER_TYPE_COORD, methodName, \"String_Node_Str\", paramTypes, params);\n loginAsAdmin(\"String_Node_Str\");\n evaluation.endTime = Common.getDateOffsetToCurrentTime(-1);\n assertEquals(EvalStatus.CLOSED, evaluation.getStatus());\n BackDoorLogic backDoorLogic = new BackDoorLogic();\n backDoorLogic.editEvaluation(evaluation);\n logoutUser();\n verifyCannotAccess(USER_TYPE_STUDENT, methodName, \"String_Node_Str\", paramTypes, params);\n verifyCanAccess(USER_TYPE_COORD, methodName, \"String_Node_Str\", paramTypes, params);\n ______TS(\"String_Node_Str\");\n restoreTypicalDataInDatastore();\n SubmissionData sub1 = dataBundle.submissions.get(\"String_Node_Str\");\n alterSubmission(sub1);\n invokeEditSubmission(sub1);\n verifyPresentInDatastore(sub1);\n ______TS(\"String_Node_Str\");\n try {\n invokeEditSubmission(null);\n } catch (Exception e) {\n assertEquals(NullPointerException.class, e.getCause().getClass());\n }\n ______TS(\"String_Node_Str\");\n sub1.evaluation = \"String_Node_Str\";\n try {\n invokeEditSubmission(sub1);\n } catch (Exception e) {\n assertEquals(EntityDoesNotExistException.class, e.getCause().getClass());\n }\n}\n"
|
"public List<SuspiciousCode> getSuspicious(String packageToInst, String mutatorIdentifier) throws FileNotFoundException, IOException {\n if (getProperties().getFailingTestCases() == null || \"String_Node_Str\".equals(getProperties().getFailingTestCases().isEmpty())) {\n new IllegalArgumentException(\"String_Node_Str\");\n }\n logger.info(\"String_Node_Str\" + getOutDirWithPrefix(mutatorIdentifier) + \"String_Node_Str\" + getProperties().getFailingTestCases());\n List<String> listTOInst = new ArrayList<String>();\n listTOInst.add(packageToInst);\n HashSet<String> hs = new HashSet<String>();\n hs.add(getOutDirWithPrefix(mutatorIdentifier));\n List<SuspiciousCode> suspiciousStatemens = faultLocalizationFacade.searchGZoltar(getOutDirWithPrefix(mutatorIdentifier), getProperties().getFailingTestCases(), listTOInst, hs, ConfigurationProperties.getProperty(\"String_Node_Str\") + \"String_Node_Str\" + ConfigurationProperties.getProperty(\"String_Node_Str\"));\n return suspiciousStatemens;\n}\n"
|
"private boolean isFullyGrown(IBlockState state) {\n return ((Integer) state.getValue(STAGE)) == TOTAL_GROW_TICKS || ((PlantHalf) state.getValue(BlockTallPlant.HALF)) == PlantHalf.UPPER;\n}\n"
|
"static DetailledItem parseResult(String html, JSONObject data) {\n Document doc = Jsoup.parse(html);\n doc.setBaseUri(data.optString(\"String_Node_Str\"));\n DetailedItem result = new DetailedItem();\n if (doc.select(\"String_Node_Str\").size() == 1) {\n result.setCover(doc.select(\"String_Node_Str\").get(0).attr(\"String_Node_Str\"));\n }\n result.setTitle(doc.select(\"String_Node_Str\").text());\n Elements detailtrs = doc.select(\"String_Node_Str\");\n for (int i = 0; i < detailtrs.size(); i++) {\n Element tr = detailtrs.get(i);\n if (tr.child(0).hasClass(\"String_Node_Str\")) {\n String title = tr.child(0).text();\n String content = tr.child(1).text();\n if (title.equals(\"String_Node_Str\") || title.equals(\"String_Node_Str\")) {\n try {\n if (tr.child(1).select(\"String_Node_Str\").size() > 0) {\n Element link = tr.child(1).select(\"String_Node_Str\").first();\n List<NameValuePair> query = URLEncodedUtils.parse(new URI(link.absUrl(\"String_Node_Str\")), \"String_Node_Str\");\n for (NameValuePair q : query) {\n if (q.getName().equals(\"String_Node_Str\")) {\n result.setCollectionId(q.getValue());\n }\n }\n }\n } catch (URISyntaxException e) {\n }\n } else {\n if (content.contains(\"String_Node_Str\") && tr.child(1).select(\"String_Node_Str\").size() > 0) {\n content += \"String_Node_Str\" + tr.child(1).select(\"String_Node_Str\").first().attr(\"String_Node_Str\");\n }\n result.addDetail(new Detail(title, content));\n }\n }\n }\n Elements detailcenterlinks = doc.select(\"String_Node_Str\");\n for (int i = 0; i < detailcenterlinks.size(); i++) {\n Element a = detailcenterlinks.get(i);\n result.addDetail(new Detail(a.text().trim(), a.absUrl(\"String_Node_Str\")));\n }\n try {\n JSONObject copymap = new JSONObject();\n if (data.has(\"String_Node_Str\")) {\n copymap = data.getJSONObject(\"String_Node_Str\");\n } else {\n Elements ths = doc.select(\"String_Node_Str\");\n for (int i = 0; i < ths.size(); i++) {\n Element th = ths.get(i);\n String head = th.text().trim();\n if (head.equals(\"String_Node_Str\")) {\n copymap.put(\"String_Node_Str\", i);\n } else if (head.equals(\"String_Node_Str\")) {\n copymap.put(\"String_Node_Str\", i);\n } else if (head.equals(\"String_Node_Str\") || head.equals(\"String_Node_Str\")) {\n copymap.put(\"String_Node_Str\", i);\n } else if (head.equals(\"String_Node_Str\")) {\n copymap.put(\"String_Node_Str\", i);\n } else if (head.equals(\"String_Node_Str\") || head.equals(\"String_Node_Str\")) {\n copymap.put(\"String_Node_Str\", i);\n } else if (head.equals(\"String_Node_Str\")) {\n copymap.put(\"String_Node_Str\", i);\n } else if (head.equals(\"String_Node_Str\") || head.matches(\"String_Node_Str\")) {\n copymap.put(\"String_Node_Str\", i);\n } else if (head.equals(\"String_Node_Str\") || head.equals(\"String_Node_Str\")) {\n copymap.put(\"String_Node_Str\", i);\n }\n }\n }\n Elements exemplartrs = doc.select(\"String_Node_Str\");\n DateTimeFormatter fmt = DateTimeFormat.forPattern(\"String_Node_Str\").withLocale(Locale.GERMAN);\n for (int i = 0; i < exemplartrs.size(); i++) {\n Element tr = exemplartrs.get(i);\n Copy copy = new Copy();\n Iterator<?> keys = copymap.keys();\n while (keys.hasNext()) {\n String key = (String) keys.next();\n int index;\n try {\n index = copymap.has(key) ? copymap.getInt(key) : -1;\n } catch (JSONException e1) {\n index = -1;\n }\n if (index >= 0) {\n try {\n copy.set(key, tr.child(index).text(), fmt);\n } catch (IllegalArgumentException e) {\n e.printStackTrace();\n }\n }\n }\n result.addCopy(copy);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n try {\n Elements bandtrs = doc.select(\"String_Node_Str\");\n for (int i = 0; i < bandtrs.size(); i++) {\n Element tr = bandtrs.get(i);\n Volume volume = new Volume();\n volume.setId(tr.attr(\"String_Node_Str\").split(\"String_Node_Str\")[1]);\n volume.setTitle(tr.text());\n result.addVolume(volume);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n if (doc.select(\"String_Node_Str\").size() == 1) {\n result.setReservable(true);\n result.setReservation_info(doc.select(\"String_Node_Str\").attr(\"String_Node_Str\"));\n }\n return result;\n}\n"
|
"private static PlanSkeleton buildCamp(SuperFace sf, Double cap) {\n Plan plan = new Plan();\n LoopL<Bar> loopl = new LoopL();\n Loop<Bar> loop = new Loop();\n loopl.add(loop);\n Cache<Point2d, Point2d> cache = new Cache<Point2d, Point2d>() {\n public Point2d create(Point2d i) {\n return new Point2d(i.x, i.y);\n }\n };\n LoopL<HalfEdge> edges = sf.findHoles();\n LoopL<Point2d> lpd = new LoopL();\n for (Loop<HalfEdge> loopHE : edges) {\n Map<Point2d, SuperEdge> ses = new HashMap();\n Loop<Point2d> lp = new Loop();\n lpd.add(lp);\n for (HalfEdge he : loopHE) {\n SuperEdge se = (SuperEdge) he;\n lp.append(se.start);\n ses.put(se.start, se);\n }\n lp = Loopz.mergeAdjacentEdges2(lp, 0.001);\n for (Loopable<Point2d> lpb : lp.loopableIterator()) {\n Bar b = new Bar(cache.get(lpb.getNext().get()), cache.get(lpb.get()));\n SuperEdge se = ses.get(lpb.get());\n Profile profile = null;\n if (se.prof == null || se.prof.size() < 2) {\n List<Point2d> defpts = new ArrayList<>();\n defpts.add(new Point2d(0, 0));\n defpts.add(new Point2d(0, -sf.height * 1.2));\n profile = new Profile(defpts);\n } else {\n profile = toProfile(se.prof);\n }\n tagWalls((SuperFace) se.face, profile, se, lpb.get(), lpb.getNext().get());\n plan.addLoop(profile.points.get(0), plan.root, profile);\n b.tags.add(new SETag(se, sf));\n loop.prepend(b);\n plan.profiles.put(b, profile);\n }\n }\n plan.points = loopl;\n if (cap != null) {\n Ship s = new FlatRoofShip(cap, plan);\n for (Profile prof : plan.profiles.values()) {\n for (Loop<Bar> lb : prof.points) {\n boolean addedMarker = false;\n for (Bar b : lb) {\n if (-b.start.y < cap && -b.end.y > cap || (!addedMarker && b == lb.start.getPrev().get())) {\n Marker m = new Marker();\n m.set(b.toLine().xAtY(-cap), -cap);\n m.bar = b;\n m.bar.mould.create(m, null);\n Instance i = s.newInstance();\n i.anchors[0].setProfileGen(m.generator);\n addedMarker = true;\n }\n }\n }\n }\n plan.ships.add(s);\n }\n PlanSkeleton skel = new PlanSkeleton(plan);\n skel.skeleton();\n return skel;\n}\n"
|
"public static String getVersionNumber() {\n String maj = getMajorVersion();\n String min = getMinorVersion();\n String upd = getUpdateVersion();\n String v;\n try {\n if (min != null && min.length() > 0 && Integer.parseInt(min) >= 0) {\n if (upd != null && upd.length() > 0 && Integer.parseInt(upd) >= 0) {\n v = maj + \"String_Node_Str\" + min + \"String_Node_Str\" + upd;\n } else {\n v = maj + \"String_Node_Str\" + min;\n }\n } else {\n if (upd != null && upd.length() > 0 && Integer.parseInt(upd) >= 0) {\n v = maj + \"String_Node_Str\" + upd;\n } else {\n v = maj;\n }\n }\n } catch (NumberFormatException nfe) {\n v = maj;\n }\n return v;\n}\n"
|
"public void run() {\n if (!teamChat.isDisposed())\n teamChat.setStatus(user.getNickname() + \"String_Node_Str\");\n}\n"
|
"public void fill(GL3 gl, ByteBuffer buff, int target, int usage) {\n setInfo(target, buff.limit() * GLSupport.BYTE_SIZE, usage);\n gl.glBindBuffer(target, boId);\n gl.glBufferData(target, buff.limit() * Byte.BYTES, buff, usage);\n}\n"
|
"public boolean hasTables() {\n return dbTables.size() != 0;\n}\n"
|
"public void messageReceived(MessageReceivedEvent evt) {\n Contact sourceContact = evt.getSourceContact();\n this.processMessage(sourceContact, evt.getTimestamp(), Constants.INCOMING_MESSAGE, evt.getSourceMessage().getContent(), evt.getSourceMessage().getContentType());\n}\n"
|
"public static File validateSettingsDirectory(File dir) throws IOException {\n dir = dir.getAbsoluteFile();\n if (!dir.isDirectory()) {\n dir.delete();\n if (!dir.mkdirs())\n throw new IOException(\"String_Node_Str\" + dir);\n }\n if (!dir.canWrite())\n throw new IOException(\"String_Node_Str\" + dir);\n if (!dir.canRead())\n throw new IOException(\"String_Node_Str\");\n return dir;\n}\n"
|
"public void run() {\n Player p = Bukkit.getPlayer(playername);\n if (p != null) {\n Util.teleportPlayerFixed(p, arena.getMainLobbyTemp());\n pli.getSpectatorManager().setSpectate(p, false);\n if (!p.isOp()) {\n p.setFlying(false);\n p.setAllowFlight(false);\n }\n }\n}\n"
|
"protected <R> R read(final CratePersistentEntity<R> entity, final CrateDocument source, final Object parent) {\n final DefaultSpELExpressionEvaluator evaluator = new DefaultSpELExpressionEvaluator(source, spELContext);\n ParameterValueProvider<CratePersistentProperty> provider = getParameterProvider(entity, source, evaluator, parent);\n EntityInstantiator instantiator = instantiators.getInstantiatorFor(entity);\n R instance = instantiator.createInstance(entity, provider);\n final BeanWrapper<R> wrapper = create(instance, conversionService);\n final R result = wrapper.getBean();\n entity.doWithProperties(new PropertyHandler<CratePersistentProperty>() {\n public void doWithPersistentProperty(final CratePersistentProperty prop) {\n if (!sourceHasProperty(prop) || entity.isConstructorArgument(prop)) {\n return;\n }\n wrapper.setProperty(prop, getValueInternal(prop, source, result));\n }\n if (!source.containsKey(property.getFieldName()) || entity.isConstructorArgument(property)) {\n continue;\n }\n });\n entity.doWithAssociations(new AssociationHandler<CratePersistentProperty>() {\n public void doWithAssociation(final Association<CratePersistentProperty> association) {\n CratePersistentProperty inverseProp = association.getInverse();\n Object obj = getValueInternal(inverseProp, source, result);\n wrapper.setProperty(inverseProp, obj);\n }\n });\n return result;\n}\n"
|
"protected Connection getConnection(DBInputSplit dbSplit) {\n boolean connected = false;\n DBChunkHost avoid_host = null;\n int connect_tries = 0;\n Connection connection = null;\n String localHostAddr = getLocatHostAddres();\n DBChunk chunk = dbSplit.getChunk();\n DBChunkHost chunk_host = null;\n while (!connected) {\n if (!chunk.getLocations().contains(localHostAddr)) {\n LOG.info(\"String_Node_Str\" + localHostAddr);\n chunk_host = chunk.getAnyHost(avoid_host);\n } else {\n if (avoid_host != chunk.getHost(localHostAddr)) {\n chunk_host = chunk.getHost(localHostAddr);\n }\n LOG.info(\"String_Node_Str\" + localHostAddr + \"String_Node_Str\" + chunk.getId() + \"String_Node_Str\" + chunk_host.getHost() + \"String_Node_Str\" + chunk_host.getUrl());\n try {\n Class.forName(chunk_host.getDriver());\n connection = DriverManager.getConnection(chunk_host.getUrl(), chunk_host.getUser(), chunk_host.getPassword());\n connected = true;\n } catch (Exception e) {\n LOG.info(\"String_Node_Str\");\n LOG.info(e);\n if (connect_tries < MAX_CONNECTION_TRIALS) {\n connect_tries++;\n avoid_host = chunk_host;\n chunk_host = null;\n } else\n throw new RuntimeException(e);\n }\n }\n return connection;\n}\n"
|
"public void onRequest(int request) {\n if (!hasValidState())\n return;\n if (request == EditorListener.REQUEST_PICK_PHOTO) {\n doPickPhotoAction(rawContactId);\n }\n}\n"
|
"public Monitor findGroupMonitorWithId(String groupId) {\n return findGroupMonitor(groupId, aliasToActiveMonitorsMap);\n}\n"
|
"public void run() {\n ChangePerspectiveAction perspectiveAction = new ChangePerspectiveAction(PluginConstant.SE_ID);\n perspectiveAction.run();\n SQLExplorerPlugin default1 = SQLExplorerPlugin.getDefault();\n Collection<Alias> aliases = default1.getAliasManager().getAliases();\n TdDataProvider tdDataProvider = DataProviderHelper.getDataProvider(table);\n TypedReturnCode<TdProviderConnection> tdPc = DataProviderHelper.getTdProviderConnection(tdDataProvider);\n TdProviderConnection providerConnection = tdPc.getObject();\n String url = providerConnection.getConnectionString();\n for (Alias alias : aliases) {\n if (alias.getUrl().equals(url)) {\n String qualifiedName = getTableQualifiedName(tdDataProvider);\n String query = \"String_Node_Str\" + qualifiedName;\n SQLEditorInput input = new SQLEditorInput(\"String_Node_Str\" + SQLExplorerPlugin.getDefault().getEditorSerialNo() + \"String_Node_Str\");\n input.setUser(alias.getDefaultUser());\n try {\n IWorkbenchPage page = SQLExplorerPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();\n SQLEditor editorPart = (SQLEditor) page.openEditor((IEditorInput) input, SQLEditor.class.getName());\n editorPart.setText(query);\n ExecSQLAction execSQLAction = new ExecSQLAction(editorPart);\n execSQLAction.run();\n } catch (PartInitException e) {\n log.error(e, e);\n }\n }\n }\n}\n"
|
"public void scan(String base, Pattern regex, List<NutResource> list) {\n for (String ensName : names) {\n String name = ensName;\n if (name.contains(\"String_Node_Str\"))\n name = name.substring(name.lastIndexOf('/') + 1);\n if (ensName.startsWith(base) && (null == regex || regex.matcher(name).find())) {\n try {\n list.add(Scans.makeJarNutResource(jarPath, ensName, base));\n }\n }\n } catch (Throwable e) {\n if (log.isWarnEnabled())\n log.warn(\"String_Node_Str\" + jarPath + \"String_Node_Str\", e);\n }\n}\n"
|
"protected void addListeners() {\n if (useCustomItemColoring) {\n addEraseItemListener();\n }\n final MouseListener mouseListener = new MouseListener() {\n public void mouseDoubleClick(MouseEvent e) {\n }\n public void mouseDown(MouseEvent mouseEvent) {\n controlClicked = mouseEvent.getSource();\n }\n public void mouseUp(MouseEvent e) {\n }\n };\n final TraverseListener traverseListenerForControls = new TraverseListener() {\n public void keyTraversed(TraverseEvent e) {\n if (!keyboardManagementForCellEdition) {\n return;\n }\n int key = e.detail;\n if (key == SWT.TRAVERSE_TAB_NEXT || key == SWT.TRAVERSE_TAB_PREVIOUS) {\n keyPressed = key;\n e.doit = false;\n editOtherEditor((Control) e.getSource());\n } else if (key == SWT.TRAVERSE_RETURN) {\n keyPressed = key;\n if (getTable().getSelectionIndex() != -1 && getTable().isFocusControl()) {\n editOtherEditor(null);\n } else {\n forceTableFocus();\n }\n } else if (key == SWT.TRAVERSE_ESCAPE) {\n forceTableFocus();\n } else {\n }\n }\n private void forceTableFocus() {\n new AsynchronousThreading(10, false, getTable().getDisplay(), new Runnable() {\n public void run() {\n if (!getTable().isDisposed()) {\n getTable().forceFocus();\n }\n }\n }).start();\n }\n };\n final TraverseListener traverseListenerForTable = new TraverseListener() {\n public void keyTraversed(TraverseEvent e) {\n if (!keyboardManagementForCellEdition) {\n return;\n }\n int key = e.detail;\n if (key == SWT.TRAVERSE_TAB_NEXT || key == SWT.TRAVERSE_TAB_PREVIOUS) {\n keyPressed = key;\n e.doit = false;\n editOtherEditor(null);\n } else if (key == SWT.TRAVERSE_RETURN && getTable().getSelectionIndex() != -1 && getTable().isFocusControl()) {\n keyPressed = key;\n editOtherEditor(null);\n }\n }\n };\n getTable().addTraverseListener(traverseListenerForTable);\n final KeyListener keyListenerForTable = new KeyListener() {\n public void keyPressed(KeyEvent e) {\n if (!keyboardManagementForCellEdition) {\n return;\n }\n int key = e.keyCode;\n if (key == SWT.F2) {\n keyPressed = key;\n editOtherEditor(null);\n }\n }\n public void keyReleased(KeyEvent e) {\n }\n };\n getTable().addKeyListener(keyListenerForTable);\n getTable().addDisposeListener(new DisposeListener() {\n public void widgetDisposed(DisposeEvent e) {\n if (tableEditorManager != null) {\n tableEditorManager.release();\n }\n }\n });\n if (tableEditorManager != null) {\n tableEditorManager.addListener(new ITableEditorManagerListener() {\n public void notifyEvent(TableEditorManagerEvent event) {\n Control editor = event.getTableEditor().getEditor();\n if (event.getEventType() == EVENT_TYPE.CONTROL_CREATED) {\n editor.addMouseListener(mouseListener);\n editor.addTraverseListener(traverseListenerForControls);\n }\n }\n });\n }\n for (TableViewerCreatorColumnNotModifiable column : columns) {\n CellEditor cellEditor = column.getCellEditor();\n if (cellEditor != null && cellEditor.getControl() != null) {\n addTraverseListenerRecursivly(cellEditor.getControl(), traverseListenerForControls);\n }\n }\n if ((this.getTable().getStyle() & SWT.VIRTUAL) != 0) {\n getTable().addPaintListener(new PaintListener() {\n\n public void paintControl(PaintEvent event) {\n if (tableEditorManager != null) {\n tableEditorManager.paintVisibleAreaEditor(event);\n }\n }\n });\n}\n"
|
"public RecordMetadata getMetadata() {\n return metadata;\n}\n"
|
"public void update() {\n super.update();\n _healthBar.setPosition(new Vector2f(_toolbar.getPosition().x, _toolbar.getPosition().y - _toolbar.getSize().y + 8f));\n _crosshair.setPosition(new Vector2f(Display.getWidth() / 2, Display.getHeight() / 2));\n boolean enableDebug = Config.getInstance().isDebug();\n _debugLine1.setVisible(enableDebug);\n _debugLine2.setVisible(enableDebug);\n _debugLine3.setVisible(enableDebug);\n _debugLine4.setVisible(enableDebug);\n if (enableDebug) {\n double memoryUsage = ((double) Runtime.getRuntime().totalMemory() - (double) Runtime.getRuntime().freeMemory()) / 1048576.0;\n Timer timer = CoreRegistry.get(Timer.class);\n _debugLine1.setText(String.format(\"String_Node_Str\", timer.getFps(), memoryUsage, Runtime.getRuntime().totalMemory() / 1048576.0, Runtime.getRuntime().maxMemory() / 1048576.0));\n _debugLine2.setText(String.format(\"String_Node_Str\", cameraTarget.toString()));\n _debugLine3.setText(String.format(\"String_Node_Str\", CoreRegistry.get(WorldRenderer.class)));\n _debugLine4.setText(String.format(\"String_Node_Str\", ChunkTessellator.getVertexArrayUpdateCount(), CoreRegistry.get(GameEngine.class).getActiveTaskCount()));\n }\n}\n"
|
"private void checkParameters(Method m) {\n Annotation[][] pas = m.getParameterAnnotations();\n int paramCount = 0;\n for (Annotation[] pa : pas) {\n paramCount++;\n checkParameter(m, m.toString(), Integer.toString(paramCount), pa);\n }\n}\n"
|
"private void addPluginsToMap(NamespaceId namespace, Id.Artifact parentArtifactId, SortedMap<ArtifactDescriptor, List<PluginClass>> map, Row row) throws IOException {\n for (Map.Entry<byte[], byte[]> column : row.getColumns().entrySet()) {\n ImmutablePair<ArtifactDescriptor, PluginClass> pluginEntry = getPluginEntry(namespace, parentArtifactId, column);\n if (pluginEntry != null) {\n ArtifactDescriptor artifactDescriptor = pluginEntry.getFirst();\n if (!map.containsKey(artifactDescriptor)) {\n map.put(artifactDescriptor, Sets.<PluginClass>newHashSet());\n }\n map.get(artifactDescriptor).add(pluginEntry.getSecond());\n }\n }\n}\n"
|
"public void createProductionOrders(ActionRequest request, ActionResponse response) throws AxelorException {\n SaleOrder saleOrder = request.getContext().asType(SaleOrder.class);\n List<Long> productionOrderIdList = productionOrderSaleOrderService.generateProductionOrder(saleOrder);\n if (generalService.getGeneral().getProductionOrderGenerationAuto() && !productionOrderIdList.isEmpty()) {\n response.setView(ActionView.define(I18n.get(\"String_Node_Str\")).model(ProductionOrder.class.getName()).add(\"String_Node_Str\", \"String_Node_Str\").add(\"String_Node_Str\", \"String_Node_Str\").domain(\"String_Node_Str\" + Joiner.on(\"String_Node_Str\").join(productionOrderIdList) + \"String_Node_Str\").map());\n } else {\n response.setFlash(IExceptionMessage.PRODUCTION_ORDER_NO_GENERATION);\n }\n}\n"
|
"public void init(TreeViewer viewer, IStructuredSelection selection) {\n boolean canWork = !selection.isEmpty() && selection.size() == 1;\n IProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();\n if (factory.isUserReadOnlyOnCurrentProject()) {\n canWork = false;\n }\n if (canWork) {\n Object o = selection.getFirstElement();\n repositoryNode = (RepositoryNode) o;\n switch(repositoryNode.getType()) {\n case REPOSITORY_ELEMENT:\n if (repositoryNode.getObject().getRepositoryStatus() == ERepositoryStatus.DELETED || repositoryNode.getObject().getRepositoryStatus() == ERepositoryStatus.LOCK_BY_OTHER) {\n canWork = false;\n }\n if (!isUnderDBConnection(repositoryNode)) {\n canWork = false;\n }\n Item item = repositoryNode.getObject().getProperty().getItem();\n if (item instanceof DatabaseConnectionItem) {\n DatabaseConnectionItem dbItem = (DatabaseConnectionItem) item;\n DatabaseConnection dbConn = (DatabaseConnection) dbItem.getConnection();\n String dbType = dbConn.getDatabaseType();\n if (EDatabaseTypeName.HIVE.getXmlName().equalsIgnoreCase(dbType) || EDatabaseTypeName.HBASE.getXmlName().equalsIgnoreCase(dbType) || EDatabaseTypeName.IMPALA.getXmlName().equalsIgnoreCase(dbType)) {\n canWork = false;\n break;\n }\n }\n if (repositoryNode.getObjectType() != ERepositoryObjectType.METADATA_CONNECTIONS && repositoryNode.getObjectType() != ERepositoryObjectType.METADATA_CON_QUERY && repositoryNode.getObjectType() != ERepositoryObjectType.METADATA_CON_TABLE) {\n canWork = false;\n } else {\n if (PluginChecker.isCDCPluginLoaded()) {\n ICDCProviderService cdcService = (ICDCProviderService) GlobalServiceRegister.getDefault().getService(ICDCProviderService.class);\n if (cdcService != null && cdcService.isSubscriberTableNode(repositoryNode)) {\n canWork = false;\n break;\n }\n }\n IRepositoryService service = (IRepositoryService) GlobalServiceRegister.getDefault().getService(IRepositoryService.class);\n IProxyRepositoryFactory repFactory = service.getProxyRepositoryFactory();\n if (!repFactory.isPotentiallyEditable(repositoryNode.getObject())) {\n canWork = false;\n break;\n }\n }\n break;\n default:\n canWork = false;\n }\n if (canWork && (!ProjectManager.getInstance().isInCurrentMainProject(repositoryNode) || !isLastVersion(repositoryNode))) {\n canWork = false;\n }\n }\n setEnabled(canWork);\n}\n"
|
"public boolean performFinish() {\n String folderName = mainPage.getName();\n if (defaultLabel == null) {\n IFolder folder = ResourcesPlugin.getWorkspace().getRoot().getFolder(path);\n IFolder newFolder = folder.getFolder(folderName);\n try {\n newFolder.create(false, true, null);\n Object persistentProperty = TdqPropertieManager.getInstance().getFolderPropertyValue(folder, DQStructureManager.FOLDER_CLASSIFY_KEY);\n if (persistentProperty != null) {\n TdqPropertieManager.getInstance().addFolderProperties(newFolder, DQStructureManager.FOLDER_CLASSIFY_KEY, persistentProperty.toString());\n }\n folder.refreshLocal(IResource.DEPTH_INFINITE, null);\n DQRespositoryView findView = (DQRespositoryView) CorePlugin.getDefault().findView(DQRespositoryView.ID);\n findView.getCommonViewer().refresh();\n findView.getCommonViewer().setExpandedState(newFolder, true);\n } catch (CoreException e) {\n MessageDialog.openError(getShell(), DefaultMessagesImpl.getString(\"String_Node_Str\"), DefaultMessagesImpl.getString(\"String_Node_Str\"));\n ExceptionHandler.process(e);\n return false;\n }\n }\n return true;\n}\n"
|
"public AcsLogger getLoggerForCorba(String corbaName, boolean autoConfigureContextName) {\n String loggerName = corbaName;\n AcsLogger corbaLogger = null;\n processNameLock.lock();\n try {\n if (autoConfigureContextName && processName != null) {\n loggerName += \"String_Node_Str\" + processName;\n }\n corbaLogger = getAcsLogger(loggerName, LoggerOwnerType.OrbLogger);\n if (corbaName.equals(JacORBLoggerFactory.JACORB_LOGGER_NAME)) {\n corbaLogger.addIgnoreLogs(\"String_Node_Str\", \"String_Node_Str\");\n corbaLogger.addIgnoreLogs(\"String_Node_Str\", \"String_Node_Str\");\n corbaLogger.addIgnoreLogs(\"String_Node_Str\", \"String_Node_Str\");\n }\n if (autoConfigureContextName && processName == null) {\n AcsLoggerInfo loggerInfo = loggers.get(loggerName);\n loggerInfo.needsProcessNameUpdate = true;\n }\n } finally {\n processNameLock.unlock();\n }\n if (suppressCorbaRemoteLogging) {\n sharedLogConfig.setAndLockMinLogLevel(AcsLogLevelDefinition.OFF, loggerName);\n } else if (!sharedLogConfig.hasCustomConfig(loggerName)) {\n if (corbaName.startsWith(ACSLoggerFactory.HIBERNATE_LOGGER_NAME_PREFIX) || corbaName.startsWith(ACSLoggerFactory.HIBERNATE_SQL_LOGGER_NAME_PREFIX) || corbaName.startsWith(CommonsLoggingFactory.SCXML_LOGGER_NAME_PREFIX)) {\n AcsLogLevelDefinition minCustomLevel = AcsLogLevelDefinition.WARNING;\n AcsLogLevelDefinition customLevel = (minCustomLevel.compareTo(sharedLogConfig.getDefaultMinLogLevel()) > 0 ? minCustomLevel : sharedLogConfig.getDefaultMinLogLevel());\n sharedLogConfig.setMinLogLevel(customLevel, loggerName);\n AcsLogLevelDefinition customLevelLocal = (minCustomLevel.compareTo(sharedLogConfig.getDefaultMinLogLevelLocal()) > 0 ? minCustomLevel : sharedLogConfig.getDefaultMinLogLevelLocal());\n sharedLogConfig.setMinLogLevelLocal(customLevelLocal, loggerName);\n m_internalLogger.info(\"String_Node_Str\" + loggerName + \"String_Node_Str\" + customLevelLocal.name + \"String_Node_Str\" + customLevel.name + \"String_Node_Str\");\n }\n }\n return corbaLogger;\n}\n"
|
"private void insertRecordInJoinTable(String joinTableName, String joinColumnName, String inverseJoinColumnName, Object parentId, Set<Object> childrenIds) {\n Session s = getStatefulSession();\n Transaction tx = s.beginTransaction();\n for (Object childId : childrenIds) {\n StringBuffer query = new StringBuffer();\n query.append(\"String_Node_Str\").append(joinTableName).append(\"String_Node_Str\").append(joinColumnName).append(\"String_Node_Str\").append(inverseJoinColumnName).append(\"String_Node_Str\").append(\"String_Node_Str\").append(parentId).append(\"String_Node_Str\").append(childId).append(\"String_Node_Str\");\n s.createSQLQuery(query.toString()).executeUpdate();\n }\n tx.commit();\n}\n"
|
"public SerializerResult referenceCollection(final ServiceMetadata metadata, final EdmEntitySet edmEntitySet, final EntityCollection entityCollection, final ReferenceCollectionSerializerOptions options) throws SerializerException {\n OutputStream outputStream = null;\n SerializerException cachedException = null;\n try {\n final ContextURL contextURL = checkContextURL(options == null ? null : options.getContextURL());\n buffer = new CircleStreamBuffer();\n final UriHelper uriHelper = new UriHelperImpl();\n final JsonGenerator json = new JsonFactory().createGenerator(buffer.getOutputStream());\n json.writeStartObject();\n writeContextURL(contextURL, json);\n if (options != null && options.getCount() != null && options.getCount().getValue()) {\n writeCount(entityCollection, json);\n }\n json.writeArrayFieldStart(Constants.VALUE);\n for (final Entity entity : entityCollection.getEntities()) {\n json.writeStartObject();\n json.writeStringField(Constants.JSON_ID, uriHelper.buildCanonicalURL(edmEntitySet, entity));\n json.writeEndObject();\n }\n json.writeEndArray();\n writeNextLink(entityCollection, json);\n json.writeEndObject();\n json.close();\n buffer.getOutputStream().close();\n return SerializerResultImpl.with().content(buffer.getInputStream()).build();\n } catch (final IOException e) {\n cachedException = new SerializerException(\"String_Node_Str\", e, SerializerException.MessageKeys.IO_EXCEPTION);\n throw cachedException;\n } finally {\n closeCircleStreamBufferOutput(buffer, cachedException);\n }\n}\n"
|
"private void okAction() {\n File file = new File(assemblerText.getText());\n if (!file.exists() || file.isDirectory()) {\n String message = String.format(\"String_Node_Str\", assemblerText.getText());\n if (JOptionPane.showConfirmDialog(null, message, \"String_Node_Str\", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE) == JOptionPane.NO_OPTION) {\n return;\n }\n }\n file = new File(listingText.getText());\n if (!file.exists() || file.isDirectory()) {\n String message = String.format(\"String_Node_Str\", listingText.getText());\n if (JOptionPane.showConfirmDialog(null, message, \"String_Node_Str\", JOptionPane.WARNING_MESSAGE, JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION) {\n return;\n }\n }\n file = new File(objectText.getText());\n if (!file.exists() || file.isDirectory()) {\n String message = String.format(\"String_Node_Str\", objectText.getText());\n if (JOptionPane.showConfirmDialog(null, message, \"String_Node_Str\", JOptionPane.WARNING_MESSAGE, JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION) {\n return;\n }\n }\n for (String path : macroText.getText().split(\"String_Node_Str\")) {\n file = new File(path);\n if (!file.exists() || file.isDirectory()) {\n String message = String.format(\"String_Node_Str\", path);\n if (JOptionPane.showConfirmDialog(null, message, \"String_Node_Str\", JOptionPane.WARNING_MESSAGE, JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION) {\n return;\n }\n }\n }\n file = new File(tapeText.getText());\n if (!file.exists() || file.isDirectory()) {\n String message = String.format(\"String_Node_Str\", tapeText.getText());\n if (JOptionPane.showConfirmDialog(null, message, \"String_Node_Str\", JOptionPane.WARNING_MESSAGE, JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION) {\n return;\n }\n }\n file = new File(diagnosticText.getText());\n if (!file.exists() || file.isDirectory()) {\n String message = String.format(\"String_Node_Str\", diagnosticText.getText());\n if (JOptionPane.showConfirmDialog(null, message, \"String_Node_Str\", JOptionPane.WARNING_MESSAGE, JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION) {\n return;\n }\n }\n AssemblerOptions.assemblerPath = assemblerText.getText();\n AssemblerOptions.boot = bootCheckBox.isSelected();\n AssemblerOptions.bootLoader = bootIBMRadioButton.isSelected() ? AssemblerOptions.BOOT_IBM : bootVan1RadioButton.isSelected() ? AssemblerOptions.BOOT_VAN_1 : bootVan2RadioButton.isSelected() ? AssemblerOptions.BOOT_VAN_2 : AssemblerOptions.BOOT_NONE;\n AssemblerOptions.encoding = encodingCheckBox.isSelected();\n AssemblerOptions.encodingChoice = encodingSimhRadioButton.isSelected() ? AssemblerOptions.ENCODING_SIMH : encodingARadioButton.isSelected() ? AssemblerOptions.ENCODING_A : encodingHRadioButton.isSelected() ? AssemblerOptions.ENCODING_H : AssemblerOptions.ENCODING_PRINT;\n AssemblerOptions.listing = listingCheckBox.isSelected();\n AssemblerOptions.listingPath = listingText.getText();\n AssemblerOptions.object = objectCheckBox.isSelected();\n AssemblerOptions.objectPath = objectText.getText();\n AssemblerOptions.macro = macroCheckBox.isSelected();\n AssemblerOptions.macroPath = macroText.getText();\n AssemblerOptions.tape = tapeCheckBox.isSelected();\n AssemblerOptions.tapePath = tapeText.getText();\n AssemblerOptions.diagnostic = diagnosticCheckBox.isSelected();\n AssemblerOptions.diagnosticPath = diagnosticText.getText();\n AssemblerOptions.codeOk = codeOkCheckBox.isSelected();\n AssemblerOptions.interleave = interleaveCheckBox.isSelected();\n AssemblerOptions.store = storeCheckBox.isSelected();\n AssemblerOptions.dump = dumpCheckBox.isSelected();\n AssemblerOptions.page = pageCheckBox.isSelected();\n AssemblerOptions.pageLength = pageText.getText();\n AssemblerOptions.trace = traceCheckBox.isSelected();\n AssemblerOptions.traceLexer = traceLexerCheckBox.isSelected();\n AssemblerOptions.traceParser = traceParserCheckBox.isSelected();\n AssemblerOptions.traceProcess = traceProcessCheckBox.isSelected();\n AssemblerOptions.extras = extrasCheckBox.isSelected();\n AssemblerOptions.extrasEx = extrasExCheckBox.isSelected();\n AssemblerOptions.extrasEnd = extrasEndCheckBox.isSelected();\n AssemblerOptions.extrasQueue = extrasQueueCheckBox.isSelected();\n AssemblerOptions.extrasReloader = extrasReloaderCheckBox.isSelected();\n AssemblerOptions.command = buildCommand();\n this.setVisible(false);\n}\n"
|
"protected void updateInsertExtras(Bundle extras, Project project) {\n extras.putLong(Shuffle.Tasks.PROJECT_ID, project.id);\n if (project.defaultContextId != null) {\n Context context = BindingUtils.fetchContextById(this, project.defaultContextId);\n if (context != null) {\n extras.putLong(Shuffle.Tasks.CONTEXT_ID, context.id);\n }\n }\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.