content
stringlengths
40
137k
"protected Map getHyperlinkDetectorTargets(ISourceViewer sourceViewer) {\n Map hyperlinkDetectorTargets = super.getHyperlinkDetectorTargets(sourceViewer);\n if (container != null)\n hyperlinkDetectorTargets.put(container.getClass().getPackage().getName(), view);\n return hyperlinkDetectorTargets;\n}\n"
"public void itemsChanged(Inventory inventory) {\n if (inventory.isEmpty() && id >= 0 && child >= 0) {\n player.send(new InterfaceResetItemsMessage(id, child));\n } else {\n Item[] items = inventory.toArray();\n player.send(new InterfaceItemsMessage(id, child, type, items));\n }\n}\n"
"private boolean isFlushed(SpeechItem speechItem) {\n synchronized (mFlushedObjects) {\n return mFlushAll > 0 || mFlushedObjects.contains(speechItem.getCallerIdentity());\n }\n}\n"
"private static Index createIndex(final File inputFile, final FeatureIterator iterator, final IndexCreator creator) {\n Feature lastFeature = null;\n Feature currentFeature;\n final Map<String, Feature> visitedChromos = new HashMap<String, Feature>(40);\n while (iterator.hasNext()) {\n final long position = iterator.getPosition();\n currentFeature = iterator.next();\n checkSorted(inputFile, lastFeature, currentFeature);\n final String curChr = currentFeature.getContig();\n final String lastChr = lastFeature != null ? lastFeature.getContig() : null;\n if (!curChr.equals(lastChr)) {\n if (visitedChromos.containsKey(curChr)) {\n String msg = \"String_Node_Str\";\n msg += \"String_Node_Str\" + featToString(visitedChromos.get(curChr));\n msg += \"String_Node_Str\" + featToString(lastFeature);\n msg += \"String_Node_Str\" + featToString(currentFeature);\n throw new TribbleException.MalformedFeatureFile(msg, inputFile.getAbsolutePath());\n } else {\n visitedChromos.put(curChr, currentFeature);\n }\n }\n creator.addFeature(currentFeature, position);\n lastFeature = currentFeature;\n }\n iterator.close();\n return creator.finalizeIndex(finalPosition);\n}\n"
"public void marshal(java.io.OutputStream os, Object namespacePrefixMapper) throws JAXBException {\n try {\n Marshaller marshaller = jc.createMarshaller();\n if (Docx4jProperties.getProperty(\"String_Node_Str\", true)) {\n marshaller.setProperty(\"String_Node_Str\", true);\n }\n NamespacePrefixMapperUtils.setProperty(marshaller, namespacePrefixMapper);\n log.debug(\"String_Node_Str\" + this.getClass().getName());\n getContents();\n setMceIgnorable((McIgnorableNamespaceDeclarator) namespacePrefixMapper);\n if (Docx4jProperties.getProperty(\"String_Node_Str\", false)) {\n Document doc = XmlUtils.marshaltoW3CDomDocument(jaxbElement, jc);\n NamespacePrefixMapperUtils.declareNamespaces(this.getMceIgnorable(), doc);\n log.warn(\"String_Node_Str\" + XmlUtils.w3CDomNodeToString(doc));\n Init.init();\n Canonicalizer c = Canonicalizer.getInstance(CanonicalizationMethod.EXCLUSIVE);\n byte[] bytes = c.canonicalizeSubtree(doc, this.getMceIgnorable());\n IOUtils.write(bytes, os);\n } else {\n marshaller.marshal(jaxbElement, os);\n }\n ((McIgnorableNamespaceDeclarator) namespacePrefixMapper).setMcIgnorable(null);\n } catch (Docx4JException e) {\n log.error(e.getMessage(), e);\n throw new JAXBException(e);\n } catch (JAXBException e) {\n log.error(e.getMessage(), e);\n throw e;\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n throw new JAXBException(e);\n }\n}\n"
"public boolean applyIpAssociations(Network network, boolean continueOnError) throws ResourceUnavailableException {\n List<IPAddressVO> userIps = _ipAddressDao.listByAssociatedNetwork(network.getId(), null);\n List<PublicIp> publicIps = new ArrayList<PublicIp>();\n if (userIps != null && !userIps.isEmpty()) {\n for (IPAddressVO userIp : userIps) {\n PublicIp publicIp = new PublicIp(userIp, _vlanDao.findById(userIp.getVlanId()), NetUtils.createSequenceBasedMacAddress(userIp.getMacAddress()));\n publicIps.add(publicIp);\n }\n }\n boolean success = true;\n for (NetworkElement element : _networkElements) {\n try {\n element.applyIps(network, publicIps);\n } catch (ResourceUnavailableException e) {\n success = false;\n if (!continueOnError) {\n throw e;\n } else {\n s_logger.debug(\"String_Node_Str\" + element.getName(), e);\n }\n }\n }\n if (success) {\n for (IPAddressVO addr : userIps) {\n if (addr.getState() == IpAddress.State.Allocating) {\n addr.setAssociatedWithNetworkId(network.getId());\n markPublicIpAsAllocated(addr);\n } else if (addr.getState() == IpAddress.State.Releasing) {\n if (cleanupIpResources(addr.getId(), Account.ACCOUNT_ID_SYSTEM, _accountMgr.getSystemAccount())) {\n _ipAddressDao.unassignIpAddress(addr.getId());\n } else {\n success = false;\n s_logger.warn(\"String_Node_Str\" + addr.getId());\n }\n }\n }\n }\n return success;\n}\n"
"private void updateManifest() {\n String packageBase = fProjectProvider.getProjectName();\n String sep = System.getProperty(\"String_Node_Str\");\n String manifestFile = fProjectProvider.getLocationPath().makeAbsolute().toOSString() + sep + fProjectProvider.getProjectName() + sep + \"String_Node_Str\" + sep + \"String_Node_Str\";\n StringBuilder manifestLines = new StringBuilder();\n manifestLines.append(\"String_Node_Str\");\n manifestLines.append(\"String_Node_Str\");\n manifestLines.append(\"String_Node_Str\");\n manifestLines.append(\"String_Node_Str\");\n manifestLines.append(\"String_Node_Str\");\n manifestLines.append(\"String_Node_Str\");\n manifestLines.append(\"String_Node_Str\");\n manifestLines.append(\"String_Node_Str\");\n manifestLines.append(\"String_Node_Str\");\n manifestLines.append(\"String_Node_Str\");\n manifestLines.append(\"String_Node_Str\");\n manifestLines.append(\"String_Node_Str\" + packageBase + \"String_Node_Str\");\n manifestLines.append(\"String_Node_Str\" + packageBase + \"String_Node_Str\");\n try {\n manifestFile.appendContents(new ByteArrayInputStream(manifestLines.toString().getBytes()), IResource.FORCE, null);\n } catch (CoreException e) {\n e.printStackTrace();\n }\n}\n"
"public List<ValidationMessage> validate(final Path path, final String content) {\n try {\n return genericValidator.validate(path, new ByteArrayInputStream(content.getBytes(Charsets.UTF_8)), FILTER_JAVA, FILTER_DRLS);\n } catch (Exception e) {\n throw ExceptionUtilities.handleException(e);\n }\n}\n"
"private IResultMetaData getRealMetaData(DataSetHandle dataSetHandle) throws BirtException {\n QueryDefinition query = new QueryDefinition();\n query.setDataSetName(dataSetHandle.getQualifiedName());\n query.setMaxRows(1);\n IResultMetaData metaData = MetaDataPopulator.retrieveResultMetaData(dataSetHandle);\n if (metaData == null) {\n metaData = retrieveMetaDataByQueryExecution(dataSetHandle);\n }\n if (!(dataSetHandle instanceof ScriptDataSetHandle))\n clearUnusedData(dataSetHandle, metaData);\n return metaData;\n}\n"
"public void onViewCreated(View view, Bundle state) {\n super.onViewCreated(view, state);\n DisplayViewModelFactory factory = new DisplayViewModelFactory(state);\n displayViewModel = ViewModelProviders.of(this, factory).get(DisplayViewModel.class);\n layoutManager = new LinearLayoutManager(getActivity(), LinearLayoutManager.HORIZONTAL, false);\n getRecyclerView().setLayoutManager(layoutManager);\n snapperCarr.attachToRecyclerView(getRecyclerView());\n adapter = new PageAdapter();\n getRecyclerView().setAdapter(adapter);\n getRecyclerView().addOnScrollListener(new RecyclerView.OnScrollListener() {\n public void onScrolled(RecyclerView recyclerView, int dx, int dy) {\n if (ignoreNextScroll) {\n ignoreNextScroll = false;\n } else {\n int position = getCurrentPosition();\n if (position >= 0) {\n displayViewModel.setCurrentModel(adapter.getItem(position));\n }\n }\n }\n });\n Toolbar tb = view.findViewById(R.id.toolbar);\n tb.inflateMenu(R.menu.actions_display);\n tb.setOnMenuItemClickListener(item -> (onOptionsItemSelected(item)));\n if (((Contract) getActivity()).shouldShowTitle()) {\n tb.setTitle(R.string.app_name);\n }\n editMenu = tb.getMenu().findItem(R.id.edit);\n editMenu.setVisible(false);\n}\n"
"private static void generateNamesForAnonymousBlocks(BlockOutline block, AtomicInteger counter) {\n if (block.getName() == null || block.getName().trim().isEmpty()) {\n StringBuilder name = new StringBuilder().append(\"String_Node_Str\").append(counter.getAndIncrement());\n if (block.getConstructor() != null) {\n MethodParser parsed = new MethodParser(block.getConstructor().getMethodSignature());\n name.append(\"String_Node_Str\").append(parsed.methodName);\n }\n block.setName(name.toString());\n }\n for (MethodOutline method : block.getAllMethods()) {\n for (BlockOutline chain : method.getBlockChain()) {\n if (chain == block) {\n continue;\n }\n generateNamesForAnonymousBlocks(chain, counter);\n }\n }\n}\n"
"private static String getProfileIDFromProfile(PointFeature pointFeature) {\n String profileID = null;\n try {\n profileID = (pointFeature.getData().getScalarObject(\"String_Node_Str\").toString());\n } catch (Exception e) {\n System.out.println(\"String_Node_Str\" + e.toString());\n profileID = \"String_Node_Str\";\n }\n return profileID;\n}\n"
"public static List extractColumnExpressions(String oldExpression, boolean mode) throws BirtException {\n if (oldExpression == null || oldExpression.trim().length() == 0)\n return new ArrayList();\n return ExpressionParserUtility.compileColumnExpression(new ExpressionParserUtility(), oldExpression, mode);\n}\n"
"public void testInferTypesPerformance() {\n InputStream in = this.getClass().getClassLoader().getResourceAsStream(\"String_Node_Str\");\n BufferedReader inBuffReader = new BufferedReader(new InputStreamReader(in));\n List<String[]> records = new ArrayList<String[]>();\n String line = null;\n String start, end;\n try {\n while ((line = inBuffReader.readLine()) != null) {\n String[] record = StringUtils.splitByWholeSeparatorPreserveAllTokens(line, \"String_Node_Str\");\n records.add(record);\n }\n start = TypeInferenceUtilsTest.getCurrentTimeStamp();\n printline(\"String_Node_Str\" + start);\n inferExector.inferTypes(records);\n end = TypeInferenceUtilsTest.getCurrentTimeStamp();\n printline(\"String_Node_Str\" + end);\n double timeDiff = TypeInferenceUtilsTest.getTimeDifference(start, end);\n printline(\"String_Node_Str\" + timeDiff);\n Assert.assertTrue(timeDiff < 0.9);\n } catch (IOException e) {\n e.printStackTrace();\n }\n in = null;\n ;\n try {\n in = new FileInputStream(new File(\"String_Node_Str\"));\n } catch (FileNotFoundException e1) {\n e1.printStackTrace();\n }\n inBuffReader = new BufferedReader(new InputStreamReader(in));\n records = new ArrayList<String[]>();\n try {\n while ((line = inBuffReader.readLine()) != null) {\n String[] record = StringUtils.splitByWholeSeparatorPreserveAllTokens(line, \"String_Node_Str\");\n records.add(record);\n }\n start = TypeInferenceUtilsTest.getCurrentTimeStamp();\n printline(\"String_Node_Str\" + start);\n inferExector.inferTypes(records);\n end = TypeInferenceUtilsTest.getCurrentTimeStamp();\n printline(\"String_Node_Str\" + end);\n double timeDiff = TypeInferenceUtilsTest.getTimeDifference(start, end);\n printline(\"String_Node_Str\" + timeDiff);\n Assert.assertTrue(timeDiff < 4.8);\n } catch (IOException e) {\n e.printStackTrace();\n }\n in = null;\n ;\n try {\n in = new FileInputStream(new File(\"String_Node_Str\"));\n } catch (FileNotFoundException e1) {\n e1.printStackTrace();\n }\n inBuffReader = new BufferedReader(new InputStreamReader(in));\n try {\n start = TypeInferenceUtilsTest.getCurrentTimeStamp();\n printline(\"String_Node_Str\" + start);\n boolean isFirstLine = true;\n while ((line = inBuffReader.readLine()) != null) {\n String[] record = StringUtils.splitByWholeSeparatorPreserveAllTokens(line, \"String_Node_Str\");\n if (isFirstLine) {\n isFirstLine = false;\n inferExector.init(record);\n }\n inferExector.handle(record);\n }\n end = TypeInferenceUtilsTest.getCurrentTimeStamp();\n printline(\"String_Node_Str\" + end);\n double timeDiff = TypeInferenceUtilsTest.getTimeDifference(start, end);\n printline(\"String_Node_Str\" + timeDiff);\n Assert.assertTrue(timeDiff < 45);\n } catch (IOException e) {\n e.printStackTrace();\n }\n}\n"
"public void setAlarm(Context context, long triggerInMillis) {\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n String valAthanGap = prefs.getString(\"String_Node_Str\", \"String_Node_Str\");\n long athanGap = TextUtils.isEmpty(valAthanGap) ? 0 : Long.parseLong(valAthanGap);\n Calendar triggerTime = Calendar.getInstance();\n triggerTime.setTimeInMillis(timeInMillis - TimeUnit.SECONDS.toMillis(athanGap));\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n if (!triggerTime.before(Calendar.getInstance())) {\n triggerTime.set(Calendar.SECOND, 0);\n Log.d(TAG, \"String_Node_Str\" + triggerTime.getTime());\n Intent intent = new Intent(context, AlarmReceiver.class);\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, intent, 0);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n alarmManager.setExact(AlarmManager.RTC_WAKEUP, triggerTime.getTimeInMillis(), pendingIntent);\n } else {\n alarmManager.set(AlarmManager.RTC_WAKEUP, triggerTime.getTimeInMillis(), pendingIntent);\n }\n }\n}\n"
"public boolean handle(Object receive) throws Exception {\n if (receive instanceof HttpResponse) {\n HttpResponse response = (HttpResponse) receive;\n if (NettyUtil.isSuccessful(response.getStatus())) {\n ObjectNode node = to(response.getContent());\n handler.handle(RestRiakOperations.this.support.newResponse(node));\n return true;\n }\n }\n return false;\n}\n"
"public void doLocalOp() {\n if (isMigrationAware() && isPartitionMigrating()) {\n setRedoResult(REDO_PARTITION_MIGRATING);\n } else {\n request.attachment = TargetAwareOp.this;\n request.local = true;\n ((RequestHandler) getPacketProcessor(request.operation)).handle(request);\n }\n}\n"
"private void executeCommand(PrintWriter out, BufferedReader in, String cmd) throws IOException {\n String sensorName = in.readLine();\n SensorController sensorCtrl = getSensorCtrlFromName(sensorName);\n SensorModel sensorModel = getSensorModelFromName(sensorName);\n if (cmd.compareTo(\"String_Node_Str\") == 0) {\n sensorModel.getNumSensorValues(out);\n else if (cmd.compareTo(\"String_Node_Str\") == 0) {\n String args = in.readLine();\n if (sensorModel.isEnabled()) {\n int updateDelay = Integer.parseInt(args);\n sensorCtrl.setCurrentUpdateRate(updateDelay);\n sensorModel.setSensorUpdateRate(out);\n } else {\n System.out.println(sensorName + \"String_Node_Str\");\n out.println(\"String_Node_Str\");\n }\n } else if (cmd.compareTo(\"String_Node_Str\") == 0) {\n sensorModel.unsetSensorUpdateRate(out);\n sensorCtrl.setCurrentUpdateRate(sensorModel.getDefaultUpdateRate());\n } else if (cmd.compareTo(\"String_Node_Str\") == 0) {\n if (sensorCtrl != null) {\n sensorCtrl.readSensor(out);\n sensorCtrl.updateEmulatorRefresh(mSensorSimulator.view.getRefreshCount());\n } else {\n out.println(\"String_Node_Str\");\n mSensorSimulator.addMessage(\"String_Node_Str\" + cmd);\n }\n } else\n out.println(\"String_Node_Str\");\n}\n"
"protected void addPathFile(File pathComponent) throws IOException {\n pathComponents.addElement(pathComponent);\n if (pathComponent.isDirectory()) {\n return;\n }\n String absPathPlusTimeAndLength = pathComponent.getAbsolutePath() + pathComponent.lastModified() + \"String_Node_Str\" + pathComponent.length();\n String classpath = (String) pathMap.get(absPathPlusTimeAndLength);\n if (classpath == null) {\n ZipFile jarFile = null;\n InputStream manifestStream = null;\n try {\n jarFile = new ZipFile(pathComponent);\n manifestStream = jarFile.getInputStream(new ZipEntry(\"String_Node_Str\"));\n if (manifestStream == null) {\n return;\n }\n Reader manifestReader = new InputStreamReader(manifestStream, \"String_Node_Str\");\n org.apache.tools.ant.taskdefs.Manifest manifest = new org.apache.tools.ant.taskdefs.Manifest(manifestReader);\n classpath = manifest.getMainSection().getAttributeValue(\"String_Node_Str\");\n } catch (org.apache.tools.ant.taskdefs.ManifestException e) {\n } finally {\n if (manifestStream != null) {\n manifestStream.close();\n }\n if (jarFile != null) {\n jarFile.close();\n }\n }\n if (classpath == null) {\n classpath = \"String_Node_Str\";\n }\n pathMap.put(absPathPlusTimeAndLength, classpath);\n }\n if (!\"String_Node_Str\".equals(classpath)) {\n URL baseURL = FILE_UTILS.getFileURL(pathComponent);\n StringTokenizer st = new StringTokenizer(classpath);\n while (st.hasMoreTokens()) {\n String classpathElement = st.nextToken();\n URL libraryURL = new URL(baseURL, classpathElement);\n if (!libraryURL.getProtocol().equals(\"String_Node_Str\")) {\n log(\"String_Node_Str\" + classpathElement + \"String_Node_Str\" + \"String_Node_Str\", Project.MSG_VERBOSE);\n continue;\n }\n File libraryFile = new File(URLDecoder.decode(libraryURL.getFile()));\n if (libraryFile.exists() && !isInPath(libraryFile)) {\n addPathFile(libraryFile);\n }\n }\n }\n}\n"
"private Status updateStructureHandle() {\n try {\n structureHandle.setName(dataSetParamName.getText());\n structureHandle.setParameterDataType(ParameterPageUtil.getTypeName(dataType.getText()));\n setDirection(direction.getText());\n structureHandle.setExpressionProperty(DataSetParameter.DEFAULT_VALUE_MEMBER, new Expression(defaultValue.isEnabled() ? defaultValue.getText().trim() : defaultValueString, (String) defaultValue.getData(DataUIConstants.EXPR_TYPE)));\n if (isOdaDataSetHandle)\n ((OdaDataSetParameterHandle) structureHandle).setParamName(Utility.findIndex(linkToSalarParameter.getItems(), linkToSalarParameter.getText()) == 0 ? null : linkToSalarParameter.getText());\n } catch (SemanticException e) {\n return getMiscStatus(IStatus.ERROR, Utility.getNonNullString(e.getMessage()));\n }\n return null;\n}\n"
"public void handleWorldLoad(WorldEvent.Load event) {\n if (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER) {\n TilePathMarker.clearAvailableMarkersList(event.getWorld());\n }\n}\n"
"public boolean postfire() throws IllegalActionException {\n FSMActor ctrl = getController();\n State curState = ctrl.currentState();\n TypedActor[] currentRefinement = curState.getRefinement();\n if (currentRefinement == null) {\n throw new IllegalActionException(this, \"String_Node_Str\");\n }\n if (_debug_info) {\n }\n boolean postfireReturn = currentRefinement[0].postfire();\n _firingsSoFar++;\n _firingsSoFar = 0;\n Transition lastChosenTr = _getLastChosenTransition();\n if (lastChosenTr == null) {\n if (_debug_info)\n System.out.println(getName() + \"String_Node_Str\" + \"String_Node_Str\");\n } else {\n if (_debug_info)\n System.out.println(getName() + \"String_Node_Str\");\n State newState = lastChosenTr.destinationState();\n _setCurrentState(newState);\n if (_debug_info)\n System.out.println(getName() + \"String_Node_Str\" + newState.getFullName());\n curState = newState;\n _setCurrentConnectionMap();\n _currentLocalReceiverMap = (Map) _localReceiverMaps.get(ctrl.currentState());\n TypedCompositeActor actor = (TypedCompositeActor) (curState.getRefinement())[0];\n _updateInputTokenConsumptionRates(actor);\n _updateOutputTokenProductionRates(actor);\n if (_debug_info)\n System.out.println(getName() + \"String_Node_Str\" + \"String_Node_Str\");\n CompositeActor hdfActor = _getHighestFSM();\n Director director = hdfActor.getExecutiveDirector();\n if (director instanceof HDFDirector) {\n ((HDFDirector) director).invalidateSchedule();\n }\n }\n if (_debug_info)\n System.out.println(getName() + \"String_Node_Str\");\n return postfireReturn;\n}\n"
"protected void waitForApplicationToBeRunning(URI applicationRef) throws InterruptedException, TimeoutException {\n int count = 0;\n while (getApplicationStatus(applicationRef) != ApplicationSummary.Status.RUNNING) {\n if (getApplicationStatus(applicationRef) == ApplicationSummary.Status.ERROR)\n throw new RuntimeException(\"String_Node_Str\");\n Thread.sleep(100);\n count += 1;\n if (count >= 100) {\n throw new TimeoutException(\"String_Node_Str\");\n }\n }).every(10, TimeUnit.SECONDS).limitTimeTo(3, TimeUnit.MINUTES).run();\n assertTrue(started);\n}\n"
"private void findContour(boolean black) {\n ImageUInt8 binary = new ImageUInt8(image.width, image.height);\n GThresholdImageOps.threshold(image, binary, 40, black);\n contour = BinaryImageOps.contour(binary, ConnectRule.FOUR, null).get(0).external;\n List<PointIndex_I32> corners = ShapeFittingOps.fitPolygon(contour, true, 0.05, 0.1, 10);\n split = new GrowQueue_I32(corners.size());\n for (int i = 0; i < corners.size(); i++) {\n split.add(corners.get(i).index);\n }\n}\n"
"public void afterFlow() {\n super.afterFlow();\n Execution execution = getExecution();\n execution.setEndTime(new Date());\n ExecutionStatus status = ExecutionStatus.DONE;\n if (steps != null) {\n for (ExecutionStep executionStep : steps.values()) {\n if (ExecutionStatus.ERROR.name().equals(executionStep.getStatus())) {\n status = ExecutionStatus.ERROR;\n }\n if (status != ExecutionStatus.ERROR && ExecutionStatus.CANCELLED.name().equals(executionStep.getStatus())) {\n status = ExecutionStatus.CANCELLED;\n }\n }\n }\n execution.setStatus(status.name());\n this.recorder.record(execution);\n}\n"
"public static DeviceConfiguration create(DeviceInformation di) {\n DeviceConfiguration configuration = new DeviceConfiguration();\n configuration.setValues(di.getRFAddress(), di.getDeviceType(), di.getSerialNumber(), di.getRoomId(), di.getName());\n return configuration;\n}\n"
"private void syncRingerAndNotificationStreamVolume(int streamType, int index, boolean force) {\n boolean notificationsUseRingVolume = Settings.System.getInt(mContentResolver, Settings.System.NOTIFICATIONS_USE_RING_VOLUME, 1) == 1;\n if (notificationsUseRingVolume) {\n if (streamType == AudioManager.STREAM_NOTIFICATION) {\n streamType = AudioManager.STREAM_RING;\n }\n if (streamType == AudioManager.STREAM_RING) {\n setStreamVolumeInt(AudioManager.STREAM_NOTIFICATION, index, force, true);\n }\n }\n}\n"
"private void checkRecoveredData() throws IssuerPublicKeyException {\n checkDataTrailer();\n checkDataHeader();\n checkCertificateFormat();\n byte[] remainder = getIssuerPublicKeyRemainder();\n byte[] exponent = issuerPublicKeyCertificate.getExponent();\n checkHashResult(remainder, exponent);\n checkIssuerIdentifier();\n checkExpirationDate();\n checkIssuerPublicKeyAlgorithmIndicator();\n int nCA = caPublicKey.getModulus().length;\n int nI = Bytes.toInt(issuerData.get(ISSUER_PUBLIC_KEY_LENGTH)[0]);\n byte[] modulus;\n if (nI <= nCA - 36) {\n modulus = Bytes.left(issuerData.get(ISSUER_PUBLIC_KEY), nI);\n } else {\n modulus = Bytes.concat(issuerData.get(ISSUER_PUBLIC_KEY), remainder);\n }\n issuerPublicKey = new PublicKey(issuerData.get(ISSUER_PUBLIC_KEY_ALGORITHM_INDICATOR), modulus, exponent);\n}\n"
"public Widget createActionsLayout(SelectedItems<IndexedFile> files, AsyncCallback<ActionImpact> callback) {\n FlowPanel layout = createLayout();\n addTitle(layout, messages.sidebarFoldersFilesTitle(), files, FileAction.DOWNLOAD, FileAction.RENAME, FileAction.MOVE, FileAction.UPLOAD_FILES, FileAction.CREATE_FOLDER, FileAction.REMOVE);\n addButton(layout, messages.downloadButton(), FileAction.DOWNLOAD, files, ActionImpact.NONE, callback, \"String_Node_Str\", \"String_Node_Str\");\n addButton(layout, messages.renameButton(), FileAction.RENAME, files, ActionImpact.UPDATED, callback, \"String_Node_Str\", \"String_Node_Str\");\n addButton(layout, messages.moveButton(), FileAction.MOVE, files, ActionImpact.UPDATED, callback, \"String_Node_Str\", \"String_Node_Str\");\n addButton(layout, messages.uploadFilesButton(), FileAction.UPLOAD_FILES, files, ActionImpact.UPDATED, callback, \"String_Node_Str\", \"String_Node_Str\");\n addButton(layout, messages.createFolderButton(), FileAction.CREATE_FOLDER, files, ActionImpact.UPDATED, callback, \"String_Node_Str\", \"String_Node_Str\");\n addButton(layout, messages.removeButton(), FileAction.REMOVE, files, ActionImpact.DESTROYED, callback, \"String_Node_Str\", \"String_Node_Str\");\n addTitle(layout, messages.preservationTitle(), files, \"String_Node_Str\", FileAction.NEW_PROCESS, FileAction.IDENTIFY_FORMATS, FileAction.SHOW_EVENTS, FileAction.SHOW_RISKS);\n addButton(layout, messages.newProcessPreservation(), FileAction.NEW_PROCESS, files, ActionImpact.UPDATED, callback, \"String_Node_Str\", \"String_Node_Str\");\n addButton(layout, messages.identifyFormatsButton(), FileAction.IDENTIFY_FORMATS, files, ActionImpact.UPDATED, callback, \"String_Node_Str\", \"String_Node_Str\");\n addButton(layout, messages.preservationEvents(), FileAction.SHOW_EVENTS, files, ActionImpact.NONE, callback, \"String_Node_Str\", \"String_Node_Str\");\n addButton(layout, messages.preservationRisks(), FileAction.SHOW_RISKS, files, ActionImpact.NONE, callback, \"String_Node_Str\", \"String_Node_Str\");\n return layout;\n}\n"
"public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) {\n if (getItemCount() == 0) {\n detachAndScrapAttachedViews(recycler);\n return;\n }\n if (getChildCount() == 0) {\n View scrap = recycler.getViewForPosition(0);\n addView(scrap);\n measureChildWithMargins(scrap, 0, 0);\n mDecoratedChildWidth = getDecoratedMeasuredWidth(scrap);\n mDecoratedChildHeight = getDecoratedMeasuredHeight(scrap);\n detachAndScrapView(scrap, recycler);\n }\n updateWindowSizing();\n int childLeft;\n int childTop;\n if (getChildCount() == 0) {\n mFirstVisiblePosition = 0;\n childLeft = childTop = 0;\n } else if (getVisibleChildCount() > getItemCount()) {\n mFirstVisiblePosition = 0;\n childLeft = childTop = 0;\n } else {\n final View topChild = getChildAt(0);\n if (mForceClearOffsets) {\n childLeft = childTop = 0;\n mForceClearOffsets = false;\n } else {\n childLeft = getDecoratedLeft(topChild);\n childTop = getDecoratedTop(topChild);\n }\n int maxFirstRow = getTotalRowCount() - (mVisibleRowCount - 1);\n int maxFirstCol = getTotalColumnCount() - (mVisibleColumnCount - 1);\n boolean isOutOfRowBounds = getFirstVisibleRow() > maxFirstRow;\n boolean isOutOfColBounds = getFirstVisibleColumn() > maxFirstCol;\n if (isOutOfRowBounds || isOutOfColBounds) {\n int firstRow;\n if (isOutOfRowBounds) {\n firstRow = maxFirstRow;\n } else {\n firstRow = getFirstVisibleRow();\n }\n int firstCol;\n if (isOutOfColBounds) {\n firstCol = maxFirstCol;\n } else {\n firstCol = getFirstVisibleColumn();\n }\n mFirstVisiblePosition = firstRow * getTotalColumnCount() + firstCol;\n childLeft = getHorizontalSpace() - (mDecoratedChildWidth * mVisibleColumnCount);\n childTop = getVerticalSpace() - (mDecoratedChildHeight * mVisibleRowCount);\n if (getFirstVisibleRow() == 0) {\n childTop = Math.min(childTop, 0);\n }\n if (getFirstVisibleColumn() == 0) {\n childLeft = Math.min(childLeft, 0);\n }\n }\n }\n detachAndScrapAttachedViews(recycler);\n fillGrid(DIRECTION_NONE, childLeft, childTop, recycler);\n}\n"
"public View getView(int r, View convertView, ViewGroup parent) {\n Message message = this.getItem(r);\n SmsBaseViewHolder holder;\n if (convertView == null) {\n holder = new SmsBaseViewHolder();\n convertView = LayoutInflater.from(mContext).inflate(R.layout.message, parent, false);\n holder.mBody = (TextView) convertView.findViewById(R.id.message);\n holder.mdate = (TextView) convertView.findViewById(R.id.date_message);\n holder.mLayout = (RelativeLayout) convertView.findViewById(R.id.message_relativeLayout);\n holder.mIsRead = (View) convertView.findViewById(R.id.is_read);\n convertView.setTag(holder);\n } else\n holder = (SmsBaseViewHolder) convertView.getTag();\n userPref.setUserPref(PreferenceManager.getDefaultSharedPreferences(mContext));\n holder.mBody.setText(message.getBody());\n holder.mBody.setTextSize(userPref.text_size);\n holder.mdate.setText(message.getDate());\n if (!PhoneNumberUtils.compare(mPhoneContact, message.getSender())) {\n holder.mLayout.setGravity(GravityCompat.END);\n holder.mLayout.setPadding(42, 0, 0, 0);\n holder.mBody.setBackgroundColor(mContext.getResources().getColor(R.color.grey_mid_high));\n if (message.isRead())\n holder.mIsRead.setBackgroundColor(mContext.getResources().getColor(R.color.read_green));\n else {\n holder.mIsRead.setBackgroundColor(mContext.getResources().getColor(android.R.color.transparent));\n }\n } else {\n holder.mLayout.setGravity(Gravity.LEFT);\n holder.mLayout.setPadding(0, 0, 42, 0);\n holder.mBody.setBackgroundColor(mContext.getResources().getColor(R.color.grey_low));\n holder.mIsRead.setBackgroundColor(mContext.getResources().getColor(android.R.color.transparent));\n }\n return convertView;\n}\n"
"private void restoreInvAndExp(Player p) {\n inventoryManager.clearInventory(p);\n try {\n inventoryManager.restoreInv(p);\n } catch (Exception e) {\n e.printStackTrace();\n Messenger.severe(\"String_Node_Str\" + p.getName() + \"String_Node_Str\");\n }\n rewardManager.grantRewards(p);\n if (lobbyPlayers.contains(p) || !settings.getBoolean(\"String_Node_Str\") || settings.getBoolean(\"String_Node_Str\", false) || settings.getBoolean(\"String_Node_Str\", false)) {\n playerData.get(p).restoreData();\n } else {\n p.setFoodLevel(playerData.get(p).food());\n }\n}\n"
"protected void performFiltering(CharSequence text, int keyCode) {\n if (text == null) {\n updateDropDownForFilter(0, true);\n } else {\n if (mFilter != null) {\n mFilter.filter(text, new Filter.FilterListener() {\n\n public void onFilterComplete(int count) {\n updateDropDownForFilter(count, false);\n }\n });\n }\n}\n"
"public void bundleChanged(BundleEvent event) {\n Bundle bundle = event.getBundle();\n if (bundle != null && bundle.getSymbolicName() != null && bundle.getSymbolicName().equals(bundleName)) {\n if (event.getType() == BundleEvent.STARTED) {\n ResourceServlet.this.bundle = event.getBundle();\n logger.info(\"String_Node_Str\" + bundleName + \"String_Node_Str\");\n } else if (event.getType() == BundleEvent.STOPPED) {\n ResourceServlet.this.bundle = null;\n logger.info(\"String_Node_Str\" + bundleName + \"String_Node_Str\");\n }\n }\n}\n"
"public IProgressMonitor deploy(String boxVersion, String profileId, String workspaceId, String environment, int instances, JSONArray variables) throws IOException {\n JSONObject profile = (JSONObject) doGet(MessageFormat.format(\"String_Node_Str\", profileId), false);\n JSONObject deployRequest = new JSONObject();\n String profileSchema = profile.getString(\"String_Node_Str\");\n String schemaVersion = getSchemaVersion(profileSchema);\n if (schemaVersion.compareTo(\"String_Node_Str\") > 0) {\n if (boxVersion != null) {\n profile.getJSONObject(\"String_Node_Str\").put(\"String_Node_Str\", boxVersion);\n }\n JSONObject serviceProfile = profile.getJSONObject(\"String_Node_Str\");\n if (serviceProfile.containsKey(\"String_Node_Str\")) {\n serviceProfile.put(\"String_Node_Str\", instances);\n }\n deployRequest.put(\"String_Node_Str\", BASE_ELASTICBOX_SCHEMA + schemaVersion + '/' + DEPLOYMENT_REQUEST_SCHEMA_NAME);\n for (Object json : variables) {\n JSONObject variable = (JSONObject) json;\n if (variable.containsKey(\"String_Node_Str\") && variable.getString(\"String_Node_Str\").isEmpty()) {\n variable.remove(\"String_Node_Str\");\n }\n }\n deployRequest.put(\"String_Node_Str\", variables);\n } else {\n JSONObject mainInstance = (JSONObject) profile.getJSONArray(\"String_Node_Str\").get(0);\n JSONArray jsonVars = mainInstance.getJSONArray(\"String_Node_Str\");\n for (Object json : variables) {\n JSONObject variable = (JSONObject) json;\n JSONObject jsonVar = findVariable(variable, jsonVars);\n if (jsonVar == null) {\n jsonVars.add(variable);\n } else {\n jsonVar.put(\"String_Node_Str\", variable.getString(\"String_Node_Str\"));\n }\n }\n JSONObject serviceProfile = mainInstance.getJSONObject(\"String_Node_Str\");\n if (serviceProfile.containsKey(\"String_Node_Str\")) {\n serviceProfile.put(\"String_Node_Str\", instances);\n }\n deployRequest.put(\"String_Node_Str\", BASE_ELASTICBOX_SCHEMA + schemaVersion + \"String_Node_Str\");\n }\n deployRequest.put(\"String_Node_Str\", environment);\n deployRequest.put(\"String_Node_Str\", profile);\n deployRequest.put(\"String_Node_Str\", workspaceId);\n HttpPost post = new HttpPost(MessageFormat.format(\"String_Node_Str\", endpointUrl));\n post.setEntity(new StringEntity(deployRequest.toString(), ContentType.APPLICATION_JSON));\n try {\n HttpResponse response = execute(post);\n JSONObject instance = JSONObject.fromObject(getResponseBodyAsString(response));\n return new ProgressMonitor(endpointUrl + instance.getString(\"String_Node_Str\"), Collections.singleton(InstanceOperation.DEPLOY), instance.getString(\"String_Node_Str\"));\n } finally {\n post.reset();\n }\n}\n"
"public int getMaxTrackingDistance() {\n return net.minecraft.server.PlayerManager.a(pm.getPlayerViewRadius());\n}\n"
"public DataType getDataType(String expression) {\n return null;\n}\n"
"private void setPropertyInternal(String propertyName, Object val) {\n if (propertiesMap.containsKey(propertyName)) {\n if (!StaticContentSpecLoader.PROPERTY_NAME.getPropertyName().equals(propertyName)) {\n checkForChange(propertiesMap.get(propertyName), val);\n } else {\n checkForNameChange((String) propertiesMap.get(propertyName), (String) val);\n }\n } else {\n isChanged = true;\n }\n if (bufferPropertiesMap != null) {\n bufferPropertiesMap.put(propertyName, val);\n } else {\n if (!hasProperty(StaticContentSpecLoader.PROPERTY_EXTENDSID.getPropertyName()) || Utils.equalObjects(getExtendsID(), StaticContentSpecLoader.getContentSpec().getPropertyForObjectTypeByName(getTypeID(), StaticContentSpecLoader.PROPERTY_EXTENDSID.getPropertyName()).getDefaultClassValue())) {\n Element element = StaticContentSpecLoader.getContentSpec().getPropertyForObjectTypeByName(getTypeID(), propertyName);\n if (element != null && Utils.equalObjects(val, element.getDefaultClassValue())) {\n propertiesMap.remove(propertyName);\n return;\n }\n }\n propertiesMap.put(propertyName, val);\n }\n}\n"
"public void setup() {\n Config config = new Config();\n ClientConfig clientConfig = new ClientConfig();\n clientConfig.addQueryCacheConfig(TEST_MAP_NAME, new QueryCacheConfig(QUERY_CACHE_NAME).setPredicateConfig(new PredicateConfig(predicate)).setIncludeValue(includeValues));\n if (useNearCache) {\n clientConfig.addNearCacheConfig(new NearCacheConfig().setName(TEST_MAP_NAME).setInvalidateOnChange(true));\n }\n clientConfig.setProperty(MapEventPublisherImpl.LISTENER_WITH_PREDICATE_PRODUCES_NATURAL_EVENT_TYPES.getName(), Boolean.toString(useQueryCacheNaturalFilteringStrategy));\n factory = new TestHazelcastFactory();\n factory.newHazelcastInstance(config);\n HazelcastInstance client = factory.newHazelcastClient(clientConfig);\n map = client.getMap(TEST_MAP_NAME);\n queryCache = map.getQueryCache(QUERY_CACHE_NAME);\n}\n"
"private void parse(Tree tree) throws SAXException {\n if (tree == null) {\n return;\n }\n switch(tree.getType()) {\n case JSONLexer.PAIR:\n {\n Tree valueTree = tree.getChild(1);\n if (valueTree.getType() == JSONLexer.ARRAY) {\n parse(valueTree);\n } else {\n Tree stringTree = tree.getChild(0);\n String qualifiedName = stringTree.getText().substring(1, stringTree.getText().length() - 1);\n String localName = qualifiedName;\n if (attributePrefix != null && qualifiedName.startsWith(attributePrefix)) {\n break;\n }\n String uri = Constants.EMPTY_STRING;\n if (namespaceAware && namespaces != null) {\n if (localName.length() > 2) {\n int nsIndex = localName.indexOf(namespaceSeparator, 1);\n String prefix = Constants.EMPTY_STRING;\n if (nsIndex > -1) {\n prefix = localName.substring(0, nsIndex);\n }\n uri = namespaces.resolveNamespacePrefix(prefix);\n if (uri == null) {\n uri = namespaces.getDefaultNamespaceURI();\n } else {\n localName = localName.substring(nsIndex + 1);\n }\n if (localName.equals(Constants.SCHEMA_TYPE_ATTRIBUTE) && uri.equals(javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI)) {\n break;\n }\n } else {\n uri = namespaces.getDefaultNamespaceURI();\n }\n }\n if (contentHandler instanceof XMLRootRecord || contentHandler instanceof DeferredContentHandler) {\n if (!namespaceAware && localName.equals(Constants.SCHEMA_TYPE_ATTRIBUTE)) {\n break;\n }\n if (textWrapper != null && textWrapper.equals(localName)) {\n parse(valueTree);\n break;\n }\n } else if (contentHandler instanceof UnmarshalRecord && ((UnmarshalRecord) contentHandler).getXPathNode() != null) {\n if (!namespaceAware && localName.equals(Constants.SCHEMA_TYPE_ATTRIBUTE) && !((UnmarshalRecord) contentHandler).getXPathNode().hasTypeChild()) {\n break;\n }\n boolean isTextValue = isTextValue(localName);\n if (isTextValue) {\n parse(valueTree);\n break;\n }\n }\n contentHandler.startElement(uri, localName, localName, attributes.setTree(valueTree, attributePrefix, namespaces, namespaceSeparator, namespaceAware));\n parse(valueTree);\n contentHandler.endElement(uri, localName, localName);\n }\n break;\n }\n case JSONLexer.STRING:\n {\n String string = string(tree.getChild(0).getText());\n contentHandler.characters(string);\n break;\n }\n case JSONLexer.NUMBER:\n {\n contentHandler.characters(tree.getChild(0).getText());\n break;\n }\n case JSONLexer.TRUE:\n {\n contentHandler.characters(TRUE);\n break;\n }\n case JSONLexer.FALSE:\n {\n contentHandler.characters(FALSE);\n break;\n }\n case JSONLexer.NULL:\n {\n break;\n }\n case JSONLexer.ARRAY:\n {\n Tree parentStringTree = tree.getParent().getChild(0);\n String parentLocalName = parentStringTree.getText().substring(1, parentStringTree.getText().length() - 1);\n if (attributePrefix != null && parentLocalName.startsWith(attributePrefix)) {\n break;\n }\n String uri = Constants.EMPTY_STRING;\n if (namespaceAware && namespaces != null) {\n if (parentLocalName.length() > 2) {\n int nsIndex = parentLocalName.indexOf(namespaceSeparator, 1);\n if (nsIndex > -1) {\n String prefix = parentLocalName.substring(0, nsIndex);\n uri = namespaces.resolveNamespacePrefix(prefix);\n }\n if (uri == null) {\n uri = namespaces.getDefaultNamespaceURI();\n } else {\n parentLocalName = parentLocalName.substring(nsIndex + 1);\n }\n } else {\n uri = namespaces.getDefaultNamespaceURI();\n }\n }\n boolean isTextValue = isTextValue(parentLocalName);\n int size = tree.getChildCount();\n if (size == 0) {\n if (contentHandler instanceof UnmarshalRecord) {\n UnmarshalRecord ur = (UnmarshalRecord) contentHandler;\n XPathNode node = ur.getNonAttributeXPathNode(uri, parentLocalName, parentLocalName, null);\n if (node != null) {\n NodeValue nv = node.getNodeValue();\n if (nv == null && node.getTextNode() != null) {\n nv = node.getTextNode().getUnmarshalNodeValue();\n }\n if (nv != null && nv.isContainerValue()) {\n ur.getContainerInstance(((ContainerValue) nv));\n }\n }\n }\n }\n startCollection();\n if (size == 1) {\n CommonTree ct = (CommonTree) tree.getChild(0);\n if (ct != null && ct.getType() == JSONLexer.NULL) {\n contentHandler.setNil(true);\n }\n if (!isTextValue) {\n contentHandler.startElement(uri, parentLocalName, parentLocalName, attributes.setTree(nextChildTree, attributePrefix, namespaces, namespaceSeparator, namespaceAware));\n }\n parse(nextChildTree);\n if (!isTextValue) {\n contentHandler.endElement(uri, parentLocalName, parentLocalName);\n }\n }\n break;\n }\n default:\n {\n for (int x = 0, size = tree.getChildCount(); x < size; x++) {\n parse((CommonTree) tree.getChild(x));\n }\n }\n }\n}\n"
"private Node constructNode(final String name, final Node parent, final JsonNode jsonNode) {\n final PluginType<?> type = getPluginManager().getPluginType(name);\n final Node node = new Node(parent, name, type);\n processAttributes(node, jsonNode);\n final Iterator<Map.Entry<String, JsonNode>> iter = jsonNode.getFields();\n final List<Node> children = node.getChildren();\n while (iter.hasNext()) {\n final Map.Entry<String, JsonNode> entry = iter.next();\n final JsonNode n = entry.getValue();\n if (n.isArray() || n.isObject()) {\n if (type == null) {\n status.add(new Status(name, n, ErrorType.CLASS_NOT_FOUND));\n }\n if (n.isArray()) {\n LOGGER.debug(\"String_Node_Str\" + entry.getKey());\n for (int i = 0; i < n.size(); ++i) {\n final String pluginType = getType(n.get(i), entry.getKey());\n final PluginType entryType = getPluginManager().getPluginType(pluginType);\n final Node item = new Node(node, entry.getKey(), entryType);\n processAttributes(item, n.get(i));\n if (pluginType.equals(entry.getKey())) {\n LOGGER.debug(\"String_Node_Str\" + entry.getKey() + \"String_Node_Str\" + i + \"String_Node_Str\");\n } else {\n LOGGER.debug(\"String_Node_Str\" + pluginType + \"String_Node_Str\" + entry.getKey() + \"String_Node_Str\" + i + \"String_Node_Str\");\n }\n final Iterator<Map.Entry<String, JsonNode>> itemIter = n.get(i).getFields();\n final List<Node> itemChildren = item.getChildren();\n while (itemIter.hasNext()) {\n final Map.Entry<String, JsonNode> itemEntry = itemIter.next();\n if (itemEntry.getValue().isObject()) {\n LOGGER.debug(\"String_Node_Str\" + itemEntry.getKey());\n itemChildren.add(constructNode(itemEntry.getKey(), item, itemEntry.getValue()));\n }\n }\n children.add(item);\n }\n } else {\n LOGGER.debug(\"String_Node_Str\" + entry.getKey());\n children.add(constructNode(entry.getKey(), node, n));\n }\n }\n }\n String t;\n if (type == null) {\n t = \"String_Node_Str\";\n } else {\n t = type.getElementName() + \"String_Node_Str\" + type.getPluginClass();\n }\n final String p = node.getParent() == null ? \"String_Node_Str\" : node.getParent().getName() == null ? \"String_Node_Str\" : node.getParent().getName();\n LOGGER.debug(\"String_Node_Str\" + node.getName() + \"String_Node_Str\" + p + \"String_Node_Str\" + t);\n return node;\n}\n"
"public static IMethod findJavaMethodInWorkspace(String klass, String selector) {\n IType type = null;\n try {\n type = findJavaClassInWorkspace(klass);\n } catch (Throwable t) {\n return null;\n }\n if (type == null) {\n return null;\n }\n String name = parseForName(selector, type);\n String[] paramTypes = parseForParameterTypes(selector);\n IMethod m = type.getMethod(name, paramTypes);\n IMethod[] methods = type.findMethods(m);\n if (methods != null && methods.length == 1) {\n return methods[0];\n } else {\n try {\n List<IMethod> matches = new ArrayList<IMethod>();\n Collection<String> typeParameterNames = getTypeParameterNames(type);\n METHODS: for (IMethod x : type.getMethods()) {\n if (x.getElementName().equals(name)) {\n if (x.getParameterTypes().length == paramTypes.length) {\n for (int i = 0; i < x.getParameterTypes().length; i++) {\n String s1 = Signature.getTypeErasure(Signature.getSignatureSimpleName(x.getParameterTypes()[i]));\n String s2 = Signature.getTypeErasure(Signature.getSignatureSimpleName(paramTypes[i]));\n if (typeParameterNames.contains(s1)) {\n } else {\n if (!s1.equals(s2)) {\n continue METHODS;\n }\n }\n }\n matches.add(x);\n }\n }\n }\n if (matches.size() == 1) {\n return matches.get(0);\n } else {\n System.err.println(\"String_Node_Str\" + m);\n return null;\n }\n } catch (JavaModelException e) {\n e.printStackTrace();\n return null;\n }\n }\n}\n"
"public Ranking<S> computeRanking(List<S> population) {\n int size = population.size();\n List<Double> upperBound = new ArrayList<>();\n List<Double> lowerBound = new ArrayList<>();\n for (int i = 0; i < population.get(0).getNumberOfObjectives(); i++) {\n Collections.sort(population, new ObjectiveComparator<S>(i));\n double objetiveMinn = population.get(0).getObjective(i);\n double objetiveMaxn = population.get(population.size() - 1).getObjective(i);\n upperBound.add(objetiveMaxn);\n lowerBound.add(objetiveMinn);\n }\n this.utilityFunctions.setLowerBounds(lowerBound);\n this.utilityFunctions.setUpperBounds(upperBound);\n List<S> temporalList = new LinkedList();\n temporalList.addAll(population);\n int numberOfPoint = this.referencePoint.size() / numberObjectives;\n int indexReference = 0;\n this.numberOfRanks = population.size() + 1;\n this.rankedSubpopulations = new ArrayList(this.numberOfRanks);\n for (int i = 0; i < numberOfRanks - 1; i++) {\n this.rankedSubpopulations.add(new ArrayList<>());\n }\n for (S solution : populationOrder) {\n this.setAttribute(solution, rank);\n this.rankedSubpopulations.get(rank).add(solution);\n rank++;\n }\n rank = 0;\n int rankPreference = 0;\n while (!populationOrder.isEmpty()) {\n int indexRandom = JMetalRandom.getInstance().nextInt(0, populationOrder.size() - 1);\n S solutionRandom = populationOrder.get(indexRandom);\n populationOrder.remove(indexRandom);\n for (int i = 0; i < populationOrder.size(); i++) {\n S solution = populationOrder.get(i);\n double sum = this.preference(solutionRandom, solution, upperBound, lowerBound);\n if (sum < epsilon) {\n removeRank(solution);\n this.setAttribute(solution, this.rankedSubpopulations.size() - 1);\n List<S> rankListAux = this.rankedSubpopulations.get(this.rankedSubpopulations.size() - 1);\n if (rankListAux == null) {\n rankListAux = new ArrayList();\n }\n rankListAux.add(solution);\n populationOrder.remove(i);\n }\n }\n rank++;\n }\n return this;\n}\n"
"public static void close(Project project, boolean keepDelayedSync) {\n Map<String, Object> projectInstances = ProjectListenerMapping.getInstance().get(project);\n if (projectInstances == null)\n return;\n AutoSyncCommitListener listener = (AutoSyncCommitListener) projectInstances.get(LISTENER);\n if (listener != null) {\n if (keepDelayedSync)\n listener.setAuto(false);\n else\n project.getRepository().getTransactionManager().removeTransactionCommitListener(listener);\n }\n Connection connection = (Connection) projectInstances.remove(CONNECTION);\n Session session = (Session) projectInstances.remove(SESSION);\n MessageConsumer consumer = (MessageConsumer) projectInstances.remove(CONSUMER);\n try {\n if (consumer != null)\n consumer.close();\n if (session != null)\n session.close();\n if (connection != null)\n connection.close();\n } catch (Exception e) {\n }\n Application.getInstance().getGUILog().log(\"String_Node_Str\");\n}\n"
"public List<DifferentialFunction<ArrayField>> diff(List<DifferentialFunction<ArrayField>> i_v) {\n return Arrays.asList(f().one(getResultShape()));\n}\n"
"public void end(String body) {\n movieTrailer.setTitle(body);\n}\n"
"public void putStream(Stream s) {\n if (!running)\n return;\n streamUpdateLock.lock();\n try {\n conn = getConnection();\n PreparedStatement ps;\n ps = conn.prepareStatement(CREATE_STREAM);\n ps.setString(1, s.getStreamId());\n ps.setString(2, s.getTitle());\n ps.setString(3, s.getDescription());\n ps.setString(4, s.getMimeType());\n ps.setLong(5, s.getSize());\n ps.setLong(6, s.getDuration());\n ps.executeUpdate();\n for (StreamAttribute attr : s.getAttributes()) {\n ps = conn.prepareStatement(CREATE_STREAM_ATTRIBUTES);\n ps.setString(1, s.getStreamId());\n ps.setString(2, attr.getName());\n ps.setString(3, attr.getValue());\n ps.executeUpdate();\n }\n } catch (SQLException e) {\n log.error(\"String_Node_Str\", e);\n } finally {\n if (conn != null)\n returnConnection(conn);\n }\n}\n"
"public static long factorial(final int n) {\n if (n < 0) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (n > 20) {\n throw new ArithmeticException(\"String_Node_Str\");\n }\n return result;\n}\n"
"private static boolean posNotOnBorder(final Partition[] partitionObjects, final short[] partitions, final short width, final ShortPoint2D startPosition, final ShortPoint2D checkPosition, final short partition, MutableInt partitionSize) {\n final short checkPositionX = checkPosition.x;\n final short checkPositionY = checkPosition.y;\n boolean pos2NotOnBorder = BorderTraversingAlgorithm.traverseBorder(new IContainingProvider() {\n public boolean contains(int x, int y) {\n return partitionObjects[partitions[x + y * width]].partitionId == partition;\n }\n }, insideStartPosition, outsideStartPosition, new IBorderVisitor() {\n\n public boolean visit(int insideX, int insideY, int outsideX, int outsideY) {\n return checkPositionX != insideX || checkPositionY != insideY;\n }\n }, false, partitionSize);\n return pos2NotOnBorder;\n}\n"
"public void endElement(String namespaceURI, String localName, String qName) throws SAXException {\n XMLField xmlField = null;\n if (isCollection) {\n xmlField = (XMLField) ((XMLBinaryDataCollectionMapping) mapping).getField();\n } else {\n xmlField = (XMLField) ((XMLBinaryDataMapping) mapping).getField();\n }\n if (XMLConstants.XOP_URL.equals(namespaceURI) && (INCLUDE_ELEMENT_NAME.equals(localName) || INCLUDE_ELEMENT_NAME.equals(qName))) {\n XMLField xmlField = null;\n if (isCollection) {\n attributeClassification = ((XMLBinaryDataCollectionMapping) mapping).getAttributeElementClass();\n } else {\n attributeClassification = mapping.getAttributeClassification();\n }\n if (attachmentUnmarshaller == null) {\n throw XMLMarshalException.noAttachmentUnmarshallerSet(this.c_id);\n }\n if (attributeClassification.equals(XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER)) {\n data = attachmentUnmarshaller.getAttachmentAsDataHandler(this.c_id);\n } else {\n data = attachmentUnmarshaller.getAttachmentAsByteArray(this.c_id);\n }\n data = XMLBinaryDataHelper.getXMLBinaryDataHelper().convertObject(data, mapping.getAttributeClassification(), record.getSession());\n if (this.converter != null) {\n Converter converter = this.converter;\n if (converter instanceof XMLConverter) {\n data = ((XMLConverter) converter).convertDataValueToObjectValue(data, record.getSession(), record.getUnmarshaller());\n } else {\n data = converter.convertDataValueToObjectValue(data, record.getSession());\n }\n }\n if (isCollection) {\n if (data != null) {\n record.addAttributeValue((ContainerValue) nodeValue, data);\n }\n } else {\n record.setAttributeValue(data, mapping);\n }\n if (!xmlField.isSelfField()) {\n XMLReader xmlReader = record.getXMLReader();\n xmlReader.setContentHandler(record);\n xmlReader.setLexicalHandler(record);\n }\n } else {\n if (!xmlField.isSelfField()) {\n XMLReader xmlReader = record.getXMLReader();\n xmlReader.setContentHandler(record);\n xmlReader.setLexicalHandler(record);\n record.endElement(namespaceURI, localName, qName);\n }\n }\n}\n"
"public void testOps() {\n String humanId = \"String_Node_Str\";\n Human human = new Human(humanId);\n human.setHumanAlive(true);\n HumansPrivatePhoto photo = new HumansPrivatePhoto(humanId);\n photo.setPhotoName(\"String_Node_Str\");\n human.setHumansPrivatePhoto(photo);\n photo.setHuman(human);\n em.persist(human);\n em.clear();\n Human result = em.find(Human.class, humanId);\n Assert.assertNotNull(result);\n Assert.assertEquals(humanId, result.getHumanId());\n Assert.assertEquals(\"String_Node_Str\", result.getHumansPrivatePhoto().getPhotoName());\n Assert.assertTrue(result.getHumanAlive());\n}\n"
"public CubeInstance createCube(String cubeName, String projectName, CubeDesc desc, String owner) throws IOException {\n logger.info(\"String_Node_Str\" + projectName + \"String_Node_Str\" + cubeName + \"String_Node_Str\" + desc.getName() + \"String_Node_Str\");\n CubeInstance cube = CubeInstance.create(cubeName, projectName, desc);\n cube.setOwner(owner);\n saveResource(cube);\n ProjectManager.getInstance(config).moveRealizationToProject(RealizationType.CUBE, cubeName, projectName, owner);\n return cube;\n}\n"
"public static boolean doesStackContain(ItemStack stackA, ItemStack stackB) {\n return (stackB.isEmpty() || !stackA.isEmpty() && (areStacksEqualIgnoreAmount(stackA, stackB) && stackA.getCount() >= stackB.getCount()));\n}\n"
"public String toString() {\n return \"String_Node_Str\" + this.changeId + \"String_Node_Str\" + this.author + \"String_Node_Str\" + this.changeLogClass + \"String_Node_Str\" + this.changeSetMethodName + \"String_Node_Str\";\n}\n"
"protected Term extractTerm(String line) {\n String spacedLine = \"String_Node_Str\";\n for (char c : line.toCharArray()) {\n if (c == '(' || c == ')' || c == ',') {\n spacedLine += \"String_Node_Str\" + c + \"String_Node_Str\";\n } else if (c == ':') {\n spacedLine += \"String_Node_Str\";\n } else if (c == '=') {\n spacedLine += \"String_Node_Str\";\n } else {\n spacedLine += c;\n }\n }\n final int S_KWTERM = 1, S_NAME = 2, S_ASSIGN = 3, S_TERM_CLASS = 4, S_PARAMETERS = 5;\n int state = S_KWTERM;\n StringTokenizer tokenizer = new StringTokenizer(spacedLine);\n String token = \"String_Node_Str\", name = \"String_Node_Str\", termClass = \"String_Node_Str\";\n List<String> parameters = new ArrayList<>();\n while (tokenizer.hasMoreTokens()) {\n token = tokenizer.nextToken();\n if (state == S_KWTERM && \"String_Node_Str\".equals(token)) {\n state = S_NAME;\n continue;\n }\n if (state == S_NAME) {\n name = token;\n state = S_ASSIGN;\n continue;\n }\n if (state == S_ASSIGN && \"String_Node_Str\".equals(token)) {\n state = S_TERM_CLASS;\n continue;\n }\n if (state == S_TERM_CLASS) {\n if (Op.isNumeric(token)) {\n termClass = Constant.class.getSimpleName();\n parameters.add(token);\n } else if (\"String_Node_Str\".equals(token)) {\n termClass = Discrete.class.getSimpleName();\n } else {\n termClass = token;\n }\n state = S_PARAMETERS;\n continue;\n }\n if (state == S_PARAMETERS) {\n if (!Function.class.getSimpleName().equals(termClass) && (\"String_Node_Str\".equals(token) || \"String_Node_Str\".equals(token) || \"String_Node_Str\".equals(token))) {\n continue;\n }\n if (\"String_Node_Str\".equals(token)) {\n break;\n }\n parameters.add(token.trim());\n }\n }\n if (state <= S_ASSIGN) {\n throw new RuntimeException(\"String_Node_Str\" + line);\n }\n double[] values = new double[parameters.size()];\n if (!Function.class.getSimpleName().equals(termClass)) {\n String parameter = \"String_Node_Str\";\n try {\n for (int i = 0; i < parameters.size(); ++i) {\n parameter = parameters.get(i);\n values[i] = Op.toDouble(parameter);\n }\n } catch (Exception ex) {\n throw new RuntimeException(String.format(\"String_Node_Str\" + \"String_Node_Str\", parameter, line));\n }\n }\n try {\n Term result = FactoryManager.instance().term().createInstance(termClass, values);\n result.setName(Op.makeValidId(name));\n if (Function.class.getSimpleName().equals(termClass) && !parameters.isEmpty()) {\n String infix = Op.join(parameters, \"String_Node_Str\");\n if (infix.length() > 1 && infix.charAt(0) == '(' && infix.charAt(infix.length() - 1) == ')') {\n infix = infix.substring(1, infix.length() - 2);\n }\n ((Function) result).setText(infix);\n }\n return result;\n } catch (Exception ex) {\n throw ex;\n }\n}\n"
"private void mavenBuildCodeProjectPom(String goals, String module, Map<String, Object> argumentsMap, IProgressMonitor monitor) throws Exception {\n IFile childModulePomFile;\n if (TalendMavenConstants.CURRENT_PATH.equals(module)) {\n childModulePomFile = this.getProject().getFile(TalendMavenConstants.POM_FILE_NAME);\n } else {\n IFolder moduleFolder = this.getProject().getFolder(module);\n childModulePomFile = moduleFolder.getFile(TalendMavenConstants.POM_FILE_NAME);\n }\n if (childModulePomFile.getLocation().toFile().exists()) {\n MavenPomCommandLauncher mavenLauncher = null;\n if (goals == null || goals.trim().length() == 0 || goals.equals(TalendMavenConstants.GOAL_COMPILE) || goals.equals(TalendMavenConstants.GOAL_TEST_COMPILE)) {\n buildWholeCodeProject();\n } else {\n mavenLauncher = new MavenPomCommandLauncher(childModulePomFile, goals);\n mavenLauncher.setArgumentsMap(argumentsMap);\n mavenLauncher.execute(monitor);\n }\n } else {\n throw new RuntimeException(\"String_Node_Str\" + module);\n }\n}\n"
"public org.hl7.fhir.dstu2.model.MessageHeader.MessageHeaderResponseComponent convertMessageHeaderResponseComponent(org.hl7.fhir.dstu3.model.MessageHeader.MessageHeaderResponseComponent src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.dstu2.model.MessageHeader.MessageHeaderResponseComponent();\n copyElement(src, tgt);\n tgt.setIdentifier(src.getIdentifier());\n tgt.setCode(convertResponseType(src.getCode()));\n tgt.setDetails(convertReference(src.getDetails()));\n return tgt;\n}\n"
"private void parseDataModel(AbstractWorkflowDataModel wfdm) {\n boolean metadatawriteback = wfdm.isMetadataWriteBack();\n List<OozieJob> parents = new ArrayList<OozieJob>();\n AbstractJob job0 = new BashJob(\"String_Node_Str\");\n job0.getCommand().addArgument(\"String_Node_Str\");\n if (!wfdm.getDirectories().isEmpty()) {\n for (String dir : wfdm.getDirectories()) {\n job0.getCommand().addArgument(\"String_Node_Str\" + dir + \"String_Node_Str\");\n }\n }\n OozieJob oJob0 = new OozieJob(job0, \"String_Node_Str\" + this.jobs.size(), wfdm.getEnv().getOOZIE_WORK_DIR());\n oJob0.setMetadataWriteback(metadatawriteback);\n String parentAccession = wfdm.getParent_accessions();\n if (parentAccession != null && !parentAccession.isEmpty()) {\n oJob0.setParentAccession(parentAccession);\n }\n String workflowRunAccession = wfdm.getWorkflow_run_accession();\n if (workflowRunAccession != null && !workflowRunAccession.isEmpty()) {\n oJob0.setWorkflowRunAccession(workflowRunAccession);\n oJob0.setWorkflowRunAncesstor(true);\n }\n this.jobs.add(oJob0);\n parents.add(oJob0);\n if (!wfdm.getFiles().isEmpty()) {\n Collection<OozieJob> newParents = new ArrayList<OozieJob>();\n for (Map.Entry<String, SqwFile> entry : wfdm.getFiles().entrySet()) {\n AbstractJob job = new BashJob(\"String_Node_Str\" + entry.getKey());\n job.addFile(entry.getValue());\n OozieProvisionFileJob ojob = new OozieProvisionFileJob(job, entry.getValue(), job.getAlgo() + this.jobs.size(), wfdm.getConfigs().get(\"String_Node_Str\"));\n ojob.setMetadataWriteback(metadatawriteback);\n if (workflowRunAccession != null && !workflowRunAccession.isEmpty()) {\n ojob.setWorkflowRunAccession(workflowRunAccession);\n }\n this.jobs.add(ojob);\n this.fileJobMap.put(entry.getValue(), ojob);\n if (entry.getValue().isInput()) {\n newParents.add(ojob);\n for (OozieJob parent : parents) {\n ojob.addParent(parent);\n }\n String outputDir = wfdm.getConfigs().get(\"String_Node_Str\") + \"String_Node_Str\" + entry.getValue().getUniqueDir();\n job0.getCommand().addArgument(\"String_Node_Str\" + outputDir + \"String_Node_Str\");\n ojob.setOutputDir(outputDir);\n } else {\n ojob.setMetadataOutputPrefix(wfdm.getMetadata_output_file_prefix());\n ojob.setOutputDir(wfdm.getMetadata_output_dir());\n }\n }\n parents.clear();\n parents.addAll(newParents);\n }\n Map<OozieJob, OozieJob> hasProvisionOut = new HashMap<OozieJob, OozieJob>();\n for (AbstractJob job : wfdm.getWorkflow().getJobs()) {\n OozieJob pjob = this.createOozieJobObject(job, wfdm);\n pjob.setMetadataWriteback(metadatawriteback);\n if (workflowRunAccession != null && !workflowRunAccession.isEmpty()) {\n pjob.setWorkflowRunAccession(workflowRunAccession);\n }\n this.jobs.add(pjob);\n for (Job parent : job.getParents()) {\n pjob.addParent(this.getOozieJobObject((AbstractJob) parent));\n }\n if (job.getFiles().isEmpty() == false) {\n for (SqwFile file : job.getFiles()) {\n if (file.isInput()) {\n AbstractJob pfjob = new BashJob(\"String_Node_Str\");\n pfjob.addFile(file);\n OozieProvisionFileJob parentPfjob = new OozieProvisionFileJob(pfjob, file, pfjob.getAlgo() + \"String_Node_Str\" + jobs.size(), wfdm.getConfigs().get(\"String_Node_Str\"));\n parentPfjob.addParent(oJob0);\n parentPfjob.setMetadataWriteback(metadatawriteback);\n if (workflowRunAccession != null && !workflowRunAccession.isEmpty()) {\n parentPfjob.setWorkflowRunAccession(workflowRunAccession);\n }\n this.jobs.add(parentPfjob);\n parentPfjob.setOutputDir(\"String_Node_Str\" + file.getUniqueDir());\n pjob.addParent(parentPfjob);\n job0.getCommand().addArgument(\"String_Node_Str\" + \"String_Node_Str\" + file.getUniqueDir() + \"String_Node_Str\");\n } else {\n AbstractJob pfjob = new BashJob(\"String_Node_Str\");\n pfjob.addFile(file);\n OozieProvisionFileJob parentPfjob = new OozieProvisionFileJob(pfjob, file, pfjob.getAlgo() + \"String_Node_Str\" + jobs.size(), wfdm.getConfigs().get(\"String_Node_Str\"));\n parentPfjob.addParent(pjob);\n parentPfjob.setMetadataWriteback(metadatawriteback);\n parentPfjob.setMetadataOutputPrefix(wfdm.getMetadata_output_file_prefix());\n parentPfjob.setOutputDir(wfdm.getMetadata_output_dir());\n if (workflowRunAccession != null && !workflowRunAccession.isEmpty()) {\n parentPfjob.setWorkflowRunAccession(workflowRunAccession);\n }\n this.jobs.add(parentPfjob);\n hasProvisionOut.put(pjob, parentPfjob);\n }\n }\n }\n if (pjob.getParents().isEmpty()) {\n for (OozieJob parent : parents) {\n pjob.addParent(parent);\n }\n }\n }\n if (!hasProvisionOut.isEmpty()) {\n for (Map.Entry<OozieJob, OozieJob> entry : hasProvisionOut.entrySet()) {\n Collection<OozieJob> children = entry.getKey().getChildren();\n if (children.size() <= 1)\n continue;\n for (OozieJob child : children) {\n if (child == entry.getValue())\n continue;\n child.addParent(entry.getValue());\n }\n }\n }\n List<OozieJob> leaves = new ArrayList<OozieJob>();\n for (OozieJob _job : this.jobs) {\n if (_job.getChildren().isEmpty()) {\n leaves.add(_job);\n }\n }\n for (Map.Entry<SqwFile, OozieJob> entry : fileJobMap.entrySet()) {\n if (entry.getKey().isOutput()) {\n for (OozieJob leaf : leaves) {\n if (leaf != entry.getValue())\n entry.getValue().addParent(leaf);\n }\n }\n }\n this.setEndJob();\n this.setAccessionFileRelations(oJob0);\n}\n"
"public Map<Integer, List<DelayedEntry>> process(List<DelayedEntry> delayedEntries) {\n Map<Integer, List<DelayedEntry>> failMap;\n sort(delayedEntries);\n if (writeBatchSize > 1) {\n failMap = doStoreUsingBatchSize(delayedEntries);\n } else {\n failMap = processInternal(delayedEntries);\n }\n return failMap;\n}\n"
"public void jobToBeExecuted(JobExecutionContext context) {\n numJobsFired.incrementAndGet();\n synchronized (executingJobs) {\n executingJobs.put(((OperableTrigger) context.getTrigger()).getFireInstanceId(), context);\n }\n}\n"
"private void reSetParKeyValuesForCon(IConnection parConnection) {\n IElementParameter parTableCon = parConnection.getElementParameter(HASH_KEYS);\n if (parTableCon != null) {\n Object[] itemCon = parTableCon.getListItemsValue();\n ElementParameter conElemForList = null;\n String clumnKeyListName = \"String_Node_Str\";\n for (Object itemList : itemCon) {\n if (((ElementParameter) itemList).getFieldType().equals(EParameterFieldType.PREV_COLUMN_LIST) || ((ElementParameter) itemList).getFieldType().equals(EParameterFieldType.COLUMN_LIST)) {\n conElemForList = (ElementParameter) itemList;\n clumnKeyListName = ((ElementParameter) itemList).getName();\n }\n }\n List<String> parKeyValues = new ArrayList<String>();\n if (conElemForList != null) {\n for (Map conColumnListMap : (List<Map>) parTableCon.getValue()) {\n if (conColumnListMap.get(clumnKeyListName) instanceof String) {\n parKeyValues.add((String) conColumnListMap.get(clumnKeyListName));\n }\n if (conColumnListMap.get(clumnKeyListName) instanceof Integer) {\n Integer index = (Integer) conColumnListMap.get(clumnKeyListName);\n parKeyValues.add((String) conElemForList.getListItemsValue()[index]);\n if (conElemForList.getListItemsDisplayName().length > index) {\n conColumnListMap.put(clumnKeyListName, conElemForList.getListItemsDisplayName()[index]);\n }\n }\n }\n }\n }\n}\n"
"public IResultObject[] readData(InputStream bis, int length) throws IOException, DataException {\n ResultObject[] rowDatas = new ResultObject[length];\n int rowLen;\n byte[] rowDataBytes;\n ByteArrayInputStream bais;\n DataInputStream dis;\n for (int i = 0; i < length; i++) {\n if (session.getStopSign().isStopped())\n break;\n rowLen = IOUtil.readInt(bis);\n rowDataBytes = new byte[rowLen];\n int readSize = bis.read(rowDataBytes);\n int totalSize = readSize;\n while (readSize > 0 && totalSize < rowLen) {\n readSize = bis.read(rowDataBytes, totalSize, rowLen - totalSize);\n totalSize += readSize;\n }\n bais = new ByteArrayInputStream(rowDataBytes);\n dis = new DataInputStream(bais);\n Object[] obs = new Object[columnCount];\n for (int j = 0; j < columnCount; j++) {\n Class fieldType = typeArray[j];\n if (dis.readByte() == 0) {\n obs[j] = null;\n continue;\n }\n if (fieldType.equals(Integer.class))\n obs[j] = new Integer(dis.readInt());\n else if (fieldType.equals(Double.class))\n obs[j] = new Double(dis.readDouble());\n else if (fieldType.equals(BigDecimal.class))\n obs[j] = new BigDecimal(dis.readUTF());\n else if (fieldType.equals(Time.class))\n obs[j] = new Time(dis.readLong());\n else if (fieldType.equals(Timestamp.class))\n obs[j] = new Timestamp(dis.readLong());\n else if (fieldType.equals(java.sql.Date.class))\n obs[j] = new java.sql.Date(dis.readLong());\n else if (Date.class.isAssignableFrom(fieldType))\n obs[j] = new Date(dis.readLong());\n else if (fieldType.equals(Boolean.class))\n obs[j] = new Boolean(dis.readBoolean());\n else if (fieldType.equals(String.class))\n obs[j] = IOUtil.readString(dis);\n else if (fieldType.equals(IClob.class) || fieldType.equals(Clob.class))\n obs[j] = IOUtil.readString(dis);\n else if (fieldType.equals(IBlob.class) || fieldType.equals(Blob.class)) {\n int len = IOUtil.readInt(dis);\n if (len == 0) {\n obs[j] = null;\n } else {\n byte[] bytes = new byte[len];\n dis.read(bytes);\n obs[j] = bytes;\n }\n } else if (fieldType.equals(Object.class) || fieldType.equals(DataType.getClass(DataType.ANY_TYPE))) {\n ObjectInputStream ois = null;\n if (classLoader != null) {\n ois = ObjectSecurity.createObjectInputStream(dis, classLoader);\n } else {\n ois = ObjectSecurity.createObjectInputStream(dis);\n }\n try {\n obs[j] = ObjectSecurity.readObject(ois);\n } catch (Exception e) {\n }\n ois.close();\n } else {\n throw new DataException(ResourceConstants.BAD_DATA_TYPE, fieldType.toString());\n }\n }\n rowDatas[i] = newResultObject(obs);\n rowDataBytes = null;\n dis = null;\n bais = null;\n }\n return rowDatas;\n}\n"
"public void createPartControl(Composite parent) {\n scrollFrame = new ScrolledComposite(parent, SWT.V_SCROLL);\n scrollFrame.setExpandVertical(true);\n scrollFrame.setExpandHorizontal(true);\n scrollFrame.setAlwaysShowScrollBars(true);\n SashForm sash = new SashForm(scrollFrame, SWT.NONE);\n scrollFrame.setContent(sash);\n tableViewer = new TableViewer(sash, SWT.FULL_SELECTION | SWT.H_SCROLL);\n tableViewer.setContentProvider(new ViewContentProvider(tableViewer));\n tableViewer.setLabelProvider(new ViewLabelProvider());\n Table table = tableViewer.getTable();\n tableViewer.addSelectionChangedListener(new ISelectionChangedListener() {\n public void selectionChanged(SelectionChangedEvent event) {\n ISelection sel = event.getSelection();\n if (!sel.isEmpty()) {\n Object firstSel = null;\n if (sel instanceof IStructuredSelection) {\n firstSel = ((IStructuredSelection) sel).getFirstElement();\n updateScrollOrigin();\n if (firstSel instanceof ITmfTimeAnalysisEntry) {\n ITmfTimeAnalysisEntry trace = (ITmfTimeAnalysisEntry) firstSel;\n tsfviewer.setSelectedTrace(trace);\n }\n }\n }\n }\n private void updateScrollOrigin() {\n Table table = tableViewer.getTable();\n if (table != null && table.getItemCount() > 0) {\n TableItem item = table.getSelection()[0];\n if (item == null) {\n return;\n }\n Rectangle itemRect = item.getBounds();\n int step = itemRect.height;\n int hscrolly = 0;\n ScrollBar hbar = scrollFrame.getHorizontalBar();\n if (hbar != null) {\n hscrolly = hbar.getSize().y;\n }\n int visibleHeight = scrollFrame.getSize().y - hscrolly;\n Point origin = scrollFrame.getOrigin();\n int endy = origin.y + visibleHeight;\n int itemStartPos = itemRect.y + table.getHeaderHeight() + table.getBorderWidth() + table.getParent().getBorderWidth();\n int itemEndPos = itemStartPos + step;\n if (origin.y >= step && itemStartPos < origin.y) {\n scrollFrame.setOrigin(origin.x, origin.y - step);\n }\n if (itemEndPos > endy) {\n scrollFrame.setOrigin(origin.x, origin.y + step);\n }\n }\n }\n });\n tableViewer.getTable().addKeyListener(new KeyListener() {\n public void keyPressed(KeyEvent e) {\n Table table = tableViewer.getTable();\n Point origin = scrollFrame.getOrigin();\n if (table == null || table.getItemCount() < 1) {\n return;\n }\n TableItem item;\n int count;\n switch(e.keyCode) {\n case SWT.PAGE_DOWN:\n updateScrollPageDown();\n break;\n case SWT.PAGE_UP:\n updateScrollUp();\n break;\n case SWT.HOME:\n count = table.getItemCount();\n item = table.getItem(0);\n scrollFrame.setOrigin(origin.x, 0);\n break;\n case SWT.END:\n count = table.getItemCount();\n item = table.getItem(count - 1);\n int itemStartPos = item.getBounds().y;\n scrollFrame.setOrigin(origin.x, itemStartPos);\n break;\n default:\n break;\n }\n }\n public void keyReleased(KeyEvent e) {\n }\n private void updateScrollPageDown() {\n Table table = tableViewer.getTable();\n int step = table.getItemHeight();\n int hscrolly = 0;\n ScrollBar hbar = scrollFrame.getHorizontalBar();\n if (hbar != null) {\n hscrolly = hbar.getSize().y;\n }\n Point origin = scrollFrame.getOrigin();\n int visibleHeight = scrollFrame.getSize().y - hscrolly;\n int endy = origin.y + visibleHeight;\n scrollFrame.setOrigin(origin.x, endy - step);\n }\n private void updateScrollUp() {\n Table table = tableViewer.getTable();\n int step = table.getItemHeight();\n int hscrolly = 0;\n ScrollBar hbar = scrollFrame.getHorizontalBar();\n if (hbar != null) {\n hscrolly = hbar.getSize().y;\n }\n Point origin = scrollFrame.getOrigin();\n int visibleHeight = scrollFrame.getSize().y - hscrolly;\n int pageUpPos = origin.y - visibleHeight + step;\n pageUpPos = pageUpPos > 0 ? pageUpPos : 0;\n scrollFrame.setOrigin(origin.x, pageUpPos);\n }\n });\n applyTableLayout(table);\n int borderWidth = table.getBorderWidth();\n int itemHeight = table.getItemHeight() + getTableItemHeightAdjustement();\n int headerHeight = table.getHeaderHeight();\n table.getVerticalBar().setVisible(false);\n tsfviewer = TmfViewerFactory.createViewer(sash, new FlowTimeRangeViewerProvider(getParamsUpdater()));\n tsfviewer.groupTraces(false);\n tsfviewer.setItemHeight(itemHeight);\n tsfviewer.setBorderWidth(borderWidth);\n tsfviewer.setHeaderHeight(headerHeight);\n tsfviewer.setVisibleVerticalScroll(false);\n tsfviewer.setNameWidthPref(0);\n tsfviewer.setAcceptSelectionAPIcalls(true);\n tsfviewer.addWidgetSelectionListner(this);\n tsfviewer.addFilterSelectionListner(this);\n tsfviewer.addWidgetTimeScaleSelectionListner(this);\n sash.setWeights(new int[] { 1, 1 });\n PlatformUI.getWorkbench().getHelpSystem().setHelp(tableViewer.getControl(), \"String_Node_Str\");\n makeActions();\n hookContextMenu();\n hookDoubleClickAction();\n contributeToActionBars();\n int timeSpaceWidth = tsfviewer.getTimeSpace();\n if (timeSpaceWidth < 0) {\n timeSpaceWidth = -timeSpaceWidth;\n }\n TmfExperiment<?> experiment = TmfExperiment.getCurrentExperiment();\n if (experiment != null) {\n TmfTimeRange experimentTRange = experiment.getTimeRange();\n TmfTimeRange adjustedTimeRange = initialExperimentDataRequest(this, experimentTRange);\n ModelUpdateInit(experimentTRange, adjustedTimeRange, this);\n } else {\n TraceDebug.debug(\"String_Node_Str\");\n }\n}\n"
"private List<ConnectionDetails> createNeigbourConnectionDetails(ConnectionDetails connectionDetails, Map<String, String> params, List<DeviceNeighbour> neighbours) {\n List<ConnectionDetails> neighboursConnDetails = new ArrayList<ConnectionDetails>();\n for (DeviceNeighbour neighbour : neighbours) {\n params.put(\"String_Node_Str\", neighbour.getDeviceType());\n params.put(\"String_Node_Str\", neighbour.getHostName());\n params.put(\"String_Node_Str\", \"String_Node_Str\" + neighbour.getIpAddress());\n params.put(\"String_Node_Str\", \"String_Node_Str\" + neighbour.getROCommunity());\n ConnectionDetails neighbourConnectionDetails = new ConnectionDetails();\n neighbourConnectionDetails.setConnectionType(\"String_Node_Str\");\n neighbourConnectionDetails.setParams(params);\n neighboursConnDetails.add(neighbourConnectionDetails);\n }\n return neighboursConnDetails;\n}\n"
"public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n View view = getView();\n listView = (ListView) view.findViewById(R.id.list);\n LayoutInflater inflater = LayoutInflater.from(view.getContext());\n final View header = inflater.inflate(R.layout.view_flip_header, listView, false);\n final View footer = inflater.inflate(R.layout.view_flip_footer, listView, false);\n final ImageView largeView = (ImageView) view.findViewById(R.id.large);\n ImageButton createButton = (ImageButton) view.findViewById(R.id.create_button);\n listView.addHeaderView(header);\n listView.addFooterView(footer);\n listView.setAdapter(flipAdapter);\n bind(demo.getFlipVmm().get(flipId)).subscribe(flipAdapter);\n final PublishSubject<ImageViewModel> largeSource = PublishSubject.create();\n bind(largeSource).distinctUntilChanged().subscribe(new ImageView.Updater(largeView));\n createButton.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n ((FlipActivity) getActivity()).startRecording();\n }\n });\n listView.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {\n public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {\n targetHeight = bottom - top;\n if (targetHeight != header.getLayoutParams().height) {\n header.getLayoutParams().height = targetHeight;\n header.invalidate();\n }\n if (targetHeight != footer.getLayoutParams().height) {\n footer.getLayoutParams().height = targetHeight;\n footer.invalidate();\n }\n }\n });\n listView.setOnScrollListener(new AbsListView.OnScrollListener() {\n int scrollState = SCROLL_STATE_IDLE;\n boolean visible = false;\n int publishIndex = -1;\n void show() {\n if (!visible) {\n visible = true;\n largeView.setVisibility(View.VISIBLE);\n }\n }\n void hide() {\n if (visible) {\n visible = false;\n largeView.setVisibility(View.INVISIBLE);\n }\n }\n public void onScrollStateChanged(AbsListView view, int scrollState) {\n this.scrollState = scrollState;\n }\n public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {\n if (publishLarge(firstVisibleItem, visibleItemCount)) {\n show();\n } else {\n hide();\n }\n }\n boolean publishLarge(int firstVisibleItem, int visibleItemCount) {\n int index = indexOf(firstVisibleItem);\n if (0 <= index && 0 <= indexOf(firstVisibleItem + visibleItemCount - 1)) {\n publishLarge(index);\n return true;\n } else {\n return false;\n }\n }\n int indexOf(int position) {\n int index = position - listView.getHeaderViewsCount();\n if (index < 0 || flipAdapter.getCount() <= index) {\n return -1;\n }\n return index;\n }\n void publishLarge(int index) {\n if (publishIndex != index) {\n publishIndex = index;\n Id frameId = flipAdapter.getItem(index);\n largeSource.onNext(flipAdapter.flipVm.getFrameVm(frameId).imageVm);\n }\n }\n });\n updateHeaderIndefinitely(header, bind(demo.getFlipInfoVmm().get(flipId)));\n scrollToEnd();\n}\n"
"public void actionPerformed(ActionEvent actor) {\n JComponent source = (JComponent) actor.getSource();\n List<PossibleAction> actions;\n PossibleAction chosenAction = null;\n if (source instanceof ClickField) {\n gbc = gb.getConstraints(source);\n actions = ((ClickField) source).getPossibleActions();\n SoundManager.notifyOfClickFieldSelection(actions.get(0));\n SoundManager.notifyOfClickFieldSelection(actions.get(0));\n log.debug(\"String_Node_Str\" + actions.get(0).toString());\n if (actions == null || actions.size() == 0) {\n log.warn(\"String_Node_Str\");\n } else if (actions.get(0) instanceof SellShares) {\n List<String> options = new ArrayList<String>();\n List<SellShares> sellActions = new ArrayList<SellShares>();\n List<Integer> sellAmounts = new ArrayList<Integer>();\n SellShares sale;\n for (PossibleAction action : actions) {\n sale = (SellShares) action;\n int i = sale.getNumber();\n if (sale.getPresidentExchange() == 0) {\n options.add(LocalText.getText(\"String_Node_Str\", i, sale.getShare(), i * sale.getShare(), sale.getCompanyName(), gameUIManager.format(i * sale.getShareUnits() * sale.getPrice())));\n } else {\n options.add(LocalText.getText(\"String_Node_Str\", i, sale.getShare(), i * sale.getShare(), sale.getCompanyName(), gameUIManager.format(i * sale.getShareUnits() * sale.getPrice()), 3 - sale.getPresidentExchange(), sale.getPresidentExchange() * sale.getShareUnit()));\n }\n sellActions.add(sale);\n sellAmounts.add(i);\n }\n int index = 0;\n if (options.size() > 1) {\n String message = LocalText.getText(\"String_Node_Str\");\n String sp = (String) JOptionPane.showInputDialog(this, message, message, JOptionPane.QUESTION_MESSAGE, null, options.toArray(new String[0]), options.get(0));\n index = options.indexOf(sp);\n } else if (options.size() == 1) {\n String message = LocalText.getText(\"String_Node_Str\");\n int result = JOptionPane.showConfirmDialog(this, options.get(0), message, JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);\n index = (result == JOptionPane.OK_OPTION ? 0 : -1);\n }\n if (index < 0) {\n } else {\n chosenAction = sellActions.get(index);\n }\n } else if (actions.get(0) instanceof BuyCertificate) {\n boolean startCompany = false;\n List<String> options = new ArrayList<String>();\n List<BuyCertificate> buyActions = new ArrayList<BuyCertificate>();\n List<Integer> buyAmounts = new ArrayList<Integer>();\n BuyCertificate buy;\n String companyName = \"String_Node_Str\";\n String playerName = \"String_Node_Str\";\n int sharePerCert;\n int sharesPerCert;\n int shareUnit;\n for (PossibleAction action : actions) {\n buy = (BuyCertificate) action;\n playerName = buy.getPlayerName();\n PublicCompany company = buy.getCompany();\n companyName = company.getId();\n sharePerCert = buy.getSharePerCertificate();\n shareUnit = company.getShareUnit();\n sharesPerCert = sharePerCert / shareUnit;\n if (buy instanceof StartCompany) {\n startCompany = true;\n int[] startPrices;\n if (((StartCompany) buy).mustSelectAPrice()) {\n startPrices = ((StartCompany) buy).getStartPrices();\n Arrays.sort(startPrices);\n if (startPrices.length > 1) {\n for (int i = 0; i < startPrices.length; i++) {\n options.add(LocalText.getText(\"String_Node_Str\", gameUIManager.format(startPrices[i]), sharePerCert, gameUIManager.format(sharesPerCert * startPrices[i])));\n buyActions.add(buy);\n buyAmounts.add(startPrices[i]);\n }\n } else {\n options.add(LocalText.getText(\"String_Node_Str\", companyName, company.getPresidentsShare().getShare(), gameUIManager.format(company.getPresidentsShare().getShares() * startPrices[0])));\n buyActions.add(buy);\n buyAmounts.add(startPrices[0]);\n }\n } else {\n startPrices = new int[] { ((StartCompany) buy).getPrice() };\n options.add(LocalText.getText(\"String_Node_Str\", companyName, sharePerCert, gameUIManager.format(startPrices[0])));\n buyActions.add(buy);\n buyAmounts.add(startPrices[0]);\n }\n } else {\n options.add(LocalText.getText(\"String_Node_Str\", sharePerCert, companyName, buy.getFromPortfolio().getName(), gameUIManager.format(sharesPerCert * buy.getPrice())));\n buyActions.add(buy);\n buyAmounts.add(1);\n for (int i = 2; i <= buy.getMaximumNumber(); i++) {\n options.add(LocalText.getText(\"String_Node_Str\", i, sharePerCert, companyName, buy.getFromPortfolio().getId(), gameUIManager.format(i * sharesPerCert * buy.getPrice())));\n buyActions.add(buy);\n buyAmounts.add(i);\n }\n }\n }\n int index = 0;\n if (options.size() > 1 || actions.get(0) instanceof StartCompany_18EU) {\n if (startCompany) {\n RadioButtonDialog dialog = new RadioButtonDialog(GameUIManager.COMPANY_START_PRICE_DIALOG, gameUIManager, parent, LocalText.getText(\"String_Node_Str\"), LocalText.getText(\"String_Node_Str\", playerName, companyName), options.toArray(new String[0]), -1);\n gameUIManager.setCurrentDialog(dialog, actions.get(0));\n parent.disableButtons();\n return;\n } else {\n String sp = (String) JOptionPane.showInputDialog(this, LocalText.getText(startCompany ? \"String_Node_Str\" : \"String_Node_Str\"), LocalText.getText(\"String_Node_Str\"), JOptionPane.QUESTION_MESSAGE, null, options.toArray(new String[0]), options.get(0));\n index = options.indexOf(sp);\n }\n } else if (options.size() == 1) {\n int result = JOptionPane.showConfirmDialog(this, options.get(0), LocalText.getText(\"String_Node_Str\"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);\n index = (result == JOptionPane.OK_OPTION ? 0 : -1);\n }\n if (index < 0) {\n } else if (startCompany) {\n chosenAction = buyActions.get(index);\n ((StartCompany) chosenAction).setStartPrice(buyAmounts.get(index));\n ((StartCompany) chosenAction).setNumberBought(((StartCompany) chosenAction).getSharesPerCertificate());\n } else {\n chosenAction = buyActions.get(index);\n ((BuyCertificate) chosenAction).setNumberBought(buyAmounts.get(index));\n }\n } else if (actions.get(0) instanceof CashCorrectionAction) {\n CashCorrectionAction cca = (CashCorrectionAction) actions.get(0);\n String amountString = (String) JOptionPane.showInputDialog(this, LocalText.getText(\"String_Node_Str\", cca.getCashHolderName()), LocalText.getText(\"String_Node_Str\"), JOptionPane.QUESTION_MESSAGE, null, null, 0);\n if (amountString.substring(0, 1).equals(\"String_Node_Str\"))\n amountString = amountString.substring(1);\n int amount;\n try {\n amount = Integer.parseInt(amountString);\n } catch (NumberFormatException e) {\n amount = 0;\n }\n cca.setAmount(amount);\n chosenAction = cca;\n } else {\n chosenAction = processGameSpecificActions(actor, actions.get(0));\n }\n } else {\n log.warn(\"String_Node_Str\" + source.toString());\n }\n chosenAction = processGameSpecificFollowUpActions(actor, chosenAction);\n if (chosenAction != null)\n (parent).process(chosenAction);\n repaint();\n}\n"
"public void load(final Object input, final OCommandContext context) {\n progress.incrementAndGet();\n System.out.println(input);\n}\n"
"public boolean canReplyTo(Event replyToEvent) {\n return replyToEvent != null && Event.EVENT_TYPE_MESSAGE.equals(replyToEvent.getType());\n}\n"
"public void persistJoinTable(String joinTableName, String joinColumnName, String inverseJoinColumnName, EntityMetadata relMetadata, EntitySaveGraph objectGraph) {\n Mutator mutator = Pelops.createMutator(PelopsUtils.generatePoolName(getPersistenceUnit()));\n String parentId = (String) primaryKey;\n List<Column> columns = new ArrayList<Column>();\n if (Collection.class.isAssignableFrom(objectGraph.getChildEntity().getClass())) {\n Collection children = (Collection) objectGraph.getChildEntity();\n for (Object child : children) {\n addColumnsToJoinTable(inverseJoinColumnName, relMetadata, columns, child);\n }\n } else {\n Object child = objectGraph.getChildEntity();\n addColumnsToJoinTable(inverseJoinColumnName, relMetadata, columns, child);\n }\n mutator.writeColumns(joinTableName, new Bytes(parentId.getBytes()), Arrays.asList(columns.toArray(new Column[0])));\n mutator.execute(ConsistencyLevel.ONE);\n}\n"
"public void testTxnBackupDies() throws TransactionException {\n Config config = new Config();\n final TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(2);\n final HazelcastInstance h1 = factory.newHazelcastInstance(config);\n final HazelcastInstance h2 = factory.newHazelcastInstance(config);\n final IMap map1 = h1.getMap(\"String_Node_Str\");\n final int size = 50;\n final CountDownLatch latch = new CountDownLatch(size + 1);\n Runnable runnable = new Runnable() {\n public void run() {\n try {\n boolean b = h1.executeTransaction(new TransactionOptions().setDurability(1), new TransactionalTask<Boolean>() {\n public Boolean execute(TransactionalTaskContext context) throws TransactionException {\n final TransactionalMap<Object, Object> txMap = context.getMap(\"String_Node_Str\");\n for (int i = 0; i < size; i++) {\n txMap.put(i, i);\n try {\n Thread.sleep(100);\n } catch (InterruptedException e) {\n }\n latch.countDown();\n }\n return true;\n }\n });\n fail();\n } catch (Exception e) {\n }\n latch.countDown();\n }\n };\n new Thread(runnable).start();\n try {\n Thread.sleep(1000);\n h2.getLifecycleService().shutdown();\n latch.await();\n for (int i = 0; i < size; i++) {\n assertNull(map1.get(i));\n }\n } catch (InterruptedException e) {\n }\n}\n"
"public static String script(String str, DataPointHints dph) {\n if (dph != null) {\n str.append(\"String_Node_Str\");\n str.append(addDataValueToScript(dph.getBaseValue()));\n str.append(\"String_Node_Str\");\n str.append(addDataValueToScript(dph.getOrthogonalValue()));\n str.append(\"String_Node_Str\");\n str.append(addDataValueToScript(dph.getSeriesValue()));\n } else {\n str.append(\"String_Node_Str\");\n }\n return str;\n}\n"
"public <T> DocumentEntity<T> replaceDocument(String database, String documentHandle, T value, Long rev, Policy policy, Boolean waitForSync) throws ArangoException {\n validateDocumentHandle(documentHandle);\n HttpResponseEntity res = httpManager.doPut(createDocumentEndpointUrl(database, documentHandle), new MapBuilder().put(\"String_Node_Str\", rev).put(POLICY, policy == null ? null : policy.name()).put(WAIT_FOR_SYNC, waitForSync).get(), EntityFactory.toJsonString(value));\n DocumentEntity<T> result = createEntity(res, DocumentEntity.class);\n annotationHandler.updateDocumentRev(value, result.getDocumentRevision());\n result.setEntity(value);\n return result;\n}\n"
"public void endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord) {\n UnmarshalRecord childRecord = unmarshalRecord.getChildRecord();\n if (null != childRecord) {\n if (!xmlAnyCollectionMapping.usesXMLRoot()) {\n Object objectValue = childRecord.getCurrentObject();\n objectValue = xmlAnyCollectionMapping.convertDataValueToObjectValue(objectValue, unmarshalRecord.getSession(), unmarshalRecord.getUnmarshaller());\n unmarshalRecord.addAttributeValue(this, objectValue);\n } else {\n Object childObject = childRecord.getCurrentObject();\n Descriptor workingDescriptor = childRecord.getDescriptor();\n if (workingDescriptor != null) {\n String prefix = xPathFragment.getPrefix();\n if ((prefix == null) && (xPathFragment.getNamespaceURI() != null)) {\n prefix = unmarshalRecord.resolveNamespaceUri(xPathFragment.getNamespaceURI());\n }\n childObject = workingDescriptor.wrapObjectInXMLRoot(childObject, xPathFragment.getNamespaceURI(), xPathFragment.getLocalName(), prefix, false, unmarshalRecord.isNamespaceAware(), unmarshalRecord.getUnmarshaller());\n childObject = xmlAnyCollectionMapping.convertDataValueToObjectValue(childObject, unmarshalRecord.getSession(), unmarshalRecord.getUnmarshaller());\n unmarshalRecord.addAttributeValue(this, childObject);\n }\n }\n unmarshalRecord.setChildRecord(null);\n } else {\n SAXFragmentBuilder builder = unmarshalRecord.getFragmentBuilder();\n if (xmlAnyCollectionMapping.isMixedContent() && unmarshalRecord.getTextWrapperFragment() != null && unmarshalRecord.getTextWrapperFragment().equals(xPathFragment)) {\n endElementProcessText(unmarshalRecord, xmlAnyCollectionMapping, xPathFragment, null);\n return;\n }\n UnmarshalKeepAsElementPolicy keepAsElementPolicy = xmlAnyCollectionMapping.getKeepAsElementPolicy();\n if (null != keepAsElementPolicy && (keepAsElementPolicy.isKeepUnknownAsElement() || keepAsElementPolicy.isKeepAllAsElement()) && builder.getNodes().size() > 1) {\n setOrAddAttributeValueForKeepAsElement(builder, xmlAnyCollectionMapping, xmlAnyCollectionMapping, unmarshalRecord, true, null);\n } else {\n if (xmlAnyCollectionMapping.isMixedContent()) {\n endElementProcessText(unmarshalRecord, xmlAnyCollectionMapping, xPathFragment, null);\n } else {\n unmarshalRecord.resetStringBuffer();\n }\n }\n }\n}\n"
"public boolean performFinish() {\n if (minValue.getText().equals(\"String_Node_Str\") || maxValue.getText().equals(\"String_Node_Str\") || numbOfBins.getText().equals(\"String_Node_Str\")) {\n parameters.setBins(null);\n return false;\n }\n}\n"
"private void unlinkFromTarget(final E edge, final E tmpEdge, final V tmpVertex) {\n vertexPool.getByInternalPoolIndex(edge.getTargetVertexInternalPoolIndex(), tmpVertex);\n final int targetInIndex = tmpVertex.getFirstInEdgeIndex();\n if (targetInIndex == edge.getInternalPoolIndex()) {\n tmpVertex.setFirstInEdgeIndex(edge.getNextTargetEdgeIndex());\n } else {\n getByInternalPoolIndex(targetInIndex, tmpEdge);\n int nextTargetEdgeIndex = tmpEdge.getNextTargetEdgeIndex();\n while (nextTargetEdgeIndex != edge.getInternalPoolIndex()) {\n getByInternalPoolIndex(nextTargetEdgeIndex, tmpEdge);\n nextTargetEdgeIndex = tmpEdge.getNextTargetEdgeIndex();\n }\n tmpEdge.setNextTargetEdgeIndex(edge.getNextTargetEdgeIndex());\n }\n}\n"
"public static BranchCreationRequest createBranchCreateRequest(int index) {\n BranchType branchType = BranchType.values()[Math.abs(index % BranchType.values().length)];\n String branchName = \"String_Node_Str\" + index;\n int parentBranchId = index;\n int associatedArtifactId = index * 3;\n int sourceTransactionId = index * 7;\n String branchGuid = GUID.create();\n long branchUuid = Lib.generateUuid();\n int authorId = index * 7;\n String creationComment = \"String_Node_Str\" + index;\n int mergeFromAddressingQueryId = -1;\n int destinationBranchId = -1;\n return new BranchCreationRequest(branchType, sourceTransactionId, parentBranchId, branchGuid, branchName, branchUuid, associatedArtifactId, authorId, creationComment, mergeFromAddressingQueryId, destinationBranchId);\n}\n"
"public void testInvalidScripts_GRE323_2() {\n runConformTest(new String[] { \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" });\n}\n"
"public void layout() {\n init();\n if (PropertyUtil.isInlineElement(image)) {\n assert (parent instanceof IInlineStackingLayout);\n IInlineStackingLayout lineParent = (IInlineStackingLayout) parent;\n if (root.getAllocatedWidth() > parent.getCurrentMaxContentWidth()) {\n if (!lineParent.isEmptyLine()) {\n boolean ret = lineParent.endLine();\n layout();\n }\n }\n }\n boolean succeed = parent.addArea(root, 0);\n if (succeed) {\n return;\n } else {\n boolean succeed = parent.addArea(root, 0);\n if (succeed) {\n return;\n } else {\n if (!parent.isPageEmpty()) {\n parent.autoPageBreak();\n }\n parent.addToRoot(root, parent.contextList.size() - 1);\n if (parent.isInBlockStacking) {\n parent.flushFinishedPage();\n }\n }\n }\n}\n"
"public AbstractRecord extractPrimaryKeyRowFromObject(Object domainObject, AbstractSession session) {\n AbstractRecord databaseRow = createRecord(getPrimaryKeyMappings().size(), session);\n for (int index = 0; index < getPrimaryKeyMappings().size(); index++) {\n getPrimaryKeyMappings().get(index).writeFromObjectIntoRow(domainObject, databaseRow, session);\n }\n if (this.descriptor.hasSimplePrimaryKey()) {\n return databaseRow;\n }\n AbstractRecord primaryKeyRow = createRecord(getPrimaryKeyMappings().size());\n List primaryKeyFields = this.descriptor.getPrimaryKeyFields();\n for (int index = 0; index < primaryKeyFields.size(); index++) {\n Class classification = getPrimaryKeyClassifications().get(index);\n DatabaseField field = (DatabaseField) primaryKeyFields.get(index);\n Object value = databaseRow.get(field);\n primaryKeyRow.put(field, session.getPlatform(domainObject.getClass()).convertObject(value, classification));\n }\n return primaryKeyRow;\n}\n"
"public List<ProjectVersion> findProjectVersionsByProject(String projectId) {\n Map<String, Object> params = new HashMap<>();\n params.put(\"String_Node_Str\", 0);\n params.put(\"String_Node_Str\", project.getId());\n List<ProjectVersion> versions = persistenceManager.find(ProjectVersion.class, params, null, null, tableName(ProjectVersion.class));\n AbstractObjectCreateTimeDescSorter.sort(versions);\n return versions;\n}\n"
"public Feature getFeature() throws IOException {\n if (outputQueue.size() == 0) {\n if (segmentEnd) {\n segmentEnd = false;\n outputQueue.add(new Feature(Signal.SEGMENT_END, getNextFeatureID()));\n } else {\n if (segmentEnd) {\n segmentEnd = false;\n outputQueue.add(new Feature(Signal.SEGMENT_END, getNextFeatureID()));\n } else if (input.hasContent()) {\n int numberFeatures = readCepstra(featureBlockSize);\n if (numberFeatures > 0) {\n computeFeatures(numberFeatures);\n }\n } else if (input.getSignal().equals(Signal.SEGMENT_START)) {\n input = (Cepstrum) peekableQueue.removeNext();\n segmentStart = true;\n outputQueue.add(new Feature(input.getSignal(), getNextFeatureID()));\n }\n }\n }\n if (outputQueue.size() > 0) {\n return (Feature) outputQueue.remove(0);\n } else {\n return null;\n }\n}\n"
"public void setElementValue(XMLElement element, String value) {\n if (EjbTagNames.TIMEOUT_VALUE.equals(element.getQName())) {\n descriptor.setValue(Long.parseLong(value));\n } else if (EjbTagNames.TIMEOUT_UNIT.equals(element.getQName())) {\n descriptor.setUnit(elementToTimeUnit.get(value));\n } else {\n super.setElementValue(element, value);\n }\n}\n"
"public boolean onSingleTapUp(MotionEvent e) {\n OnChartGestureListener l = mChart.getOnChartGestureListener();\n if (l != null) {\n l.onChartSingleTapped(e);\n }\n Highlight h = mChart.getHighlightByTouchPoint(e.getX(), e.getY());\n if (h == null || h.equalTo(mLastHighlighted)) {\n mChart.highlightTouch(null);\n mLastHighlighted = null;\n } else {\n mLastHighlighted = h;\n mChart.highlightTouch(h);\n }\n return super.onSingleTapUp(e);\n}\n"
"void runVerticesReadyForExecution() {\n final Set<ExecutionVertex> readyVertices = this.scheduler.getVerticesReadyToBeExecuted();\n synchronized (this.verticesReadyToRun) {\n this.verticesReadyToRun.addAll(readyVertices);\n final Iterator<ExecutionVertex> it = this.verticesReadyToRun.iterator();\n while (it.hasNext()) {\n final ExecutionVertex vertex = it.next();\n if (vertex.getExecutionState() != ExecutionState.READY) {\n LOG.error(\"String_Node_Str\" + vertex + \"String_Node_Str\" + vertex.getExecutionState());\n }\n if (vertex.isInputVertex() && vertex.getEnvironment().getInputSplits().length == 0 && vertex.getGroupVertex().getStageNumber() == 0) {\n try {\n if (!InputSplitAssigner.assignInputSplits(vertex)) {\n continue;\n }\n } catch (ExecutionFailureException e) {\n e.printStackTrace();\n }\n }\n LOG.info(\"String_Node_Str\" + vertex + \"String_Node_Str\" + vertex.getAllocatedResource().getInstance());\n final TaskSubmissionResult submissionResult = vertex.startTask();\n it.remove();\n if (submissionResult.getReturnCode() == AbstractTaskResult.ReturnCode.ERROR) {\n vertex.getEnvironment().changeExecutionState(ExecutionState.FAILED, submissionResult.getDescription());\n }\n }\n }\n}\n"
"private void updateMobileIndicatorUsingCaps(String user) {\n ContactJabberImpl contact = ssclCallback.findContactById(StringUtils.parseBareAddress(user));\n if (contact == null)\n return;\n int currentMostConnectedStatus = 0;\n List<ContactResource> mostAvailableResources = new ArrayList<ContactResource>();\n for (Map.Entry<String, ContactResourceJabberImpl> resEntry : contact.getResourcesMap().entrySet()) {\n ContactResourceJabberImpl res = resEntry.getValue();\n if (!res.getPresenceStatus().isOnline())\n continue;\n int status = res.getPresenceStatus().getStatus();\n if (status > currentMostConnectedStatus) {\n if (currentMostConnectedStatus != status)\n mostAvailableResources.clear();\n currentMostConnectedStatus = status;\n mostAvailableResources.add(res);\n }\n }\n boolean allMobile = false;\n for (ContactResource res : mostAvailableResources) {\n if (res.isMobile())\n allMobile = true;\n else {\n allMobile = false;\n break;\n }\n }\n if (mostAvailableResources.size() > 0)\n contact.setMobile(allMobile);\n else\n contact.setMobile(false);\n}\n"
"public View createViewByType(AVIMReservedMessageType type, boolean comeMsg) {\n View baseView;\n if (comeMsg) {\n baseView = View.inflate(context, R.layout.chat_item_base_left, null);\n } else {\n baseView = View.inflate(context, R.layout.chat_item_base_right, null);\n }\n LinearLayout contentView = (LinearLayout) baseView.findViewById(R.id.contentLayout);\n int contentId;\n switch(type) {\n case TextMessageType:\n contentId = R.layout.chat_item_text;\n break;\n case AudioMessageType:\n contentId = R.layout.chat_item_audio;\n break;\n case ImageMessageType:\n contentId = R.layout.chat_item_image;\n break;\n case LocationMessageType:\n contentId = R.layout.chat_item_location;\n break;\n default:\n contentId = R.layout.chat_item_text;\n break;\n }\n contentView.removeAllViews();\n View content = View.inflate(context, contentId, null);\n if (type == AVIMReservedMessageType.AudioMessageType) {\n PlayButton btn = (PlayButton) content;\n btn.setLeftSide(comeMsg);\n } else if (type == AVIMReservedMessageType.TextMessageType) {\n TextView textView = (TextView) content;\n if (comeMsg) {\n textView.setTextColor(Color.BLACK);\n } else {\n textView.setTextColor(Color.WHITE);\n }\n }\n contentView.addView(content);\n return baseView;\n}\n"
"public boolean apply(Game game, Ability source) {\n return true;\n}\n"
"private void fetchMDocsByTag(String workspaceId, String label) {\n desiredProfile = m_tableProfiles.getProfile(\"String_Node_Str\");\n pageManager.setPageManagerBackend(new MDocTagBackend(m_login, label, workspaceId));\n}\n"
"public static void main(String[] args) throws IOException, InterruptedException {\n HttpClient client = new HttpClient();\n String[] urls = new String[] { \"String_Node_Str\", \"String_Node_Str\" };\n ExecutorService pool = Executors.newCachedThreadPool();\n for (String url : urls) {\n final CountDownLatch cd = new CountDownLatch(1);\n SSLEngine engine = SslContextFactory.getClientContext().createSSLEngine();\n engine = null;\n HttpRequestConfig cfg = new HttpRequestConfig(HttpMethod.GET, 10000, -1, engine);\n client.exec(url, new TreeMap<String, Object>(), null, cfg, new RespListener(new IResponseHandler() {\n public void onSuccess(int status, Map<String, String> headers, Object body) {\n int length = body instanceof String ? ((String) body).length() : ((BytesInputStream) body).available();\n logger.info(\"String_Node_Str\", status, headers, length);\n cd.countDown();\n }\n public void onThrowable(Throwable t) {\n logger.error(\"String_Node_Str\", t);\n cd.countDown();\n }\n }, IFilter.ACCEPT_ALL, pool));\n cd.await();\n }\n}\n"
"public E next() {\n if (currentSample != null) {\n return currentSample;\n } else {\n throw new NoSuchElementException();\n }\n}\n"
"public void onKeyDown(KeyDownEvent event) {\n final int keyCode = event.getNativeKeyCode();\n Selection selection = getTextArea().getDocument().getSelection();\n if (selection.getRangeCount() > 0) {\n Range range = selection.getRangeAt(0);\n logRange(range);\n int pos = -1;\n Node startContainer = range.getStartContainer();\n Node endContainer = range.getEndContainer();\n List<Integer> path = TreeHelper.getLocator(range.getStartContainer());\n TreeOperation op = null;\n switch(keyCode) {\n case KeyCodes.KEY_BACKSPACE:\n {\n pos = range.getStartOffset();\n if (Node.TEXT_NODE == startContainer.getNodeType()) {\n Text textNode = Text.as(startContainer);\n if (pos == 0) {\n if (leftParagraph != null) {\n boolean merge = false;\n if (textNode != n && textNode == n.getFirstChild()) {\n merge = true;\n }\n if (textNode == n && n == rightParagraph.getFirstChild()) {\n merge = true;\n }\n if (merge) {\n op = new TreeMergeParagraph(clientJupiter.getSiteId(), path.get(0), leftParagraph.getChildCount(), rightParagraph.getChildCount());\n op.setPath(TreeHelper.toIntArray(path));\n } else {\n log.severe(\"String_Node_Str\");\n }\n } else {\n }\n } else {\n pos = pos - 1;\n op = new TreeDeleteText(clientJupiter.getSiteId(), pos, TreeHelper.toIntArray(path));\n }\n } else if (Node.ELEMENT_NODE == startContainer.getNodeType()) {\n if (pos == 0) {\n if (startContainer.getPreviousSibling() != null) {\n log.severe(\"String_Node_Str\");\n } else {\n event.preventDefault();\n }\n }\n }\n }\n break;\n case KeyCodes.KEY_DELETE:\n {\n if (Node.TEXT_NODE == startContainer.getNodeType()) {\n Text textNode = Text.as(startContainer);\n pos = range.getStartOffset();\n if (textNode.getLength() == pos) {\n Element sibling = textNode.getParentElement().getNextSiblingElement();\n if ((sibling != null) && (!sibling.getClassName().toLowerCase().contains(\"String_Node_Str\"))) {\n path.set(0, path.get(0) + 1);\n op = new TreeMergeParagraph(clientJupiter.getSiteId(), path.get(0), 1, 1);\n op.setPath(TreeHelper.toIntArray(path));\n }\n } else {\n op = new TreeDeleteText(clientJupiter.getSiteId(), pos, TreeHelper.toIntArray(path));\n }\n } else if (Node.ELEMENT_NODE == startContainer.getNodeType()) {\n if (startContainer.getNextSibling() != null) {\n path.set(0, path.get(0) + 1);\n op = new TreeMergeParagraph(clientJupiter.getSiteId(), path.get(0), 1, 1);\n op.setPath(TreeHelper.toIntArray(path));\n }\n }\n }\n break;\n case KeyCodes.KEY_ENTER:\n {\n path = TreeHelper.getLocator(range.getEndContainer());\n pos = range.getEndOffset();\n if (Node.TEXT_NODE == endContainer.getNodeType()) {\n Text textNode = Text.as(endContainer);\n boolean isNewParagraph = false;\n Node n = textNode;\n while (!\"String_Node_Str\".equalsIgnoreCase(n.getParentNode().getNodeName())) {\n n = n.getParentNode();\n }\n if (n.getPreviousSibling() == null && 0 == pos) {\n isNewParagraph = true;\n pos = path.get(0);\n }\n if ((n.getNextSibling() == null || BR.equalsIgnoreCase(n.getNextSibling().getNodeName())) && textNode.getLength() == pos) {\n isNewParagraph = true;\n pos = path.get(0) + 1;\n }\n if (isNewParagraph) {\n op = new TreeNewParagraph(clientJupiter.getSiteId(), pos);\n op.setPath(TreeHelper.toIntArray(path));\n } else {\n op = new TreeInsertParagraph(clientJupiter.getSiteId(), pos, TreeHelper.toIntArray(path));\n }\n } else if (Node.ELEMENT_NODE == endContainer.getNodeType()) {\n Element element = Element.as(endContainer);\n if (element.getPreviousSibling() == null && 0 == pos) {\n op = new TreeNewParagraph(clientJupiter.getSiteId(), path.get(0));\n op.setPath(TreeHelper.toIntArray(path));\n } else {\n int brCount = element.getElementsByTagName(BR).getLength();\n int childCount = element.getChildCount();\n boolean isBeforeLastBrTag = ((pos == (childCount - brCount)) && (BR.equalsIgnoreCase(element.getLastChild().getNodeName())));\n boolean isAfterLastTag = (pos == childCount);\n if (isBeforeLastBrTag || isAfterLastTag) {\n pos = path.get(0) + 1;\n op = new TreeNewParagraph(clientJupiter.getSiteId(), pos);\n op.setPath(TreeHelper.toIntArray(path));\n } else {\n pos = range.getEndOffset();\n op = new TreeInsertParagraph(clientJupiter.getSiteId(), pos, TreeHelper.toIntArray(path));\n }\n }\n }\n }\n break;\n default:\n break;\n }\n if (op != null) {\n if (!(op instanceof TreeInsertText || op instanceof TreeDeleteText)) {\n event.preventDefault();\n }\n clientJupiter.generate(op);\n }\n }\n}\n"
"public boolean inDeepScope(String symbol) {\n if ((_currentBranch || isForStatement) && _trueSymbols.containsKey(symbol)) {\n return true;\n } else if (!(_currentBranch || isForStatement) && _falseSymbols.containsKey(symbol)) {\n return true;\n }\n for (IfTree child : _children) {\n if (child.isForStatement) {\n if (child.inDeepScope(symbol)) {\n return true;\n }\n }\n }\n return false;\n}\n"
"public boolean isRemote() {\n return !(\"String_Node_Str\".equals(getHost()));\n}\n"
"public void testRateLimitExceeded() throws IOException {\n responseHeaders.setContentType(MediaType.APPLICATION_JSON);\n mockServer.expect(requestTo(\"String_Node_Str\")).andExpect(method(GET)).andRespond(withStatus(UNAUTHORIZED).body(jsonResource(\"String_Node_Str\")).contentType(MediaType.APPLICATION_JSON));\n yammerTemplate.userOperations().getUsers(1);\n}\n"
"public void onClick(MouseEvent event) {\n int x = (int) (event.getX() / this.getTileSize());\n int y = (int) (event.getY() / this.getTileSize());\n if (event.getButton().equals(MouseButton.PRIMARY)) {\n Node node = event.getPickResult().getIntersectedNode();\n if (!(node instanceof PixelatedImageView)) {\n set(x, y, new WholeTile(1, 0, getTileset()));\n } else {\n WholeTile wholeTile = (WholeTile) this.grid[x][y];\n wholeTile.setBlockId((wholeTile.getBlockId() + 1) % 45);\n wholeTile.updateImageView();\n }\n } else if (event.getButton().equals(MouseButton.SECONDARY)) {\n remove(x, y);\n }\n}\n"
"public OrderBean transformToOrderFormBean(Orders entity) {\n OrderBean formBean = new OrderBean();\n formBean.setOrderNumber(entity.getOrderNumber());\n Contacts shipperContactName = customerService.findContactById(entity.getShipperContactId());\n Customer customerName = customerService.findCustomerById(shipperContactName.getReferenceId());\n formBean.setCustomerName((customerName.getCustomerName()));\n formBean.setServiceRequirement(entity.getServiceRequirement());\n formBean.setModeOfService(entity.getServiceMode());\n Contacts consigneeName = customerService.findContactById(entity.getConsigneeContactId());\n formBean.setConsigneeCode(getFullName(consigneeName.getLastName(), consigneeName.getFirstName(), consigneeName.getMiddleName()));\n formBean.setOrderId(entity.getOrderId());\n List<OrderItems> orderItemsVolume = orderService.findAllItemByOrderId(entity.getOrderId());\n Float orderVolume = 0.F;\n for (OrderItems orderItemElem : orderItemsVolume) {\n if (orderItemElem.getVolume() != null) {\n orderVolume = orderVolume + orderItemElem.getVolume();\n }\n }\n formBean.setOrderVolume(orderVolume);\n Double orderWeight = 0.0;\n for (OrderItems orderItemElem : orderItemsVolume) {\n if (orderItemElem.getWeight() != null) {\n orderWeight = orderWeight + orderItemElem.getWeight();\n }\n }\n formBean.setOrderWeight(orderWeight);\n formBean.setOrderStatus(entity.getOrderStatus());\n formBean.setFreightType(entity.getServiceType());\n if (entity.getOriginationPort() != null) {\n formBean.setOriginationPort(entity.getOriginationPort());\n } else {\n formBean.setOriginationPort(\"String_Node_Str\");\n }\n formBean.setModeOfPayment(entity.getPaymentMode());\n formBean.setNotifyBy(entity.getNotificationType());\n formBean.setOrderDate(entity.getOrderDate());\n if (entity.getDestinationPort() != null) {\n formBean.setDestinationPort(entity.getDestinationPort());\n } else {\n formBean.setDestinationPort(\"String_Node_Str\");\n }\n formBean.setRates(entity.getRates());\n formBean.setComments(entity.getComments());\n formBean.setPickupDate(entity.getPickupDate());\n formBean.setDeliveryDate(entity.getDeliveryDate());\n Contacts contactShipperName = customerService.findContactById(entity.getShipperContactId());\n Customer shipperName = customerService.findCustomerById(contactShipperName.getReferenceId());\n if (shipperName != null) {\n formBean.setCustomerId(shipperName.getCustomerId());\n formBean.setCustomerName(shipperName.getCustomerName());\n }\n Contacts contacts = customerService.findContactById(entity.getShipperContactId());\n contact = new ContactBean();\n contact.setName(getFullName(contacts.getLastName(), contacts.getFirstName(), contacts.getMiddleName()));\n contact.setPhone(contacts.getPhone());\n contact.setEmail(contacts.getEmail());\n contact.setFax(contacts.getFax());\n contact.setMobile(contacts.getMobile());\n formBean.setShipperInfoContact(contact);\n if (entity.getShipperAddressId() != null) {\n Address addresses = customerService.findAddressById(entity.getShipperAddressId());\n address = new AddressBean();\n address.setAddress(getAddress(addresses));\n formBean.setShipperInfoAddress(address);\n } else {\n address = new AddressBean();\n address.setAddress(\"String_Node_Str\");\n formBean.setShipperInfoAddress(address);\n }\n Contacts consigneeContact = customerService.findContactById(entity.getConsigneeContactId());\n contact = new ContactBean();\n contact.setName(getFullName(consigneeContact.getLastName(), consigneeContact.getFirstName(), consigneeContact.getMiddleName()));\n contact.setPhone(consigneeContact.getPhone());\n contact.setEmail(consigneeContact.getEmail());\n contact.setFax(consigneeContact.getFax());\n contact.setMobile(consigneeContact.getMobile());\n formBean.setConsigneeInfoContact(contact);\n if (entity.getConsigneeAddressId() != null) {\n Address consigneeAddress = customerService.findAddressById(entity.getConsigneeAddressId());\n address = new AddressBean();\n address.setAddress(getAddress(consigneeAddress));\n formBean.setConsigneeInfoAddress(address);\n } else {\n address = new AddressBean();\n address.setAddress(\"String_Node_Str\");\n formBean.setConsigneeInfoAddress(address);\n }\n formBean.setConsigneeContactPersonId(order.getConsigneeContactPersonId());\n if (order.getConsigneeContactPersonId() != null) {\n Contacts contactElem = customerService.findContactById(order.getConsigneeContactPersonId());\n formBean.setConsigneeContactName(contactElem.getFirstName() + \"String_Node_Str\" + contactElem.getMiddleName() + \"String_Node_Str\" + contactElem.getLastName());\n }\n List<OrderItems> orderItemEntity = operationsService.findAllOrderItemsByOrderId(entity.getOrderId());\n if (orderItemEntity.size() >= 1) {\n if (orderEntity.getServiceMode().equals(\"String_Node_Str\") || orderEntity.getServiceMode().equals(\"String_Node_Str\") || orderEntity.getServiceMode().equals(\"String_Node_Str\") || orderEntity.getServiceMode().equals(\"String_Node_Str\")) {\n if (orderItemEntity.get(0).getTruckOrigin() != null || \"String_Node_Str\".equals(orderItemEntity.get(0).getTruckOrigin())) {\n Trucks truckEntityOri = vendorService.findTrucksByTruckCode(orderItemEntity.get(0).getTruckOrigin());\n formBean.setPlateNumberOri(truckEntityOri.getPlateNumber());\n } else {\n formBean.setPlateNumberOri(\"String_Node_Str\");\n }\n } else if (orderEntity.getServiceMode().equals(\"String_Node_Str\") || orderEntity.getServiceMode().equals(\"String_Node_Str\") || orderEntity.getServiceMode().equals(\"String_Node_Str\") || orderEntity.getServiceMode().equals(\"String_Node_Str\")) {\n if (orderItemEntity.get(0).getTruckDestination() != null || \"String_Node_Str\".equals(orderItemEntity.get(0).getTruckDestination())) {\n Trucks truckEntityDes = vendorService.findTrucksByTruckCode(orderItemEntity.get(0).getTruckDestination());\n formBean.setPlateNumberDes(truckEntityDes.getPlateNumber());\n } else {\n formBean.setPlateNumberDes(\"String_Node_Str\");\n }\n }\n if (orderItemEntity.get(0).getTruckDestination() != null) {\n Trucks truckEntityDes = vendorService.findTrucksByTruckCode(orderItemEntity.get(0).getTruckDestination());\n formBean.setPlateNumberDes(truckEntityDes.getPlateNumber());\n } else {\n formBean.setPlateNumberDes(\"String_Node_Str\");\n }\n }\n return formBean;\n}\n"
"public static AmbariApiException RESPONSE_EXCEPTION(int errCode, String message) {\n return new AmbariApiException(\"String_Node_Str\", null, message);\n}\n"
"public Object getMetadata() {\n try {\n Object[] ports = _state.snapshot().keySet().toArray();\n return PersistentVector.create(ports);\n } catch (IOException ex) {\n throw new RuntimeException(ex);\n }\n}\n"
"private void init() throws Exception {\n while (getChild(UIActivityLoader.class) != null) {\n removeChild(UIActivityLoader.class);\n }\n if (activityIdList == null) {\n return;\n }\n ActivityManager activityManager = getApplicationComponent(ActivityManager.class);\n for (String activityId : activityIdList) {\n UIActivityLoader uiActivityLoader = addChild(UIActivityLoader.class, null, UIActivityLoader.buildComponentId(activityId));\n if (isRenderFull()) {\n UIActivityFactory factory = CommonsUtils.getService(UIActivityFactory.class);\n factory.addChild(activityManager.getActivity(activityId), uiActivityLoader);\n }\n }\n}\n"
"public void onStopTrackingTouch(SeekBar seekBar) {\n if (result.getLastSeekEvent().x == seekBarMax - seekBarMargin) {\n main.addSentenceResult(result);\n if (!showQuestion()) {\n nextSentence();\n }\n }\n}\n"