content
stringlengths 40
137k
|
---|
"public ArrayList<String> getRowValues(int rowNr) {\n ArrayList<String> valuesList = new ArrayList<String>();\n if (rowCount > 0) {\n HashMap<String, String> rowData = resultList.get(rowNr);\n for (int i = 0; i < nameList.size(); i++) {\n valuesList.add(rowData.get(nameList.get(i)));\n }\n return valuesList;\n }\n return valuesList;\n}\n"
|
"public static String getNewQueryLabel() {\n return Messages1.getString(\"String_Node_Str\", num++);\n}\n"
|
"public boolean hasPrevPage() {\n if (offset > 0) {\n return true;\n }\n return false;\n}\n"
|
"public Collection<DistributedObject> getDistributedObjects() {\n try {\n ClientMessage request = ClientGetDistributedObjectsCodec.encodeRequest();\n final Future<ClientMessage> future = new ClientInvocation(this, request, getName()).invoke();\n ClientMessage response = future.get();\n ClientGetDistributedObjectsCodec.ResponseParameters resultParameters = ClientGetDistributedObjectsCodec.decodeResponse(response);\n Collection<? extends DistributedObject> distributedObjects = proxyManager.getDistributedObjects();\n Set<DistributedObjectInfo> localDistributedObjects = new HashSet<DistributedObjectInfo>();\n for (DistributedObject localInfo : distributedObjects) {\n localDistributedObjects.add(new DistributedObjectInfo(localInfo.getServiceName(), localInfo.getName()));\n }\n Collection<DistributedObjectInfo> newDistributedObjectInfo = resultParameters.response;\n for (DistributedObjectInfo distributedObjectInfo : newDistributedObjectInfo) {\n localDistributedObjects.remove(distributedObjectInfo);\n getDistributedObject(distributedObjectInfo.getServiceName(), distributedObjectInfo.getName());\n }\n for (DistributedObjectInfo distributedObjectInfo : localDistributedObjects) {\n proxyManager.destroyProxyLocally(distributedObjectInfo.getServiceName(), distributedObjectInfo.getName());\n }\n return (Collection<DistributedObject>) proxyManager.getDistributedObjects();\n } catch (Exception e) {\n throw rethrow(e);\n }\n}\n"
|
"public static Resource[] getJndiLocations(final String[] filePathJndiNames) {\n final ResourceLoader resourceLoader = new DefaultResourceLoader();\n try {\n final InitialContext initCtx = new InitialContext();\n final Context envCtx = (Context) initCtx.lookup(\"String_Node_Str\");\n final Resource[] locations = new Resource[filePathJndiNames.length];\n boolean found = false;\n try {\n final Context envCtx = (Context) initCtx.lookup(\"String_Node_Str\");\n for (int i = 0; i < filePathJndiNames.length; i++) {\n locations[i] = resourceLoader.getResource((String) envCtx.lookup(filePathJndiNames[i]));\n }\n found = true;\n } catch (final NamingException e) {\n LOGGER.warn(\"String_Node_Str\" + e.getExplanation());\n }\n if (!found) {\n try {\n for (int i = 0; i < filePathJndiNames.length; i++) {\n locations[i] = resourceLoader.getResource((String) initCtx.lookup(filePathJndiNames[i]));\n }\n } catch (final NamingException e) {\n LOGGER.warn(\"String_Node_Str\" + \"String_Node_Str\" + e.getExplanation());\n return null;\n }\n }\n return locations;\n } catch (final NamingException e) {\n LOGGER.warn(\"String_Node_Str\" + \"String_Node_Str\" + e.getExplanation());\n return null;\n }\n}\n"
|
"public String getBootArgs() {\n String eth1Ip = (proxy.getPrivateIpAddress() == null) ? \"String_Node_Str\" : proxy.getPrivateIpAddress();\n String eth1NetMask = (proxy.getPrivateNetmask() == null) ? \"String_Node_Str\" : proxy.getPrivateNetmask();\n String eth2Ip = (proxy.getPublicIpAddress() == null) ? \"String_Node_Str\" : proxy.getPublicIpAddress();\n String eth2NetMask = (proxy.getPublicNetmask() == null) ? \"String_Node_Str\" : proxy.getPublicNetmask();\n String gateWay = (proxy.getGateway() == null) ? \"String_Node_Str\" : proxy.getGateway();\n String basic = \"String_Node_Str\" + proxy.getGuestIpAddress() + \"String_Node_Str\" + proxy.getGuestNetmask() + \"String_Node_Str\" + eth1Ip + \"String_Node_Str\" + eth1NetMask + \"String_Node_Str\" + eth2Ip + \"String_Node_Str\" + eth2NetMask + \"String_Node_Str\" + gateWay + \"String_Node_Str\" + proxy.getDns1() + \"String_Node_Str\" + \"String_Node_Str\" + proxy.getName() + \"String_Node_Str\";\n if (proxy.getDns2() != null) {\n basic = basic + \"String_Node_Str\" + proxy.getDns2();\n }\n basic = basic + \"String_Node_Str\" + mgmt_host + \"String_Node_Str\" + mgmt_port;\n if (sslEnabled)\n basic = basic + \"String_Node_Str\";\n if (proxy.getPrivateIpAddress() == null || proxy.getPublicIpAddress() == null) {\n basic = basic + \"String_Node_Str\";\n }\n return basic;\n}\n"
|
"public void configure(Context context) {\n awsAccessKeyId = context.getString(\"String_Node_Str\");\n Preconditions.checkArgument(awsAccessKeyId != null && !awsAccessKeyId.isEmpty(), \"String_Node_Str\");\n awsSecretKey = context.getString(\"String_Node_Str\");\n Preconditions.checkArgument(awsSecretKey != null && !awsSecretKey.isEmpty(), \"String_Node_Str\");\n bucket = context.getString(\"String_Node_Str\");\n Preconditions.checkArgument(bucket != null && !bucket.isEmpty(), \"String_Node_Str\");\n endPoint = context.getString(\"String_Node_Str\");\n Preconditions.checkArgument(endPoint != null && !endPoint.isEmpty(), \"String_Node_Str\");\n batchSize = context.getString(\"String_Node_Str\", 1000);\n objPrefix = context.getString(\"String_Node_Str\", \"String_Node_Str\");\n}\n"
|
"public String toString() {\n return String.format(\"String_Node_Str\", maxIdx + 1, itIdx, Arrays.toString(elements));\n}\n"
|
"private void setAvailabilityProperties() throws ConnectorRuntimeException {\n if (!isClustered())\n return;\n try {\n Domain domain = Globals.get(Domain.class);\n ServerContext serverContext = Globals.get(ServerContext.class);\n Server server = domain.getServerNamed(serverContext.getInstanceName());\n JmsService jmsService = server.getConfig().getExtensionByType(JmsService.class);\n if (jmsService.getType().equals(REMOTE)) {\n return;\n }\n AvailabilityService as = server.getConfig().getAvailabilityService();\n if (as == null) {\n logFine(\"String_Node_Str\");\n return;\n }\n boolean useMasterBroker = true;\n if (as.getExtensionByType(JmsAvailability.class) != null && !MASTERBROKER.equalsIgnoreCase(as.getExtensionByType(JmsAvailability.class).getConfigStoreType()))\n useMasterBroker = false;\n boolean isJmsAvailabilityEnabled = this.isJMSAvailabilityOn(as);\n logFine(\"String_Node_Str\");\n if (!useMasterBroker || isJmsAvailabilityEnabled) {\n ConnectorDescriptor cd = getDescriptor();\n String clusterName = getMQClusterName();\n ConnectorConfigProperty envProp1 = new ConnectorConfigProperty(CLUSTERID, clusterName, \"String_Node_Str\", \"String_Node_Str\");\n setProperty(cd, envProp1);\n if (brokerInstanceName == null) {\n brokerInstanceName = getBrokerInstanceName(jmsService);\n }\n ConnectorConfigProperty envProp2 = new ConnectorConfigProperty(BROKERID, brokerInstanceName, \"String_Node_Str\", \"String_Node_Str\");\n setProperty(cd, envProp2);\n if (isJmsAvailabilityEnabled) {\n ConnectorConfigProperty envProp3 = new ConnectorConfigProperty(HAREQUIRED, \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n setProperty(cd, envProp3);\n ConnectorConfigProperty envProp4 = new ConnectorConfigProperty(BROKERENABLEHA, \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n setProperty(cd, envProp4);\n String nodeHostName = domain.getNodeNamed(server.getNodeRef()).getNodeHost();\n if (nodeHostName != null) {\n ConnectorConfigProperty envProp5 = new ConnectorConfigProperty(BROKERBINDADDRESS, nodeHostName, \"String_Node_Str\", \"String_Node_Str\");\n setProperty(cd, envProp5);\n }\n loadDBProperties(as.getExtensionByType(JmsAvailability.class), ClusterMode.ENHANCED);\n } else {\n JmsAvailability jmsAvailability = as.getExtensionByType(JmsAvailability.class);\n if (\"String_Node_Str\".equals(jmsAvailability.getMessageStoreType()))\n loadDBProperties(jmsAvailability, ClusterMode.ENHANCED);\n loadDBProperties(jmsAvailability, ClusterMode.CONVENTIONAL_OF_PEER_BROKERS);\n }\n } else {\n if (\"String_Node_Str\".equals(as.getExtensionByType(JmsAvailability.class).getMessageStoreType()))\n loadDBProperties(as.getExtensionByType(JmsAvailability.class), ClusterMode.CONVENTIONAL_WITH_MASTER_BROKER);\n }\n } catch (Exception e) {\n ConnectorRuntimeException crex = new ConnectorRuntimeException(e.getMessage());\n throw (ConnectorRuntimeException) crex.initCause(e);\n }\n}\n"
|
"public GenericType clone() {\n GenericType t = new GenericType();\n t.theClass = this.theClass;\n t.name = this.name;\n t.qualifiedName = this.qualifiedName;\n t.fullName = this.fullName;\n t.arrayDimensions = this.arrayDimensions;\n if (this.generics != null) {\n t.generics = new ArrayList(this.generics);\n }\n return t;\n}\n"
|
"private void call(TreeNode treeNode) {\n List<UIContactDetail> telephonyContacts = ((ContactNode) treeNode).getContactDescriptor().getContactDetailsForOperationSet(OperationSetBasicTelephony.class);\n ChooseCallAccountPopupMenu chooseAccountDialog = null;\n if (telephonyContacts.size() == 1) {\n UIContactDetail detail = telephonyContacts.get(0);\n ProtocolProviderService preferredProvider = detail.getPreferredProtocolProvider(OperationSetBasicTelephony.class);\n List<ProtocolProviderService> providers = null;\n String protocolName = null;\n if (preferredProvider != null) {\n if (preferredProvider.isRegistered())\n CallManager.createCall(preferredProvider, detail.getAddress());\n else {\n protocolName = preferredProvider.getProtocolName();\n providers = GuiActivator.getRegisteredProviders(protocolName, OperationSetBasicTelephony.class);\n }\n } else {\n protocolName = detail.getPreferredProtocol(OperationSetBasicTelephony.class);\n providers = CallManager.getRegisteredProviders(protocolName, OperationSetBasicTelephony.class);\n }\n if (providers != null) {\n int providersCount = providers.size();\n if (providersCount <= 0) {\n new ErrorDialog(null, GuiActivator.getResources().getI18NString(\"String_Node_Str\"), GuiActivator.getResources().getI18NString(\"String_Node_Str\", new String[] { protocolName })).showDialog();\n } else if (providersCount == 1) {\n CallManager.createCall(providers.get(0), detail.getAddress());\n } else if (providersCount > 1)\n chooseAccountDialog = new ChooseCallAccountPopupMenu(tree, detail.getAddress(), providers);\n }\n } else if (telephonyContacts.size() > 1) {\n chooseAccountDialog = new ChooseCallAccountPopupMenu(tree, telephonyContacts);\n }\n if (chooseAccountDialog != null) {\n Point location = new Point(callButton.getX(), callButton.getY() + callButton.getHeight());\n SwingUtilities.convertPointToScreen(location, tree);\n location.y = location.y + tree.getPathBounds(tree.getSelectionPath()).y;\n chooseAccountDialog.showPopupMenu(location.x + 8, location.y - 8);\n }\n}\n"
|
"protected void renderLines(int start, int stop) {\n report(\"String_Node_Str\");\n gl.glPushMatrix();\n gl.glScalef(1, -1, 1);\n gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);\n gl.glEnableClientState(GL10.GL_COLOR_ARRAY);\n for (int j = 0; j < pathCount; j++) {\n int i = pathOffset[j];\n float sw = vertices[lines[i][VERTEX1]][SW];\n if (sw > 0) {\n gl.glLineWidth(sw);\n if (vertexBuffer.capacity() / 3 <= 3 * (pathLength[j] + 1)) {\n expandBuffers();\n }\n vertexBuffer.rewind();\n colorBuffer.rewind();\n float[] a = vertices[lines[i][VERTEX1]];\n colorBuffer.put(toFixed32(a[SR]));\n colorBuffer.put(toFixed32(a[SG]));\n colorBuffer.put(toFixed32(a[SB]));\n colorBuffer.put(toFixed32(a[SA]));\n vertexBuffer.put(toFixed32(a[X]));\n vertexBuffer.put(toFixed32(a[Y]));\n vertexBuffer.put(toFixed32(a[Z]));\n for (int k = 0; k < pathLength[j]; k++) {\n float[] b = vertices[lines[i][VERTEX2]];\n colorBuffer.put(toFixed32(b[SR]));\n colorBuffer.put(toFixed32(b[SG]));\n colorBuffer.put(toFixed32(b[SB]));\n colorBuffer.put(toFixed32(b[SA]));\n vertexBuffer.put(toFixed32(b[X]));\n vertexBuffer.put(toFixed32(b[Y]));\n vertexBuffer.put(toFixed32(b[Z]));\n i++;\n }\n vertexBuffer.position(0);\n colorBuffer.position(0);\n gl.glVertexPointer(3, GL10.GL_FIXED, 0, vertexBuffer);\n gl.glColorPointer(4, GL10.GL_FIXED, 0, colorBuffer);\n gl.glDrawArrays(GL10.GL_LINE_STRIP, 0, pathLength[j] + 1);\n }\n }\n gl.glPopMatrix();\n report(\"String_Node_Str\");\n}\n"
|
"private String getWmicResult(String alias, String verb, String property) {\n String res = \"String_Node_Str\";\n BufferedReader in = null;\n try {\n ProcessBuilder pb = new ProcessBuilder(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", alias, verb, property);\n Process p = pb.start();\n bw = new BufferedWriter(new OutputStreamWriter(p.getOutputStream()));\n bw.write(13);\n bw.flush();\n bw.close();\n p.waitFor();\n if (p.exitValue() == 0) {\n in = new BufferedReader(new InputStreamReader(p.getInputStream()));\n String line = null;\n while ((line = in.readLine()) != null) {\n line = line.trim();\n if (line.length() == 0) {\n continue;\n }\n res = line;\n }\n return res;\n }\n } catch (Exception e) {\n } finally {\n if (in != null) {\n try {\n in.close();\n } catch (IOException e) {\n }\n }\n }\n return res.trim();\n}\n"
|
"protected Attribute[] attributes() {\n if (null == attributes) {\n if (tree.getType() == JSONLexer.NULL) {\n attributes = new Attribute[1];\n attributes[0] = new Attribute(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.SCHEMA_NIL_ATTRIBUTE, XMLConstants.SCHEMA_NIL_ATTRIBUTE, \"String_Node_Str\");\n return attributes;\n }\n if (tree.getType() == JSONLexer.OBJECT) {\n ArrayList<Attribute> attributesList = new ArrayList<Attribute>(tree.getChildCount());\n for (int x = 0; x < tree.getChildCount(); x++) {\n Tree childTree = tree.getChild(x);\n String attributeLocalName = childTree.getChild(0).getText().substring(1, childTree.getChild(0).getText().length() - 1);\n if (attributePrefix != null) {\n if (attributeLocalName.startsWith(attributePrefix)) {\n attributeLocalName = attributeLocalName.substring(attributePrefix.length());\n } else {\n break;\n }\n }\n String uri = XMLConstants.EMPTY_STRING;\n if (namespaceAware && namespaces != null) {\n int nsIndex = attributeLocalName.indexOf(namespaceSeparator);\n if (nsIndex > -1) {\n prefix = attributeLocalName.substring(0, nsIndex);\n attributeLocalName = attributeLocalName.substring(nsIndex + 1);\n uri = namespaces.resolveNamespacePrefix(prefix);\n }\n }\n Tree childValueTree = childTree.getChild(1);\n if (childValueTree.getType() == JSONLexer.ARRAY) {\n int size = childValueTree.getChildCount();\n if (size == 0) {\n attributesList.add(new Attribute(uri, attributeLocalName, attributeLocalName, \"String_Node_Str\"));\n }\n for (int y = 0; y < size; y++) {\n CommonTree nextChildTree = (CommonTree) childValueTree.getChild(y);\n addSimpleAttribute(attributesList, uri, attributeLocalName, nextChildTree);\n }\n } else {\n addSimpleAttribute(attributesList, uri, attributeLocalName, childValueTree);\n }\n }\n attributes = attributesList.toArray(new Attribute[attributesList.size()]);\n } else {\n attributes = NO_ATTRIBUTES;\n }\n }\n return attributes;\n}\n"
|
"public void buttonPressed(int button) {\n result = button;\n if (button == Window.OK) {\n pass1 = password1.getText();\n pass2 = password2.getText();\n if (!pass1.equals(pass2)) {\n MessageDialog.openError(getShell(), Messages.ChangePasswordDialog_PASSWORDS_NO_MATCH_TITLE, Messages.ChangePasswordDialog_PASSWORDS_NO_MATCH_MESSAGE);\n p1.setText(\"String_Node_Str\");\n p2.setText(\"String_Node_Str\");\n p1.setFocus();\n return;\n }\n }\n close();\n}\n"
|
"void setKeyboardMode(int mode, int imeOptions, boolean enableVoice, boolean isSymbols) {\n if (mInputView == null)\n return;\n mMode = mode;\n mImeOptions = imeOptions;\n if (enableVoice != mHasVoice) {\n setVoiceMode(mHasVoice, mVoiceOnPrimary);\n }\n mIsSymbols = isSymbols;\n mInputView.setPreviewEnabled(mInputMethodService.getPopupOn());\n KeyboardId id = getKeyboardId(mode, imeOptions, isSymbols);\n LatinKeyboard keyboard = null;\n keyboard = getKeyboard(id);\n if (mode == MODE_PHONE) {\n mInputView.setPhoneKeyboard(keyboard);\n mInputView.setPreviewEnabled(false);\n }\n mCurrentId = id;\n mInputView.setKeyboard(keyboard);\n keyboard.setShifted(false);\n keyboard.setShiftLocked(keyboard.isShiftLocked());\n keyboard.setImeOptions(mContext.getResources(), mMode, imeOptions);\n keyboard.setBlackFlag(isBlackSym());\n}\n"
|
"public static void defineDataSourceAndDataSet(DataSetHandle dataSet, DataEngine dataEngine, IModelAdapter modelAdaptor) throws BirtException {\n if (dataSet == null)\n return;\n DataSourceHandle dataSource = dataSet.getDataSource();\n if (dataSource != null && ((DataEngineImpl) dataEngine).getDataSourceRuntime(dataSource.getName()) == null) {\n dataEngine.defineDataSource(modelAdaptor.adaptDataSource(dataSource));\n }\n if (dataSet instanceof JointDataSetHandle) {\n JointDataSetHandle jointDataSet = (JointDataSetHandle) dataSet;\n Iterator iter = jointDataSet.dataSetsIterator();\n while (iter.hasNext()) {\n DataSetHandle childDataSet = (DataSetHandle) iter.next();\n if (childDataSet != null) {\n DataSourceHandle childDataSource = childDataSet.getDataSource();\n if (childDataSource != null) {\n dataEngine.defineDataSource(modelAdaptor.adaptDataSource(childDataSource));\n }\n defineDataSourceAndDataSet(childDataSet, dataEngine, modelAdaptor, context);\n }\n }\n }\n if (dataSet instanceof DerivedDataSetHandle) {\n List inputDataSet = ((DerivedDataSetHandle) dataSet).getInputDataSets();\n for (int i = 0; i < inputDataSet.size(); i++) {\n defineDataSourceAndDataSet((DataSetHandle) inputDataSet.get(i), dataEngine, modelAdaptor);\n }\n }\n if (((DataEngineImpl) dataEngine).getDataSetDesign(dataSet.getQualifiedName()) == null)\n dataEngine.defineDataSet(modelAdaptor.adaptDataSet(dataSet));\n}\n"
|
"private static void addParticleAndAttributeInfo(ATreeNode node, XSComplexTypeDecl complexType, ATreeNode complexTypesRoot) throws OdaException {\n XSParticle particle = complexType.getParticle();\n if (particle != null) {\n addElementToNode(node, complexTypesRoot, (XSModelGroupImpl) particle.getTerm());\n }\n if (!includeAttribute)\n return;\n XSAttributeGroupDecl group = complexType.getAttrGrp();\n if (group != null) {\n XSObjectList list = group.getAttributeUses();\n for (int j = 0; j < list.getLength(); j++) {\n ATreeNode childNode = new ATreeNode();\n childNode.setValue(((XSAttributeUseImpl) list.item(j)).getAttrDeclaration().getName());\n childNode.setType(ATreeNode.ATTRIBUTE_TYPE);\n node.addChild(childNode);\n }\n }\n}\n"
|
"protected Object invokeSync(RSARemoteCall remoteCall) throws ECFException {\n if (remoteCall.getClass().isAssignableFrom(RSARemoteCall.class)) {\n Callable<Object> c = getSyncCallable(remoteCall);\n if (c == null)\n throw new ECFException(\"String_Node_Str\" + remoteCall.getMethod(), new NullPointerException(\"String_Node_Str\"));\n try {\n return callSync(remoteCall, c);\n } catch (InterruptedException e) {\n throw new ECFException(\"String_Node_Str\" + remoteCall.getMethod(), e);\n } catch (ExecutionException e) {\n throw new ECFException(\"String_Node_Str\" + remoteCall.getMethod(), e.getCause());\n } catch (TimeoutException e) {\n throw new ECFException(\"String_Node_Str\" + remoteCall.getMethod(), e);\n }\n }\n return super.invokeSync(remoteCall);\n}\n"
|
"public void updateEntity() {\n if (!init) {\n initData();\n markDirty();\n }\n if (FMLCommonHandler.instance().getEffectiveSide().isClient())\n return;\n if (!worldObj.isRemote) {\n if (!addedToEnergyNet) {\n EnergyTileLoadEvent event = new EnergyTileLoadEvent(this);\n MinecraftForge.EVENT_BUS.post(event);\n addedToEnergyNet = true;\n }\n index = (index + 1) % DATA_POINTS;\n data[index] = 0;\n this.getAverage();\n double total = EnergyNet.instance.getTotalEnergyEmitted(this);\n if (IC2NuclearControl.instance.crossClassic.getClassicType() == IC2ClassicType.SPEIGER) {\n double realTotal = total - lastReceivedPower;\n lastReceivedPower = total;\n data[index] = realTotal;\n } else\n data[index] = total;\n this.setPowerType((byte) EnergyStorageData.TARGET_TYPE_IC2);\n }\n super.updateEntity();\n}\n"
|
"private IStatus processResultTree(IProgressMonitor monitor, boolean reportSuccess, boolean reportFailure) {\n Map<String, String> taskIdToComment = new HashMap<String, String>();\n TestResult resultTestModel = TestResultBP.getInstance().getResultTestModel();\n TestResultNode rootResultNode = resultTestModel.getRootResultNode();\n ITreeNodeOperation<TestResultNode> operation = new ReportOperation(taskIdToComment, reportFailure, reportSuccess, m_projProps.getDashboardURL(), summary.getId().toString());\n TestResultNodeTraverser traverser = new TestResultNodeTraverser(rootResultNode, operation);\n traverser.traverse();\n return reportToALM(monitor, taskIdToComment);\n}\n"
|
"private static String sampleFactTable(String factTableName, int sampleRatio) throws IOException, JobException {\n String sampleTableName = factTableName + \"String_Node_Str\" + sampleRatio;\n String settingQueries = \"String_Node_Str\";\n String dropQuery = \"String_Node_Str\" + sampleTableName + \"String_Node_Str\";\n String createQuery = \"String_Node_Str\" + sampleTableName + \"String_Node_Str\" + factTableName + \"String_Node_Str\";\n HiveSourceTableMgmt hstm = new HiveSourceTableMgmt();\n File dir = File.createTempFile(\"String_Node_Str\", null);\n dir.delete();\n dir.mkdir();\n logger.info(\"String_Node_Str\" + factTableName + \"String_Node_Str\" + dir.getAbsolutePath());\n hstm.extractTableDescWithTablePattern(factTableName, dir.getAbsolutePath());\n String factTableExdFilePath = dir.getAbsolutePath() + File.separator + HiveSourceTableMgmt.TABLE_EXD_FOLDER_NAME + File.separator + factTableName.toUpperCase() + \"String_Node_Str\" + HiveSourceTableMgmt.OUTPUT_SURFIX;\n logger.info(\"String_Node_Str\" + factTableExdFilePath);\n InputStream is = new FileInputStream(factTableExdFilePath);\n Map<String, String> attrs = JsonUtil.readValue(is, HashMap.class);\n is.close();\n String partitionClause = getPartitionClause(attrs);\n String insertQuery = \"String_Node_Str\" + sampleTableName + \"String_Node_Str\" + partitionClause + \"String_Node_Str\" + factTableName + \"String_Node_Str\" + sampleRatio + \"String_Node_Str\";\n String query = settingQueries + dropQuery + createQuery + insertQuery;\n logger.info(\"String_Node_Str\" + query);\n is = HiveSourceTableMgmt.executeHiveCommand(query);\n InputStreamReader reader = new InputStreamReader(is);\n BufferedReader bufferedReader = new BufferedReader(reader);\n String line = null;\n while ((line = bufferedReader.readLine()) != null) {\n logger.info(line);\n }\n logger.info(\"String_Node_Str\");\n bufferedReader.close();\n return sampleTableName;\n}\n"
|
"public boolean isPause() {\n if (!openSocket) {\n return false;\n }\n InputStream in;\n try {\n askForStatus();\n ois = new NoHeaderObjectInputStream(s.getInputStream());\n TraceBean traceBean = (TraceBean) ois.readObject();\n return traceBean.equals(TraceStatusBean.PAUSE);\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n}\n"
|
"public Question getNextQuestion() throws SurveyException {\n Question next = nextQ();\n SurveyDatum[] options = next.getOptListByIndex();\n if (next.randomize)\n if (next.ordered) {\n if (random.nextBoolean())\n for (int i = 0; i < options.length / 2; i++) {\n SurveyDatum foo = options[i];\n options[i] = options[options.length - i - 1];\n options[options.length - i - 1] = foo;\n }\n } else {\n random.shuffle(options);\n }\n for (int i = 0; i < options.length; i++) options[i].setIndex(i);\n return next;\n}\n"
|
"public ExtantNetwork extantNetwork() throws NotEnoughResourcesException, TransientEntityException {\n if (!NetworkGroups.networkingConfiguration().hasNetworking()) {\n ExtantNetwork bogusNet = ExtantNetwork.bogus(this);\n if (!this.hasExtantNetwork())\n this.setExtantNetwork(bogusNet);\n return bogusNet;\n } else if (!Entities.isPersistent(this)) {\n throw new TransientEntityException(this.toString());\n } else {\n ExtantNetwork exNet = this.getExtantNetwork();\n if (exNet == null) {\n for (Integer i : Numbers.shuffled(NetworkGroups.networkTagInterval())) {\n try {\n Entities.uniqueResult(ExtantNetwork.named(i));\n continue;\n } catch (Exception ex) {\n exNet = ExtantNetwork.create(this, i);\n Entities.persist(exNet);\n this.setExtantNetwork(exNet);\n return this.getExtantNetwork();\n }\n }\n throw new NotEnoughResourcesException(\"String_Node_Str\" + this.getFullName() + \"String_Node_Str\");\n } else {\n return this.getExtantNetwork();\n }\n }\n}\n"
|
"public static PropertyValue multiply(PropertyValue aValue, PropertyValue bValue) {\n int aType = checkNumericalAndGetType(aValue);\n int bType = checkNumericalAndGetType(bValue);\n boolean sameType = aType == bType;\n int returnType = maxType(aType, bType);\n if (returnType == INT) {\n int a = aType == INT ? aValue.getInt() : aValue.getShort();\n int b = bType == INT ? bValue.getInt() : bValue.getShort();\n aValue.setInt(a * b);\n } else if (returnType == FLOAT) {\n float a;\n float b;\n if (sameType) {\n a = aValue.getFloat();\n b = bValue.getFloat();\n } else {\n a = aType == FLOAT ? aValue.getFloat() : aValue.getInt();\n b = bType == FLOAT ? bValue.getFloat() : bValue.getInt();\n }\n aValue.setFloat(a * b);\n } else if (returnType == LONG) {\n long a;\n long b;\n if (sameType) {\n a = aValue.getLong();\n b = bValue.getLong();\n } else {\n a = aType == LONG ? aValue.getLong() : aValue.getInt();\n b = bType == LONG ? bValue.getLong() : bValue.getInt();\n }\n aValue.setLong(a * b);\n } else if (returnType == DOUBLE) {\n double a;\n double b;\n if (sameType) {\n a = aValue.getDouble();\n b = bValue.getDouble();\n } else {\n a = aType == DOUBLE ? aValue.getDouble() : doubleValue(aValue, aType);\n b = bType == DOUBLE ? bValue.getDouble() : doubleValue(bValue, bType);\n }\n aValue.setDouble(a * b);\n } else {\n BigDecimal a;\n BigDecimal b;\n if (sameType) {\n a = aValue.getBigDecimal();\n b = bValue.getBigDecimal();\n } else {\n a = aType == BIG_DECIMAL ? aValue.getBigDecimal() : bigDecimalValue(aValue, aType);\n b = bType == BIG_DECIMAL ? bValue.getBigDecimal() : bigDecimalValue(bValue, bType);\n }\n aValue.setBigDecimal(a.multiply(b));\n }\n return aValue;\n}\n"
|
"public void simpleMode(InventoryClickEvent event) {\n DecimalFormat f = new DecimalFormat(\"String_Node_Str\");\n int slot = event.getSlot();\n if (slot < 0) {\n event.setCursor(null);\n return;\n }\n boolean top = event.getView().convertSlot(event.getRawSlot()) == event.getRawSlot();\n if (top) {\n if (event.isShiftClick()) {\n ((Player) event.getWhoClicked()).sendMessage(ChatColor.GOLD + \"String_Node_Str\");\n event.setCancelled(true);\n return;\n }\n if (isManagementSlot(slot, 1)) {\n if (isWool(event.getCurrentItem(), itemsConfig.getItemManagement(7))) {\n switchInventory(TraderStatus.SELL);\n } else if (isWool(event.getCurrentItem(), itemsConfig.getItemManagement(0))) {\n if (!permissionsManager.has(player, \"String_Node_Str\")) {\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\"));\n } else {\n switchInventory(TraderStatus.SELL);\n }\n } else if (isWool(event.getCurrentItem(), itemsConfig.getItemManagement(1))) {\n if (!permissionsManager.has(player, \"String_Node_Str\")) {\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\"));\n } else {\n switchInventory(TraderStatus.BUY);\n }\n }\n } else if (equalsTraderStatus(TraderStatus.SELL)) {\n if (selectItem(slot, TraderStatus.SELL).hasSelectedItem()) {\n if (getSelectedItem().hasMultipleAmouts() && permissionsManager.has(player, \"String_Node_Str\")) {\n switchInventory(getSelectedItem());\n setTraderStatus(TraderStatus.SELL_AMOUNT);\n } else {\n double price = getPrice(player, \"String_Node_Str\");\n if (!checkLimits()) {\n Bukkit.getServer().getPluginManager().callEvent(new TraderTransactionEvent(this, this.getNpc(), player, this.getTraderStatus(), this.getSelectedItem(), price, TransactionResult.FAIL_LIMIT));\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n } else if (!inventoryHasPlace(0)) {\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n Bukkit.getServer().getPluginManager().callEvent(new TraderTransactionEvent(this, this.getNpc(), player, this.getTraderStatus(), this.getSelectedItem(), price, TransactionResult.FAIL_SPACE));\n } else if (!buyTransaction(price)) {\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n Bukkit.getServer().getPluginManager().callEvent(new TraderTransactionEvent(this, this.getNpc(), player, this.getTraderStatus(), this.getSelectedItem(), price, TransactionResult.FAIL_MONEY));\n } else {\n player.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\" + getSelectedItem().getAmount()).replace(\"String_Node_Str\", f.format(price)));\n addSelectedToInventory(0);\n updateLimits();\n Bukkit.getServer().getPluginManager().callEvent(new TraderTransactionEvent(this, this.getNpc(), player, this.getTraderStatus(), this.getSelectedItem(), price, TransactionResult.SUCCESS_SELL));\n log(\"String_Node_Str\", getSelectedItem().getItemStack().getTypeId(), getSelectedItem().getItemStack().getData().getData(), getSelectedItem().getAmount(), price);\n }\n }\n }\n } else if (equalsTraderStatus(TraderStatus.SELL_AMOUNT)) {\n if (!event.getCurrentItem().getType().equals(Material.AIR)) {\n double price = getPrice(player, \"String_Node_Str\", slot);\n if (!checkLimits(slot)) {\n Bukkit.getServer().getPluginManager().callEvent(new TraderTransactionEvent(this, this.getNpc(), player, this.getTraderStatus(), this.getSelectedItem(), price, TransactionResult.FAIL_LIMIT));\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n } else if (!inventoryHasPlace(slot)) {\n Bukkit.getServer().getPluginManager().callEvent(new TraderTransactionEvent(this, this.getNpc(), player, this.getTraderStatus(), this.getSelectedItem(), price, TransactionResult.FAIL_SPACE));\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n } else if (!buyTransaction(price)) {\n Bukkit.getServer().getPluginManager().callEvent(new TraderTransactionEvent(this, this.getNpc(), player, this.getTraderStatus(), this.getSelectedItem(), price, TransactionResult.FAIL_MONEY));\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n } else {\n player.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\" + getSelectedItem().getAmount(slot)).replace(\"String_Node_Str\", f.format(price)));\n addSelectedToInventory(slot);\n Bukkit.getServer().getPluginManager().callEvent(new TraderTransactionEvent(this, this.getNpc(), event.getWhoClicked(), this.getTraderStatus(), this.getSelectedItem(), price, TransactionResult.SUCCESS_SELL));\n updateLimits(slot);\n switchInventory(getSelectedItem());\n log(\"String_Node_Str\", getSelectedItem().getItemStack().getTypeId(), getSelectedItem().getItemStack().getData().getData(), getSelectedItem().getAmount(slot), price);\n }\n }\n }\n } else {\n if (equalsTraderStatus(TraderStatus.BUY)) {\n if (selectItem(event.getCurrentItem(), TraderStatus.BUY, true).hasSelectedItem()) {\n double price = getPrice(player, \"String_Node_Str\");\n int scale = event.getCurrentItem().getAmount() / getSelectedItem().getAmount();\n if (!checkBuyLimits(scale)) {\n Bukkit.getServer().getPluginManager().callEvent(new TraderTransactionEvent(this, this.getNpc(), player, this.getTraderStatus(), this.getSelectedItem(), price, TransactionResult.FAIL_LIMIT));\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n } else if (!sellTransaction(price * scale, event.getCurrentItem())) {\n Bukkit.getServer().getPluginManager().callEvent(new TraderTransactionEvent(this, this.getNpc(), player, this.getTraderStatus(), this.getSelectedItem(), price, TransactionResult.FAIL_MONEY));\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n } else {\n player.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\" + getSelectedItem().getAmount() * scale).replace(\"String_Node_Str\", f.format(price * scale)));\n updateBuyLimits(scale);\n NBTTagEditor.removeDescription(event.getCurrentItem());\n removeFromInventory(event.getCurrentItem(), event);\n Bukkit.getServer().getPluginManager().callEvent(new TraderTransactionEvent(this, this.getNpc(), event.getWhoClicked(), this.getTraderStatus(), this.getSelectedItem(), price, TransactionResult.SUCCESS_BUY));\n log(\"String_Node_Str\", getSelectedItem().getItemStack().getTypeId(), getSelectedItem().getItemStack().getData().getData(), getSelectedItem().getAmount() * scale, price * scale);\n }\n }\n } else if (equalsTraderStatus(TraderStatus.SELL_AMOUNT)) {\n event.setCancelled(true);\n return;\n } else if (selectItem(event.getCurrentItem(), TraderStatus.BUY, true, true).hasSelectedItem()) {\n double price = getPrice(player, \"String_Node_Str\");\n int scale = event.getCurrentItem().getAmount() / getSelectedItem().getAmount();\n if (!permissionsManager.has(player, \"String_Node_Str\")) {\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n } else if (!checkBuyLimits(scale)) {\n Bukkit.getServer().getPluginManager().callEvent(new TraderTransactionEvent(this, this.getNpc(), event.getWhoClicked(), this.getTraderStatus(), this.getSelectedItem(), price, TransactionResult.FAIL_MONEY));\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n } else if (!sellTransaction(price * scale, event.getCurrentItem())) {\n Bukkit.getServer().getPluginManager().callEvent(new TraderTransactionEvent(this, this.getNpc(), event.getWhoClicked(), this.getTraderStatus(), this.getSelectedItem(), price, TransactionResult.FAIL_MONEY));\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n } else {\n player.sendMessage(locale.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\" + getSelectedItem().getAmount() * scale).replace(\"String_Node_Str\", f.format(price * scale)));\n updateBuyLimits(scale);\n Bukkit.getServer().getPluginManager().callEvent(new TraderTransactionEvent(this, this.getNpc(), event.getWhoClicked(), this.getTraderStatus(), this.getSelectedItem(), price, TransactionResult.SUCCESS_BUY));\n NBTTagEditor.removeDescription(event.getCurrentItem());\n removeFromInventory(event.getCurrentItem(), event);\n log(\"String_Node_Str\", getSelectedItem().getItemStack().getTypeId(), getSelectedItem().getItemStack().getData().getData(), getSelectedItem().getAmount() * scale, price * scale);\n }\n }\n }\n event.setCancelled(true);\n}\n"
|
"private void verifyServiceDeclaration() {\n final PackageManager packageManager = mContext.getPackageManager();\n final Intent intent = new Intent(mContext, BeaconService.class);\n List<ResolveInfo> resolveInfo = packageManager.queryIntentServices(intent, PackageManager.MATCH_DEFAULT_ONLY);\n if (resolveInfo != null && resolveInfo.size() == 0) {\n throw new ServiceNotDeclaredException();\n }\n}\n"
|
"public void onDraw(Canvas canvas) {\n doDraw(mState, canvas);\n if (errorArrow != -1) {\n canvas.save();\n canvas.rotate(errorArrow, centerX, centerY);\n canvas.drawPath(arrow, paint);\n canvas.restore();\n }\n}\n"
|
"private ServiceName createModuleService(DeploymentPhaseContext phaseContext, final DeploymentUnit deploymentUnit, final List<ResourceRoot> resourceRoots, final ModuleSpecification moduleSpecification, final ModuleIdentifier moduleIdentifier) throws DeploymentUnitProcessingException {\n final ModuleSpec.Builder specBuilder = ModuleSpec.build(moduleIdentifier);\n final List<ModuleDependency> dependencies = moduleSpecification.getDependencies();\n for (ResourceRoot resourceRoot : resourceRoots) {\n addResourceRoot(specBuilder, resourceRoot);\n }\n final boolean childFirst;\n if (moduleSpecification.getChildFirst() == null) {\n childFirst = false;\n } else {\n childFirst = moduleSpecification.getChildFirst();\n }\n if (childFirst) {\n specBuilder.addDependency(DependencySpec.createLocalDependencySpec());\n }\n if (dependencies != null)\n for (ModuleDependency dependency : dependencies) {\n final List<FilterSpecification> importFilters = dependency.getImportFilters();\n final List<FilterSpecification> exportFilters = dependency.getExportFilters();\n final PathFilter importFilter;\n final PathFilter exportFilter;\n final MultiplePathFilterBuilder importBuilder = PathFilters.multiplePathFilterBuilder(true);\n for (FilterSpecification filter : importFilters) {\n importBuilder.addFilter(filter.getPathFilter(), filter.isInclude());\n }\n if (dependency.isImportServices()) {\n importBuilder.addFilter(PathFilters.getMetaInfServicesFilter(), true);\n }\n importBuilder.addFilter(PathFilters.getMetaInfSubdirectoriesFilter(), false);\n importBuilder.addFilter(PathFilters.getMetaInfFilter(), false);\n importFilter = importBuilder.create();\n if (exportFilters.isEmpty()) {\n if (dependency.isExport()) {\n exportFilter = PathFilters.acceptAll();\n } else {\n exportFilter = PathFilters.rejectAll();\n }\n } else {\n final MultiplePathFilterBuilder exportBuilder = PathFilters.multiplePathFilterBuilder(dependency.isExport());\n for (FilterSpecification filter : exportFilters) {\n exportBuilder.addFilter(filter.getPathFilter(), filter.isInclude());\n }\n exportFilter = exportBuilder.create();\n }\n DependencySpec depSpec = DependencySpec.createModuleDependencySpec(importFilter, exportFilter, dependency.getModuleLoader(), dependency.getIdentifier(), dependency.isOptional());\n specBuilder.addDependency(depSpec);\n final String depName = dependency.getIdentifier().getName();\n if (depName.startsWith(ServiceModuleLoader.MODULE_PREFIX)) {\n phaseContext.addToAttachmentList(Attachments.NEXT_PHASE_DEPS, ServiceModuleLoader.moduleSpecServiceName(dependency.getIdentifier()));\n }\n }\n if (!childFirst) {\n specBuilder.addDependency(DependencySpec.createLocalDependencySpec());\n }\n final ModuleSpec moduleSpec = specBuilder.create();\n final ServiceName moduleSpecServiceName = ServiceModuleLoader.moduleSpecServiceName(moduleIdentifier);\n final ValueService<ModuleSpec> moduleSpecService = new ValueService<ModuleSpec>(new ImmediateValue<ModuleSpec>(moduleSpec));\n phaseContext.getServiceTarget().addService(moduleSpecServiceName, moduleSpecService).addDependencies(deploymentUnit.getServiceName()).addDependencies(phaseContext.getPhaseServiceName()).setInitialMode(Mode.ON_DEMAND).install();\n return ModuleLoadService.install(phaseContext.getServiceTarget(), moduleIdentifier, dependencies);\n}\n"
|
"public void canComputeLikelihoodForIntegerData() {\n for (double u : photons) {\n PoissonDistribution pd = new PoissonDistribution(u);\n for (int x = 0; x < 100; x++) {\n double e = pd.probability(x);\n double o = PoissonCalculator.likelihood(u, x);\n if (e > 1e-100)\n TestAssert.assertEqualsRelative(e, o, 1e-10);\n e = pd.logProbability(x);\n o = PoissonCalculator.logLikelihood(u, x);\n Assert.assertEquals(e, o, Math.abs(e) * 1e-10);\n }\n }\n}\n"
|
"public void dirtyEntries(long fromTimeStamp) {\n try (CompiledReplicatedMapIterationContext<K, KI, MKI, V, VI, MVI, R, ?> c = iterationContext()) {\n boolean debugEnabled = LOG.isDebugEnabled();\n for (int i = 0; i < actualSegments; i++) {\n final int segmentIndex = i;\n c.initTheSegmentIndex(segmentIndex);\n c.forEachReplicableEntry(entry -> {\n if (debugEnabled) {\n LOG.debug(\"String_Node_Str\", localIdentifier, c.key(), c.value());\n }\n MapReplicableEntry re = (MapReplicableEntry) entry;\n if (debugEnabled) {\n LOG.debug(\"String_Node_Str\" + \"String_Node_Str\", fromTimeStamp, re.originTimestamp(), re.originIdentifier(), localIdentifier);\n }\n if (re.originTimestamp() >= fromTimeStamp && (!bootstrapOnlyLocalEntries || re.originIdentifier() == localIdentifier)) {\n raiseChange(segmentIndex, c.pos(), c.timestamp());\n }\n });\n }\n }\n}\n"
|
"public Map<Integer, String> retrieveUsernames(Collection<Integer> ids) {\n if (ids.isEmpty())\n return Collections.EMPTY_MAP;\n Map<Integer, String> names = new HashMap<Integer, String>();\n UserExample example = new UserExample();\n example.createCriteria().andUser_idIn(Lists.newArrayList(ids));\n List<User> users = userDAO.selectByExample(example);\n for (User user : users) names.put(user.getUser_id(), user.getUsername());\n return names;\n}\n"
|
"public Call showCheckoutConfirmationForm(final String language) {\n return CheckoutPaymentController.show(language);\n}\n"
|
"public final Path findPath(IPathCalculateable requester, final short sx, final short sy, final short tx, final short ty) {\n final boolean blockedAtStart;\n if (!isInBounds(sx, sy)) {\n throw new InvalidStartPositionException(\"String_Node_Str\", sx, sy);\n } else if (!isInBounds(tx, ty) || isBlocked(requester, tx, ty) || map.getBlockedPartition(sx, sy) != map.getBlockedPartition(tx, ty)) {\n return null;\n } else if (sx == tx && sy == ty) {\n return null;\n } else if (isBlocked(requester, sx, sy)) {\n blockedAtStart = true;\n } else {\n blockedAtStart = false;\n }\n float temp = xFactor;\n xFactor = yFactor;\n yFactor = temp;\n final int targetFlatIdx = getFlatIdx(tx, ty);\n closedList.clear();\n openList.clear();\n open.clear();\n boolean found = false;\n initStartNode(sx, sy, tx, ty);\n while (!open.isEmpty()) {\n int currFlatIdx = open.deleteMin();\n short x = getX(currFlatIdx);\n short y = getY(currFlatIdx);\n setClosed(x, y);\n if (targetFlatIdx == currFlatIdx) {\n found = true;\n break;\n }\n for (int i = 0; i < EDirection.NUMBER_OF_DIRECTIONS; i++) {\n short neighborX = (short) (x + xDeltaArray[i]);\n short neighborY = (short) (y + yDeltaArray[i]);\n if (isValidPosition(requester, neighborX, neighborY, blockedAtStart)) {\n int flatNeighborIdx = getFlatIdx(neighborX, neighborY);\n if (!closedList.get(flatNeighborIdx)) {\n float newCosts = costsAndHeuristics[getCostsIdx(currFlatIdx)] + map.getCost(x, y, neighborX, neighborY);\n if (openList.get(flatNeighborIdx)) {\n if (costsAndHeuristics[getCostsIdx(flatNeighborIdx)] > newCosts) {\n costsAndHeuristics[getCostsIdx(flatNeighborIdx)] = newCosts;\n depthParentHeap[getDepthIdx(flatNeighborIdx)] = depthParentHeap[getDepthIdx(currFlatIdx)] + 1;\n depthParentHeap[getParentIdx(flatNeighborIdx)] = currFlatIdx;\n open.siftUp(flatNeighborIdx);\n }\n } else {\n costsAndHeuristics[getCostsIdx(flatNeighborIdx)] = newCosts;\n costsAndHeuristics[getHeuristicIdx(flatNeighborIdx)] = getHeuristicCost(neighborX, neighborY, tx, ty);\n depthParentHeap[getDepthIdx(flatNeighborIdx)] = depthParentHeap[getDepthIdx(currFlatIdx)] + 1;\n depthParentHeap[getParentIdx(flatNeighborIdx)] = currFlatIdx;\n openList.set(flatNeighborIdx);\n open.insert(flatNeighborIdx);\n map.markAsOpen(neighborX, neighborY);\n }\n }\n }\n }\n }\n if (found) {\n int pathlength = depthParentHeap[getDepthIdx(getFlatIdx(tx, ty))];\n Path path = new Path(pathlength);\n int idx = pathlength;\n int parentFlatIdx = targetFlatIdx;\n while (idx > 0) {\n idx--;\n path.insertAt(idx, getX(parentFlatIdx), getY(parentFlatIdx));\n parentFlatIdx = depthParentHeap[getParentIdx(parentFlatIdx)];\n }\n path.initPath();\n return path;\n }\n return null;\n}\n"
|
"public void run() {\n try {\n for (; ; ) {\n final String line = bufferedReader.readLine();\n if (line == null) {\n eofReached = true;\n break;\n } else {\n try {\n lineQueue.put(line);\n } catch (final InterruptedException e) {\n break;\n }\n }\n }\n } catch (Exception e) {\n AsynchronousLineReader.this.workerException = e;\n } finally {\n CloserUtil.close(AsynchronousLineReader.this.bufferedReader);\n }\n}\n"
|
"public void onResume() {\n super.onResume();\n Intent intent = getIntent();\n contentUri = intent.getData();\n contentType = intent.getIntExtra(CONTENT_TYPE_EXTRA, inferContentType(contentUri, intent.getStringExtra(CONTENT_EXT_EXTRA)));\n contentId = intent.getStringExtra(CONTENT_ID_EXTRA);\n provider = intent.getStringExtra(PROVIDER_EXTRA);\n configureSubtitleView();\n if (player == null) {\n if (!maybeRequestPermission()) {\n preparePlayer(true);\n }\n } else {\n player.setBackgrounded(false);\n }\n}\n"
|
"protected void computeMethodMapIfNeeded() throws InvalidClassFileException {\n if (methodMap == null) {\n synchronized (this) {\n if (methodMap == null) {\n IMethod[] methods = computeDeclaredMethods();\n if (methods.length > 5) {\n tmpMethodMap = HashMapFactory.make(methods.length);\n } else {\n methodMap = new SmallMap<Selector, IMethod>();\n }\n for (int i = 0; i < methods.length; i++) {\n IMethod m = methods[i];\n methodMap.put(m.getReference().getSelector(), m);\n }\n }\n }\n }\n}\n"
|
"public void testMixedProtocol() throws Exception {\n DatagramPacket pack = null;\n UDP_ACCESS = new DatagramSocket();\n for (int i = 0; i < testUP.length; i++) {\n assertTrue(\"String_Node_Str\", testUP[i].isOpen());\n assertTrue(\"String_Node_Str\", testUP[i].isSupernodeClientConnection());\n drain(testUP[i], 500);\n if ((i == 2)) {\n testUP[i].send(MessagesSupportedVendorMessage.instance());\n testUP[i].flush();\n }\n }\n {\n drainAll();\n PingReply pong = PingReply.create(GUID.makeGuid(), (byte) 4, UDP_ACCESS.getLocalPort(), InetAddress.getLocalHost().getAddress(), 10, 10, true, 900, true);\n testUP[0].send(pong);\n testUP[0].flush();\n UDP_ACCESS.setSoTimeout(TIMEOUT * 2);\n pack = new DatagramPacket(new byte[1000], 1000);\n try {\n UDP_ACCESS.receive(pack);\n } catch (IOException bad) {\n fail(\"String_Node_Str\", bad);\n }\n InputStream in = new ByteArrayInputStream(pack.getData());\n PingRequest ping = (PingRequest) Message.read(in);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n pong = PingReply.create(ping.getGUID(), (byte) 4, UDP_ACCESS.getLocalPort(), InetAddress.getLocalHost().getAddress(), 10, 10, true, 900, true);\n pong.write(baos);\n pack = new DatagramPacket(baos.toByteArray(), baos.toByteArray().length, pack.getAddress(), pack.getPort());\n UDP_ACCESS.send(pack);\n }\n {\n testUP[0].send(MessagesSupportedVendorMessage.instance());\n testUP[0].flush();\n byte[] cbGuid = null;\n int cbPort = -1;\n while (cbGuid == null) {\n try {\n Message m = testUP[0].receive(TIMEOUT);\n if (m instanceof UDPConnectBackVendorMessage) {\n UDPConnectBackVendorMessage udp = (UDPConnectBackVendorMessage) m;\n cbGuid = udp.getConnectBackGUID().bytes();\n cbPort = udp.getConnectBackPort();\n }\n } catch (Exception ie) {\n fail(\"String_Node_Str\", ie);\n }\n }\n PingRequest pr = new PingRequest(cbGuid, (byte) 1, (byte) 0);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n pr.write(baos);\n pack = new DatagramPacket(baos.toByteArray(), baos.toByteArray().length, testUP[0].getInetAddress(), cbPort);\n UDP_ACCESS.send(pack);\n }\n {\n Socket sock = null;\n OutputStream os = null;\n try {\n sock = Sockets.connect(InetAddress.getLocalHost().getHostAddress(), SERVER_PORT, 12);\n os = sock.getOutputStream();\n os.write(\"String_Node_Str\".getBytes());\n } catch (IOException ignored) {\n } catch (SecurityException ignored) {\n } catch (Throwable t) {\n ErrorService.error(t);\n } finally {\n if (sock != null)\n try {\n sock.close();\n } catch (IOException ignored) {\n }\n if (os != null)\n try {\n os.close();\n } catch (IOException ignored) {\n }\n }\n }\n Thread.sleep(250);\n assertTrue(rs.isGUESSCapable());\n assertTrue(rs.acceptedIncomingConnection());\n drainAll();\n GUID queryGuid = new GUID(RouterService.newQueryGUID());\n assertTrue(GUID.addressesMatch(queryGuid.bytes(), RouterService.getAddress(), RouterService.getPort()));\n RouterService.query(queryGuid.bytes(), \"String_Node_Str\");\n Thread.sleep(250);\n for (int i = 0; i < testUP.length; i++) {\n QueryRequest qr = getFirstQueryRequest(testUP[i], TIMEOUT);\n assertNotNull(\"String_Node_Str\" + i + \"String_Node_Str\", qr);\n assertEquals(new GUID(qr.getGUID()), queryGuid);\n if ((i == 0) || (i == 2))\n assertTrue(qr.desiresOutOfBandReplies());\n else\n assertTrue(!qr.desiresOutOfBandReplies());\n }\n Message m = null;\n assertGreaterThan(SearchResultHandler.REPORT_INTERVAL, 4 * testUP.length);\n for (int i = 0; i < testUP.length; i++) {\n Response[] res = new Response[4];\n res[0] = new Response(10, 10, \"String_Node_Str\" + i);\n res[1] = new Response(10, 10, \"String_Node_Str\" + i);\n res[2] = new Response(10, 10, \"String_Node_Str\" + i);\n res[3] = new Response(10, 10, \"String_Node_Str\" + i);\n m = new QueryReply(queryGuid.bytes(), (byte) 1, 6355, myIP(), 0, res, GUID.makeGuid(), new byte[0], false, false, true, true, false, false, null);\n testUP[i].send(m);\n testUP[i].flush();\n }\n for (int i = 0; i < testUP.length; i++) {\n QueryStatusResponse stat = getFirstQueryStatus(testUP[i]);\n if ((i == 0) || (i == 2)) {\n assertNotNull(stat);\n assertEquals(new GUID(stat.getGUID()), queryGuid);\n assertEquals(4, stat.getNumResults());\n } else\n assertNull(stat);\n }\n rs.stopQuery(queryGuid);\n for (int i = 0; i < testUP.length; i++) {\n QueryStatusResponse stat = getFirstQueryStatus(testUP[i]);\n if ((i == 0) || (i == 2)) {\n assertNotNull(stat);\n assertEquals(new GUID(stat.getGUID()), queryGuid);\n assertEquals(65535, stat.getNumResults());\n } else\n assertNull(stat);\n }\n}\n"
|
"protected void onPause() {\n super.onPause();\n dropView(this);\n}\n"
|
"public void testAddNote_issue134() {\n SQLiteDatabase db = TestUtils.loadDBFromDump(targetContext, testContext, \"String_Node_Str\");\n WordPressDB wpdb = new WordPressDB(targetContext);\n Note note = createEmptyNote();\n wpdb.addNote(note, true);\n db.close();\n}\n"
|
"public Page<T> findPaginated(Integer page, Integer size) {\n Assert.isTrue(page > 0, \"String_Node_Str\");\n Assert.isTrue(direction.isEmpty() || direction.equalsIgnoreCase(Sort.Direction.ASC.toString()) || direction.equalsIgnoreCase(Sort.Direction.DESC.toString()), \"String_Node_Str\");\n if (direction.isEmpty()) {\n return this.repository.findAll(new PageRequest(page - 1, size));\n } else {\n Assert.notNull(properties);\n return this.repository.findAll(new PageRequest(page - 1, size, new Sort(Sort.Direction.fromString(direction.toUpperCase()), properties.split(\"String_Node_Str\"))));\n }\n}\n"
|
"private int[] getArea(String string) {\n String[] rawDatas = string.split(\"String_Node_Str\");\n if (rawDatas.length == 8) {\n int[] area = new int[4];\n area[0] = Integer.parseInt(rawDatas[0]);\n area[1] = Integer.parseInt(rawDatas[1]);\n area[2] = Integer.parseInt(rawDatas[4]) - area[0];\n area[3] = Integer.parseInt(rawDatas[5]) - area[1];\n return area;\n }\n return null;\n}\n"
|
"public void onKeyDown(KeyDownEvent event) {\n final int keyCode = event.getNativeKeyCode();\n log.fine(\"String_Node_Str\" + keyCode + \"String_Node_Str\" + event.getNativeEvent().getKeyCode());\n Selection selection = getTextArea().getDocument().getSelection();\n if (selection.getRangeCount() > 0) {\n Range range = selection.getRangeAt(0);\n doStuff(range);\n Node startContainer = range.getStartContainer();\n int pos = 0;\n if (Node.TEXT_NODE == startContainer.getNodeType()) {\n log.info(\"String_Node_Str\");\n Text textNode = Text.as(startContainer);\n pos = range.getStartOffset();\n }\n Node endContainer = range.getEndContainer();\n if (Node.ELEMENT_NODE == endContainer.getNodeType() || Node.DOCUMENT_NODE == endContainer.getNodeType()) {\n log.info(\"String_Node_Str\");\n pos = range.getEndOffset();\n }\n OperationTarget t = getTarget(range);\n List<Integer> path = t.getStartContainer();\n TreeOperation op = null;\n if (keyCode == 8) {\n if (pos == 0) {\n if (isNoteworthyPath(path)) {\n op = new TreeMergeParagraph(clientJupiter.getSiteId(), path.get(0), 1, 1);\n op.setPath(convertPath(path));\n }\n } else {\n pos = pos - 1;\n op = new TreeDeleteText(clientJupiter.getSiteId(), pos, convertPath(path));\n }\n } else if (keyCode == 46) {\n final Node node = TreeHelper.getChildNodeFromLocator(TreeClientCallback.getUpdatedNativeNode(), convertPath(t.getStartContainer()));\n log.info(\"String_Node_Str\" + node.getNodeName() + \"String_Node_Str\" + node.getNodeValue() + \"String_Node_Str\" + node.getNodeType());\n if (Node.TEXT_NODE == node.getNodeType()) {\n Text textNode = Text.as(node);\n if (textNode.getLength() == t.getStartOffset()) {\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(convertPath(path));\n }\n } else {\n op = new TreeDeleteText(clientJupiter.getSiteId(), pos, convertPath(path));\n }\n }\n } else if (keyCode == 13) {\n if (pos == 0 && !isNoteworthyPath(path.subList(1, path.size()))) {\n op = new TreeNewParagraph(clientJupiter.getSiteId(), pos);\n op.setPath(convertPath(path));\n } else {\n op = new TreeInsertParagraph(clientJupiter.getSiteId(), pos, convertPath(path));\n }\n }\n if (op != null) {\n clientJupiter.generate(op);\n }\n }\n}\n"
|
"protected boolean calculateEnabled() {\n RepositoryNode rootNode = ((ProjectRepositoryNode) ProjectRepositoryNode.getInstance()).getRootRepositoryNode(ERepositoryObjectType.METADATA);\n if (getSelectedObjects().isEmpty() || rootNode == null) {\n return false;\n } else {\n Object s = getSelectedObjects().get(0);\n if (s instanceof List && !((List) s).isEmpty()) {\n List selectedarts = (List) s;\n Object object = selectedarts.get(selectedarts.size() - 1);\n if (object instanceof TreeNodeEditPart) {\n TreeNodeEditPart parentPart = (TreeNodeEditPart) object;\n schemaNode = (TreeNode) parentPart.getModel();\n if (schemaNode.eContainer() instanceof AbstractInOutTree && XmlMapUtil.DOCUMENT.equals(schemaNode.getType())) {\n return true;\n }\n }\n }\n }\n return false;\n}\n"
|
"public IWSResponse execute(int operation, String input) {\n if (operation == PublicWSProvider2.GET) {\n return new WSResponse(getAccelerationXml(), \"String_Node_Str\");\n }\n return null;\n}\n"
|
"public Vector sampleObservation(VehicleState vehicleState, PathEdge edge) {\n final MultivariateGaussian gbelief = vehicleState.getBelief().clone();\n StandardRoadTrackingFilter.convertToGroundBelief(gbelief, edge);\n final Vector gMean = StandardRoadTrackingFilter.getOg().times(gbelief.getMean());\n final Matrix covSqrt = CholeskyDecompositionMTJ.create(DenseMatrixFactoryMTJ.INSTANCE.copyMatrix(obsCov)).getR();\n final Vector thisStateSample = MultivariateGaussian.sample(gMean, covSqrt, rng);\n return thisStateSample;\n}\n"
|
"public static SphereClient ofRetry(final SphereClient delegate) {\n final List<RetryRule> retryRules = singletonList(RetryRule.of(isDeleteAndNewVersionIsKnown(), retryWithNewVersion()));\n return RetrySphereClientDecorator.of(delegate, retryRules);\n}\n"
|
"private GraphViewerPanel createViewerPanel() {\n return new GraphViewerPanel<G>(frame, viewerConfig, graphmlLoader, iconMapLoader, edgeStrokeMapLoader, edgeColorMapLoader, entireGraph, projectPath, versionDir, graphmlDir, initialNode);\n}\n"
|
"public int getBlockEndIndex() {\n return currentBlock.getEndIndex();\n}\n"
|
"public void testCountDistinctAgg() {\n boolean use_agg_orig = props.UseAggregates.get();\n boolean do_caching_orig = props.DisableCaching.get();\n props.DisableCaching.setString(\"String_Node_Str\");\n assertQueryReturns(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", fold(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\"));\n if (use_agg_orig) {\n properties.UseAggregates.setString(\"String_Node_Str\");\n } else {\n properties.UseAggregates.setString(\"String_Node_Str\");\n }\n assertQueryReturns(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", fold(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\"));\n if (use_agg_orig) {\n properties.UseAggregates.setString(\"String_Node_Str\");\n } else {\n properties.UseAggregates.setString(\"String_Node_Str\");\n }\n if (do_caching_orig) {\n properties.DisableCaching.setString(\"String_Node_Str\");\n } else {\n properties.DisableCaching.setString(\"String_Node_Str\");\n }\n}\n"
|
"public boolean verify() {\n for (EdgeDraftImpl edge : edgeMap.values().toArray(new EdgeDraftImpl[0])) {\n if (edge.getWeight() <= 0f) {\n if (parameters.isRemoveEdgeWithWeightZero()) {\n String id = edge.getId();\n String sourceTargetId = edge.getSource().getId() + \"String_Node_Str\" + edge.getTarget().getId();\n edgeMap.remove(id);\n edgeSourceTargetMap.remove(sourceTargetId);\n report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class, \"String_Node_Str\", id), Level.SEVERE));\n }\n }\n }\n if (directedEdgesCount > 0 && undirectedEdgesCount == 0) {\n parameters.setEdgeDefault(EdgeDefault.DIRECTED);\n } else if (directedEdgesCount == 0 && undirectedEdgesCount > 0) {\n parameters.setEdgeDefault(EdgeDefault.UNDIRECTED);\n } else if (directedEdgesCount > 0 && undirectedEdgesCount > 0) {\n parameters.setEdgeDefault(EdgeDefault.MIXED);\n }\n for (NodeDraftImpl node : nodeMap.values()) {\n dynamicGraph = node.getTimeInterval() != null;\n if (dynamicGraph) {\n break;\n }\n }\n if (!dynamicGraph) {\n for (EdgeDraftImpl edge : edgeMap.values()) {\n dynamicGraph = edge.getTimeInterval() != null;\n if (dynamicGraph) {\n break;\n }\n }\n }\n if (!dynamicGraph) {\n for (AttributeColumn col : attributeModel.getNodeTable().getColumns()) {\n dynamicGraph = col.getType().isDynamicType();\n if (dynamicGraph) {\n break;\n }\n }\n for (AttributeColumn col : attributeModel.getEdgeTable().getColumns()) {\n dynamicGraph = dynamicGraph || col.getType().isDynamicType();\n if (dynamicGraph) {\n break;\n }\n }\n }\n if (timeIntervalMin != null || timeIntervalMax != null) {\n if (timeFormat.equals(TimeFormat.DATE) || timeFormat.equals(TimeFormat.DATETIME)) {\n try {\n String message = \"String_Node_Str\" + (timeIntervalMin != null ? DynamicUtilities.getXMLDateStringFromDouble(timeIntervalMin) : \"String_Node_Str\") + \"String_Node_Str\";\n message += (timeIntervalMax != null ? DynamicUtilities.getXMLDateStringFromDouble(timeIntervalMax) : \"String_Node_Str\") + \"String_Node_Str\";\n report.log(NbBundle.getMessage(ImportContainerImpl.class, \"String_Node_Str\", message));\n } catch (Exception e) {\n }\n } else {\n String message = \"String_Node_Str\" + (timeIntervalMin != null ? timeIntervalMin.toString() : \"String_Node_Str\") + \"String_Node_Str\";\n message += (timeIntervalMax != null ? timeIntervalMax.toString() : \"String_Node_Str\") + \"String_Node_Str\";\n report.log(NbBundle.getMessage(ImportContainerImpl.class, \"String_Node_Str\", message));\n }\n }\n if (dynamicGraph) {\n report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class, \"String_Node_Str\", timeFormat.toString()), Level.INFO));\n }\n if (dynamicGraph && parameters.isRemoveIntervalsOverlapping()) {\n for (NodeDraftImpl node : nodeMap.values()) {\n AttributeValue[] values = node.getAttributeRow().getValues();\n for (int i = 0; i < values.length; i++) {\n AttributeValue val = values[i];\n if (val.getValue() != null && val.getValue() instanceof DynamicType) {\n DynamicType type = (DynamicType) val.getValue();\n type = DynamicUtilities.removeOverlapping(type);\n node.getAttributeRow().setValue(val.getColumn(), type);\n }\n }\n }\n for (EdgeDraftImpl edge : edgeMap.values()) {\n AttributeValue[] values = edge.getAttributeRow().getValues();\n for (int i = 0; i < values.length; i++) {\n AttributeValue val = values[i];\n if (val.getValue() != null && val.getValue() instanceof DynamicType) {\n DynamicType type = (DynamicType) val.getValue();\n type = DynamicUtilities.removeOverlapping(type);\n edge.getAttributeRow().setValue(val.getColumn(), type);\n }\n }\n }\n }\n if (dynamicGraph && (timeIntervalMin != null || timeIntervalMax != null)) {\n for (NodeDraftImpl node : nodeMap.values()) {\n boolean issue = false;\n if (timeIntervalMin != null || timeIntervalMax != null) {\n if (timeIntervalMin != null && node.getTimeInterval() != null && node.getTimeInterval().getLow() < timeIntervalMin) {\n node.setTimeInterval((TimeInterval) DynamicUtilities.fitToInterval(node.getTimeInterval(), timeIntervalMin, node.getTimeInterval().getHigh()));\n issue = true;\n }\n if (timeIntervalMax != null && node.getTimeInterval() != null && node.getTimeInterval().getHigh() > timeIntervalMax) {\n node.setTimeInterval((TimeInterval) DynamicUtilities.fitToInterval(node.getTimeInterval(), node.getTimeInterval().getLow(), timeIntervalMax));\n issue = true;\n }\n if (node.getTimeInterval() == null) {\n node.setTimeInterval(new TimeInterval(timeIntervalMin, timeIntervalMax));\n }\n }\n AttributeValue[] values = node.getAttributeRow().getValues();\n for (int i = 0; i < values.length; i++) {\n AttributeValue val = values[i];\n if (val.getValue() != null && val.getValue() instanceof DynamicType) {\n DynamicType type = (DynamicType) val.getValue();\n if (timeIntervalMin != null && type.getLow() < timeIntervalMin) {\n if (!Double.isInfinite(type.getLow())) {\n issue = true;\n }\n node.getAttributeRow().setValue(val.getColumn(), DynamicUtilities.fitToInterval(type, timeIntervalMin, type.getHigh()));\n }\n if (timeIntervalMax != null && type.getHigh() > timeIntervalMax) {\n if (!Double.isInfinite(type.getHigh())) {\n issue = true;\n }\n node.getAttributeRow().setValue(val.getColumn(), DynamicUtilities.fitToInterval(type, type.getLow(), timeIntervalMax));\n }\n }\n }\n if (issue) {\n report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class, \"String_Node_Str\", node.getId()), Level.WARNING));\n }\n }\n for (EdgeDraftImpl edge : edgeMap.values()) {\n boolean issue = false;\n if (timeIntervalMin != null || timeIntervalMax != null) {\n if (timeIntervalMin != null && edge.getTimeInterval() != null && edge.getTimeInterval().getLow() < timeIntervalMin) {\n edge.setTimeInterval((TimeInterval) DynamicUtilities.fitToInterval(edge.getTimeInterval(), timeIntervalMin, edge.getTimeInterval().getHigh()));\n issue = true;\n }\n if (timeIntervalMax != null && edge.getTimeInterval() != null && edge.getTimeInterval().getHigh() > timeIntervalMax) {\n edge.setTimeInterval((TimeInterval) DynamicUtilities.fitToInterval(edge.getTimeInterval(), edge.getTimeInterval().getLow(), timeIntervalMax));\n issue = true;\n }\n if (edge.getTimeInterval() == null) {\n edge.setTimeInterval(new TimeInterval(timeIntervalMin, timeIntervalMax));\n }\n }\n AttributeValue[] values = edge.getAttributeRow().getValues();\n for (int i = 0; i < values.length; i++) {\n AttributeValue val = values[i];\n if (val.getValue() != null && val.getValue() instanceof DynamicType) {\n DynamicType type = (DynamicType) val.getValue();\n if (timeIntervalMin != null && type.getLow() < timeIntervalMin) {\n if (!Double.isInfinite(type.getLow())) {\n issue = true;\n }\n edge.getAttributeRow().setValue(val.getColumn(), DynamicUtilities.fitToInterval(type, timeIntervalMin, type.getHigh()));\n }\n if (timeIntervalMax != null && type.getHigh() > timeIntervalMax) {\n if (!Double.isInfinite(type.getHigh())) {\n issue = true;\n }\n edge.getAttributeRow().setValue(val.getColumn(), DynamicUtilities.fitToInterval(type, type.getLow(), timeIntervalMax));\n }\n }\n }\n if (issue) {\n report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class, \"String_Node_Str\", edge.getId()), Level.WARNING));\n }\n }\n }\n return true;\n}\n"
|
"public void run() {\n JavaThreadModel.setCurrentCollector(collector);\n collector.run();\n}\n"
|
"protected void eyeTransform(Eye eye) {\n eyeType = eye.getType();\n eyeViewPort = eye.getViewport();\n eyeFov = eye.getFov();\n eyePerspective = eye.getPerspective(cameraNear, cameraFar);\n perspectiveMatrix.set(eyePerspective[0], eyePerspective[4], eyePerspective[8], eyePerspective[12], eyePerspective[1], eyePerspective[5], eyePerspective[9], eyePerspective[13], eyePerspective[2], eyePerspective[6], eyePerspective[10], eyePerspective[14], eyePerspective[3], eyePerspective[7], eyePerspective[11], eyePerspective[15]);\n eyeView = eye.getEyeView();\n viewMatrix.set(eyeView[0], eyeView[4], eyeView[8], eyeView[12], eyeView[1], eyeView[5], eyeView[9], eyeView[13], eyeView[2], eyeView[6], eyeView[10], eyeView[14], eyeView[3], eyeView[7], eyeView[11], eyeView[15]);\n}\n"
|
"public void testResolveWildcardArtifactId() throws Exception {\n DependencyQuery query = DependencyQueryBuilder.create(CoordinateBuilder.create().setGroupId(\"String_Node_Str\").setArtifactId(\"String_Node_Str\").setClassifier(\"String_Node_Str\"));\n Set<Dependency> coreAddons = resolver.resolveDependencies(query);\n Assert.assertFalse(coreAddons.isEmpty());\n}\n"
|
"private EntityManagerFactoryImpl getEntityManagerFactory(String property) {\n Map<String, Object> props = new HashMap<String, Object>();\n props.put(Constants.PERSISTENCE_UNIT_NAME, _persistenceUnit);\n props.put(PersistenceProperties.KUNDERA_CLIENT_FACTORY, ThriftClientFactory.class.getName());\n props.put(PersistenceProperties.KUNDERA_NODES, \"String_Node_Str\");\n props.put(PersistenceProperties.KUNDERA_PORT, \"String_Node_Str\");\n props.put(PersistenceProperties.KUNDERA_KEYSPACE, _keyspace);\n props.put(PersistenceProperties.KUNDERA_DDL_AUTO_PREPARE, property);\n if (useLucene) {\n props.put(PersistenceProperties.KUNDERA_INDEX_HOME_DIR, \"String_Node_Str\");\n }\n KunderaMetadata.INSTANCE.setApplicationMetadata(null);\n ApplicationMetadata appMetadata = KunderaMetadata.INSTANCE.getApplicationMetadata();\n PersistenceUnitMetadata puMetadata = new PersistenceUnitMetadata();\n puMetadata.setPersistenceUnitName(_persistenceUnit);\n Properties p = new Properties();\n p.putAll(props);\n puMetadata.setProperties(p);\n Map<String, PersistenceUnitMetadata> metadata = new HashMap<String, PersistenceUnitMetadata>();\n metadata.put(_persistenceUnit, puMetadata);\n appMetadata.addPersistenceUnitMetadata(metadata);\n Map<String, List<String>> clazzToPu = new HashMap<String, List<String>>();\n List<String> pus = new ArrayList<String>();\n pus.add(_persistenceUnit);\n clazzToPu.put(CassandraEntityPersonnelUniMToM.class.getName(), pus);\n clazzToPu.put(CassandraEntityHabitatUniMToM.class.getName(), pus);\n appMetadata.setClazzToPuMap(clazzToPu);\n EntityMetadata m = new EntityMetadata(CassandraEntityPersonnelUniMToM.class);\n EntityMetadata m1 = new EntityMetadata(CassandraEntityHabitatUniMToM.class);\n TableProcessor processor = new TableProcessor(null);\n processor.process(CassandraEntityPersonnelUniMToM.class, m);\n processor.process(CassandraEntityHabitatUniMToM.class, m1);\n m.setPersistenceUnit(_persistenceUnit);\n MetamodelImpl metaModel = new MetamodelImpl();\n metaModel.addEntityMetadata(CassandraEntityPersonnelUniMToM.class, m);\n metaModel.addEntityMetadata(CassandraEntityHabitatUniMToM.class, m1);\n metaModel.assignManagedTypes(appMetadata.getMetaModelBuilder(_persistenceUnit).getManagedTypes());\n metaModel.assignEmbeddables(appMetadata.getMetaModelBuilder(_persistenceUnit).getEmbeddables());\n metaModel.assignMappedSuperClass(appMetadata.getMetaModelBuilder(_persistenceUnit).getMappedSuperClassTypes());\n appMetadata.getMetamodelMap().put(_persistenceUnit, metaModel);\n new ClientFactoryConfiguraton(null, _persistenceUnit).configure();\n configuration.configure();\n return null;\n}\n"
|
"String buildEnvironmentString() {\n if (environment.isEmpty()) {\n return null;\n }\n StringBuilder sb = new StringBuilder();\n for (Map.Entry<String, String> entry : environment.entrySet()) {\n if (sb.length() != 0) {\n sb.append(\"String_Node_Str\");\n }\n sb.append(entry.getKey() + \"String_Node_Str\" + entry.getValue() + \"String_Node_Str\");\n }\n return sb.toString();\n}\n"
|
"public static void projectJoinInputs(RelNode[] inputRels, List<RexNode> leftJoinKeys, List<RexNode> rightJoinKeys, int systemColCount, List<Integer> leftKeys, List<Integer> rightKeys, List<Integer> outputProj) {\n RelNode leftRel = inputRels[0];\n RelNode rightRel = inputRels[1];\n RexBuilder rexBuilder = leftRel.getCluster().getRexBuilder();\n int origLeftInputSize = leftRel.getRowType().getFieldCount();\n int origRightInputSize = rightRel.getRowType().getFieldCount();\n List<RexNode> newLeftFields = new ArrayList<RexNode>();\n List<String> newLeftFieldNames = new ArrayList<String>();\n List<RexNode> newRightFields = new ArrayList<RexNode>();\n List<String> newRightFieldNames = new ArrayList<String>();\n int leftKeyCount = leftJoinKeys.size();\n int rightKeyCount = rightJoinKeys.size();\n int i;\n for (i = 0; i < systemColCount; i++) {\n outputProj.add(i);\n }\n for (i = 0; i < origLeftInputSize; i++) {\n newLeftFields.add(rexBuilder.makeInputRef(leftRel.getRowType().getFields()[i].getType(), i));\n newLeftFieldNames.add(leftRel.getRowType().getFields()[i].getName());\n outputProj.add(systemColCount + i);\n }\n int newLeftKeyCount = 0;\n for (i = 0; i < leftKeyCount; i++) {\n RexNode leftKey = leftJoinKeys.get(i);\n if (leftKey instanceof RexInputRef) {\n leftKeys.add(((RexInputRef) leftKey).getIndex());\n } else {\n newLeftFields.add(leftKey);\n newLeftFieldNames.add(\"String_Node_Str\" + newLeftKeyCount);\n leftKeys.add(origLeftInputSize + newLeftKeyCount);\n newLeftKeyCount++;\n }\n }\n int leftFieldCount = origLeftInputSize + newLeftKeyCount;\n for (i = 0; i < origRightInputSize; i++) {\n newRightFields.add(rexBuilder.makeInputRef(rightRel.getRowType().getFields()[i].getType(), i));\n newRightFieldNames.add(rightRel.getRowType().getFields()[i].getName());\n outputProj.add(systemColCount + leftFieldCount + i);\n }\n int newRightKeyCount = 0;\n for (i = 0; i < rightKeyCount; i++) {\n RexNode rightKey = rightJoinKeys.get(i);\n if (rightKey instanceof RexInputRef) {\n rightKeys.add(((RexInputRef) rightKey).getIndex());\n } else {\n newRightFields.add(rightKey);\n newRightFieldNames.add(rightKey.toString());\n rightKeys.add(origRightInputSize + newRightKeyCount);\n newRightKeyCount++;\n }\n }\n if (newLeftKeyCount > 0) {\n leftRel = CalcRel.createProject(leftRel, newLeftFields, newLeftFieldNames);\n }\n if (newRightKeyCount > 0) {\n rightRel = CalcRel.createProject(rightRel, newRightFields, newRightFieldNames);\n }\n inputRels[0] = leftRel;\n inputRels[1] = rightRel;\n}\n"
|
"private static void streamToFile(InputStream stm, String targetFilename, boolean append) {\n FileOutputStream stmOut = null;\n byte[] buffer = new byte[FILE_WRITE_BUFFER_SIZE];\n int bytecount;\n File outFile = new File(folder, targetFilename);\n FileOutputStream stmOut = new FileOutputStream(outFile, append);\n while ((bytecount = stm.read(buffer)) > 0) {\n stmOut.write(buffer, 0, bytecount);\n }\n}\n"
|
"public void redraw() {\n if (debug > 0)\n System.err.println(\"String_Node_Str\");\n if (backingStore != null) {\n Graphics g = backingStore.getGraphics();\n int xoffset = (super.getSize().width - size.width * charWidth) / 2;\n int yoffset = (super.getSize().height - size.height * charHeight) / 2;\n Color fg = color[COLOR_FG_STD];\n Color bg = color[COLOR_BG_STD];\n g.setFont(normalFont);\n for (int l = 0; l < size.height; l++) {\n if (!update[0] && !update[l + 1])\n continue;\n update[l + 1] = false;\n for (int c = 0; c < size.width; c++) {\n int addr = 0;\n int currAttr = charAttributes[windowBase + l][c];\n fg = getForeground();\n bg = getBackground();\n if (((currAttr & BOLD) != 0) && ((currAttr & COLOR_FG) == 0) && ((currAttr & COLOR_BG) == 0))\n fg = color[COLOR_FG_BOLD];\n if ((currAttr & COLOR_FG) != 0)\n fg = color[((currAttr & COLOR_FG) >> 3) - 1];\n if ((currAttr & COLOR_BG) != 0)\n bg = color[((currAttr & COLOR_BG) >> 7) - 1];\n if ((currAttr & BOLD) != 0)\n if (fg.equals(Color.black))\n fg = Color.gray;\n else {\n fg = fg.brighter();\n bg = bg.brighter();\n }\n if ((currAttr & INVERT) != 0) {\n Color swapc = bg;\n bg = fg;\n fg = swapc;\n }\n if (sf.inSoftFont(charArray[windowBase + l][c])) {\n g.setColor(bg);\n g.fillRect(c * charWidth + xoffset, l * charHeight + yoffset, charWidth, charHeight);\n g.setColor(fg);\n sf.drawChar(g, charArray[windowBase + l][c], xoffset + c * charWidth, l * charHeight + yoffset, charWidth, charHeight);\n if ((currAttr & UNDERLINE) != 0)\n g.drawLine(c * charWidth + xoffset, (l + 1) * charHeight - charDescent / 2 + yoffset, c * charWidth + charWidth + xoffset, (l + 1) * charHeight - charDescent / 2 + yoffset);\n continue;\n }\n while (c + addr < size.width && charAttributes[windowBase + l][c + addr] == currAttr && !sf.inSoftFont(charArray[windowBase + l][c + addr])) {\n if (charArray[windowBase + l][c + addr] < ' ')\n charArray[windowBase + l][c + addr] = ' ';\n addr++;\n }\n if ((currAttr & INVERT) != 0) {\n Color swapc = bg;\n bg = fg;\n fg = swapc;\n }\n if (sf.inSoftFont(charArray[windowBase + l][c])) {\n g.setColor(bg);\n g.fillRect(c * charWidth + xoffset, l * charHeight + yoffset, charWidth, charHeight);\n g.setColor(fg);\n sf.drawChar(g, charArray[windowBase + l][c], xoffset + c * charWidth, l * charHeight + yoffset, charWidth, charHeight);\n if ((currAttr & UNDERLINE) != 0)\n g.drawLine(c * charWidth + xoffset, (l + 1) * charHeight - charDescent / 2 + yoffset, c * charWidth + charWidth + xoffset, (l + 1) * charHeight - charDescent / 2 + yoffset);\n continue;\n }\n while (c + addr < size.width && charAttributes[windowBase + l][c + addr] == currAttr && !sf.inSoftFont(charArray[windowBase + l][c + addr])) {\n if (charArray[windowBase + l][c + addr] < ' ')\n charArray[windowBase + l][c + addr] = ' ';\n addr++;\n }\n g.setColor(bg);\n g.fillRect(c * charWidth + xoffset, l * charHeight + yoffset, addr * charWidth, charHeight);\n g.setColor(fg);\n g.drawChars(charArray[windowBase + l], c, addr, c * charWidth + xoffset, (l + 1) * charHeight - charDescent + yoffset);\n if ((currAttr & UNDERLINE) != 0)\n g.drawLine(c * charWidth + xoffset, (l + 1) * charHeight - charDescent / 2 + yoffset, c * charWidth + addr * charWidth + xoffset, (l + 1) * charHeight - charDescent / 2 + yoffset);\n c += addr - 1;\n }\n }\n if (screenBase + cursorY >= windowBase && screenBase + cursorY < windowBase + size.height) {\n g.setColor(color[COLOR_FG_STD]);\n g.setXORMode(color[COLOR_BG_STD]);\n g.fillRect(cursorX * charWidth + xoffset, (cursorY + screenBase - windowBase) * charHeight + yoffset, charWidth, charHeight);\n g.setPaintMode();\n }\n if (windowBase <= selectBegin.y || windowBase <= selectEnd.y) {\n int beginLine = selectBegin.y - windowBase;\n int endLine = selectEnd.y - selectBegin.y;\n if (beginLine < 0) {\n endLine += beginLine;\n beginLine = 0;\n }\n if (endLine > size.height)\n endLine = size.height - beginLine;\n g.setXORMode(color[COLOR_BG_STD]);\n g.fillRect(selectBegin.x * charWidth + xoffset, beginLine * charHeight + yoffset, (endLine == 0 ? (selectEnd.x - selectBegin.x) : (size.width - selectBegin.x)) * charWidth, charHeight);\n if (endLine > 1)\n g.fillRect(0 + xoffset, (beginLine + 1) * charHeight + yoffset, size.width * charWidth, (endLine - 1) * charHeight);\n if (endLine > 0)\n g.fillRect(0 + xoffset, (beginLine + endLine) * charHeight + yoffset, selectEnd.x * charWidth, charHeight);\n g.setPaintMode();\n }\n if (insets != null) {\n g.setColor(getBackground());\n xoffset--;\n yoffset--;\n for (int i = insets.top - 1; i >= 0; i--) g.draw3DRect(xoffset - i, yoffset - i, charWidth * size.width + 1 + i * 2, charHeight * size.height + 1 + i * 2, raised);\n }\n update[0] = false;\n repaint();\n}\n"
|
"protected boolean isBeginDragValid() throws Exception {\n Point2D.Double cartesianPt = pane.awtScreen2Cartesian(mouseDown);\n Point2D.Double geoPt = pane.cartesian2Geo(cartesianPt);\n return !map.selectedPointHitted(GeometryUtils.createPoint(geoPt));\n}\n"
|
"public InstanceExample nextInstance() {\n Instance x = (Instance) ((Instance) this.inputStream.nextInstance().getData());\n if (dataset == null) {\n System.out.println(\"String_Node_Str\");\n initialize(x);\n }\n System.out.println(\"String_Node_Str\");\n double[] z_ = new double[dataset.numAttributes()];\n Instance z = new InstanceImpl(x.weight(), z_);\n int d = x.numAttributes();\n int h = numLatentOption.getValue();\n int j_c = x.classIndex();\n for (int k = 0; k < h; k++) {\n double sum_k = 0.;\n for (int j = 0; j < d; j++) {\n if (j != j_c)\n sum_k += (x.value(j) - c[k]);\n }\n double v = sum_k / Math.pow(r[k], 2);\n z.setValue(k, Math.exp(-sum_k));\n }\n z.setDataset(dataset);\n return new InstanceExample(z);\n}\n"
|
"public boolean executeFromConsole() {\n try {\n SarImageReader sar = (SarImageReader) SumoPlatform.getApplication().getCurrentImageReader();\n ImageLayer layer = LayerManager.getIstanceManager().getCurrentImageLayer();\n if (layer != null && commandLine.length >= 3) {\n String arg0 = commandLine[1];\n String arg1 = commandLine[2];\n String arg2 = commandLine[3];\n if (arg0.equalsIgnoreCase(\"String_Node_Str\")) {\n if (commandLine.length == 2 && arg1.equalsIgnoreCase(\"String_Node_Str\")) {\n runBBAnalysis();\n } else {\n int row = Integer.parseInt(arg1);\n int col = Integer.parseInt(arg2);\n String direction = \"String_Node_Str\";\n if (commandLine.length == 5)\n direction = commandLine[4];\n BlackBorderAnalysis borderAn = new BlackBorderAnalysis(sar, layer.getRealTileSizeX(), layer.getRealTileSizeY(), null);\n borderAn.analyse(row, col, direction.equalsIgnoreCase(\"String_Node_Str\"));\n yy = borderAn.getSizeY() * row;\n xx = borderAn.getSizeX() * col;\n tileSizeY = borderAn.getSizeY();\n tileSizeX = borderAn.getSizeX();\n com.vividsolutions.jts.geom.Polygon box = JTSUtil.createPolygon(xx, yy, layer.getRealTileSizeX(), layer.getRealTileSizeY());\n GeometryImage gi = new GeometryImage(arg2, box);\n SimpleGeometryLayer sgl = new SimpleGeometryLayer(layer, gi);\n LayerManager.addLayerInThread(sgl);\n }\n } else if (arg0.equalsIgnoreCase(\"String_Node_Str\")) {\n int row = Integer.parseInt(arg1);\n int col = Integer.parseInt(arg2);\n Float hh = 1.5f;\n Float hv = 1.5f;\n Float vh = 1.5f;\n Float vv = 1.5f;\n Float buffer = 0.0f;\n if (commandLine.length >= 5) {\n buffer = Float.parseFloat(commandLine[4]);\n hh = Float.parseFloat(commandLine[5]);\n hv = Float.parseFloat(commandLine[6]);\n vh = Float.parseFloat(commandLine[7]);\n vv = Float.parseFloat(commandLine[8]);\n }\n MaskVectorLayer coastlineMask = null;\n MaskVectorLayer iceMasks = null;\n for (ILayer l : LayerManager.getIstanceManager().getChilds(layer)) {\n if (l instanceof IMask) {\n if (((MaskVectorLayer) l).getMaskType() == MaskVectorLayer.COASTLINE_MASK) {\n coastlineMask = (MaskVectorLayer) l;\n } else if (((MaskVectorLayer) l).getMaskType() == MaskVectorLayer.ICE_MASK) {\n iceMasks = (MaskVectorLayer) l;\n }\n }\n }\n MaskGeometries mg = null;\n IMask bufferedMask = null;\n if (coastlineMask != null) {\n bufferedMask = FactoryLayer.createMaskLayer(coastlineMask.getName(), coastlineMask.getType(), 0, ((MaskVectorLayer) coastlineMask).getGeometriclayer(), coastlineMask.getMaskType());\n mg = new MaskGeometries(\"String_Node_Str\", bufferedMask.getGeometries());\n }\n MaskGeometries ice = null;\n IMask iceMask = null;\n if (iceMasks != null) {\n iceMask = FactoryLayer.createMaskLayer(iceMasks.getName(), iceMasks.getType(), 0, ((MaskVectorLayer) iceMasks).getGeometriclayer(), iceMasks.getMaskType());\n ice = new MaskGeometries(\"String_Node_Str\", iceMask.getGeometries());\n }\n VDSAnalysis analysis = new VDSAnalysis(sar, mg, ice, Float.parseFloat(sar.getENL()), new Float[] { hh, hv, vh, vv }, layer.getRealTileSizeX(), layer.getRealTileSizeY(), layer.getHorizontalTilesImage(), layer.getVerticalTilesImage());\n analysis.setAnalyseSingleTile(true);\n analysis.setxTileToAnalyze(col);\n analysis.setyTileToAnalyze(row);\n proc = new AnalysisProcess(sar, Float.parseFloat(sar.getENL()), analysis, 0, 0, null);\n proc.addProcessListener(this);\n Thread t = new Thread(proc);\n t.setName(\"String_Node_Str\" + sar.getDisplayName(0));\n t.start();\n yy = layer.getRealTileSizeY() * row;\n xx = layer.getRealTileSizeX() * col;\n tileSizeY = layer.getRealTileSizeY();\n tileSizeX = layer.getRealTileSizeX();\n }\n }\n } catch (Exception e) {\n logger.error(e.getMessage());\n return false;\n } finally {\n }\n return true;\n}\n"
|
"private void initTestImportsType() {\n testImportsType = ComponentFactory.eINSTANCE.createIMPORTSType();\n IMPORTType importType1 = ComponentFactory.eINSTANCE.createIMPORTType();\n importType1.setMODULE(\"String_Node_Str\");\n importType1.setREQUIREDIF(\"String_Node_Str\");\n testImportsType.getIMPORT().add(importType1);\n IMPORTType importType2 = mock(IMPORTType.class);\n importType2.setMODULE(\"String_Node_Str\");\n importType2.setREQUIREDIF(\"String_Node_Str\");\n testImportsType.getIMPORT().add(importType2);\n IMPORTSType importsType = mock(IMPORTSType.class);\n importsType.setREQUIREDIF(\"String_Node_Str\");\n IMPORTType importType3 = mock(IMPORTType.class);\n importType3.setMODULE(\"String_Node_Str\");\n importType3.setREQUIREDIF(\"String_Node_Str\");\n importsType.getIMPORT().add(importType3);\n testImportsType.getIMPORTS().add(importsType);\n}\n"
|
"public Factor getClamped(VarConfig clmpVarConfig) {\n if (clmpVarConfig.size() == 0) {\n return this;\n } else if (clmpVarConfig.size() == vars.size()) {\n return new ProjDepTreeFactor(0, VarType.OBSERVED);\n } else {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n return this;\n}\n"
|
"private void reportDisconnect() {\n if (mListeners.isEmpty())\n return;\n for (MavLinkConnectionListener listener : mListeners.values()) {\n listener.onDisconnect();\n }\n}\n"
|
"public void testMultipleTypesInOneFile03() {\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 mapreduceSpecification(HttpRequest request, HttpResponder responder, final String appId, final String mapreduceId) {\n programLifecycleHttpHandler.runnableSpecification(RESTMigrationUtils.rewriteV2RequestToV3(request), responder, Constants.DEFAULT_NAMESPACE, appId, ProgramType.MAPREDUCE.getCategoryName(), mapreduceId);\n}\n"
|
"public Community getCommunity(Integer communityId, String expand, String user_ip, String user_agent, String xforwarderfor, HttpHeaders headers, HttpServletRequest request) throws WebApplicationException {\n log.info(\"String_Node_Str\" + communityId + \"String_Node_Str\");\n org.dspace.core.Context context = null;\n Community community = null;\n try {\n context = createContext(getUser(headers));\n org.dspace.content.Community dspaceCommunity = findCommunity(context, communityId, org.dspace.core.Constants.READ);\n writeStats(dspaceCommunity, UsageEvent.Action.VIEW, user_ip, user_agent, xforwarderfor, headers, request, context);\n community = new Community(dspaceCommunity, expand, context);\n context.complete();\n } catch (SQLException e) {\n processException(\"String_Node_Str\" + communityId + \"String_Node_Str\" + e, context);\n } catch (ContextException e) {\n processException(\"String_Node_Str\" + communityId + \"String_Node_Str\" + e.getMessage(), context);\n } finally {\n processFinally(context);\n }\n log.trace(\"String_Node_Str\" + communityId + \"String_Node_Str\");\n return community;\n}\n"
|
"public void runMain(String[] args, boolean useSystemExit) {\n boolean verbose = (-1 != (\"String_Node_Str\" + LangUtil.arrayAsList(args)).indexOf(\"String_Node_Str\"));\n IMessageHolder holder = clientHolder;\n if (null == holder) {\n holder = ourHandler;\n if (verbose) {\n ourHandler.setInterceptor(MessagePrinter.VERBOSE);\n } else {\n ourHandler.ignore(IMessage.INFO);\n ourHandler.setInterceptor(MessagePrinter.TERSE);\n }\n }\n try {\n run(args, holder);\n } catch (OutOfMemoryError outOfMemory) {\n IMessage outOfMemoryMessage = new Message(OUT_OF_MEMORY_MSG, null, true);\n holder.handleMessage(outOfMemoryMessage);\n systemExit(holder);\n }\n boolean skipExit = false;\n if (useSystemExit && !LangUtil.isEmpty(args)) {\n for (int i = 0; i < args.length; i++) {\n if (\"String_Node_Str\".equals(args[i])) {\n skipExit = true;\n break;\n }\n }\n }\n if (useSystemExit && !skipExit) {\n systemExit(holder);\n }\n}\n"
|
"public static Map getImplementorsMap(Class clazz) {\n Map matches = new HashMap();\n try {\n Properties props = ResourceUtil.getProperties(clazz);\n Iterator it = props.keySet().iterator();\n while (it.hasNext()) {\n try {\n String key = (String) it.next();\n String value = props.getProperty(key);\n Class impl = Class.forName(value);\n if (clazz.isAssignableFrom(impl)) {\n matches.put(key, impl);\n } else {\n log.warn(\"String_Node_Str\" + impl.getName() + \"String_Node_Str\" + clazz.getName() + \"String_Node_Str\");\n }\n } catch (ClassNotFoundException ex) {\n log.warn(\"String_Node_Str\" + clazz.getName(), ex);\n }\n }\n log.debug(\"String_Node_Str\" + matches.size() + \"String_Node_Str\" + clazz.getName());\n } catch (Exception ex) {\n log.error(\"String_Node_Str\", ex);\n }\n return matches;\n}\n"
|
"public void setCells(Set<GridCell> c) {\n this.cells = new TreeSet<GridCell>(new CellComparator());\n this.cells.addAll(cells);\n}\n"
|
"private void renderRemoteViewsLevel_2_3_Active(GL gl) {\n float fright = 0.0f;\n float ftop = viewFrustum.getTop();\n float fleftOffset = 0.09f + GAP_BETWEEN_LEVELS + renderStyle.getWidthLevel2() * fAnimationScale;\n if (bIsHeatmapInFocus) {\n fright += viewFrustum.getWidth() - 0.725f;\n } else {\n fright += viewFrustum.getWidth() - 2;\n }\n if (contentVA.getGroupList() != null)\n fleftOffset += renderStyle.getWidthClusterVisualization();\n if (bGeneDendrogramActive) {\n fleftOffset += renderStyle.getWidthGeneDendrogram();\n fright -= 0.3f;\n }\n gl.glTranslatef(fleftOffset, -0.2f, 0);\n if (bExperimentDendrogramActive) {\n glHeatMapView.getViewFrustum().setTop(ftop - renderStyle.getHeightExperimentDendrogram());\n } else {\n glHeatMapView.getViewFrustum().setTop(ftop);\n }\n if (contentVA.getGroupList() != null)\n glHeatMapView.setClusterVisualizationActiveFlag(true);\n else\n glHeatMapView.setClusterVisualizationActiveFlag(false);\n glHeatMapView.getViewFrustum().setRight(fright);\n gl.glPushName(pickingManager.getPickingID(iUniqueID, EPickingType.HIER_HEAT_MAP_EMBEDDED_HEATMAP_SELECTION, glHeatMapView.getID()));\n glHeatMapView.displayRemote(gl);\n gl.glPopName();\n renderStyle.setWidthLevel3(glHeatMapView.getViewFrustum().getWidth() - 0.95f);\n if (bExperimentDendrogramActive) {\n float fOffsetx = ftop - renderStyle.getHeightExperimentDendrogram();\n if (storageVA.getGroupList() != null)\n fOffsetx += renderStyle.getWidthClusterVisualization();\n gl.glTranslatef(0f, fOffsetx, 0f);\n gl.glPushName(pickingManager.getPickingID(iUniqueID, EPickingType.HIER_HEAT_MAP_EXPERIMENT_DENDROGRAM_SELECTION, glExperimentDendrogramView.getID()));\n glExperimentDendrogramView.getViewFrustum().setTop(ftop - 3.6f);\n glExperimentDendrogramView.getViewFrustum().setRight(renderStyle.getWidthLevel3());\n glExperimentDendrogramView.displayRemote(gl);\n gl.glPopName();\n gl.glTranslatef(0f, -3.6f, 0f);\n }\n gl.glTranslatef(-fleftOffset, +0.2f, 0);\n if (bGeneDendrogramActive) {\n gl.glTranslatef(0f, 0.4f, 0f);\n gl.glPushName(pickingManager.getPickingID(iUniqueID, EPickingType.HIER_HEAT_MAP_GENE_DENDROGRAM_SELECTION, glGeneDendrogramView.getID()));\n glGeneDendrogramView.getViewFrustum().setTop(ftop - 0.6f);\n glGeneDendrogramView.getViewFrustum().setRight(1.7f);\n glGeneDendrogramView.displayRemote(gl);\n gl.glPopName();\n gl.glTranslatef(0f, -0.4f, 0f);\n }\n}\n"
|
"protected Pool loadTransitionMatricesAscii(String path) throws FileNotFoundException, IOException {\n String location = \"String_Node_Str\";\n InputStream inputStream = StreamFactory.getInputStream(location, path);\n LogMath logMath = ConfigurationManager.getInstance(LogMath.class);\n logger.info(\"String_Node_Str\");\n logger.info(path);\n int numMatrices;\n int numStates;\n Pool pool = new Pool(path);\n ExtendedStreamTokenizer est = new ExtendedStreamTokenizer(inputStream, '#', false);\n est.expectString(\"String_Node_Str\");\n numMatrices = est.getInt(\"String_Node_Str\");\n est.expectString(\"String_Node_Str\");\n for (int i = 0; i < numMatrices; i++) {\n est.expectString(\"String_Node_Str\");\n est.expectString(\"String_Node_Str\" + i + \"String_Node_Str\");\n est.expectString(\"String_Node_Str\");\n numStates = est.getInt(\"String_Node_Str\") + 1;\n float[][] tmat = new float[numStates][numStates];\n for (int j = 0; j < numStates; j++) {\n for (int k = 0; k < numStates; k++) {\n if (j < numStates - 1) {\n if (sparseForm) {\n if (k == j || k == j + 1) {\n tmat[j][k] = est.getFloat(\"String_Node_Str\");\n }\n } else {\n tmat[j][k] = est.getFloat(\"String_Node_Str\");\n }\n }\n tmat[j][k] = logMath.linearToLog(tmat[j][k]);\n if (logger.isLoggable(Level.FINE)) {\n logger.fine(\"String_Node_Str\" + j + \"String_Node_Str\" + k + \"String_Node_Str\" + tmat[j][k]);\n }\n }\n }\n pool.put(i, tmat);\n }\n est.close();\n return pool;\n}\n"
|
"public void compile() throws Exception {\n LifecycleManager.getDefault().saveAll();\n for (CoffeeScriptDataObject coffeeFile : data) {\n ProgressHandle handle = ProgressHandleFactory.createHandle(\"String_Node_Str\" + coffeeFile.getPrimaryFile().getNameExt(), this);\n try {\n handle.start();\n CoffeeScriptCompiler.CompilerResult result = CoffeeScriptSettings.getCompiler().compile(dataObject.getPrimaryFile().asText(), bare);\n if (result == null) {\n return;\n }\n if (result.getJs() != null) {\n FileObject folder = dataObject.getFolder().getPrimaryFile();\n FileObject file = folder.getFileObject(dataObject.getName(), \"String_Node_Str\");\n if (file != null) {\n file.delete();\n }\n file = folder.createData(dataObject.getName(), \"String_Node_Str\");\n file.getOutputStream().write(result.getJs().getBytes());\n } else {\n }\n handleResult(result);\n } finally {\n handle.finish();\n }\n }\n}\n"
|
"protected static List<IComponent> getRelatedComponents(final IComponentsFactory compFac, String keyword, boolean needCheckVisible) {\n Collection<IComponent> componentSet = null;\n IComponentsHandler componentsHandler = compFac.getComponentsHandler();\n String lowerCasedKeyword = null;\n if (keyword != null) {\n lowerCasedKeyword = keyword.toLowerCase().trim();\n }\n boolean needSort = true;\n if (compFac != null && lowerCasedKeyword != null && 0 < lowerCasedKeyword.length()) {\n componentSet = new LinkedHashSet<IComponent>();\n Map<String, Map<String, Set<IComponent>>> componentNameMap = compFac.getComponentNameMap();\n if (componentNameMap != null) {\n Map<String, Set<IComponent>> map = componentNameMap.get(lowerCasedKeyword);\n if (map != null) {\n Collection<Set<IComponent>> componentSets = map.values();\n Iterator<Set<IComponent>> componentSetIter = componentSets.iterator();\n List<IComponent> filteredComponent = new ArrayList<IComponent>();\n while (componentSetIter.hasNext()) {\n filteredComponent.addAll(componentSetIter.next());\n }\n if (componentsHandler != null) {\n filteredComponent = componentsHandler.filterComponents(filteredComponent);\n }\n Iterator<IComponent> componentIter = filteredComponent.iterator();\n while (componentIter.hasNext()) {\n IComponent iComponent = componentIter.next();\n if (iComponent == null || !ComponentUtilities.isComponentVisible(iComponent) || iComponent.isTechnical()) {\n componentIter.remove();\n }\n }\n if (!filteredComponent.isEmpty()) {\n componentSet.addAll(filteredComponent);\n }\n }\n }\n if (componentNameMap != null) {\n addComponentsByNameFilter(compFac, componentSet, lowerCasedKeyword);\n if (!componentSet.isEmpty()) {\n componentSet = new LinkedHashSet<IComponent>(sortResultsBasedOnRecentlyUsed(new ArrayList<IComponent>(componentSet)));\n needSort = false;\n }\n boolean shouldSearchFromHelpAPI = PaletteSettingsPreferencePage.isPaletteSearchFromHelp();\n if (shouldSearchFromHelpAPI) {\n String helpKeyword = keyword;\n if (helpKeyword != null) {\n helpKeyword = helpKeyword.trim();\n }\n Set<String> componentNames = getRelatedComponentNamesFromHelp(helpKeyword);\n if (componentNames != null && 0 < componentNames.size()) {\n int limit = PaletteSettingsPreferencePage.getPaletteSearchResultLimitFromHelp();\n int i = 0;\n Iterator<String> nameIter = componentNames.iterator();\n while (nameIter.hasNext()) {\n if (limit <= i) {\n break;\n }\n String componentName = nameIter.next();\n Map<String, Set<IComponent>> map = componentNameMap.get(componentName.toLowerCase());\n if (map == null) {\n continue;\n }\n Set<IComponent> findedComponents = map.get(componentName);\n if (findedComponents != null && !findedComponents.isEmpty()) {\n for (IComponent iComponent : findedComponents) {\n if (limit <= i) {\n break;\n }\n if (ComponentUtilities.isComponentVisible(iComponent) && !iComponent.isTechnical() && filterComponent(iComponent, componentsHandler)) {\n componentSet.add(iComponent);\n i++;\n }\n }\n }\n }\n if (0 < i) {\n needSort = false;\n }\n }\n }\n }\n } else if (compFac != null) {\n componentSet = compFac.getComponents();\n }\n List<IComponent> relatedComponents = null;\n if (componentSet == null || componentSet.isEmpty()) {\n relatedComponents = new LinkedList<IComponent>();\n } else {\n relatedComponents = new LinkedList<IComponent>(componentSet);\n }\n if (compFac != null && componentsHandler != null && !relatedComponents.isEmpty()) {\n relatedComponents = componentsHandler.filterComponents(relatedComponents);\n }\n if (needCheckVisible && relatedComponents != null && !relatedComponents.isEmpty()) {\n Iterator<IComponent> iter = relatedComponents.iterator();\n while (iter.hasNext()) {\n IComponent component = iter.next();\n if (component == null || !ComponentUtilities.isComponentVisible(component) || component.isTechnical()) {\n iter.remove();\n }\n }\n }\n if (needSort) {\n relatedComponents = sortResultsBasedOnRecentlyUsed(relatedComponents);\n }\n return relatedComponents;\n}\n"
|
"public ICompletableFuture<V> getAsyncInternal(final Data keyData) {\n Object cached = nearCache.get(keyData);\n if (cached != null && NULL_OBJECT != cached) {\n return new CompletedFuture<V>(getContext().getSerializationService(), cached, getContext().getExecutionService().getAsyncExecutor());\n }\n final boolean marked = keyStateMarker.tryMark(key);\n ICompletableFuture<V> future;\n try {\n future = super.getAsyncInternal(key);\n } catch (Throwable t) {\n resetToUnmarkedState(key);\n throw ExceptionUtil.rethrow(t);\n }\n ((ClientDelegatingFuture) future).andThenInternal(new ExecutionCallback<Data>() {\n public void onResponse(Data response) {\n if (marked) {\n tryToPutNearCache(keyData, response);\n }\n }\n public void onFailure(Throwable t) {\n }\n });\n return future;\n}\n"
|
"public static void addCatalogOrSchema(IMetadataConnection metadataConnection, DatabaseConnection dbconn) {\n EDatabaseSchemaOrCatalogMapping catalog = null;\n EDatabaseSchemaOrCatalogMapping schema = null;\n EDatabaseTypeName type = EDatabaseTypeName.getTypeFromDbType(metadataConnection.getDbType());\n if (type.equals(EDatabaseTypeName.GENERAL_JDBC)) {\n String realtype = ExtractMetaDataUtils.getInstance().getDbTypeByClassName(metadataConnection.getDriverClass());\n type = EDatabaseTypeName.getTypeFromDbType(realtype);\n catalog = type.getCatalogMappingField();\n schema = type.getSchemaMappingField();\n } else {\n catalog = type.getCatalogMappingField();\n schema = type.getSchemaMappingField();\n }\n fillValuesForSchemaOrCatalog(catalog, schema, metadataConnection, dbconn);\n}\n"
|
"public GestureDetector createGestureDetector(Context appContext, AskOnGestureListener listener) {\n return new AskV8GestureDetector(appContext, listener);\n}\n"
|
"public Object getKey(T item) {\n return (keyProvider == null || item == null) ? item : keyProvider.getKey(item);\n}\n"
|
"public IRegion documentChanged2(DocumentEvent e) {\n try {\n IDocument d = e.getDocument();\n Position[] category = d.getPositions(fPositionCategory);\n IRegion line = d.getLineInformationOfOffset(e.getOffset());\n int reparseStart = line.getOffset();\n int partitionStart = -1;\n int partitionEnd = partitionStart;\n String contentType = IDocument.DEFAULT_CONTENT_TYPE;\n ;\n String nextPartitionType = null;\n int newLength = e.getText() == null ? 0 : e.getText().length();\n int reparseEnd = e.getOffset() + newLength;\n int first = d.computeIndexInCategory(fPositionCategory, e.getOffset());\n CFEPartition activePartition = null;\n if (first > 0) {\n activePartition = (CFEPartition) category[first - 1];\n String partitionType = activePartition.getType();\n if (partitionType.endsWith(\"String_Node_Str\")) {\n --first;\n d.removePosition(fPositionCategory, activePartition);\n activePartition = (CFEPartition) category[first - 1];\n if (!activePartition.getType().endsWith(\"String_Node_Str\")) {\n --first;\n d.removePosition(fPositionCategory, activePartition);\n activePartition = (CFEPartition) category[first - 1];\n }\n } else {\n if (partitionType.equals(CFPartitionScanner.CF_BOOLEAN_STATEMENT) || partitionType.equals(CFPartitionScanner.CF_EXPRESSION) || partitionType.equals(CFPartitionScanner.CF_SET_STATEMENT) || partitionType.endsWith(\"String_Node_Str\")) {\n --first;\n d.removePosition(fPositionCategory, activePartition);\n activePartition = (CFEPartition) category[first - 1];\n }\n }\n if (first - 2 > 0) {\n CFEPartition prevPartition = (CFEPartition) category[first - 2];\n nextPartitionType = prevPartition.getNextPartitionType();\n }\n if (isPseudoPartition(activePartition.getType())) {\n String pseudoPartitionType = activePartition.getType();\n while (first > 0) {\n --first;\n activePartition = (CFEPartition) category[first];\n if (pseudoPartitionType.equals(activePartition.getOpensPartitionType())) {\n reparseStart = activePartition.getOffset() + activePartition.getLength();\n break;\n }\n }\n }\n if (activePartition.offset + activePartition.length < e.fOffset) {\n partitionType = IDocument.DEFAULT_CONTENT_TYPE;\n }\n if (activePartition.getType().endsWith(\"String_Node_Str\") || activePartition.getType().endsWith(\"String_Node_Str\")) {\n int index = first;\n reparseEnd = d.getLength();\n d.removePosition(fPositionCategory, activePartition);\n while (index < category.length) {\n CFEPartition endPartition = (CFEPartition) category[index];\n if (endPartition.getType().endsWith(\"String_Node_Str\") || endPartition.getType().endsWith(\"String_Node_Str\")) {\n reparseEnd = endPartition.getOffset() + endPartition.getLength();\n break;\n }\n index++;\n }\n }\n contentType = IDocument.DEFAULT_CONTENT_TYPE;\n partitionStart = activePartition.getOffset();\n partitionEnd = activePartition.getOffset() + activePartition.getLength();\n if (partitionType.equals(CFPartitionScanner.CF_COMMENT) || partitionType.equals(CFPartitionScanner.HTM_COMMENT)) {\n System.out.println(\"String_Node_Str\" + partitionStart + \"String_Node_Str\" + partitionType);\n reparseStart = partitionStart;\n contentType = CFPartitionScanner.CF_COMMENT;\n }\n } else if (category != null && category.length > 0) {\n activePartition = (CFEPartition) category[first];\n }\n fPositionUpdater.update(e);\n for (int i = first; i < category.length; i++) {\n Position p = category[i];\n CFEPartition cfp = (CFEPartition) p;\n if (p.isDeleted) {\n rememberDeletedOffset(e.getOffset());\n break;\n }\n }\n category = d.getPositions(fPositionCategory);\n fScanner.setPartialRange(d, reparseStart, d.getLength() - reparseStart, contentType, partitionStart);\n int lastScannedPosition = reparseStart;\n IToken token = fScanner.nextToken();\n int lastOffset = -1;\n while (!token.isEOF()) {\n lastOffset = fScanner.getTokenOffset();\n contentType = getTokenContentType(token);\n if (!isSupportedContentType(contentType)) {\n token = fScanner.nextToken();\n continue;\n }\n int start = fScanner.getTokenOffset();\n int length = fScanner.getTokenLength();\n lastScannedPosition = start + length - 1;\n while (first < category.length) {\n CFEPartition p = (CFEPartition) category[first];\n if (lastScannedPosition >= p.offset + p.length || (p.overlapsWith(start, length) && (!d.containsPosition(fPositionCategory, start, length) || !contentType.equals(p.getType())))) {\n String closes = p.getClosesPartitionType();\n String opens = p.getOpensPartitionType();\n if (closes != null) {\n }\n if (opens != null) {\n }\n if (!p.getType().equals(p.getNextPartitionType())) {\n rememberRegion(p.offset, p.length);\n d.removePosition(fPositionCategory, p);\n } else {\n if (p.offset + p.length > start) {\n int oldLength = p.length;\n p.length = start - p.offset;\n } else if (p.offset + p.length < start) {\n p.length = start - p.offset;\n } else {\n }\n if (p.length < 0) {\n rememberRegion(p.offset, p.length);\n d.removePosition(fPositionCategory, p);\n }\n }\n ++first;\n } else\n break;\n }\n if (d.containsPosition(fPositionCategory, start, length)) {\n if (lastScannedPosition >= reparseEnd) {\n return createRegion();\n }\n ++first;\n } else {\n handleToken(token, getTokenContentType(token), nextPartitionType);\n rememberRegion(start, length);\n }\n token = fScanner.nextToken();\n }\n if (lastScannedPosition != reparseStart) {\n ++lastScannedPosition;\n }\n first = d.computeIndexInCategory(fPositionCategory, lastScannedPosition);\n CFEPartition p;\n while (first < category.length) {\n p = (CFEPartition) category[first++];\n d.removePosition(fPositionCategory, p);\n rememberRegion(p.offset, p.length);\n }\n } catch (BadPositionCategoryException x) {\n } catch (BadLocationException x) {\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return createRegion();\n}\n"
|
"public Object doInTransaction(TransactionStatus status) {\n try {\n final RpslObject rpslObject = RpslObject.parse(object);\n final RpslObject dummyObject = dummifier.dummify(3, rpslObject);\n jdbcTemplate.update(\"String_Node_Str\" + table + \"String_Node_Str\", dummyObject.toByteArray(), objectId, sequenceId);\n } catch (RuntimeException e) {\n LOGGER.error(table + \"String_Node_Str\" + objectId + \"String_Node_Str\" + sequenceId + \"String_Node_Str\" + new String(object), e);\n }\n int count = jobsDone.incrementAndGet();\n if (count % 100000 == 0) {\n LOGGER.info(\"String_Node_Str\" + count);\n }\n return null;\n}\n"
|
"public FnID defineFunction(String name, FunctionType type, DefaultVals<Var> defaultVals) throws UserException {\n DefInfo def = lookupDef(name);\n if (def != null && def.kind == DefKind.FUNCTION) {\n fnID = overloadFunction(name, type, defaultVals);\n declareVariable(type, fnID.uniqueName(), Alloc.GLOBAL_CONST, DefType.GLOBAL_CONST, VarProvenance.userVar(getSourceLoc()), false);\n } else {\n declareVariable(type, name, Alloc.GLOBAL_CONST, DefType.GLOBAL_CONST, VarProvenance.userVar(getSourceLoc()), false);\n FnID fnID = new FnID(name, name);\n addFunctionOverload(name, fnID, type, defaultVals);\n return fnID;\n }\n}\n"
|
"private void createCatalogTableColumns(Table table) {\n TableColumn tableColumn = new TableColumn(table, SWT.LEFT | SWT.FILL);\n tableColumn.setText(DefaultMessagesImpl.getString(\"String_Node_Str\"));\n tableColumn.setWidth(COL1_WIDTH);\n createNbRowsCol(table, CATALOG);\n createCommonStatisticalColumns(table);\n}\n"
|
"protected void restoreWidgetValuesForPOJO() {\n IDialogSettings settings = getDialogSettings();\n if (settings != null) {\n String[] directoryNames = settings.getArray(STORE_DESTINATION_NAMES_ID);\n String fileName = getDefaultFileNameWithType();\n if (!fileName.endsWith(FileConstants.ZIP_FILE_SUFFIX)) {\n fileName = fileName + FileConstants.ZIP_FILE_SUFFIX;\n }\n if (directoryNames != null && directoryNames.length > 0) {\n for (int i = 0; i < directoryNames.length; i++) {\n if (directoryNames[i].toLowerCase().endsWith(FileConstants.ZIP_FILE_SUFFIX)) {\n directoryNames[i] = (directoryNames[i].charAt(0) + \"String_Node_Str\").toUpperCase() + directoryNames[i].substring(1);\n addDestinationItem(directoryNames[i]);\n }\n }\n setDestinationValue(directoryNames[0].substring(0, (directoryNames[0].lastIndexOf(\"String_Node_Str\") + 1)) + fileName);\n } else {\n setDefaultDestination();\n }\n shellLauncherButton.setSelection(settings.getBoolean(STORE_SHELL_LAUNCHER_ID));\n jobItemButton.setSelection(settings.getBoolean(STORE_JOB_ID));\n jobScriptButton.setSelection(settings.getBoolean(STORE_SOURCE_ID));\n contextButton.setSelection(settings.getBoolean(STORE_CONTEXT_ID));\n applyToChildrenButton.setSelection(settings.getBoolean(APPLY_TO_CHILDREN_ID));\n chkButton.setSelection(settings.getBoolean(EXTRACT_ZIP_FILE));\n zipOption = String.valueOf(chkButton.getSelection());\n }\n launcherCombo.setItems(JobScriptsManager.getLauncher());\n if (JobScriptsManager.getLauncher().length > 0) {\n launcherCombo.select(0);\n }\n if (getProcessItem() != null && contextCombo != null) {\n ProcessItem item = getProcessItem();\n try {\n String id = item.getProperty().getId();\n IRepositoryViewObject lastVersion = ProxyRepositoryFactory.getInstance().getLastVersion(id);\n item = (ProcessItem) lastVersion.getProperty().getItem();\n } catch (PersistenceException e) {\n throw new RuntimeException(e);\n }\n List<String> contextNames;\n contextNames = getJobContexts(item);\n contextCombo.setItems(contextNames.toArray(new String[contextNames.size()]));\n if (contextNames.size() > 0) {\n contextCombo.select(0);\n }\n }\n if (log4jLevelCombo != null) {\n log4jLevelCombo.setItems(Log4jPrefsSettingManager.getLevel());\n if (Log4jPrefsSettingManager.getLevel().length > 0) {\n log4jLevelCombo.select(0);\n }\n }\n}\n"
|
"private void handleCharacter(int primaryCode, int[] keyCodes, int x, int y) {\n mVoiceProxy.handleCharacter();\n if (mJustAddedMagicSpace && mSettingsValues.isMagicSpaceStripper(primaryCode)) {\n removeTrailingSpaceWhileInBatchEdit(ic);\n }\n int code = primaryCode;\n if ((isAlphabet(code) || mSettingsValues.isSymbolExcludedFromWordSeparators(code)) && isSuggestionsRequested() && !isCursorTouchingWord()) {\n if (!mHasUncommittedTypedChars) {\n mHasUncommittedTypedChars = true;\n mComposingStringBuilder.setLength(0);\n mWordComposer.reset();\n clearSuggestions();\n mComposingStateManager.onFinishComposingText();\n }\n }\n final KeyboardSwitcher switcher = mKeyboardSwitcher;\n if (switcher.isShiftedOrShiftLocked()) {\n if (keyCodes == null || keyCodes[0] < Character.MIN_CODE_POINT || keyCodes[0] > Character.MAX_CODE_POINT) {\n return;\n }\n code = keyCodes[0];\n if (switcher.isAlphabetMode() && Character.isLowerCase(code)) {\n final String upperCaseString = new String(new int[] { code }, 0, 1).toUpperCase(mSubtypeSwitcher.getInputLocale());\n if (upperCaseString.codePointCount(0, upperCaseString.length()) == 1) {\n code = upperCaseString.codePointAt(0);\n } else {\n onTextInput(upperCaseString);\n return;\n }\n }\n }\n if (mHasUncommittedTypedChars) {\n mComposingStringBuilder.append((char) code);\n mWordComposer.add(code, keyCodes, x, y);\n final InputConnection ic = getCurrentInputConnection();\n if (ic != null) {\n if (mWordComposer.size() == 1) {\n mWordComposer.setAutoCapitalized(getCurrentAutoCapsState());\n mComposingStateManager.onStartComposingText();\n }\n final CharSequence textWithUnderline = mComposingStateManager.isAutoCorrectionIndicatorOn() ? SuggestionSpanUtils.getTextWithAutoCorrectionIndicatorUnderline(this, mComposingStringBuilder) : mComposingStringBuilder;\n ic.setComposingText(textWithUnderline, 1);\n }\n mHandler.postUpdateSuggestions();\n } else {\n sendKeyChar((char) code);\n }\n if (mJustAddedMagicSpace && mSettingsValues.isMagicSpaceSwapper(primaryCode)) {\n swapSwapperAndSpace();\n } else {\n mJustAddedMagicSpace = false;\n }\n switcher.updateShiftState();\n if (LatinIME.PERF_DEBUG)\n measureCps();\n TextEntryState.typedCharacter((char) code, mSettingsValues.isWordSeparator(code), x, y);\n}\n"
|
"public void updateComponents(SWF swf) {\n this.swf = swf;\n boolean isRunning = Main.isRunning();\n boolean isDebugRunning = Main.isDebugRunning();\n boolean isDebugPaused = Main.isDebugPaused();\n boolean isRunningOrDebugging = isRunning || isDebugRunning;\n boolean swfSelected = swf != null;\n boolean isWorking = Main.isWorking();\n List<ABCContainerTag> abcList = swf != null ? swf.getAbcList() : null;\n boolean hasAbc = swfSelected && abcList != null && !abcList.isEmpty();\n boolean hasDebugger = hasAbc && DebuggerTools.hasDebugger(swf);\n MainPanel mainPanel = mainFrame.getPanel();\n boolean swfLoaded = mainPanel != null ? !mainPanel.getSwfs().isEmpty() : false;\n setMenuEnabled(\"String_Node_Str\", !isWorking);\n setMenuEnabled(\"String_Node_Str\", !isWorking);\n setMenuEnabled(\"String_Node_Str\", swfSelected && !isWorking);\n setMenuEnabled(\"String_Node_Str\", swfSelected && !isWorking);\n setMenuEnabled(\"String_Node_Str\", swfSelected && !isWorking);\n setMenuEnabled(\"String_Node_Str\", swfSelected && !isWorking);\n setMenuEnabled(\"String_Node_Str\", swfSelected && !isWorking);\n setMenuEnabled(\"String_Node_Str\", swfSelected && !isWorking);\n setMenuEnabled(\"String_Node_Str\", swfSelected && !isWorking);\n setMenuEnabled(\"String_Node_Str\", swfLoaded && !isWorking);\n setMenuEnabled(\"String_Node_Str\", swfLoaded && !isWorking);\n setMenuEnabled(\"String_Node_Str\", swfSelected);\n setMenuEnabled(\"String_Node_Str\", swfSelected && !isWorking);\n setMenuEnabled(\"String_Node_Str\", swfSelected && !isWorking);\n setMenuEnabled(\"String_Node_Str\", swfSelected && !isWorking);\n setMenuEnabled(\"String_Node_Str\", swfSelected && !isWorking);\n setMenuEnabled(\"String_Node_Str\", swfSelected && !isWorking);\n setMenuEnabled(\"String_Node_Str\", swfSelected && !isWorking);\n setMenuEnabled(\"String_Node_Str\", swfSelected && !isWorking);\n setMenuEnabled(\"String_Node_Str\", swfSelected);\n setMenuEnabled(\"String_Node_Str\", swfSelected && !isWorking);\n setMenuEnabled(\"String_Node_Str\", swfSelected && !isWorking);\n setMenuEnabled(\"String_Node_Str\", swfSelected && !isWorking);\n setMenuEnabled(\"String_Node_Str\", swfSelected && !isWorking);\n setMenuEnabled(\"String_Node_Str\", swfSelected);\n setMenuEnabled(\"String_Node_Str\", swfSelected && !isWorking);\n setMenuEnabled(\"String_Node_Str\", swfSelected && !isWorking);\n setMenuEnabled(\"String_Node_Str\", hasAbc);\n setMenuEnabled(\"String_Node_Str\", swfSelected);\n setMenuEnabled(\"String_Node_Str\", swfSelected);\n setMenuEnabled(\"String_Node_Str\", swfSelected);\n setMenuEnabled(\"String_Node_Str\", !isWorking);\n setMenuEnabled(\"String_Node_Str\", hasAbc);\n setMenuEnabled(\"String_Node_Str\", !isWorking);\n setMenuEnabled(\"String_Node_Str\", !isWorking);\n setMenuEnabled(\"String_Node_Str\", !isWorking);\n setMenuEnabled(\"String_Node_Str\", !isWorking);\n setMenuEnabled(\"String_Node_Str\", !isWorking);\n setMenuEnabled(\"String_Node_Str\", !isWorking);\n setMenuEnabled(\"String_Node_Str\", swfSelected && !isRunningOrDebugging);\n setMenuEnabled(\"String_Node_Str\", swfSelected && !isRunningOrDebugging);\n setMenuEnabled(\"String_Node_Str\", isRunningOrDebugging);\n setMenuEnabled(\"String_Node_Str\", isRunningOrDebugging);\n setPathVisible(\"String_Node_Str\", isDebugRunning);\n setMenuEnabled(\"String_Node_Str\", isDebugRunning);\n setMenuEnabled(\"String_Node_Str\", isDebugPaused);\n setMenuEnabled(\"String_Node_Str\", isDebugPaused);\n setMenuEnabled(\"String_Node_Str\", isDebugPaused);\n setMenuEnabled(\"String_Node_Str\", isDebugPaused);\n}\n"
|
"public void onServerTick(TickEvent.ServerTickEvent event) {\n final MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();\n final World world = server.getEntityWorld();\n if (Reference.pauseForPlayers && world.playerEntities.size() > 0)\n return;\n if (Reference.maxChunksLoaded <= getChunksLoaded(server))\n return;\n if (!Reference.toGenerate.isEmpty()) {\n chunkQueue += Reference.numChunksPerTick;\n while (chunkQueue > 1) {\n chunkQueue--;\n chunksGenerated++;\n ChunkPosition cp = Reference.toGenerate.poll();\n if (cp != null) {\n Utilities.generateChunk(server, cp.getX(), cp.getZ(), cp.getDimensionID());\n if (chunksGenerated % Reference.updateDelay == 0) {\n double completedPercentage = 1 - (double) Reference.toGenerate.size() / (double) Reference.startingSize;\n Reference.logger.info(String.format(\"String_Node_Str\", completedPercentage));\n cp.getICommandSender().addChatMessage(new TextComponentTranslation(\"String_Node_Str\", completedPercentage * 100));\n ConfigurationHandler.UpdateSkipChunks();\n }\n if (cp.logToChat()) {\n cp.getICommandSender().addChatMessage(new TextComponentTranslation(\"String_Node_Str\", cp.getX(), cp.getZ(), DimensionManager.getProviderType(cp.getDimensionID()) != null ? DimensionManager.getProviderType(cp.getDimensionID()).getName() : cp.getDimensionID()));\n }\n if (Reference.toGenerate.peek() == null) {\n TextComponentTranslation chatTranslation = new TextComponentTranslation(\"String_Node_Str\");\n server.addChatMessage(chatTranslation);\n cp.getICommandSender().addChatMessage(new TextComponentString(chatTranslation.getUnformattedComponentText()));\n }\n }\n Reference.skipChunks++;\n }\n }\n}\n"
|
"public void registerTopicSubscriber(final TopicSubscriber<T, M> topicSubscriber) throws AssetNotFoundException {\n if (hub.outBytesLock().isHeldByCurrentThread())\n throw new IllegalStateException(\"String_Node_Str\");\n hub.subscribe(new AbstractAsyncSubscription(hub, csp, \"String_Node_Str\") {\n\n public void onSubscribe(final WireOut wireOut) {\n wireOut.writeEventName(registerSubscriber).text(\"String_Node_Str\");\n }\n public void onConsumer(final WireIn w) {\n w.readDocument(null, d -> {\n final StringBuilder eventname = Wires.acquireStringBuilder();\n final ValueIn valueIn = d.readEventName(eventname);\n if (onEndOfSubscription.contentEquals(eventname)) {\n topicSubscriber.onEndOfSubscription();\n hub.unsubscribe(tid());\n } else if (CoreFields.reply.contentEquals(eventname)) {\n valueIn.marshallable(m -> {\n final T topic = m.read(() -> \"String_Node_Str\").object(topicClass);\n final M message = m.read(() -> \"String_Node_Str\").object(messageClass);\n RemoteTopicPublisher.this.onEvent(topic, message, topicSubscriber);\n });\n }\n });\n }\n });\n}\n"
|
"public final Object readFrom(Class<Object> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException {\n try {\n final Class elementType = getElementClass(type, genericType);\n final Unmarshaller u = getUnmarshaller(elementType, mediaType);\n final XMLStreamReader r = getXMLStreamReader(elementType, mediaType, u, entityStream);\n final List l = new ArrayList();\n boolean jaxbElement = false;\n int event = r.next();\n while (event != XMLStreamReader.START_ELEMENT) event = r.next();\n event = r.next();\n while (event != XMLStreamReader.START_ELEMENT && event != XMLStreamReader.END_DOCUMENT) event = r.next();\n while (event != XMLStreamReader.END_DOCUMENT) {\n if (elementType.isAnnotationPresent(XmlRootElement.class)) {\n l.add(u.unmarshal(r));\n } else if (elementType.isAnnotationPresent(XmlType.class)) {\n l.add(u.unmarshal(r, elementType).getValue());\n } else {\n l.add(u.unmarshal(r, elementType));\n jaxbElement = true;\n }\n event = r.getEventType();\n while (event != XMLStreamReader.START_ELEMENT && event != XMLStreamReader.END_DOCUMENT) event = r.next();\n }\n return (type.isArray()) ? createArray((List) l, jaxbElement ? JAXBElement.class : elementType) : l;\n } catch (UnmarshalException ex) {\n throw new WebApplicationException(ex, Status.BAD_REQUEST);\n } catch (XMLStreamException ex) {\n throw new WebApplicationException(ex, Status.BAD_REQUEST);\n } catch (JAXBException ex) {\n throw new WebApplicationException(ex, Status.INTERNAL_SERVER_ERROR);\n }\n}\n"
|
"private static boolean isWithinError(double val, double correctVal, double errorPercent) {\n if (val == correctVal) {\n return true;\n } else {\n return correctVal * (1 - errorPercent) < val && val < correctVal * (1 + errorPercent);\n }\n}\n"
|
"public static void clearOldFiles(File dir, long millisAgo) {\n if (dir == null) {\n return;\n }\n File[] files = dir.listFiles();\n if (files == null) {\n return;\n }\n long olderThan = System.currentTimeMillis() - millisAgo;\n for (File f : files) {\n if (f.isDirectory()) {\n clearOldFiles(f, millisAgo);\n f.delete();\n }\n if (Build.VERSION.SDK_INT < 21) {\n if (FileUtils.isFileOlder(f, olderThan)) {\n f.delete();\n }\n } else {\n try {\n StructStat stat = Os.lstat(f.getAbsolutePath());\n if ((stat.st_atime * 1000L) < olderThan) {\n f.delete();\n }\n } catch (ErrnoException e) {\n e.printStackTrace();\n }\n }\n }\n}\n"
|
"protected String toStringWithIndent(String indent) {\n StringBuilder s = new StringBuilder(1000);\n s.append(indent);\n s.append(String.format(\"String_Node_Str\", lateralFunc.toString(), tableAlias, columnAlias));\n return s.toString();\n}\n"
|
"public boolean dispatchKeyEvent(KeyEvent event) {\n if (getFragmentMaster().dispatchKeyEventToWindow(event)) {\n return true;\n }\n View view = mMasterFragment.getView();\n boolean handled = KeyEventCompat2.dispatch(event, mMasterFragment, view != null ? KeyEventCompat2.getKeyDispatcherState(view) : null, this);\n if (handled) {\n return true;\n }\n return getFragmentMaster().dispatchKeyEventToActivity(event);\n}\n"
|
"protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n int widthSize = MeasureSpec.getSize(widthMeasureSpec) - ViewCompat.getPaddingEnd(this) - ViewCompat.getPaddingStart(this);\n int widthMode = MeasureSpec.getMode(widthMeasureSpec);\n boolean growHeight = widthMode != MeasureSpec.UNSPECIFIED;\n int width = 0;\n int height = getPaddingTop();\n int currentWidth = getPaddingLeft();\n int currentHeight = 0;\n boolean newLine = false;\n int spacing = 0;\n final int count = getChildCount();\n for (int i = 0; i < count; i++) {\n View child = getChildAt(i);\n measureChild(child, widthMeasureSpec, heightMeasureSpec);\n LayoutParams lp = (LayoutParams) child.getLayoutParams();\n spacing = mHorizontalSpacing;\n if (lp.horizontalSpacing >= 0) {\n spacing = lp.horizontalSpacing;\n }\n if (growHeight && currentWidth + child.getMeasuredWidth() > widthSize) {\n height += currentHeight + mVerticalSpacing;\n currentHeight = 0;\n width = Math.max(width, currentWidth - spacing);\n currentWidth = getPaddingLeft();\n newLine = true;\n } else {\n newLine = false;\n }\n lp.x = currentWidth;\n lp.y = height;\n currentWidth += child.getMeasuredWidth() + spacing;\n currentHeight = Math.max(currentHeight, child.getMeasuredHeight());\n }\n if (!newLine) {\n width = Math.max(width, currentWidth - spacing);\n }\n width += getPaddingRight();\n height += currentHeight + getPaddingBottom();\n setMeasuredDimension(resolveSize(width, widthMeasureSpec), resolveSize(height, heightMeasureSpec));\n}\n"
|
"public static void setUp() throws WSDLException {\n if (conn == null) {\n try {\n conn = buildConnection();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n String ddlCreateProp = System.getProperty(DATABASE_DDL_CREATE_KEY, DEFAULT_DATABASE_DDL_CREATE);\n if (\"String_Node_Str\".equalsIgnoreCase(ddlCreateProp)) {\n ddlCreate = true;\n }\n String ddlDropProp = System.getProperty(DATABASE_DDL_DROP_KEY, DEFAULT_DATABASE_DDL_DROP);\n if (\"String_Node_Str\".equalsIgnoreCase(ddlDropProp)) {\n ddlDrop = true;\n }\n String ddlDebugProp = System.getProperty(DATABASE_DDL_DEBUG_KEY, DEFAULT_DATABASE_DDL_DEBUG);\n if (\"String_Node_Str\".equalsIgnoreCase(ddlDebugProp)) {\n ddlDebug = true;\n }\n if (ddlCreate) {\n runDdl(conn, CREATE_VARCHAR2ARRAY_VARRAY, ddlDebug);\n runDdl(conn, CREATE_A_PHONE2_TYPE, ddlDebug);\n runDdl(conn, CREATE_COMPLEXPKG2_SIMPLERECORD_TYPE, ddlDebug);\n runDdl(conn, CREATE_COMPLEXPKG2_PACKAGE, ddlDebug);\n runDdl(conn, CREATE_COMPLEXPKG2_BODY, ddlDebug);\n runDdl(conn, CREATE_COMPLEXPKG2_TAB1_TYPE, ddlDebug);\n }\n DBWS_BUILDER_XML_USERNAME = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n DBWS_BUILDER_XML_PASSWORD = \"String_Node_Str\";\n DBWS_BUILDER_XML_URL = \"String_Node_Str\";\n DBWS_BUILDER_XML_DRIVER = \"String_Node_Str\";\n DBWS_BUILDER_XML_PLATFORM = \"String_Node_Str\";\n DBWS_BUILDER_XML_MAIN = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n builder = null;\n DBWSTestSuite.setUp(\"String_Node_Str\");\n}\n"
|
"public void onSiteChanged(OnSiteChanged event) {\n if (getSelectedSite() == null && mSiteStore.hasSite()) {\n setSelectedSite(mSiteStore.getSites().get(0));\n }\n if (getSelectedSite() == null) {\n return;\n }\n SiteModel site = mSiteStore.getSiteByLocalId(getSelectedSite().getId());\n if (site != null) {\n mSelectedSite = site;\n }\n if (getMySiteFragment() != null) {\n getMySiteFragment().onSiteChanged(site);\n }\n}\n"
|
"public void startRenderer(String author, String description, String paperSize, int paperTrayCode, String duplex, int copies, boolean collate, String resolution, boolean color, int scale) throws IOException {\n this.scale = scale;\n if (author != null) {\n out.println(\"String_Node_Str\" + author);\n }\n out.println(\"String_Node_Str\");\n out.println(\"String_Node_Str\");\n out.println(\"String_Node_Str\");\n setCollate(collate);\n setCopies(copies);\n int[] pageSize = getPaperSize(paperSize);\n if (pageSize != null) {\n int width = pageSize[0];\n int height = pageSize[1];\n setPaperSize(paperSize, width, height);\n }\n setPaperTray(paperTrayCode);\n setDuplex(duplex);\n setResolution(resolution);\n setGray(color);\n FileUtil.load(\"String_Node_Str\", out);\n out.println(\"String_Node_Str\");\n out.println(\"String_Node_Str\");\n}\n"
|
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == SignInActivity.REQUEST_CODE) {\n if (resultCode == RESULT_CANCELED) {\n finish();\n }\n mResultCode = resultCode;\n final Blog currentBlog = WordPress.getBlog(mLocalBlogID);\n if (resultCode == RESULT_OK && currentBlog != null && !currentBlog.isDotcomFlag()) {\n if (StatsUtils.getBlogId(mLocalBlogID) == null) {\n final Handler handler = new Handler();\n XMLRPCClientInterface xmlrpcClient = XMLRPCFactory.instantiate(currentBlog.getUri(), \"String_Node_Str\", \"String_Node_Str\");\n Map<String, String> args = ApiHelper.blogOptionsXMLRPCParameters;\n Object[] params = { currentBlog.getRemoteBlogId(), currentBlog.getUsername(), currentBlog.getPassword(), args };\n xmlrpcClient.callAsync(new XMLRPCCallback() {\n public void onSuccess(long id, Object result) {\n if (result != null && (result instanceof HashMap)) {\n Map<?, ?> blogOptions = (HashMap<?, ?>) result;\n ApiHelper.updateBlogOptions(currentBlog, blogOptions);\n AnalyticsUtils.refreshMetadata();\n AnalyticsUtils.trackWithBlogDetails(AnalyticsTracker.Stat.SIGNED_INTO_JETPACK, currentBlog);\n AnalyticsUtils.trackWithBlogDetails(AnalyticsTracker.Stat.PERFORMED_JETPACK_SIGN_IN_FROM_STATS_SCREEN, currentBlog);\n if (isFinishing()) {\n return;\n }\n if (NetworkUtils.checkConnection(StatsActivity.this)) {\n handler.post(new Runnable() {\n public void run() {\n mSwipeToRefreshHelper.setRefreshing(true);\n mRequestedDate = StatsUtils.getCurrentDateTZ(mLocalBlogID);\n createFragments(true);\n }\n });\n }\n }\n }\n public void onFailure(long id, Exception error) {\n AppLog.e(T.STATS, \"String_Node_Str\" + \"String_Node_Str\", error);\n handler.post(new Runnable() {\n public void run() {\n mSwipeToRefreshHelper.setRefreshing(false);\n ToastUtils.showToast(StatsActivity.this, StatsActivity.this.getString(R.string.error_refresh_stats), Duration.LONG);\n }\n });\n }\n }, Method.GET_OPTIONS, params);\n } else {\n mRequestedDate = StatsUtils.getCurrentDateTZ(mLocalBlogID);\n createFragments(true);\n }\n mSwipeToRefreshHelper.setRefreshing(true);\n }\n }\n}\n"
|
"protected void buildProperties(IContent content, LayoutContext context) {\n IStyle style = content.getComputedStyle();\n boxStyle = new BoxStyle();\n Color color = PropertyUtil.getColor(style.getProperty(IStyle.STYLE_BACKGROUND_COLOR));\n if (color != null) {\n boxStyle.setBackgroundColor(color);\n }\n String url = content.getStyle().getBackgroundImage();\n if (url != null) {\n boxStyle.setBackgroundImage(new BackgroundImageInfo(getImageUrl(url), style.getProperty(IStyle.STYLE_BACKGROUND_REPEAT), getDimensionValue(style.getProperty(IStyle.STYLE_BACKGROUND_POSITION_X), width), getDimensionValue(style.getProperty(IStyle.STYLE_BACKGROUND_POSITION_Y), width)));\n }\n localProperties = new LocalProperties();\n int maw = parent.getMaxAvaWidth();\n IStyle cs = content.getStyle();\n CSSValue padding = cs.getProperty(IStyle.STYLE_PADDING_TOP);\n if (padding == null) {\n localProperties.setPaddingTop(DEFAULT_PADDING);\n } else {\n localProperties.setPaddingTop(PropertyUtil.getDimensionValue(style.getProperty(IStyle.STYLE_PADDING_TOP), width));\n }\n padding = cs.getProperty(IStyle.STYLE_PADDING_BOTTOM);\n if (padding == null) {\n localProperties.setPaddingBottom(DEFAULT_PADDING);\n } else {\n localProperties.setPaddingBottom(PropertyUtil.getDimensionValue(padding, width));\n }\n padding = cs.getProperty(IStyle.STYLE_PADDING_LEFT);\n if (padding == null) {\n localProperties.setPaddingLeft(DEFAULT_PADDING);\n } else {\n localProperties.setPaddingLeft(PropertyUtil.getDimensionValue(padding, width));\n }\n padding = cs.getProperty(IStyle.STYLE_PADDING_RIGHT);\n if (padding == null) {\n localProperties.setPaddingRight(DEFAULT_PADDING);\n } else {\n localProperties.setPaddingRight(PropertyUtil.getDimensionValue(padding, width));\n }\n textAlign = content.getComputedStyle().getProperty(IStyle.STYLE_TEXT_ALIGN);\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.