content
stringlengths
40
137k
"void readPropertyValues() {\n final ValueResolver placeHolderResolver = new PlaceHolderResolver();\n this.profileEnable = readBoolean(\"String_Node_Str\", true);\n this.collectorSpanServerIp = readString(\"String_Node_Str\", DEFAULT_IP, placeHolderResolver);\n this.collectorSpanServerPort = readInt(\"String_Node_Str\", 9996);\n this.collectorStatServerIp = readString(\"String_Node_Str\", \"String_Node_Str\", placeHolderResolver);\n this.collectorStatServerPort = readInt(\"String_Node_Str\", 9995);\n this.collectorTcpServerIp = readString(\"String_Node_Str\", \"String_Node_Str\", placeHolderResolver);\n this.collectorTcpServerPort = readInt(\"String_Node_Str\", 9994);\n this.spanDataSenderWriteQueueSize = readInt(\"String_Node_Str\", 1024 * 5);\n this.spanDataSenderSocketSendBufferSize = readInt(\"String_Node_Str\", 1024 * 64 * 16);\n this.spanDataSenderSocketTimeout = readInt(\"String_Node_Str\", 1000 * 3);\n this.spanDataSenderChunkSize = readInt(\"String_Node_Str\", 1024 * 16);\n this.statDataSenderWriteQueueSize = readInt(\"String_Node_Str\", 1024 * 5);\n this.statDataSenderSocketSendBufferSize = readInt(\"String_Node_Str\", 1024 * 64 * 16);\n this.statDataSenderSocketTimeout = readInt(\"String_Node_Str\", 1000 * 3);\n this.statDataSenderChunkSize = readInt(\"String_Node_Str\", 1024 * 16);\n this.tcpDataSenderCommandAcceptEnable = readBoolean(\"String_Node_Str\", false);\n this.jdbcProfile = readBoolean(\"String_Node_Str\", true);\n this.jdbcSqlCacheSize = readInt(\"String_Node_Str\", 1024);\n this.jdbcMaxSqlBindValueSize = readInt(\"String_Node_Str\", 1024);\n this.jdbcProfileMySql = readBoolean(\"String_Node_Str\", true);\n this.jdbcProfileMySqlSetAutoCommit = readBoolean(\"String_Node_Str\", false);\n this.jdbcProfileMySqlCommit = readBoolean(\"String_Node_Str\", false);\n this.jdbcProfileMySqlRollback = readBoolean(\"String_Node_Str\", false);\n this.jdbcProfileJtds = readBoolean(\"String_Node_Str\", true);\n this.jdbcProfileJtdsSetAutoCommit = readBoolean(\"String_Node_Str\", false);\n this.jdbcProfileJtdsCommit = readBoolean(\"String_Node_Str\", false);\n this.jdbcProfileJtdsRollback = readBoolean(\"String_Node_Str\", false);\n this.jdbcProfileOracle = readBoolean(\"String_Node_Str\", true);\n this.jdbcProfileOracleSetAutoCommit = readBoolean(\"String_Node_Str\", false);\n this.jdbcProfileOracleCommit = readBoolean(\"String_Node_Str\", false);\n this.jdbcProfileOracleRollback = readBoolean(\"String_Node_Str\", false);\n this.jdbcProfileCubrid = readBoolean(\"String_Node_Str\", true);\n this.jdbcProfileCubridSetAutoCommit = readBoolean(\"String_Node_Str\", false);\n this.jdbcProfileCubridCommit = readBoolean(\"String_Node_Str\", false);\n this.jdbcProfileCubridRollback = readBoolean(\"String_Node_Str\", false);\n this.jdbcProfileDbcp = readBoolean(\"String_Node_Str\", true);\n this.jdbcProfileDbcpConnectionClose = readBoolean(\"String_Node_Str\", false);\n this.tomcatHidePinpointHeader = readBoolean(\"String_Node_Str\", true);\n final String tomcatExcludeURL = readString(\"String_Node_Str\", \"String_Node_Str\");\n if (!tomcatExcludeURL.isEmpty()) {\n this.tomcatExcludeUrlFilter = new ExcludeUrlFilter(tomcatExcludeURL);\n }\n this.arucs = readBoolean(\"String_Node_Str\", true);\n this.arucsKeyTrace = readBoolean(\"String_Node_Str\", false);\n this.memcached = readBoolean(\"String_Node_Str\", true);\n this.memcachedKeyTrace = readBoolean(\"String_Node_Str\", false);\n this.apacheHttpClient4Profile = readBoolean(\"String_Node_Str\", true);\n this.apacheHttpClient4ProfileCookie = readBoolean(\"String_Node_Str\", false);\n this.apacheHttpClient4ProfileCookieDumpType = readDumpType(\"String_Node_Str\", DumpType.EXCEPTION);\n this.apacheHttpClient4ProfileCookieSamplingRate = readInt(\"String_Node_Str\", 1);\n this.apacheHttpClient4ProfileEntity = readBoolean(\"String_Node_Str\", false);\n this.apacheHttpClient4ProfileEntityDumpType = readDumpType(\"String_Node_Str\", DumpType.EXCEPTION);\n this.apacheHttpClient4ProfileEntitySamplingRate = readInt(\"String_Node_Str\", 1);\n this.apacheNIOHttpClient4Profile = readBoolean(\"String_Node_Str\", true);\n this.ningAsyncHttpClientProfile = readBoolean(\"String_Node_Str\", true);\n this.ningAsyncHttpClientProfileCookie = readBoolean(\"String_Node_Str\", false);\n this.ningAsyncHttpClientProfileCookieDumpType = readDumpType(\"String_Node_Str\", DumpType.EXCEPTION);\n this.ningAsyncHttpClientProfileCookieDumpSize = readInt(\"String_Node_Str\", 1024);\n this.ningAsyncHttpClientProfileCookieSamplingRate = readInt(\"String_Node_Str\", 1);\n this.ningAsyncHttpClientProfileEntity = readBoolean(\"String_Node_Str\", false);\n this.ningAsyncHttpClientProfileEntityDumpType = readDumpType(\"String_Node_Str\", DumpType.EXCEPTION);\n this.ningAsyncHttpClientProfileEntityDumpSize = readInt(\"String_Node_Str\", 1024);\n this.ningAsyncHttpClientProfileEntitySamplingRate = readInt(\"String_Node_Str\", 1);\n this.ningAsyncHttpClientProfileParam = readBoolean(\"String_Node_Str\", false);\n this.ningAsyncHttpClientProfileParamDumpType = readDumpType(\"String_Node_Str\", DumpType.EXCEPTION);\n this.ningAsyncHttpClientProfileParamDumpSize = readInt(\"String_Node_Str\", 1024);\n this.ningAsyncHttpClientProfileParamSamplingRate = readInt(\"String_Node_Str\", 1);\n this.redis = readBoolean(\"String_Node_Str\", true);\n this.redisPipeline = readBoolean(\"String_Node_Str\", true);\n this.nbaseArc = readBoolean(\"String_Node_Str\", true);\n this.nbaseArcPipeline = readBoolean(\"String_Node_Str\", true);\n this.lineGameNettyParamDumpSize = readInt(\"String_Node_Str\", 512);\n this.lineGameNettyEntityDumpSize = readInt(\"String_Node_Str\", 512);\n this.ibatis = readBoolean(\"String_Node_Str\", true);\n this.mybatis = readBoolean(\"String_Node_Str\", true);\n this.springBeans = readBoolean(\"String_Node_Str\", false);\n this.springBeansNamePatterns = readString(\"String_Node_Str\", null);\n this.springBeansClassPatterns = readString(\"String_Node_Str\", null);\n this.springBeansAnnotations = readString(\"String_Node_Str\", null);\n this.samplingEnable = readBoolean(\"String_Node_Str\", true);\n this.samplingRate = readInt(\"String_Node_Str\", 1);\n this.ioBufferingEnable = readBoolean(\"String_Node_Str\", true);\n this.ioBufferingBufferSize = readInt(\"String_Node_Str\", 20);\n this.profileJvmCollectInterval = readInt(\"String_Node_Str\", 1000);\n this.agentInfoSendRetryInterval = readLong(\"String_Node_Str\", DEFAULT_AGENT_INFO_SEND_RETRY_INTERVAL);\n this.applicationServerType = readServiceType(\"String_Node_Str\");\n final String profileableClass = readString(\"String_Node_Str\", \"String_Node_Str\");\n if (!profileableClass.isEmpty()) {\n this.profilableClassFilter = new ProfilableClassFilter(profileableClass);\n }\n logger.info(\"String_Node_Str\");\n}\n"
"public void unlockTxApprove(String txHash, long rockTime) {\n boolean b = true;\n int index = 0;\n while (b) {\n UtxoOutput output = ledgerCacheService.getUtxo(txHash + \"String_Node_Str\" + index);\n if (output != null) {\n if (rockTime > 0) {\n if (OutPutStatusEnum.UTXO_UNCONFIRMED_CONSENSUS_LOCK == output.getStatus()) {\n output.setStatus(OutPutStatusEnum.UTXO_UNCONFIRMED_TIME_LOCK);\n } else if (OutPutStatusEnum.UTXO_CONFIRMED_CONSENSUS_LOCK == output.getStatus()) {\n output.setStatus(OutPutStatusEnum.UTXO_CONFIRMED_TIME_LOCK);\n }\n } else {\n if (OutPutStatusEnum.UTXO_UNCONFIRM_CONSENSUS_LOCK == output.getStatus()) {\n output.setStatus(OutPutStatusEnum.UTXO_UNCONFIRM_UNSPEND);\n } else if (OutPutStatusEnum.UTXO_CONFIRM_CONSENSUS_LOCK == output.getStatus()) {\n output.setStatus(OutPutStatusEnum.UTXO_CONFIRM_UNSPEND);\n }\n }\n UtxoTransactionTool.getInstance().calcBalance(output.getAddress(), false);\n index++;\n } else {\n b = false;\n }\n }\n}\n"
"public static Object cloneSource(Object source) {\n source = unwrapToModel(source);\n if (source instanceof Object[]) {\n Object[] array = (Object[]) source;\n ArrayList list = new ArrayList();\n for (int i = 0; i < array.length; i++) {\n if (array[i] instanceof ColumnHandle) {\n list.add(cloneSource(array[i]));\n }\n }\n if (!list.isEmpty()) {\n return list.toArray();\n }\n for (int i = 0; i < array.length; i++) {\n if (!checkContainerExists(array[i], array)) {\n list.add(cloneSource(array[i]));\n }\n }\n return list.toArray();\n }\n if (source instanceof StructuredSelection) {\n return cloneSource(((StructuredSelection) source).toArray());\n }\n if (source instanceof ColumnHandle) {\n try {\n int columnNumber = HandleAdapterFactory.getInstance().getColumnHandleAdapter(source).getColumnNumber();\n Object parent = ((ColumnHandle) source).getContainer();\n if (parent instanceof TableHandle) {\n return ((TableHandle) parent).copyColumn(columnNumber);\n } else if (parent instanceof GridHandle) {\n return ((GridHandle) parent).copyColumn(columnNumber);\n }\n } catch (SemanticException e) {\n logger.log(Level.SEVERE, e.getMessage(), e);\n }\n return null;\n }\n if (source instanceof DesignElementHandle) {\n IElementCopy copyElement = CopyUtil.copy((DesignElementHandle) source);\n return copyElement;\n }\n if (source instanceof IDesignElement) {\n try {\n return ((IDesignElement) source).clone();\n } catch (CloneNotSupportedException e) {\n logger.log(Level.SEVERE, e.getMessage(), e);\n }\n }\n if (source instanceof SlotHandle) {\n SlotHandle slot = (SlotHandle) source;\n Object[] array = new Object[slot.getCount()];\n for (int i = 0; i < array.length; i++) {\n array[i] = slot.get(i);\n }\n return cloneSource(array);\n }\n if (source instanceof StructureHandle) {\n return ((StructureHandle) source).getStructure().copy();\n }\n return null;\n}\n"
"public void stop() throws Exception {\n if (!this.wasStarted) {\n DefaultExecuteResultHandler stopProcessHandler = executeCommand(getDefaultStopCommand(getStopPort()));\n stopProcessHandler.waitFor(5 * 60L * 1000L);\n if (this.startedProcessHandler != null) {\n this.startedProcessHandler.waitFor(5 * 60L * 1000L);\n }\n }\n LOGGER.info(\"String_Node_Str\");\n}\n"
"public void testDifferentMemberAdded() throws Exception {\n HazelcastClient client = mock(HazelcastClient.class);\n InetSocketAddress inetSocketAddress = new InetSocketAddress(\"String_Node_Str\", 5701);\n final Connection connection = mock(Connection.class);\n final List<LifecycleState> lifecycleEvents = new ArrayList<LifecycleState>();\n final LifecycleServiceClientImpl lifecycleService = createLifecycleServiceClientImpl(client, lifecycleEvents);\n ClientConfig clientConfig = new ClientConfig();\n clientConfig.setCredentials(credentials).addInetSocketAddress(inetSocketAddress).setConnectionTimeout(60000);\n ConnectionManager connectionManager = new ConnectionManager(client, clientConfig, lifecycleService) {\n protected Connection getNextConnection() {\n return connection;\n }\n };\n ClientBinder binder = mock(ClientBinder.class);\n connectionManager.setBinder(binder);\n Cluster cluster = mock(Cluster.class);\n InetSocketAddress inetSocketAddress2 = new InetSocketAddress(\"String_Node_Str\", 5702);\n Member member = mock(Member.class);\n when(member.getInetSocketAddress()).thenReturn(inetSocketAddress2);\n MembershipEvent membershipEvent = new MembershipEvent(member, MembershipEvent.MEMBER_ADDED);\n connectionManager.memberAdded(membershipEvent);\n connectionManager.getClusterMembers().contains(inetSocketAddress2);\n assertEquals(2, connectionManager.getClusterMembers().size());\n assertArrayEquals(new Object[0], lifecycleEvents.toArray());\n}\n"
"public float getYValForXIndex(int xIndex) {\n Entry e = getEntryForXIndex(xIndex);\n if (e != null && e.getXIndex() == xIndex)\n return e.getVal();\n else\n return Float.NaN;\n}\n"
"private static void parseLine(int lineNumber, String line) throws ParserException, ApplicationException {\n switch(line.charAt(0)) {\n case '#':\n break;\n case '[':\n if (line.equals(\"String_Node_Str\")) {\n if (currentState != STATE_START) {\n throw ParserException.generateException(lineNumber, ResourceUtil.getString(\"String_Node_Str\"));\n }\n currentState = STATE_PROCESS_GROUPS;\n } else if (line.indexOf(':') == -1) {\n currentState = STATE_PROCESS_SERVER_RULES;\n String path = line.substring(1, line.length() - 1).trim();\n if (Document.findServerPath(path) != null) {\n throw ParserException.generateException(lineNumber, ResourceUtil.getFormattedString(\"String_Node_Str\", path));\n }\n try {\n currentPath = Document.addPath(null, path);\n } catch (ApplicationException ae) {\n throw ParserException.generateException(lineNumber, ae.getMessage());\n }\n } else if (line.indexOf(':') >= 0) {\n currentState = STATE_PROCESS_RULES;\n int index = line.indexOf(':');\n String repository = line.substring(1, index).trim();\n String path = line.substring(index + 1, line.length() - 1).trim();\n Repository repositoryObject = null;\n try {\n repositoryObject = Document.addRepository(repository);\n } catch (ApplicationException ae) {\n throw ParserException.generateException(lineNumber, ae.getMessage());\n }\n if (Document.findPath(repositoryObject, path) != null) {\n Object[] args = new Object[2];\n args[0] = path;\n args[1] = repository;\n throw ParserException.generateException(lineNumber, ResourceUtil.getFormattedString(\"String_Node_Str\", args));\n }\n try {\n currentPath = Document.addPath(repositoryObject, path);\n } catch (ApplicationException ae) {\n throw ParserException.generateException(lineNumber, ae.getMessage());\n }\n } else {\n throw ParserException.generateException(lineNumber, ResourceUtil.getString(\"String_Node_Str\"));\n }\n break;\n case '@':\n if (currentState == STATE_PROCESS_RULES || currentState == STATE_PROCESS_SERVER_RULES) {\n int index = line.indexOf('=');\n String group = line.substring(1, index).trim();\n String level = line.substring(index + 1).trim();\n if (Document.findGroup(group) == null) {\n throw ParserException.generateException(lineNumber, ResourceUtil.getFormattedString(\"String_Node_Str\", group));\n }\n try {\n Document.addAccessRuleForGroup(currentPath, group, level);\n } catch (ApplicationException ae) {\n throw ParserException.generateException(lineNumber, ae.getMessage());\n }\n } else {\n throw ParserException.generateException(lineNumber, ResourceUtil.getString(\"String_Node_Str\"));\n }\n break;\n default:\n if (currentState == STATE_PROCESS_GROUPS) {\n int index = line.indexOf('=');\n if (index == -1) {\n throw ParserException.generateException(lineNumber, ResourceUtil.getString(\"String_Node_Str\"));\n }\n String name = line.substring(0, index).trim();\n String members = line.substring(index + 1).trim();\n StringTokenizer tokens = new StringTokenizer(members, \"String_Node_Str\");\n int memberCount = tokens.countTokens();\n List<String> groupMembers = new ArrayList<String>();\n List<String> userMembers = new ArrayList<String>();\n for (int i = 0; i < memberCount; i++) {\n String member = tokens.nextToken();\n if (member.charAt(0) == '@') {\n groupMembers.add(member.substring(1, member.length()));\n } else {\n userMembers.add(member);\n }\n }\n Group existingGroup = Document.findGroup(name);\n if (existingGroup == null) {\n try {\n Document.addGroupByName(name, groupMembers, userMembers);\n } catch (ApplicationException ae) {\n throw ParserException.generateException(lineNumber, ae.getMessage());\n }\n } else {\n if (existingGroup.getGroupMembers().isEmpty() && existingGroup.getUserMembers().isEmpty()) {\n Document.addMembersByName(existingGroup, groupMembers, userMembers);\n } else {\n throw ParserException.generateException(lineNumber, ResourceUtil.getFormattedString(\"String_Node_Str\", name));\n }\n }\n } else if (currentState == STATE_PROCESS_RULES || currentState == STATE_PROCESS_SERVER_RULES) {\n int index = line.indexOf('=');\n String user = line.substring(0, index).trim();\n String level = line.substring(index + 1).trim();\n try {\n Document.addAccessRuleForUser(currentPath, user, level);\n } catch (ApplicationException ae) {\n throw ParserException.generateException(lineNumber, ae.getMessage());\n }\n }\n break;\n }\n}\n"
"protected boolean _run() {\n int count = select(readFdSet.address, writeFdSet.address, 0);\n if (count < 0) {\n LOG.error().$(\"String_Node_Str\").$(Os.errno()).$();\n return false;\n }\n final long timestamp = System.currentTimeMillis();\n boolean useful = false;\n fds.clear();\n if (count > 0) {\n queryFdSets(timestamp);\n useful = true;\n }\n useful = processRegistrations(timestamp) | useful;\n int readFdCount = 0;\n int writeFdCount = 0;\n readFdSet.reset();\n writeFdSet.reset();\n long deadline = timestamp - timeout;\n for (int i = 0, n = pending.size(); i < n; ) {\n long ts = pending.get(i, M_TIMESTAMP);\n long fd = pending.get(i, M_FD);\n int _new_op = fds.get(fd);\n if (_new_op == -1) {\n if (ts < deadline && fd != socketFd) {\n disconnect(pending.get(i), DisconnectReason.IDLE);\n pending.deleteRow(i);\n n--;\n useful = true;\n continue;\n }\n ChannelStatus op = ChannelStatus.values()[(int) pending.get(i, M_OPERATION)];\n switch(op) {\n case READ:\n readFdSet.add(fd);\n readFdCount++;\n i++;\n break;\n case WRITE:\n writeFdSet.add(fd);\n writeFdCount++;\n i++;\n break;\n case DISCONNECTED:\n disconnect(pending.get(i), KQueueDispatcher.DisconnectReason.SILLY);\n pending.deleteRow(i);\n n--;\n useful = true;\n break;\n }\n } else {\n final IOContext context = pending.get(i);\n if ((_new_op & FD_READ) > 0 && Net.available(fd) == 0) {\n disconnect(context, KQueueDispatcher.DisconnectReason.PEER);\n } else {\n if ((_new_op & FD_READ) > 0) {\n enqueue(context, ChannelStatus.READ);\n }\n if ((_new_op & FD_WRITE) > 0) {\n enqueue(context, ChannelStatus.WRITE);\n }\n }\n pending.deleteRow(i);\n n--;\n }\n }\n readFdSet.setCount(readFdCount);\n writeFdSet.setCount(writeFdCount);\n return useful;\n}\n"
"public void renderGridLines(Canvas c) {\n if (!mXAxis.isDrawGridLinesEnabled() || !mXAxis.isEnabled())\n return;\n float[] positions = new float[mXAxis.mEntryCount * 2];\n for (int i = 0; i < positions.length; i += 2) {\n positions[i] = mXAxis.mEntries[i / 2];\n }\n mTrans.pointValuesToPixel(positions);\n setupGridPaint();\n Path gridLinePath = new Path();\n for (int i = 0; i < positions.length; i += 2) {\n float x = positions[i];\n if (x >= mViewPortHandler.offsetLeft() && x <= mViewPortHandler.getChartWidth()) {\n gridLinePath.moveTo(x, mViewPortHandler.contentBottom());\n gridLinePath.lineTo(x, mViewPortHandler.contentTop());\n c.drawPath(gridLinePath, mGridPaint);\n }\n gridLinePath.reset();\n }\n}\n"
"protected void onHandleIntent(Intent intent) {\n if (NetworkUtils.isOnline()) {\n PatientAndMatchesWrapper patientAndMatchesWrapper = new PatientAndMatchesWrapper();\n List<Patient> patientList = new PatientDAO().getUnsyncedPatients();\n final ListIterator<Patient> it = patientList.listIterator();\n while (it.hasNext()) {\n final Patient patient = it.next();\n fetchSimilarPatients(patient, patientAndMatchesWrapper);\n }\n if (!patientAndMatchesWrapper.getMatchingPatients().isEmpty()) {\n Intent intent1 = new Intent(getApplicationContext(), MatchingPatientsActivity.class);\n intent1.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n intent1.putExtra(ApplicationConstants.BundleKeys.CALCULATED_LOCALLY, calculatedLocally);\n intent1.putExtra(ApplicationConstants.BundleKeys.PATIENTS_AND_MATCHES, patientAndMatchesWrapper);\n startActivity(intent1);\n }\n } else {\n ToastUtil.error(getString(R.string.activity_no_internet_connection) + getString(R.string.activity_sync_after_connection));\n }\n}\n"
"public String selectPreviousItem() {\n if (hasResults && selectedIndex >= 0) {\n resultDisplayItems.get(selectedIndex).setSelectedState(false);\n selectedIndex--;\n if (selectedIndex >= 0) {\n resultDisplayItems.get(selectedIndex).setSelectedState(true);\n resultDisplayItems.get(selectedIndex).getElement().scrollIntoView();\n }\n }\n if (selectedIndex >= 0 && resultDisplayItems.size() > selectedIndex) {\n return resultDisplayItems.get(selectedIndex).getItemSelectionText();\n } else {\n return null;\n }\n}\n"
"private long readNameHashBin(long hash) {\n return hash >> 60;\n}\n"
"public Vector<DebugVariable> getWatchList(DebugVariableType[] types) {\n Vector<DebugVariable> result = null;\n if (DebugState.paused(this.state) && (types.length > 0)) {\n boolean hasSomethingToWatch = false;\n for (DebugVariableType t : types) if ((t == DebugVariableType.GLOBAL) || (t == DebugVariableType.LOCAL) || (this.classPosition.length() > 0)) {\n hasSomethingToWatch = true;\n this.waitForEOL = t;\n }\n if (hasSomethingToWatch) {\n this.watchProcessing = true;\n this.watchList = new Vector<DebugVariable>();\n this.waitingThread = Thread.currentThread();\n this.wasWatchEOL = false;\n for (DebugVariableType t : types) if ((t == DebugVariableType.GLOBAL) || (t == DebugVariableType.LOCAL) || (this.classPosition.length() > 0))\n getVariablesPrivate(t);\n do {\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n }\n } while (!(this.wasWatchEOL && (this.lastWatchEOL == this.waitForEOL)));\n this.watchProcessing = false;\n result = this.watchList;\n this.watchList = null;\n }\n }\n return result;\n}\n"
"protected void setUp() throws Exception {\n System.out.println(\"String_Node_Str\" + getClass().getSimpleName() + \"String_Node_Str\" + getName());\n FSUtils.delTree(new File(SetupUtils.TEST_DIR));\n testEnv = new TestEnvironment(new TestEnvironment.Services[] { TestEnvironment.Services.DIR_SERVICE, TestEnvironment.Services.TIME_SYNC, TestEnvironment.Services.UUID_RESOLVER, TestEnvironment.Services.MRC_CLIENT, TestEnvironment.Services.OSD_CLIENT });\n testEnv.start();\n osdId = SetupUtils.getOSD1UUID();\n osdServer = new OSD(osdCfg);\n client = testEnv.getOSDClient();\n List<String> osdset = new ArrayList<String>(1);\n osdset.add(SetupUtils.getOSD1UUID().toString());\n Replica r = Replica.newBuilder().setStripingPolicy(SetupUtils.getStripingPolicy(1, KB)).setReplicationFlags(0).addAllOsdUuids(osdset).build();\n xloc = XLocSet.newBuilder().setReadOnlyFileSize(0).setVersion(1).addReplicas(r).setReplicaUpdatePolicy(\"String_Node_Str\").build();\n}\n"
"public List<String> getQueryParameters(String key) {\n if (isOpaque()) {\n throw new UnsupportedOperationException(NOT_HIERARCHICAL);\n }\n String query = getEncodedQuery();\n if (query == null) {\n return Collections.emptyList();\n }\n String encodedKey;\n try {\n encodedKey = URLEncoder.encode(key, DEFAULT_ENCODING);\n } catch (UnsupportedEncodingException e) {\n throw new AssertionError(e);\n }\n query = \"String_Node_Str\" + query;\n String prefix = \"String_Node_Str\" + encodedKey + \"String_Node_Str\";\n ArrayList<String> values = new ArrayList<String>();\n int start = 0;\n int length = query.length();\n while (start < length) {\n start = query.indexOf(prefix, start);\n if (start == -1) {\n break;\n }\n start += prefix.length();\n int end = query.indexOf('&', start);\n if (end == -1) {\n end = query.length();\n }\n String value = query.substring(start, end);\n values.add(decode(value));\n start = end;\n }\n return Collections.unmodifiableList(values);\n}\n"
"public void buildCluster(Stack stack) {\n Cluster cluster = stack.getCluster();\n try {\n clusterService.updateCreationDateOnCluster(cluster);\n AmbariClient ambariClient = clientFactory.getAmbariClient(stack, stack.getCluster());\n Set<HostGroup> hostGroups = hostGroupService.getByCluster(cluster.getId());\n BlueprintPreparationObject blueprintPreparationObject = conversionService.convert(stack, BlueprintPreparationObject.class);\n Map<String, List<Map<String, String>>> hostGroupMappings = hostGroupAssociationBuilder.buildHostGroupAssociations(hostGroups);\n Set<HostMetadata> hostsInCluster = hostMetadataRepository.findHostsInCluster(cluster.getId());\n recipeEngine.executePostAmbariStartRecipes(stack, hostGroups);\n ambariRepositoryVersionService.setBaseRepoURL(stack.getName(), cluster.getId(), stack.getOrchestrator(), ambariClient);\n String blueprintText = centralBlueprintUpdater.getBlueprintText(blueprintPreparationObject);\n addBlueprint(stack.getId(), ambariClient, blueprintText, cluster.getTopologyValidation());\n cluster.setExtendedBlueprintText(blueprintText);\n clusterService.updateCluster(cluster);\n PollingResult waitForHostsResult = ambariPollingServiceProvider.hostsPollingService(stack, ambariClient, hostsInCluster);\n ambariClusterConnectorPollingResultChecker.checkPollingResult(waitForHostsResult, cloudbreakMessagesService.getMessage(AMBARI_CLUSTER_HOST_JOIN_FAILED.code()));\n ambariClusterTemplateService.addClusterTemplate(cluster, hostGroupMappings, ambariClient);\n Pair<PollingResult, Exception> pollingResult = ambariOperationService.waitForOperationsToStart(stack, ambariClient, singletonMap(\"String_Node_Str\", 1), START_OPERATION_STATE);\n String message = pollingResult.getRight() == null ? constructClusterFailedMessage(cluster.getId(), ambariClient) : pollingResult.getRight().getMessage();\n ambariClusterConnectorPollingResultChecker.checkPollingResult(pollingResult.getLeft(), message);\n Pair<PollingResult, Exception> pollingResultExceptionPair = ambariOperationService.waitForOperations(stack, ambariClient, new HashMap<String, Integer>() {\n {\n put(\"String_Node_Str\", 1);\n }\n }, INSTALL_AMBARI_PROGRESS_STATE);\n ambariClusterConnectorPollingResultChecker.checkPollingResult(pollingResultExceptionPair.getLeft(), constructClusterFailedMessage(cluster.getId(), ambariClient));\n recipeEngine.executePostInstallRecipes(stack, hostGroups);\n ambariSmartSenseCapturer.capture(0, ambariClient);\n cluster = ambariViewProvider.provideViewInformation(ambariClient, cluster);\n ambariClusterCreationSuccessHandler.handleClusterCreationSuccess(stack, cluster);\n } catch (CancellationException cancellationException) {\n throw cancellationException;\n } catch (Exception e) {\n LOGGER.error(\"String_Node_Str\", e.getMessage(), e);\n throw new AmbariOperationFailedException(e.getMessage(), e);\n }\n}\n"
"protected void publicFire(TTrigger trigger, Object... args) {\n TriggerWithParameters<TState, TTrigger> configuration = triggerConfiguration.get(trigger);\n if (configuration != null) {\n configuration.validateParameters(args);\n }\n TriggerBehaviour<TState, TTrigger> triggerBehaviour;\n try {\n triggerBehaviour = getCurrentRepresentation().tryFindHandler(trigger);\n } catch (Exception e) {\n unhandledTriggerAction.doIt(getCurrentRepresentation().getUnderlyingState(), trigger);\n return;\n }\n TState source = getState();\n TState destination;\n try {\n destination = triggerBehaviour.resultsInTransitionFrom(source, args);\n Transition<TState, TTrigger> transition = new Transition<>(source, destination, trigger);\n getCurrentRepresentation().exit(transition);\n setState(destination);\n getCurrentRepresentation().enter(transition, args);\n } catch (Exception e) {\n }\n}\n"
"public void run() {\n final RemovalHandler handler = scope.get();\n String fileResult;\n try {\n for (final File file : files) {\n fileResult = X_IO.toStringUtf8(new FileInputStream(file));\n final Class<? extends Model> type = typeNameToClass.get(file.getParent());\n final Model model = deserialize(type, new StringCharIterator(fileResult));\n result.addModel(model);\n }\n callback.onSuccess(result);\n } catch (final Exception e) {\n X_Log.error(ModelServiceJre.class, \"String_Node_Str\" + query);\n if (callback instanceof ErrorHandler) {\n ((ErrorHandler) callback).onError(new RuntimeException(\"String_Node_Str\" + query));\n } else {\n rethrow(e);\n }\n } finally {\n handler.remove();\n }\n}\n"
"public void initializejobletContainer(Rectangle rectangle) {\n disposeColors();\n Point location = this.getLocation();\n collapseFigure.setCollapsed(jobletContainer.isCollapsed());\n titleFigure.setText(\"String_Node_Str\" + title + \"String_Node_Str\");\n Dimension preferedSize = titleFigure.getPreferredSize();\n preferedSize = preferedSize.getExpanded(0, 3);\n rectangle.width += 32;\n collapseFigure.setLocation(new Point(location.x, location.y));\n collapseFigure.setSize(preferedSize.height, preferedSize.height);\n titleFigure.setSize(preferedSize.width, preferedSize.height - 2);\n titleFigure.setLocation(new Point((rectangle.width - preferedSize.height) / 2 + location.x, location.y + 1));\n titleFigure.setVisible(showTitle);\n outlineFigure.setLocation(new Point(location.x, location.y));\n outlineFigure.setVisible(showTitle);\n outlineFigure.setBackgroundColor(new Color(Display.getDefault(), new RGB(130, 240, 100)));\n outlineFigure.setForegroundColor(new Color(Display.getDefault(), new RGB(220, 120, 120)));\n outlineFigure.setSize(rectangle.width, preferedSize.height);\n rectFig.setLocation(new Point(location.x, location.y));\n rectFig.setSize(new Dimension(rectangle.width, rectangle.height));\n rectFig.setBackgroundColor(new Color(Display.getDefault(), new RGB(195, 240, 190)));\n rectFig.setForegroundColor(new Color(Display.getDefault(), new RGB(205, 190, 165)));\n}\n"
"public void initParameters() {\n OperatorUIUtils.initParamList(bandList, getBandNames(), (Object[]) paramMap.get(\"String_Node_Str\"));\n if (sourceProducts != null) {\n final MetadataElement absRoot = AbstractMetadata.getAbstractedMetadata(sourceProducts[0]);\n if (absRoot != null) {\n final String sampleType = absRoot.getAttributeString(AbstractMetadata.SAMPLE_TYPE);\n if (sampleType.equals(\"String_Node_Str\")) {\n auxFile.removeItem(CalibrationOp.PRODUCT_AUX);\n auxFile.setSelectedItem(paramMap.get(\"String_Node_Str\"));\n } else {\n if (auxFile.getItemCount() == 2) {\n auxFile.addItem(CalibrationOp.PRODUCT_AUX);\n }\n auxFile.setSelectedItem(CalibrationOp.PRODUCT_AUX);\n }\n final String mission = absRoot.getAttributeString(AbstractMetadata.MISSION);\n if (!mission.equals(\"String_Node_Str\")) {\n auxFile.setEnabled(false);\n auxFileLabel.setEnabled(false);\n } else {\n auxFile.setEnabled(true);\n auxFileLabel.setEnabled(true);\n }\n DialogUtils.enableComponents(auxFileLabel, auxFile, true);\n DialogUtils.enableComponents(bandListLabel, bandListPane, true);\n saveInComplexCheckBox.setVisible(true);\n saveInDbCheckBox.setVisible(true);\n createGamma0VirtualBandCheckBox.setVisible(true);\n createBeta0VirtualBandCheckBox.setVisible(true);\n DialogUtils.enableComponents(polListLabel, polListPane, false);\n outputSigmaBandCheckBox.setVisible(false);\n outputGammaBandCheckBox.setVisible(false);\n outputBetaBandCheckBox.setVisible(false);\n outputDNBandCheckBox.setVisible(false);\n if (mission.equals(\"String_Node_Str\") && sampleType.equals(\"String_Node_Str\")) {\n saveInComplexCheckBox.setEnabled(true);\n saveInComplexCheckBox.setSelected(false);\n if (saveInComplex) {\n saveInDbCheckBox.setEnabled(false);\n createGamma0VirtualBandCheckBox.setEnabled(false);\n createBeta0VirtualBandCheckBox.setEnabled(false);\n saveInDbCheckBox.setSelected(false);\n createGamma0VirtualBandCheckBox.setSelected(false);\n createBeta0VirtualBandCheckBox.setSelected(false);\n } else {\n saveInDbCheckBox.setEnabled(true);\n createGamma0VirtualBandCheckBox.setEnabled(true);\n createBeta0VirtualBandCheckBox.setEnabled(true);\n }\n } else if (mission.startsWith(\"String_Node_Str\")) {\n OperatorUIUtils.initParamList(polList, Sentinel1Utils.getProductPolarizations(absRoot), (String[]) paramMap.get(\"String_Node_Str\"));\n DialogUtils.enableComponents(auxFileLabel, auxFile, false);\n DialogUtils.enableComponents(externalAuxFileLabel, externalAuxFile, false);\n DialogUtils.enableComponents(bandListLabel, bandListPane, false);\n saveInComplexCheckBox.setVisible(false);\n saveInDbCheckBox.setVisible(false);\n createGamma0VirtualBandCheckBox.setVisible(false);\n createBeta0VirtualBandCheckBox.setVisible(false);\n DialogUtils.enableComponents(polListLabel, polListPane, true);\n outputSigmaBandCheckBox.setVisible(true);\n outputGammaBandCheckBox.setVisible(true);\n outputBetaBandCheckBox.setVisible(true);\n outputDNBandCheckBox.setVisible(true);\n } else {\n saveInComplexCheckBox.setEnabled(false);\n saveInComplexCheckBox.setSelected(false);\n }\n }\n } else {\n auxFile.setSelectedItem(paramMap.get(\"String_Node_Str\"));\n }\n final File extFile = (File) paramMap.get(\"String_Node_Str\");\n if (extFile != null) {\n externalAuxFile.setText(extFile.getAbsolutePath());\n }\n Boolean paramVal;\n paramVal = (Boolean) paramMap.get(\"String_Node_Str\");\n if (paramVal != null) {\n saveInComplex = paramVal;\n saveInComplexCheckBox.setSelected(saveInComplex);\n }\n paramVal = (Boolean) paramMap.get(\"String_Node_Str\");\n if (paramVal != null) {\n saveInDb = paramVal;\n saveInDbCheckBox.setSelected(saveInDb);\n }\n paramVal = (Boolean) paramMap.get(\"String_Node_Str\");\n if (paramVal != null) {\n createGamma0VirtualBand = paramVal;\n createGamma0VirtualBandCheckBox.setSelected(createGamma0VirtualBand);\n }\n paramVal = (Boolean) paramMap.get(\"String_Node_Str\");\n if (paramVal != null) {\n createBeta0VirtualBand = paramVal;\n createBeta0VirtualBandCheckBox.setSelected(createBeta0VirtualBand);\n }\n paramVal = (Boolean) paramMap.get(\"String_Node_Str\");\n if (paramVal != null) {\n outputSigmaBand = paramVal;\n outputSigmaBandCheckBox.setSelected(outputSigmaBand);\n }\n paramVal = (Boolean) paramMap.get(\"String_Node_Str\");\n if (paramVal != null) {\n outputGammaBand = paramVal;\n outputGammaBandCheckBox.setSelected(outputGammaBand);\n }\n paramVal = (Boolean) paramMap.get(\"String_Node_Str\");\n if (paramVal != null) {\n outputBetaBand = paramVal;\n outputBetaBandCheckBox.setSelected(outputBetaBand);\n }\n paramVal = (Boolean) paramMap.get(\"String_Node_Str\");\n if (paramVal != null) {\n outputDNBand = paramVal;\n outputDNBandCheckBox.setSelected(outputDNBand);\n }\n}\n"
"private void markSenseIncompleteUnsent(final SQLiteDatabase db) {\n if (inSenseMode) {\n SqlStorage<FormRecord> storage = new SqlStorage<FormRecord>(FormRecord.STORAGE_KEY, FormRecord.class, new ConcreteDbHelper(c, db));\n for (FormRecord record : storage) {\n if (FormRecord.STATUS_INCOMPLETE.equals(record.getStatus())) {\n storage.write(record.updateInstanceAndStatus(record.getInstanceURI().toString(), FormRecord.STATUS_COMPLETE));\n }\n }\n }\n}\n"
"private static boolean evaluateSimpleExpression(String simpleExpression, List<? extends IElementParameter> listParam, ElementParameter currentParam) {\n boolean showParameter = false;\n String test = null;\n if (simpleExpression.contains(EQUALS)) {\n test = EQUALS;\n } else {\n if (simpleExpression.contains(NOT_EQUALS)) {\n test = NOT_EQUALS;\n }\n }\n if ((simpleExpression.contains(\"String_Node_Str\") || simpleExpression.contains(\"String_Node_Str\")) && simpleExpression.endsWith(\"String_Node_Str\")) {\n return evaluateInExpression(simpleExpression, listParam);\n }\n if (test == null) {\n throwUnsupportedExpression(simpleExpression, currentParam);\n return false;\n }\n String[] strings = simpleExpression.split(test);\n String variableName = null, variableValue = null;\n for (String string2 : strings) {\n String string = string2.trim();\n if (string.contains(\"String_Node_Str\")) {\n variableValue = string;\n variableValue = variableValue.substring(1, string.lastIndexOf(\"String_Node_Str\"));\n } else {\n variableName = string;\n }\n }\n if (variableName != null && EParameterName.CURRENT_OS.getName().equals(variableName)) {\n if (variableValue != null) {\n if (checkCurrentOS(variableValue) && EQUALS.endsWith(test)) {\n return true;\n } else if (NOT_EQUALS.equals(test)) {\n return true;\n }\n }\n }\n if (listParam == null) {\n return false;\n }\n String[] varNames;\n varNames = StringUtils.split(variableName, '.');\n if ((variableName != null) && (variableValue != null)) {\n if (varNames[0].equals(\"String_Node_Str\")) {\n if (currentParam != null && currentParam.getElement() instanceof INode) {\n INode node = (INode) currentParam.getElement();\n String relatedNodeName = ElementParameterParser.getValue(node, \"String_Node_Str\" + varNames[1] + \"String_Node_Str\");\n List<? extends INode> generatingNodes = node.getProcess().getGeneratingNodes();\n for (INode aNode : generatingNodes) {\n if (aNode.getUniqueName().equals(relatedNodeName)) {\n simpleExpression = simpleExpression.replace(varNames[0] + \"String_Node_Str\" + varNames[1] + \"String_Node_Str\", \"String_Node_Str\");\n List<? extends IElementParameter> elementParameters = aNode.getElementParameters();\n return evaluate(simpleExpression, elementParameters);\n }\n }\n }\n } else if (\"String_Node_Str\".equals(varNames[0])) {\n if (listParam != null && listParam.size() > 0) {\n IElement element = listParam.get(0).getElement();\n if (element != null && element instanceof INode) {\n INode node = (INode) element;\n if (varNames.length > 2 && varNames[1] != null && varNames[2] != null) {\n IConnection[] allConnections = node.getProcess().getAllConnections(\"String_Node_Str\" + varNames[1]);\n for (IConnection c : allConnections) {\n IElementParameter elementParameter = c.getElementParameter(varNames[2]);\n if (variableValue.equals(elementParameter.getValue())) {\n return true;\n }\n }\n }\n }\n }\n return false;\n }\n }\n if ((variableName != null) && (variableValue != null)) {\n for (IElementParameter param : listParam) {\n if (param.getName().equals(varNames[0])) {\n IElementParameter testedParameter = param;\n Object value = null;\n boolean found = false;\n if (param.getFieldType().equals(EParameterFieldType.TABLE)) {\n List<Map<String, Object>> tableValues = (List<Map<String, Object>>) param.getValue();\n if (currentParam == null) {\n continue;\n }\n Map<String, Object> currentRow = tableValues.get(currentParam.getCurrentRow());\n if (currentRow.containsKey(varNames[1])) {\n for (Object curObj : param.getListItemsValue()) {\n if (curObj instanceof IElementParameter) {\n IElementParameter testParam = (IElementParameter) curObj;\n if (testParam.getName().equals(varNames[1])) {\n testedParameter = testParam;\n break;\n }\n }\n }\n if (varNames.length == 2) {\n value = currentRow.get(varNames[1]);\n } else {\n if (\"String_Node_Str\".equals(varNames[2])) {\n IMetadataTable baseTable = null;\n IMetadataColumn baseColumn = null;\n INode node;\n Object obj = currentRow.get(testedParameter.getName());\n String columnName = \"String_Node_Str\";\n if (obj instanceof String) {\n columnName = (String) obj;\n } else if (obj instanceof Integer) {\n int index = (Integer) obj;\n if (index < testedParameter.getListItemsDisplayName().length && index >= 0) {\n columnName = testedParameter.getListItemsDisplayName()[(Integer) obj];\n }\n }\n if (currentParam.getElement() instanceof INode) {\n node = (INode) currentParam.getElement();\n switch(testedParameter.getFieldType()) {\n case COLUMN_LIST:\n baseTable = node.getMetadataList().get(0);\n break;\n case PREV_COLUMN_LIST:\n IConnection connection = null;\n for (int i = 0; i < node.getIncomingConnections().size(); i++) {\n IConnection curConnec = node.getIncomingConnections().get(i);\n if (curConnec.getLineStyle() == EConnectionType.FLOW_MAIN) {\n connection = curConnec;\n break;\n }\n }\n if (connection != null) {\n baseTable = connection.getMetadataTable();\n }\n break;\n case LOOKUP_COLUMN_LIST:\n List<IConnection> refConnections = new ArrayList<IConnection>();\n for (int i = 0; i < node.getIncomingConnections().size(); i++) {\n IConnection curConnec = node.getIncomingConnections().get(i);\n if (curConnec.getLineStyle() == EConnectionType.FLOW_REF) {\n refConnections.add(curConnec);\n }\n }\n for (IConnection curConnec : refConnections) {\n IMetadataTable table = curConnec.getMetadataTable();\n for (IMetadataColumn column : table.getListColumns()) {\n String name = curConnec.getName() + \"String_Node_Str\" + column.getLabel();\n if (name.equals(columnName)) {\n baseColumn = column;\n }\n }\n }\n break;\n default:\n }\n if (baseTable != null) {\n for (IMetadataColumn column : baseTable.getListColumns()) {\n if (column.getLabel().equals(columnName)) {\n baseColumn = column;\n break;\n }\n }\n }\n if (baseColumn != null) {\n switch(LanguageManager.getCurrentLanguage()) {\n case JAVA:\n value = JavaTypesManager.getTypeToGenerate(baseColumn.getTalendType(), baseColumn.isNullable());\n break;\n default:\n value = baseColumn.getTalendType();\n }\n if (value.equals(variableValue)) {\n found = true;\n }\n }\n }\n }\n }\n }\n } else if (param.getFieldType().equals(EParameterFieldType.PROPERTY_TYPE) || param.getFieldType().equals(EParameterFieldType.SCHEMA_TYPE) || param.getFieldType().equals(EParameterFieldType.QUERYSTORE_TYPE) || param.getFieldType().equals(EParameterFieldType.ENCODING_TYPE)) {\n boolean child = false;\n Map<String, IElementParameter> childParameters = param.getChildParameters();\n if (\"String_Node_Str\".equals(param.getName())) {\n if (childParameters != null) {\n IElementParameter iElementParameter = childParameters.get(\"String_Node_Str\");\n if (iElementParameter != null) {\n Object value2 = iElementParameter.getValue();\n if (variableValue.equals(value2.toString())) {\n child = true;\n found = true;\n value = value2.toString();\n }\n }\n }\n }\n if (varNames.length > 1 && varNames[1] != null) {\n IElementParameter tempParam = childParameters.get(varNames[1]);\n if (tempParam != null) {\n value = tempParam.getValue();\n if (value.equals(variableValue)) {\n found = true;\n }\n child = true;\n }\n }\n if (!child) {\n value = testedParameter.getValue();\n }\n } else {\n value = testedParameter.getValue();\n }\n if (value instanceof Integer) {\n if (((Integer) value) < testedParameter.getListItemsValue().length) {\n value = testedParameter.getListItemsValue()[(Integer) value];\n }\n }\n if (value instanceof String) {\n if (variableValue.equals(value)) {\n found = true;\n } else if (testedParameter.getListItemsValue() instanceof Object[]) {\n Object[] values = testedParameter.getListItemsValue();\n for (int i = 0; i < values.length && !found; i++) {\n if (values[i].equals(value)) {\n String variableCode = testedParameter.getListItemsDisplayCodeName()[i];\n if (variableCode.equals(variableValue)) {\n found = true;\n }\n }\n }\n }\n } else if (value instanceof Boolean) {\n Boolean tmpValue = new Boolean(variableValue);\n if (tmpValue.equals(value)) {\n found = true;\n }\n }\n if (found) {\n if (test.equals(EQUALS)) {\n showParameter = true;\n }\n } else {\n if (test.equals(NOT_EQUALS)) {\n showParameter = true;\n }\n }\n }\n }\n }\n return showParameter;\n}\n"
"public void bringDate(long jdn) {\n CalendarType mainCalendar = Utils.getMainCalendar();\n AbstractDate today = Utils.getTodayOfCalendar(mainCalendar);\n AbstractDate date = Utils.getDateFromJdnOfCalendar(mainCalendar, jdn);\n viewPagerPosition = (today.getYear() - date.getYear()) * 12 + today.getMonth() - date.getMonth();\n CalendarAdapter.gotoOffset(monthViewPager, viewPagerPosition);\n LocalBroadcastManager.getInstance(getContext()).sendBroadcast(new Intent(Constants.BROADCAST_INTENT_TO_MONTH_FRAGMENT).putExtra(Constants.BROADCAST_FIELD_TO_MONTH_FRAGMENT, viewPagerPosition).putExtra(Constants.BROADCAST_FIELD_SELECT_DAY_JDN, jdn));\n selectDay(jdn);\n}\n"
"protected CtMember.Cache hasMemberCache() {\n WeakReference cache = memberCache;\n if (cache != null)\n return (CtMember.Cache) cache.get();\n else\n return null;\n}\n"
"protected void okPressed() {\n Calendar cenlendar = Calendar.getInstance();\n SimpleDateFormat format = null;\n int year = timed.getYear();\n int month = timed.getMonth();\n int day = timed.getDay();\n if (timet != null) {\n format = new SimpleDateFormat(\"String_Node_Str\");\n } else {\n format = new SimpleDateFormat(\"String_Node_Str\");\n }\n selectDate = format.format(cenlendar.getTime());\n super.okPressed();\n}\n"
"public void destroy() {\n if (this.encapsulatedContext != null) {\n this.encapsulatedContext.destroy();\n }\n}\n"
"private void spreadRegrowth(int cell, float strength) {\n if (strength >= 0 && Level.passable[cell] && !Level.losBlocking[cell]) {\n affectedCells.add(cell);\n if (strength >= 1.5f) {\n spreadRegrowth(cell + PathFinder.CIRCLE[left(direction)], strength - 1.5f);\n spreadRegrowth(cell + PathFinder.CIRCLE[direction], strength - 1.5f);\n spreadRegrowth(cell + PathFinder.CIRCLE[right(direction)], strength - 1.5f);\n } else {\n visualCells.add(cell);\n }\n } else if (!Level.passable[cell] || Level.losBlocking[cell])\n visualCells.add(cell);\n}\n"
"private static List wrap(List list, RelDataType type) {\n if (type.isNullable()) {\n switch(type.getSqlTypeName()) {\n case TIMESTAMP:\n return Functions.adapt(list, TIMESTAMP_TO_LONG);\n case TIME:\n return Functions.adapt(list, TIME_TO_INT);\n case DATE:\n return Functions.adapt(list, DATE_TO_INT);\n }\n }\n return list;\n}\n"
"public void widgetSelected(SelectionEvent e) {\n if (e.getSource() instanceof Tree) {\n if (((TreeItem) e.item).getItemCount() != 0) {\n preview.renderModel(null);\n description.setText(icp.getDefaultDescription());\n ChartExamplesView.setActionsEnabled(false);\n } else {\n String sKey = hmItemToKey.get(e.item);\n setClassName(icp.getClassName(sKey));\n String methodName = icp.getMethodName(className);\n setChartModel(ImportChartModel.getChartModel(className, methodName));\n preview.renderModel(getChartModel().copyInstance());\n description.setText(icp.getDescription(className));\n ChartExamplesView.setActionsEnabled(true);\n }\n }\n}\n"
"private URL generateURL(String uri) throws MalformedURLException {\n String path = URIUtil.getLocalPath(uri);\n if (path != null) {\n String fullPath = SessionHandleAdapter.getInstance().getSessionHandle().getFileLocator().findFile(SessionHandleAdapter.getInstance().getReportDesignHandle(), path);\n if (fullPath == null) {\n return null;\n }\n File file = new File(fullPath);\n if (file.exists()) {\n return file.toURL();\n }\n return null;\n }\n return URI.create(uri).toURL();\n}\n"
"private CacheEntry queryEmailDisplayName(String email) {\n CacheEntry entry = new CacheEntry();\n String[] contactInfoSelectionArgs = new String[1];\n contactInfoSelectionArgs[0] = email;\n Cursor cursor = SqliteWrapper.query(mContext, mContext.getContentResolver(), EMAIL_WITH_PRESENCE_URI, EMAIL_PROJECTION, EMAIL_SELECTION, contactInfoSelectionArgs, null);\n if (cursor != null) {\n try {\n while (cursor.moveToNext()) {\n entry.presenceResId = getPresenceIconResourceId(cursor.getInt(EMAIL_STATUS_COLUMN));\n entry.person_id = cursor.getLong(EMAIL_ID_COLUMN);\n String name = cursor.getString(EMAIL_NAME_COLUMN);\n if (TextUtils.isEmpty(name)) {\n name = cursor.getString(EMAIL_CONTACT_NAME_COLUMN);\n }\n if (!TextUtils.isEmpty(name)) {\n entry.name = name;\n loadAvatar(entry, cursor);\n if (LOCAL_DEBUG) {\n log(\"String_Node_Str\" + entry.name + \"String_Node_Str\" + email + \"String_Node_Str\" + entry.presenceResId);\n }\n break;\n }\n }\n } finally {\n cursor.close();\n }\n }\n return entry;\n}\n"
"public void widgetSelected(SelectionEvent e) {\n button.setEnabled(false);\n table.select(table.indexOf(item));\n List<ModuleToInstall> datalist = new ArrayList<ModuleToInstall>();\n datalist.add(data);\n final DownloadModuleJob job = new DownloadModuleJob(datalist);\n job.addJobChangeListener(new JobChangeAdapter() {\n public void done(IJobChangeEvent event) {\n Display.getDefault().asyncExec(new Runnable() {\n public void run() {\n String message = data.getName() + \"String_Node_Str\";\n if (!job.installedModules.isEmpty()) {\n message += \"String_Node_Str\";\n } else {\n message += \"String_Node_Str\";\n }\n MessageDialog.openInformation(getShell(), \"String_Node_Str\", message);\n }\n });\n }\n });\n job.setUser(true);\n job.setPriority(Job.INTERACTIVE);\n job.schedule();\n int n = 0;\n for (Button button : installButtons) {\n if (!button.isEnabled()) {\n n++;\n }\n }\n if (n == installButtons.size()) {\n close();\n }\n}\n"
"public Set<InvokeSite> getInvokeSites(MethodInfo invokee) {\n MethodNode node = getMethodNode(invokee);\n Set<InvokeSite> invokeSites = new HashSet<InvokeSite>();\n for (ExecutionContext ec : node.getInstances()) {\n if (ec.getCallString().isEmpty()) {\n AppInfo appInfo = AppInfo.getSingleton();\n for (ContextEdge edge : callGraph.incomingEdgesOf(ec)) {\n for (InvokeSite invokeSite : edge.getSource().getMethodInfo().getCode().getInvokeSites()) {\n if (invokeSite.canInvoke(invokee) == Ternary.TRUE) {\n invokeSites.add(invokeSite);\n }\n }\n }\n } else {\n invokeSites.add(ec.getCallString().top());\n }\n }\n return invokeSites;\n}\n"
"public boolean isFractionCurrency() {\n return !mParentCurrency.equals(NO_PARENT);\n}\n"
"public int run(String[] args) throws Exception {\n Options options = new Options();\n options.addOption(OPTION_CUBE_NAME);\n options.addOption(OPTION_PARTITION_FILE_PATH);\n options.addOption(OPTION_HTABLE_NAME);\n parseOptions(options, args);\n Path partitionFilePath = new Path(getOptionValue(OPTION_PARTITION_FILE_PATH));\n String cubeName = getOptionValue(OPTION_CUBE_NAME).toUpperCase();\n KylinConfig config = KylinConfig.getInstanceFromEnv();\n CubeManager cubeMgr = CubeManager.getInstance(config);\n CubeInstance cube = cubeMgr.getCube(cubeName);\n CubeDesc cubeDesc = cube.getDescriptor();\n String tableName = getOptionValue(OPTION_HTABLE_NAME).toUpperCase();\n HTableDescriptor tableDesc = new HTableDescriptor(TableName.valueOf(tableName));\n tableDesc.setValue(HTableDescriptor.SPLIT_POLICY, ConstantSizeRegionSplitPolicy.class.getName());\n Configuration conf = HBaseConfiguration.create(getConf());\n HBaseAdmin admin = new HBaseAdmin(conf);\n try {\n if (User.isHBaseSecurityEnabled(conf)) {\n tableDesc.addCoprocessor(\"String_Node_Str\");\n }\n for (HBaseColumnFamilyDesc cfDesc : cubeDesc.getHBaseMapping().getColumnFamily()) {\n HColumnDescriptor cf = new HColumnDescriptor(cfDesc.getName());\n cf.setMaxVersions(1);\n if (LZOSupportnessChecker.getSupportness()) {\n log.info(\"String_Node_Str\");\n cf.setCompressionType(Algorithm.LZO);\n } else {\n log.info(\"String_Node_Str\");\n }\n cf.setDataBlockEncoding(DataBlockEncoding.FAST_DIFF);\n cf.setInMemory(false);\n cf.setBlocksize(4 * 1024 * 1024);\n tableDesc.addFamily(cf);\n }\n byte[][] splitKeys = getSplits(conf, partitionFilePath);\n if (admin.tableExists(tableName)) {\n throw new RuntimeException(\"String_Node_Str\" + tableName + \"String_Node_Str\");\n }\n try {\n initHTableCoprocessor(tableDesc);\n log.info(\"String_Node_Str\" + tableName + \"String_Node_Str\");\n } catch (Exception ex) {\n log.error(\"String_Node_Str\" + tableName, ex);\n log.error(\"String_Node_Str\");\n }\n admin.createTable(tableDesc, splitKeys);\n log.info(\"String_Node_Str\" + tableName + \"String_Node_Str\");\n return 0;\n } catch (Exception e) {\n printUsage(options);\n e.printStackTrace(System.err);\n log.error(e.getLocalizedMessage(), e);\n return 2;\n } finally {\n admin.close();\n }\n}\n"
"public String toJson() {\n used = true;\n if (operations.size() > 1) {\n throw new UnsupportedOperationException(\"String_Node_Str\");\n }\n return toJsonWithoutChecks();\n}\n"
"public void onJoin(PlayerJoinEvent e) {\n final Player player = e.getPlayer();\n User user = User.get(player);\n user.getScoreboard();\n IndependentThread.actions(ActionType.PREFIX_GLOBAL_UPDATE_PLAYER, player);\n IndependentThread.actions(ActionType.DUMMY_GLOBAL_UPDATE_USER, user);\n IndependentThread.actions(ActionType.RANK_UPDATE_USER, user);\n IndependentThread.action(ActionType.PLAYERLIST_SEND, user);\n this.plugin.getServer().getScheduler().runTaskLaterAsynchronously(this.plugin, () -> {\n PacketExtension.registerPlayer(player);\n if (Settings.getConfig().createStringMaterial.equalsIgnoreCase(\"String_Node_Str\")) {\n EntityUtil.spawn(player);\n }\n Version.check(player);\n }, 30L);\n}\n"
"private ProcessResult verbUpper(String verb, Map<String, Object> namespace, List<Object> statement) {\n Token variable = getVariable(verb, statement, 1, namespace);\n Token parameter = getParameter(verb, statement, 2, namespace, EnumSet.of(TokenType.STRING, TokenType.ARRAY, TokenType.MAP));\n try {\n switch(parameter.type) {\n case STRING:\n {\n String oldValue = parameter.getStringValue();\n String newValue;\n newValue = oldValue.toUpperCase();\n variable.set(newValue);\n }\n break;\n case ARRAY:\n {\n List<Object> oldValue = parameter.getListValue();\n List<Object> newValue = new ArrayList<Object>(oldValue.size());\n String oldItem;\n String newItem;\n for (Object item : oldValue) {\n try {\n oldItem = (String) item;\n } catch (ClassCastException e) {\n throw new InvalidValueException(String.format(\"String_Node_Str\", verb, item, parameter.getObjectValue(), e));\n }\n newItem = oldItem.toUpperCase();\n newValue.add(newItem);\n }\n variable.set(newValue);\n }\n break;\n case MAP:\n {\n Map<String, Object> oldValue = parameter.getMapValue();\n Map<String, Object> newValue = new LinkedHashMap<String, Object>(oldValue.size());\n for (Map.Entry<String, Object> entry : oldValue.entrySet()) {\n String oldKey;\n String newKey;\n Object value = entry.getValue();\n oldKey = entry.getKey();\n newKey = oldKey.toUpperCase();\n newValue.put(newKey, value);\n }\n variable.set(newValue);\n }\n break;\n default:\n throw new IllegalStateException(String.format(\"String_Node_Str\", parameter.type));\n }\n } catch (Exception e) {\n throw new InvalidValueException(String.format(\"String_Node_Str\", verb, variable, parameter.getObjectValue(), e), e);\n }\n this.success = true;\n if (logger.isDebugEnabled()) {\n logger.debug(String.format(\"String_Node_Str\", statementId(namespace), verb, this.success, variable, variable.get(), parameter.getObjectValue()));\n }\n return ProcessResult.STATEMENT_CONTINUE;\n}\n"
"public void drawValues(Canvas c) {\n float sliceangle = mChart.getSliceAngle();\n float factor = mChart.getFactor();\n PointF center = mChart.getCenterOffsets();\n float yoffset = Utils.convertDpToPixel(5f);\n for (int i = 0; i < mChart.getData().getDataSetCount(); i++) {\n RadarDataSet dataSet = mChart.getData().getDataSetByIndex(i);\n if (!dataSet.isDrawValuesEnabled())\n continue;\n applyValueTextStyle(dataSet);\n ArrayList<Entry> entries = dataSet.getYVals();\n for (int j = 0; j < entries.size(); j++) {\n Entry e = entries.get(j);\n PointF p = Utils.getPosition(center, (e.getVal() - mChart.getYChartMin()) * factor, sliceangle * j + mChart.getRotationAngle());\n c.drawText(dataSet.getValueFormatter().getFormattedValue(e.getVal()), p.x, p.y - yoffset, mValuePaint);\n }\n }\n}\n"
"public CustomTxtEvent parseFirstLine(CustomTxtTraceContext context) {\n CustomTxtEvent event = new CustomTxtEvent(fDefinition, TmfTimestamp.Zero, new TmfEventSource(\"String_Node_Str\"), fEventType, new TmfEventReference(\"String_Node_Str\"));\n event.processGroups(context.inputLine, context.firstLineMatcher);\n return event;\n}\n"
"public IPersistentMap put(Object key, Object val) {\n int i = indexOf(key);\n Object[] newArray;\n if (i >= 0) {\n if (array[i + 1] == val)\n return this;\n newArray = array.clone();\n newArray[i + 1] = val;\n } else {\n newArray = new Object[array.length + 2];\n if (array.length > 0)\n System.arraycopy(array, 0, newArray, 2, array.length);\n newArray[0] = key;\n newArray[1] = val;\n }\n return create(newArray);\n}\n"
"public void setSubdirectory(String subdir) {\n if (subdir != null && name.length() > 0) {\n this.subdirectory = JDUtilities.removeEndingPoints(JDUtilities.validateFileandPathName(subdir));\n } else\n this.subdirectory = null;\n}\n"
"public void displayLocal(final GL2 gl) {\n if (pathway == null || !pathwayManager.hasItem(pathway.getID()))\n return;\n if (isPathwayDataDirty)\n initPathwayData(gl);\n pickingManager.handlePicking(this, gl);\n if (isDisplayListDirty) {\n rebuildPathwayDisplayList(gl, displayListIndex);\n isDisplayListDirty = false;\n }\n display(gl);\n}\n"
"protected String getErrorMessage(HttpServletRequest request, String key) {\n return messageSource.getMessage(getDefaultMessageKey(), request.getLocale(), getMessageParams());\n}\n"
"public void progress() {\n for (int t : messages.keySet()) {\n if (batchDone.get(t)) {\n continue;\n }\n boolean canProgress = true;\n while (canProgress) {\n Map<Integer, Queue<Object>> map = messages.get(t);\n Map<Integer, Boolean> finishedForTarget = finished.get(t);\n Map<Integer, Integer> countMap = counts.get(t);\n boolean found = true;\n boolean allFinished = true;\n for (Map.Entry<Integer, List<Object>> e : map.entrySet()) {\n if (e.getValue().size() == 0 && !finishedForTarget.get(e.getKey())) {\n found = false;\n canProgress = false;\n }\n if (!finishedForTarget.get(e.getKey())) {\n allFinished = false;\n }\n }\n if (found) {\n List<Object> out = new ArrayList<>();\n for (Map.Entry<Integer, List<Object>> e : map.entrySet()) {\n List<Object> valueList = e.getValue();\n if (valueList.size() > 0) {\n Object value = valueList.get(0);\n out.add(value);\n }\n }\n int flags = 0;\n if (allFinished) {\n boolean last = true;\n for (Map.Entry<Integer, List<Object>> e : map.entrySet()) {\n List<Object> valueList = e.getValue();\n if (valueList.size() > 1) {\n last = false;\n }\n }\n if (last) {\n flags = MessageFlags.FLAGS_LAST;\n }\n }\n if (dataFlowOperation.sendPartial(t, out, flags, destination)) {\n boolean allZero = true;\n for (Map.Entry<Integer, List<Object>> e : map.entrySet()) {\n List<Object> value = e.getValue();\n if (value.size() > 0) {\n value.remove(0);\n }\n if (value.size() != 0) {\n allZero = false;\n }\n }\n for (Map.Entry<Integer, Integer> e : countMap.entrySet()) {\n Integer i = e.getValue();\n e.setValue(i - 1);\n }\n if (allFinished && allZero) {\n batchDone.put(t, true);\n break;\n }\n } else {\n canProgress = false;\n }\n }\n }\n }\n}\n"
"protected void action() {\n ShortPoint2D position = super.getPos();\n if (!super.isValidPosition(position)) {\n if (searchesCounter > 120) {\n super.getMovable().kill();\n return;\n }\n if (super.preSearchPath(true, position.x, position.y, Constants.MOVABLE_FLEEING_DIJKSTRA_RADIUS, ESearchType.VALID_FREE_POSITION) || super.preSearchPath(false, position.x, position.y, Constants.MOVABLE_FLEEING_MAX_RADIUS, ESearchType.VALID_FREE_POSITION)) {\n lastCheckedPathStep = Integer.MIN_VALUE;\n super.followPresearchedPath();\n } else {\n EDirection currentDirection = super.getMovable().getDirection();\n EDirection newDirection;\n if (turnNextTime || MatchConstants.random().nextFloat() < 0.10) {\n turnNextTime = false;\n newDirection = currentDirection.getNeighbor(MatchConstants.random().nextInt(-1, 1));\n } else {\n newDirection = currentDirection;\n }\n ShortPoint2D newPos = newDirection.getNextHexPoint(position);\n if (super.getStrategyGrid().isFreePosition(newPos)) {\n super.goInDirection(newDirection, true);\n turnNextTime = MatchConstants.random().nextInt(7) == 0;\n } else {\n super.lookInDirection(newDirection);\n turnNextTime = true;\n }\n }\n searchesCounter++;\n } else {\n super.convertTo(super.getMovable().getMovableType());\n }\n}\n"
"public void selectionChanged(IWorkbenchPart part, ISelection selection) {\n clearContainer();\n boolean is = true;\n if (part instanceof DQRespositoryView) {\n StructuredSelection sel = (StructuredSelection) selection;\n Object fe = sel.getFirstElement();\n if (fe instanceof IFile) {\n IFile fe2 = (IFile) fe;\n is = createFileDetail(is, fe2);\n } else if (fe instanceof TdCatalog) {\n TdCatalog catalog = (TdCatalog) fe;\n createTdCatalogDetail(catalog);\n is = false;\n } else if (fe instanceof TdSchema) {\n TdSchema schema = (TdSchema) fe;\n createTdSchemaDetail(schema);\n is = false;\n } else if ((fe instanceof TdTable) || fe instanceof TdView) {\n ModelElement element = (ModelElement) fe;\n createTdTVDetail(element);\n is = false;\n } else if (fe instanceof TdColumn) {\n TdColumn column = (TdColumn) fe;\n createTdColumn(column);\n is = false;\n }\n }\n if (is) {\n createDefault();\n }\n container.layout();\n}\n"
"public long getEnergyCapacity(ItemStack itemStack) {\n return 1000000;\n}\n"
"public final TU set(String propertyName, String contextAttributeName) {\n Method method = getMethod(propertyName);\n latePropertiesAttributes.put(propertyName, contextAttributeName);\n latePropertiesSetters.put(propertyName, method);\n return (TU) this;\n}\n"
"public void shouldFetch_withACompoundAttributeQueryOnACompoundGSIWithAHashValueTheSameAsThePrimaryKeyDefinition() {\n final String itemId = randomId();\n final String gsiProperty = randomString(10);\n final Integer gsiSupportingProperty = randomInt(20);\n final Set<String> stringPropertyValues = new HashSet<>(Arrays.asList(gsiProperty));\n final Set<String> stringSupportingPropertyValues = new HashSet<>(Arrays.asList(String.valueOf(gsiSupportingProperty)));\n final ItemConfiguration itemConfiguration = new ItemConfiguration(StubWithGlobalSecondaryIndexItem.class, tableName, new PrimaryKeyDefinition(\"String_Node_Str\"));\n itemConfiguration.registerIndexes((Arrays.asList(new CompoundIndexDefinition(\"String_Node_Str\", \"String_Node_Str\"))));\n final Collection<ItemConfiguration> itemConfigurations = Arrays.asList(itemConfiguration);\n final Condition mockCondition = mock(Condition.class);\n when(mockCondition.getComparisonOperator()).thenReturn(Operators.EQUALS);\n when(mockCondition.getValues()).thenReturn(stringPropertyValues);\n when(mockCondition.hasMissingComparisonValues()).thenReturn(false);\n final Condition mockSupportingCondition = mock(Condition.class);\n when(mockSupportingCondition.getComparisonOperator()).thenReturn(Operators.LESS_THAN_OR_EQUALS);\n when(mockSupportingCondition.getValues()).thenReturn(stringSupportingPropertyValues);\n final CompoundAttributeQuery query = mock(CompoundAttributeQuery.class);\n when(query.getAttributeName()).thenReturn(\"String_Node_Str\");\n when(query.getCondition()).thenReturn(mockCondition);\n when(query.getSupportingAttributeName()).thenReturn(\"String_Node_Str\");\n when(query.getSupportingCondition()).thenReturn(mockSupportingCondition);\n final Map<String, AttributeValue> mockItem = new HashMap<>();\n mockItem.put(\"String_Node_Str\", new AttributeValue(itemId));\n mockItem.put(\"String_Node_Str\", new AttributeValue(gsiProperty));\n final AttributeValue gsiSupportingPropertyAttributeValue = new AttributeValue();\n gsiSupportingPropertyAttributeValue.withN(String.valueOf(gsiSupportingProperty));\n mockItem.put(\"String_Node_Str\", gsiSupportingPropertyAttributeValue);\n final List<Map<String, AttributeValue>> mockItems = Arrays.asList(mockItem);\n final QueryResult mockQueryResult = mock(QueryResult.class);\n when(mockQueryResult.getItems()).thenReturn(mockItems);\n when(mockQueryResult.getLastEvaluatedKey()).thenReturn(null);\n when(mockDatabaseSchemaHolder.itemConfigurations()).thenReturn(itemConfigurations);\n when(mockAmazonDynamoDbClient.query(any(QueryRequest.class))).thenReturn(mockQueryResult);\n final DynamoDbTemplate dynamoDbTemplate = new DynamoDbTemplate(mockDatabaseSchemaHolder);\n dynamoDbTemplate.initialize(mockAmazonDynamoDbClient);\n final Collection<StubWithGlobalSecondaryIndexItem> returnedItems = dynamoDbTemplate.fetch(query, StubWithGlobalSecondaryIndexItem.class);\n final ArgumentCaptor<QueryRequest> queryRequestArgumentCaptor = ArgumentCaptor.forClass(QueryRequest.class);\n verify(mockAmazonDynamoDbClient).query(queryRequestArgumentCaptor.capture());\n final QueryRequest queryRequest = queryRequestArgumentCaptor.getValue();\n assertEquals(schemaName + \"String_Node_Str\" + tableName, queryRequest.getTableName());\n assertEquals(\"String_Node_Str\", queryRequest.getIndexName());\n assertEquals(2, queryRequest.getKeyConditions().size());\n assertEquals(\"String_Node_Str\", queryRequest.getKeyConditions().get(\"String_Node_Str\").getComparisonOperator());\n assertEquals(1, queryRequest.getKeyConditions().get(\"String_Node_Str\").getAttributeValueList().size());\n assertEquals(new AttributeValue(gsiProperty), queryRequest.getKeyConditions().get(\"String_Node_Str\").getAttributeValueList().get(0));\n assertEquals(\"String_Node_Str\", queryRequest.getKeyConditions().get(\"String_Node_Str\").getComparisonOperator());\n assertEquals(1, queryRequest.getKeyConditions().get(\"String_Node_Str\").getAttributeValueList().size());\n assertEquals(gsiSupportingPropertyAttributeValue, queryRequest.getKeyConditions().get(\"String_Node_Str\").getAttributeValueList().get(0));\n assertNotNull(returnedItems);\n assertEquals(1, returnedItems.size());\n}\n"
"public boolean equals(Object obj) {\n boolean equal = true;\n if (obj instanceof Node) {\n Node n = (Node) obj;\n if (n.getArity() != this.getArity()) {\n equal = false;\n } else if (n.getIdentifier() != this.getIdentifier()) {\n equal = false;\n } else {\n for (int i = 0; i < n.getArity() && equal; i++) {\n Node thatChild = n.getChild(i);\n Node thisChild = this.getChild(i);\n if ((thisChild != null) ^ (thatChild != null)) {\n equal = false;\n } else {\n equal = ((thisChild == null) && (thatChild == null) || thisChild.equals(thatChild));\n }\n }\n }\n } else {\n equal = false;\n }\n return equal;\n}\n"
"public List<TdColumn> returnColumns(IMetadataConnection metadataConnection, TableNode tableNode, boolean... dontCreateClose) {\n if (metadataConnection == null || tableNode == null || tableNode.getType() != TableNode.TABLE) {\n return Collections.emptyList();\n }\n NamedColumnSet table = tableNode.getTable();\n if (table == null) {\n table = tableNode.getView();\n }\n if (table == null) {\n return Collections.emptyList();\n }\n List<TdColumn> metadataColumns = new ArrayList<TdColumn>();\n boolean needCreateAndClose = dontCreateClose.length == 0 || !dontCreateClose[0];\n ExtractMetaDataUtils extractMeta = ExtractMetaDataUtils.getInstance();\n try {\n DatabaseMetaData dbMetaData = createDatabaseMetaData(metadataConnection, needCreateAndClose);\n TableNode newNode = tableNode;\n String name = newNode.getItemType();\n if (name != null && StringUtils.trimToEmpty(name).equals(ETableTypes.TABLETYPE_SYNONYM.getName())) {\n String tableName = getTableNameBySynonyms(extractMeta.getConn(), newNode.getValue());\n if (tableName != null && tableName.contains(\"String_Node_Str\")) {\n tableName = tableName.replace(\"String_Node_Str\", \"String_Node_Str\");\n }\n fillSynonyms(metadataConnection, metadataColumns, table, tableName, dbMetaData);\n } else {\n EDatabaseTypeName currentEDatabaseType = EDatabaseTypeName.getTypeFromDbType(metadataConnection.getDbType());\n metadataColumns = MetadataFillFactory.getDBInstance(currentEDatabaseType).fillColumns(table, metadataConnection, dbMetaData, null);\n }\n ColumnSetHelper.addColumns(table, metadataColumns);\n if (needCreateAndClose) {\n extractMeta.closeConnection();\n }\n } catch (Exception e) {\n ExceptionHandler.process(e);\n log.error(e);\n } finally {\n if (needCreateAndClose && extractMeta.getConn() != null) {\n extractMeta.closeConnection();\n }\n }\n return metadataColumns;\n}\n"
"private void saveUpdateStatus(Project project) throws JSONException {\n Context ctx = CoreRuntimePlugin.getInstance().getContext();\n RepositoryContext repositoryContext = (RepositoryContext) ctx.getProperty(Context.REPOSITORY_CONTEXT_KEY);\n PreferenceManipulator prefManipulator = new PreferenceManipulator();\n String url = project.getEmfProject().getUrl();\n if (url == null || !\"String_Node_Str\".equals(getStorage(url))) {\n return;\n String location = getLocation(url);\n String projectName = project.getTechnicalLabel();\n String branch = getBranch();\n JSONObject json = prefManipulator.getLogonLocalBranchStatus(location, projectName);\n if (json != null) {\n Object noUpdateWhenLogon = json.get(branch);\n if (noUpdateWhenLogon != null) {\n repositoryContext.setNoUpdateWhenLogon((Boolean) noUpdateWhenLogon);\n }\n }\n}\n"
"public int getID() {\n return id;\n}\n"
"public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n dropTable(db, FriendTable.TABLE_NAME);\n dropTable(db, ChatMessageTable.TABLE_NAME);\n dropTable(db, ChatTable.TABLE_NAME);\n onCreate(db);\n}\n"
"private int executeLinking(ExecutionContext context, ImmutableList<String> linkerInputs) throws InterruptedException {\n OCamlLinkStep linkStep = new OCamlLinkStep(ocamlContext.getCxxCompiler(), ocamlContext.getOcamlCompiler(), ocamlContext.getOutput(), ocamlContext.getLinkableInput().getArgs(), linkerInputs, ocamlContext.getFlags(), ocamlContext.isLibrary(), false);\n return linkStep.execute(context);\n}\n"
"public boolean a() {\n if (!petEntity.canMove()) {\n return false;\n }\n EntityLiving owner = this.petEntity.getOwner();\n if (owner == null) {\n return false;\n }\n this.lastDamager = localEntityLiving.aF();\n if (this.lastDamager == null || !lastDamager.isAlive()) {\n return false;\n }\n if (lastDamager instanceof EntityPlayer) {\n Player targetPlayer = (Player) lastDamager.getBukkitEntity();\n if (!MyPetPvP.canHurt(myPet.getOwner().getPlayer(), targetPlayer)) {\n return false;\n }\n } else if (lastDamager instanceof EntityMyPet) {\n MyPet targetMyPet = ((EntityMyPet) lastDamager).getMyPet();\n if (!MyPetPvP.canHurt(myPet.getOwner().getPlayer(), targetMyPet.getOwner().getPlayer())) {\n return false;\n }\n } else if (lastDamager instanceof EntityTameableAnimal) {\n EntityTameableAnimal tameable = (EntityTameableAnimal) lastDamager;\n if (tameable.isTamed() && tameable.getOwner() != null) {\n Player tameableOwner = (Player) tameable.getOwner().getBukkitEntity();\n if (myPet.getOwner().equals(tameableOwner)) {\n return false;\n }\n }\n }\n if (myPet.getSkills().isSkillActive(\"String_Node_Str\")) {\n Behavior behaviorSkill = (Behavior) myPet.getSkills().getSkill(\"String_Node_Str\");\n if (behaviorSkill.getBehavior() == Behavior.BehaviorState.Friendly) {\n return false;\n }\n if (behaviorSkill.getBehavior() == BehaviorState.Raid) {\n if (lastDamager instanceof EntityTameableAnimal && ((EntityTameableAnimal) lastDamager).isTamed()) {\n return false;\n }\n if (lastDamager instanceof EntityMyPet) {\n return false;\n }\n if (lastDamager instanceof EntityPlayer) {\n return false;\n }\n }\n }\n return true;\n}\n"
"public boolean directMarshal(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, Session session, NamespaceResolver namespaceResolver) {\n if (!isSet(object)) {\n return;\n }\n}\n"
"public void prePersist() {\n pre_persist_count++;\n}\n"
"public void processCommand(ICommandSender commandSender, String[] args) {\n int x, z;\n if (args.length <= 0) {\n throw new WrongUsageException(\"String_Node_Str\");\n }\n String structureName = args[0];\n StructureInfo structureInfo = StructureHandler.getStructure(structureName);\n World world = commandSender.getEntityWorld();\n if (structureInfo == null) {\n throw new WrongUsageException(\"String_Node_Str\", structureName);\n }\n x = commandSender.getPlayerCoordinates().posX;\n z = commandSender.getPlayerCoordinates().posZ;\n if (args.length >= 3) {\n x = MathHelper.floor_double(func_110666_a(commandSender, (double) x, args[1]));\n z = MathHelper.floor_double(func_110666_a(commandSender, (double) z, args[2]));\n }\n WorldGenStructures.generateStructureRandomly(world, world.rand, structureInfo, x, z);\n}\n"
"public String toString() {\n StringBuffer result = new StringBuffer();\n result.append(listener.getClass().getName());\n result.append(\"String_Node_Str\");\n for (Iterator i = dependencies.iterator(); i.hasNext(); ) {\n EventList dependency = (EventList) i.next();\n result.append(\"String_Node_Str\").append(dependency.getClass().getName()).append(\"String_Node_Str\");\n }\n result.append(\"String_Node_Str\");\n return result.toString();\n}\n"
"void startRecentsActivity(ActivityManager.RunningTaskInfo topTask, boolean isTopTaskHome) {\n SystemServicesProxy ssp = mSystemServicesProxy;\n List<ActivityManager.RecentTaskInfo> recentTasks = ssp.getRecentTasks(3, UserHandle.CURRENT.getIdentifier(), isTopTaskHome);\n boolean useThumbnailTransition = !isTopTaskHome;\n boolean hasRecentTasks = !recentTasks.isEmpty();\n if (useThumbnailTransition) {\n ActivityOptions opts = getThumbnailTransitionActivityOptions(topTask, isTopTaskHome);\n if (opts != null) {\n startAlternateRecentsActivity(topTask, opts, EXTRA_FROM_APP_THUMBNAIL);\n } else {\n useThumbnailTransition = false;\n }\n }\n if (!useThumbnailTransition) {\n if (hasRecentTasks) {\n String homeActivityPackage = mSystemServicesProxy.getHomeActivityPackageName();\n AppWidgetProviderInfo searchWidget = null;\n String searchWidgetPackage = null;\n if (mConfig.hasSearchBarAppWidget()) {\n searchWidget = mSystemServicesProxy.getAppWidgetInfo(mConfig.searchBarAppWidgetId);\n } else {\n searchWidget = mSystemServicesProxy.resolveSearchAppWidget();\n }\n if (searchWidget != null && searchWidget.provider != null) {\n searchWidgetPackage = searchWidget.provider.getPackageName();\n }\n boolean fromSearchHome = false;\n if (homeActivityPackage != null && searchWidgetPackage != null && homeActivityPackage.equals(searchWidgetPackage)) {\n fromSearchHome = true;\n }\n ActivityOptions opts = getHomeTransitionActivityOptions(fromSearchHome);\n startAlternateRecentsActivity(topTask, opts, fromSearchHome ? EXTRA_FROM_SEARCH_HOME : EXTRA_FROM_HOME);\n } else {\n ActivityOptions opts = getUnknownTransitionActivityOptions();\n startAlternateRecentsActivity(topTask, opts, EXTRA_FROM_HOME);\n }\n }\n mLastToggleTime = System.currentTimeMillis();\n}\n"
"public boolean hasNoMovableAt(short x, short y) {\n return movableGrid.hasNoMovableAt(x, y);\n}\n"
"public static org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetContactComponent convertValueSetContactComponent(org.hl7.fhir.dstu3.model.ValueSet.ValueSetContactComponent src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetContactComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetContactComponent();\n copyElement(src, tgt);\n tgt.setName(src.getName());\n for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(convertContactPoint(t));\n return tgt;\n}\n"
"public int getNrDeleteErrors() {\n return Iterables.size(Iterables.filter(failedUpdates, new Predicate<UpdateResult>() {\n public boolean apply(UpdateResult input) {\n return Action.DELETE.equals(input.getAction());\n }\n }));\n}\n"
"protected boolean checkPageBreak() throws BirtException {\n boolean ret = false;\n if (!isInInlineStacking && context.isAutoPageBreak()) {\n int aHeight = getAllocatedHeight();\n while (aHeight + parent.getAbsoluteBP() - 3000 > context.getMaxBP()) {\n if (!parent.autoPageBreak()) {\n return false;\n }\n aHeight = getAllocatedHeight();\n ret = true;\n }\n }\n return ret;\n}\n"
"public static NiftyDialogBuilder getInstance(Context context) {\n int ort = context.getResources().getConfiguration().orientation;\n if (mOrientation != ort) {\n mOrientation = ort;\n instance = null;\n }\n if (instance == null && !((Activity) context).isFinishing()) {\n synchronized (NiftyDialogBuilder.class) {\n if (instance == null) {\n instance = new NiftyDialogBuilder(context, R.style.dialog_untran);\n }\n }\n }\n return instance;\n}\n"
"public Entity duplicate(Entity original) {\n Entity dupe;\n Location dupeLoc;\n if (sm.pluginSupport.getMythicSupport() != null && sm.pluginSupport.getMythicSupport().isMythicMob(original)) {\n dupe = sm.pluginSupport.getMythicSupport().spawnMythicMob(original);\n } else if (original instanceof Zombie) {\n dupeLoc = new Location(original.getWorld(), original.getLocation().getBlockX() + 0.5, original.getLocation().getY(), original.getLocation().getBlockZ() + 0.5);\n dupe = original.getWorld().spawnEntity(dupeLoc, original.getType());\n } else {\n dupe = original.getWorld().spawnEntity(original.getLocation(), original.getType());\n }\n return cloneTraits(original, dupe);\n}\n"
"public void nullKey() {\n try {\n cache.invokeEntryProcessor((Integer) null, new MockEntryProcessor<Integer, String, Void>());\n fail(\"String_Node_Str\");\n } catch (NullPointerException e) {\n }\n}\n"
"protected void _resolveProperties(NamedObj analyzer) throws KernelException {\n super._resolveProperties(analyzer);\n NamedObj toplevel = _toplevel();\n PropertyConstraintHelper toplevelHelper = (PropertyConstraintHelper) getHelper(toplevel);\n toplevelHelper.reinitialize();\n toplevelHelper._addDefaultConstraints(_getConstraintType(actorConstraintType.stringValue()));\n toplevelHelper._setConnectionConstraintType(_getConstraintType(connectionConstraintType.stringValue()), _getConstraintType(compositeConnectionConstraintType.stringValue()), _getConstraintType(fsmConstraintType.stringValue()), _getConstraintType(expressionASTNodeConstraintType.stringValue()));\n Writer writer = null;\n try {\n List<Inequality> conflicts = new LinkedList<Inequality>();\n List<Inequality> unacceptable = new LinkedList<Inequality>();\n List<Inequality> constraintList = toplevelHelper.constraintList();\n if (constraintList.size() > 0) {\n CPO cpo = getLattice();\n InequalitySolver solver = new InequalitySolver(cpo, this);\n Iterator constraints = constraintList.iterator();\n solver.addInequalities(constraints);\n _constraintManager.setConstraints(constraintList);\n getStats().put(\"String_Node_Str\", constraintList.size());\n getStats().put(\"String_Node_Str\", _propertyTermManager.terms().size());\n File file = null;\n Date date = new Date();\n String timestamp = date.toString().replace(\"String_Node_Str\", \"String_Node_Str\");\n String logFilename = getContainer().getName() + \"String_Node_Str\" + getUseCaseName() + \"String_Node_Str\" + timestamp.replace(\"String_Node_Str\", \"String_Node_Str\") + \"String_Node_Str\";\n if (super.isResolve() && isLogMode()) {\n String directoryPath = logDirectory.getExpression();\n directoryPath += directoryPath.endsWith(\"String_Node_Str\") || directoryPath.endsWith(\"String_Node_Str\") ? \"String_Node_Str\" : \"String_Node_Str\";\n if (directoryPath.startsWith(\"String_Node_Str\")) {\n URI directory = new File(URIAttribute.getModelURI(this)).getParentFile().toURI();\n file = FileUtilities.nameToFile(directoryPath.substring(11) + logFilename, directory);\n } else {\n if (!logDirectory.asFile().exists()) {\n if (!logDirectory.asFile().mkdirs()) {\n throw new IllegalActionException(this, \"String_Node_Str\" + logDirectory.asFile().getAbsolutePath() + \"String_Node_Str\");\n }\n }\n file = FileUtilities.nameToFile(logFilename, logDirectory.asFile().toURI());\n }\n try {\n if (!file.exists()) {\n if (!file.getParentFile().exists()) {\n file.getParentFile().mkdirs();\n }\n file.createNewFile();\n }\n writer = new FileWriter(file);\n writer.write(_getStatsAsString(\"String_Node_Str\"));\n writer.write(_getConstraintsAsLogFileString(constraintList, \"String_Node_Str\"));\n } catch (IOException ex) {\n throw new PropertyResolutionException(this, ex, \"String_Node_Str\" + file.getAbsolutePath() + \"String_Node_Str\");\n }\n }\n if (super.isResolve() && isLogMode()) {\n String constraintFilename = _getTrainedConstraintFilename() + \"String_Node_Str\";\n _logHelperConstraints(toplevelHelper);\n _updateConstraintFile(constraintFilename);\n }\n if (!isCollectConstraints()) {\n if (solvingFixedPoint.stringValue().equals(\"String_Node_Str\")) {\n solver.solveGreatest(isInitializeSolver());\n } else {\n solver.solveLeast(isInitializeSolver());\n }\n }\n if (super.isResolve() && isLogMode()) {\n try {\n writer.write(_getConstraintsAsLogFileString(constraintList, \"String_Node_Str\"));\n writer.close();\n } catch (IOException ex) {\n throw new PropertyResolutionException(this, ex, \"String_Node_Str\" + file.getAbsolutePath() + \"String_Node_Str\");\n }\n }\n for (Inequality inequality : constraintList) {\n if (!inequality.isSatisfied(_lattice)) {\n conflicts.add(inequality);\n } else {\n boolean isAcceptable = true;\n InequalityTerm[] lesserVariables = inequality.getLesserTerm().getVariables();\n InequalityTerm[] greaterVariables = inequality.getGreaterTerm().getVariables();\n for (InequalityTerm variable : lesserVariables) {\n if (!variable.isValueAcceptable() && ((PropertyTerm) variable).isEffective()) {\n unacceptable.add(inequality);\n isAcceptable = false;\n break;\n }\n }\n if (isAcceptable) {\n for (InequalityTerm variable : greaterVariables) {\n if (!variable.isValueAcceptable() && ((PropertyTerm) variable).isEffective()) {\n unacceptable.add(inequality);\n break;\n }\n }\n }\n }\n }\n }\n if (!isInitializeSolver() && !isCollectConstraints()) {\n if (conflicts.size() > 0) {\n throw new PropertyResolutionException(this, toplevel(), \"String_Node_Str\" + toplevel().getFullName() + \"String_Node_Str\" + conflicts);\n }\n if (unacceptable.size() > 0) {\n throw new TypeConflictException(unacceptable, \"String_Node_Str\" + toplevel.getFullName() + \"String_Node_Str\");\n }\n }\n } catch (IllegalActionException ex) {\n throw new PropertyResolutionException(this, toplevel, ex, \"String_Node_Str\" + \"String_Node_Str\");\n } finally {\n if (writer != null) {\n try {\n writer.close();\n } catch (IOException ex) {\n throw new PropertyResolutionException(this, toplevel(), ex, \"String_Node_Str\");\n }\n }\n }\n}\n"
"public static UUID getUUID(String username) {\n if (usernameToUUID.containsKey(username)) {\n return usernameToUUID.get(username);\n }\n String shortenedName = NameUtil.stripUsername(username);\n Account account = null;\n try {\n account = accounts.queryBuilder().selectColumns(\"String_Node_Str\").where().eq(\"String_Node_Str\", shortenedName).queryForFirst();\n } catch (SQLException e) {\n e.printStackTrace();\n return null;\n }\n if (account == null) {\n UUID uuid = Bukkit.getOfflinePlayer(username).getUniqueId();\n usernameToUUID.put(username, uuid);\n return uuid;\n }\n UUID uuid = account.getUuid();\n if (uuid != null) {\n usernameToUUID.put(account.getName(), uuid);\n }\n return uuid;\n}\n"
"public void onResponseReceived(Request request, Response response) {\n if (yapoolGWT.getSignState() == false) {\n if (SignRequestCallback.responseIsOk(response)) {\n yapoolGWT.reloadSession();\n } else if (!SignRequestCallback.responseIsOk(response)) {\n messageLabel.setVisible(true);\n messageLabel.setText(response.getText());\n }\n } else if (yapoolGWT.getSignState() == true) {\n yapoolGWT.setSignState(false);\n }\n}\n"
"public void init(IViewSite site, IMemento memento) throws PartInitException {\n super.init(site, memento);\n if (memento == null) {\n setLinkingEnabled(false);\n }\n getViewSite().getActionBars().getToolBarManager().add(new RefreshDQReponsitoryViewAction(this));\n}\n"
"public boolean checkVersions() {\n if (!setDatabasePath()) {\n return false;\n }\n File path = getExternalFilesDirWrapper();\n File oldpath = new File(Environment.getExternalStorageDirectory(), \"String_Node_Str\");\n Long oldmtime = mtime.get(path.getAbsolutePath());\n if (oldmtime == null) {\n oldmtime = 0L;\n }\n if (versions.size() != 0 && path.lastModified() <= oldmtime && (!oldpath.exists() || !oldpath.isDirectory() || oldpath.lastModified() <= oldmtime)) {\n return true;\n }\n versions.clear();\n checkVersion(oldpath);\n checkVersion(path);\n Collections.sort(versions);\n if (versions.size() == 0) {\n checkInternalVersions();\n }\n mtime.put(path.getAbsolutePath(), path.lastModified());\n return true;\n}\n"
"public static double getPlannedTime(Usr user, QDate fromDate, QDate toDate) {\n return roundToTenth(getNumberOfWorkdays(user, fromDate, toDate) * HOURS_PER_WORKDAY);\n}\n"
"public void testDataConnectionWithWifiToAMToWifi() {\n assertNotNull(\"String_Node_Str\", TEST_ACCESS_POINT);\n assertTrue(\"String_Node_Str\" + TEST_ACCESS_POINT, cmActivity.connectToWifi(TEST_ACCESS_POINT));\n waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED, STATE_TRANSITION_LONG_TIMEOUT);\n try {\n Thread.sleep(STATE_TRANSITION_SHORT_TIMEOUT);\n } catch (Exception e) {\n Log.v(LOG_TAG, \"String_Node_Str\" + e.toString());\n }\n cmActivity.setAirplaneMode(getInstrumentation().getContext(), true);\n waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.DISCONNECTED, STATE_TRANSITION_LONG_TIMEOUT);\n try {\n Thread.sleep(STATE_TRANSITION_SHORT_TIMEOUT);\n } catch (Exception e) {\n Log.v(LOG_TAG, \"String_Node_Str\" + e.toString());\n }\n NetworkInfo networkInfo = cmActivity.mCM.getNetworkInfo(ConnectivityManager.TYPE_WIFI);\n assertEquals(State.DISCONNECTED, networkInfo.getState());\n cmActivity.setStateTransitionCriteria(ConnectivityManager.TYPE_WIFI, networkInfo.getState(), NetworkState.TO_CONNECTION, State.CONNECTED);\n cmActivity.setAirplaneMode(getInstrumentation().getContext(), false);\n waitForNetworkState(ConnectivityManager.TYPE_WIFI, State.CONNECTED, STATE_TRANSITION_LONG_TIMEOUT);\n if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_WIFI)) {\n Log.v(LOG_TAG, \"String_Node_Str\");\n Log.v(LOG_TAG, \"String_Node_Str\" + cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_WIFI));\n assertTrue(false);\n }\n if (!cmActivity.validateNetworkStates(ConnectivityManager.TYPE_MOBILE)) {\n Log.v(LOG_TAG, \"String_Node_Str\");\n Log.v(LOG_TAG, \"String_Node_Str\" + cmActivity.getTransitionFailureReason(ConnectivityManager.TYPE_MOBILE));\n assertTrue(false);\n }\n}\n"
"public static void addAllAttributesOfAspect(Rule from, Multimap<Attribute, Label> labelBuilder, Aspect aspect, DependencyFilter dependencyFilter) {\n ImmutableMap<String, Attribute> attributes = aspect.getDefinition().getAttributes();\n for (Attribute aspectAttribute : attributes.values()) {\n if (!dependencyFilter.apply(aspect, aspectAttribute)) {\n continue;\n }\n if (aspectAttribute.getType() == BuildType.LABEL) {\n Label label = maybeGetRepositoryRelativeLabel(from, BuildType.LABEL.cast(aspectAttribute.getDefaultValue(from)));\n if (label != null) {\n labelBuilder.put(aspectAttribute, label);\n }\n } else if (aspectAttribute.getType() == BuildType.LABEL_LIST) {\n for (Label label : BuildType.LABEL_LIST.cast(aspectAttribute.getDefaultValue(from))) {\n labelBuilder.put(aspectAttribute, from.getLabel().resolveRepositoryRelative(label));\n }\n }\n }\n}\n"
"private Sheet generateDeclarationEtcBOHeader(List<MaterialExtension> extensions, Sheet sheet) {\n Field[] fields = DeclarationEtcBO.class.getDeclaredFields();\n Row r1 = sheet.createRow(0);\n Row r2 = sheet.createRow(1);\n Cell numcell = r1.createCell(0);\n numcell.setCellValue(\"String_Node_Str\");\n CellRangeAddress region = new CellRangeAddress(0, 1, 0, 0);\n sheet.addMergedRegion(region);\n int count = 1;\n for (Field field : fields) {\n field.setAccessible(true);\n if (field.isAnnotationPresent(ExcelHeader.class)) {\n ExcelHeader excelHeader = (ExcelHeader) field.getAnnotation(ExcelHeader.class);\n String headerName = excelHeader.header();\n if (StringUtil.notEmpty(headerName)) {\n switch(headerName) {\n case \"String_Node_Str\":\n {\n Cell r1cell = r1.createCell(count);\n r1cell.setCellValue(headerName);\n region = new CellRangeAddress(0, 0, count, count + 3);\n sheet.addMergedRegion(region);\n Cell r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 3 * 512);\n count++;\n break;\n }\n case \"String_Node_Str\":\n {\n Cell r1cell = r1.createCell(count);\n r1cell.setCellValue(headerName);\n region = new CellRangeAddress(0, 0, count, count + 2);\n sheet.addMergedRegion(region);\n Cell r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 3 * 512);\n count++;\n break;\n }\n case \"String_Node_Str\":\n {\n Cell r1cell = r1.createCell(count);\n r1cell.setCellValue(headerName);\n region = new CellRangeAddress(0, 0, count, count + 2);\n sheet.addMergedRegion(region);\n Cell r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n break;\n }\n case \"String_Node_Str\":\n {\n Cell r1cell = r1.createCell(count);\n r1cell.setCellValue(headerName);\n region = new CellRangeAddress(0, 0, count, count + 2);\n sheet.addMergedRegion(region);\n Cell r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 7 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 3 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 3 * 512);\n count++;\n break;\n }\n case \"String_Node_Str\":\n {\n Cell r1cell = r1.createCell(count);\n r1cell.setCellValue(headerName);\n region = new CellRangeAddress(0, 0, count, count + 1);\n sheet.addMergedRegion(region);\n Cell r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n break;\n }\n case \"String_Node_Str\":\n {\n Cell r1cell = r1.createCell(count);\n r1cell.setCellValue(headerName);\n region = new CellRangeAddress(0, 0, count, count + 2);\n sheet.addMergedRegion(region);\n Cell r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n break;\n }\n case \"String_Node_Str\":\n {\n Cell r1cell = r1.createCell(count);\n r1cell.setCellValue(headerName);\n region = new CellRangeAddress(0, 0, count, count + 2);\n sheet.addMergedRegion(region);\n Cell r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n break;\n }\n case \"String_Node_Str\":\n {\n Cell r1cell = r1.createCell(count);\n r1cell.setCellValue(headerName);\n region = new CellRangeAddress(0, 0, count, count + 4);\n sheet.addMergedRegion(region);\n Cell r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 3 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n break;\n }\n case \"String_Node_Str\":\n {\n Cell r1cell = r1.createCell(count);\n r1cell.setCellValue(headerName);\n region = new CellRangeAddress(0, 0, count, count + 5);\n sheet.addMergedRegion(region);\n Cell r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 3 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 4 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n break;\n }\n case \"String_Node_Str\":\n {\n Cell r1cell = r1.createCell(count);\n r1cell.setCellValue(headerName);\n region = new CellRangeAddress(0, 0, count, count + 2);\n sheet.addMergedRegion(region);\n Cell r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n break;\n }\n case \"String_Node_Str\":\n {\n Cell r1cell = r1.createCell(count);\n r1cell.setCellValue(headerName);\n region = new CellRangeAddress(0, 0, count, count + 4);\n sheet.addMergedRegion(region);\n Cell r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 7 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n break;\n }\n case \"String_Node_Str\":\n {\n Cell r1cell = r1.createCell(count);\n r1cell.setCellValue(headerName);\n region = new CellRangeAddress(0, 0, count, count + 2);\n sheet.addMergedRegion(region);\n Cell r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n break;\n }\n case \"String_Node_Str\":\n {\n Cell r1cell = r1.createCell(count);\n r1cell.setCellValue(headerName);\n region = new CellRangeAddress(0, 0, count, count + 3);\n sheet.addMergedRegion(region);\n Cell r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 9 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 3 * 512);\n count++;\n break;\n }\n case \"String_Node_Str\":\n {\n Cell r1cell = r1.createCell(count);\n r1cell.setCellValue(headerName);\n region = new CellRangeAddress(0, 0, count, count + 2);\n sheet.addMergedRegion(region);\n Cell r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n break;\n }\n case \"String_Node_Str\":\n {\n Cell r1cell = r1.createCell(count);\n r1cell.setCellValue(headerName);\n region = new CellRangeAddress(0, 0, count, count + 2);\n sheet.addMergedRegion(region);\n Cell r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n r2cell = r2.createCell(count);\n r2cell.setCellValue(\"String_Node_Str\");\n sheet.setColumnWidth(count, 5 * 512);\n count++;\n break;\n }\n case \"String_Node_Str\":\n {\n if (extensions == null || extensions.isEmpty()) {\n break;\n }\n Cell r1cell = r1.createCell(count);\n r1cell.setCellValue(headerName);\n if (extensions.size() > 1) {\n region = new CellRangeAddress(0, 0, count, count + extensions.size() - 1);\n sheet.addMergedRegion(region);\n }\n for (MaterialExtension extension : extensions) {\n Cell cell = r2.createCell(count);\n String extensionName = extension.getExtensionName() == null ? \"String_Node_Str\" : extension.getExtensionName();\n cell.setCellValue(extensionName);\n int length = extension.getExtensionName().length() > 10 ? 10 : extension.getExtensionName().length();\n sheet.setColumnWidth(count, length * 512);\n count++;\n }\n break;\n }\n default:\n Cell cell = r1.createCell(count);\n sheet.setColumnWidth(count, (headerName.length() + 1) * 512);\n cell.setCellValue(headerName);\n region = new CellRangeAddress(0, 1, count, count);\n sheet.addMergedRegion(region);\n count++;\n break;\n }\n }\n }\n }\n return sheet;\n}\n"
"public Object call() throws Exception {\n groupInProcess.add(group.getName(), key);\n try {\n makeTimedCall(createResponse(key));\n lastContentKey.updateIncrease(key, group.getName(), GROUP_LAST_COMPLETED);\n groupInProcess.remove(group.getName(), key);\n logger.trace(\"String_Node_Str\", key, group.getName());\n } catch (Exception e) {\n logger.warn(\"String_Node_Str\" + key + \"String_Node_Str\" + group.getName(), e);\n } finally {\n semaphore.release();\n }\n return null;\n}\n"
"public void setValueRequested(Attribute<Object> attr, Object value) throws AttrTableSetException {\n Selection selection = frame.getCanvas().getSelection();\n Circuit circuit = frame.getCanvas().getCircuit();\n if (selection.isEmpty() && circuit != null) {\n AttrTableCircuitModel circuitModel = new AttrTableCircuitModel(project, circuit);\n circuitModel.setValueRequested(attr, value);\n } else {\n SetAttributeAction act = new SetAttributeAction(circuit, Strings.getter(\"String_Node_Str\"));\n AutoLabel labler = null;\n if (attr.equals(StdAttr.LABEL)) {\n labler = new AutoLabel((String) value, circuit);\n }\n SortedSet<Component> comps = new TreeSet<Component>(new PositionComparator());\n comps.addAll(selection.getComponents());\n for (Component comp : comps) {\n if (!(comp instanceof Wire)) {\n if (comp.getFactory() instanceof SubcircuitFactory) {\n SubcircuitFactory fac = (SubcircuitFactory) comp.getFactory();\n if (attr.equals(CircuitAttributes.NAMED_CIRCUIT_BOX) || attr.equals(CircuitAttributes.NAME_ATTR)) {\n try {\n CircuitMutation mutation = new CircuitMutation(fac.getSubcircuit());\n mutation.setForCircuit(attr, value);\n Action action = mutation.toAction(null);\n project.doAction(action);\n } catch (CircuitException ex) {\n JOptionPane.showMessageDialog(project.getFrame(), ex.getMessage());\n }\n return;\n }\n }\n if (attr.equals(StdAttr.LABEL)) {\n if (labler.hasNext(circuit)) {\n if (comps.size() > 1) {\n act.set(comp, attr, labler.GetNext(circuit, comp.getFactory()));\n } else {\n if (getAttributeSet().getValue(StdAttr.LABEL).equals((String) value))\n return;\n else\n act.set(comp, attr, labler.GetCurrent(circuit, comp.getFactory()));\n }\n } else\n act.set(comp, attr, \"String_Node_Str\");\n } else\n act.set(comp, attr, value);\n }\n }\n project.doAction(act);\n }\n}\n"
"public void render(OpenGLContext context) {\n if (!context.isDirty() || SumoPlatform.isBatchMode()) {\n return;\n }\n int x = context.getX();\n int y = context.getY();\n float zoom = context.getZoom();\n float width = context.getWidth() * zoom;\n float height = context.getHeight() * zoom;\n if (glayer != null) {\n List<Geometry> geomList = glayer.getGeometries();\n if (!threshable && geomList != null) {\n if (getType().equalsIgnoreCase(GeometricLayer.POINT)) {\n switch(this.displaysymbol) {\n case point:\n {\n GL2ShapesRender.renderPolygons(context, width, height, geomList, this.renderWidth, color);\n if (selectedGeometry != null) {\n GL2ShapesRender.renderPoint(context, width, height, selectedGeometry.getCoordinate(), this.renderWidth, color);\n }\n }\n break;\n case circle:\n {\n GL2ShapesRender.renderCircle(context, width, height, geomList, selectedGeometry, this.renderWidth, color);\n }\n break;\n case square:\n {\n GL2ShapesRender.renderSquare(context, width, height, geomList, selectedGeometry, renderWidth, color);\n }\n break;\n case cross:\n {\n GL2ShapesRender.renderCross(context, width, height, geomList, selectedGeometry, renderWidth, color);\n }\n break;\n case triangle:\n {\n GL2ShapesRender.renderTriangle(context, width, height, geomList, selectedGeometry, renderWidth, color);\n }\n break;\n default:\n {\n }\n }\n } else if (getType().equalsIgnoreCase(GeometricLayer.POLYGON)) {\n for (Geometry tmp : geomList) {\n if (tmp instanceof Polygon) {\n Polygon polygon = (Polygon) tmp;\n if (polygon.getCoordinates().length < 1) {\n continue;\n }\n float rWidth = polygon == selectedGeometry ? this.renderWidth * 2 : this.renderWidth;\n int interior = polygon.getNumInteriorRing();\n if (interior > 0) {\n LineString line = polygon.getExteriorRing();\n GL2ShapesRender.drawPoly(context, line.getCoordinates(), width, height, x, y, rWidth, color);\n for (int i = 0; i < interior; i++) {\n LineString line2 = polygon.getInteriorRingN(i);\n GL2ShapesRender.drawPoly(context, line2.getCoordinates(), width, height, x, y, rWidth, color);\n }\n } else {\n GL2ShapesRender.drawPoly(context, polygon.getCoordinates(), width, height, x, y, rWidth, color);\n }\n } else if (tmp instanceof MultiPolygon) {\n MultiPolygon mpolygon = (MultiPolygon) tmp;\n if (mpolygon.getCoordinates().length < 1) {\n continue;\n }\n float rWidth = mpolygon == selectedGeometry ? this.renderWidth * 2 : this.renderWidth;\n GL2ShapesRender.drawPoly(context, mpolygon.getCoordinates(), width, height, x, y, rWidth, color);\n }\n }\n } else if (getType().equalsIgnoreCase(GeometricLayer.LINESTRING)) {\n for (Geometry temp : geomList) {\n if (temp.getCoordinates().length < 1) {\n continue;\n }\n float size = (temp == selectedGeometry ? this.renderWidth * 2 : this.renderWidth);\n GL2ShapesRender.renderPolygon(context, width, height, temp.getCoordinates(), size, color);\n }\n } else if (getType().equalsIgnoreCase(GeometricLayer.MIXED)) {\n for (Geometry temp : geomList) {\n if (temp.getCoordinates().length < 1) {\n continue;\n }\n if (temp instanceof LineString || temp instanceof Polygon) {\n float size = (temp == selectedGeometry ? this.renderWidth * 2 : this.renderWidth);\n GL2ShapesRender.renderPolygon(context, width, height, temp.getCoordinates(), size, color);\n } else if (temp instanceof Point) {\n float size = (temp == selectedGeometry ? this.renderWidth * 2 : this.renderWidth);\n Coordinate point = temp.getCoordinate();\n GL2ShapesRender.renderPoint(context, width, height, point, size, color);\n } else if (temp instanceof MultiPoint) {\n float size = (temp == selectedGeometry ? this.renderWidth * 2 : this.renderWidth);\n GL2ShapesRender.renderPolygon(context, width, height, temp.getCoordinates(), size, color);\n }\n }\n }\n } else {\n if (getType().equalsIgnoreCase(GeometricLayer.POINT) && geomList != null) {\n List<Geometry> toVisualize = new ArrayList<>();\n for (Geometry temp : geomList) {\n if (((Double) glayer.getAttributes(temp).get(VDSSchema.SIGNIFICANCE)) > currentThresh) {\n toVisualize.add(temp);\n }\n }\n switch(this.displaysymbol) {\n case point:\n {\n GL2ShapesRender.renderPolygons(context, width, height, toVisualize, this.renderWidth, color);\n if (selectedGeometry != null) {\n GL2ShapesRender.renderPoint(context, width, height, selectedGeometry.getCoordinate(), this.renderWidth * 2, color);\n }\n }\n break;\n case circle:\n {\n GL2ShapesRender.renderCircle(context, width, height, toVisualize, this.renderWidth, color);\n }\n break;\n case square:\n {\n GL2ShapesRender.renderSquare(context, width, height, toVisualize, selectedGeometry, renderWidth, color);\n }\n break;\n case cross:\n {\n GL2ShapesRender.renderCross(context, width, height, toVisualize, selectedGeometry, renderWidth, color);\n }\n break;\n case triangle:\n {\n GL2ShapesRender.renderTriangle(context, width, height, toVisualize, selectedGeometry, renderWidth, color);\n }\n break;\n default:\n {\n }\n }\n } else if (getType().equalsIgnoreCase(GeometricLayer.POLYGON) || getType().equalsIgnoreCase(GeometricLayer.LINESTRING)) {\n for (Geometry temp : geomList) {\n if (((Double) glayer.getAttributes(temp).get(VDSSchema.SIGNIFICANCE)) > currentThresh) {\n if (temp.getCoordinates().length < 1) {\n continue;\n }\n float size = (temp == selectedGeometry ? this.renderWidth * 2 : this.renderWidth);\n GL2ShapesRender.renderPolygon(context, width, height, temp.getCoordinates(), size, color);\n }\n }\n } else if (getType().equalsIgnoreCase(GeometricLayer.MIXED)) {\n for (Geometry temp : geomList) {\n if (((Double) glayer.getAttributes(temp).get(VDSSchema.SIGNIFICANCE)) > currentThresh) {\n if (temp.getCoordinates().length < 1) {\n continue;\n }\n if (temp instanceof Polygon || temp instanceof LineString) {\n float size = (temp == selectedGeometry ? this.renderWidth * 2 : this.renderWidth);\n GL2ShapesRender.renderPolygon(context, width, height, temp.getCoordinates(), size, color);\n } else if (temp instanceof Point) {\n float size = temp == selectedGeometry ? this.renderWidth * 2 : this.renderWidth;\n Coordinate point = temp.getCoordinate();\n GL2ShapesRender.renderPoint(context, width, height, point, size, color);\n }\n }\n }\n }\n }\n }\n}\n"
"private void writeElement(String indent, XhtmlNode node) throws IOException {\n if (!pretty)\n indent = \"String_Node_Str\";\n if (node.getChildNodes().size() == 0)\n dst.append(indent + \"String_Node_Str\" + node.getName() + attributes(node) + \"String_Node_Str\" + (isPretty() ? \"String_Node_Str\" : \"String_Node_Str\"));\n else {\n boolean act = node.allChildrenAreText();\n if (act || !pretty)\n dst.append(indent + \"String_Node_Str\" + node.getName() + attributes(node) + \"String_Node_Str\");\n else\n dst.append(indent + \"String_Node_Str\" + node.getName() + attributes(node) + \"String_Node_Str\");\n if (node.getName() == \"String_Node_Str\" && node.getElement(\"String_Node_Str\") == null)\n dst.append(indent + \"String_Node_Str\" + (isPretty() ? \"String_Node_Str\" : \"String_Node_Str\"));\n for (XhtmlNode c : node.getChildNodes()) writeNode(indent + \"String_Node_Str\", c, node.getName());\n if (act)\n dst.append(\"String_Node_Str\" + node.getName() + \"String_Node_Str\" + (isPretty() ? \"String_Node_Str\" : \"String_Node_Str\"));\n else if (node.getChildNodes().get(node.getChildNodes().size() - 1).getNodeType() == NodeType.Text)\n dst.append((isPretty() ? \"String_Node_Str\" + indent : \"String_Node_Str\") + \"String_Node_Str\" + node.getName() + \"String_Node_Str\" + (isPretty() ? \"String_Node_Str\" : \"String_Node_Str\"));\n else\n dst.append(indent + \"String_Node_Str\" + node.getName() + \"String_Node_Str\" + (isPretty() ? \"String_Node_Str\" : \"String_Node_Str\"));\n }\n}\n"
"public void process(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n List<Supplier> suppliers = new ArrayList<Supplier>();\n String searchField = request.getParameter(\"String_Node_Str\");\n SupplierSearcher searcher = new SupplierSearcher();\n if (Validator.validField(searchField)) {\n List<Supplier> s = searcher.search(searchField);\n List<Supplier> u = new ArrayList<Supplier>();\n for (Supplier su : s) {\n if (!u.contains(su))\n u.add(su);\n }\n suppliers = u;\n } else\n try {\n suppliers = sManager.getAllSuppliers();\n } catch (TransactionException e) {\n e.printStackTrace();\n }\n request.setAttribute(\"String_Node_Str\", suppliers);\n if (Validator.validField(searchField))\n request.setAttribute(\"String_Node_Str\", searchField);\n RequestDispatcher view = request.getRequestDispatcher(SupplierServlet.SEARCH_SUPPLIERS);\n view.forward(request, response);\n}\n"
"public static void init() throws Exception {\n hbmInputStream = MODEL_XML_TO_HBM_CONVERTER.convert(Utils.FULL_FIRST_ENTITY_XML_RESOURCE)[0].getInputStream();\n hbmInputSource = new InputSource(MODEL_XML_TO_HBM_CONVERTER.convert(Utils.FULL_FIRST_ENTITY_XML_RESOURCE)[0].getInputStream());\n hbmFirstEntity = buildControlDocument(new InputSource(MODEL_XML_TO_HBM_CONVERTER.convert(Utils.FULL_FIRST_ENTITY_XML_RESOURCE)[0].getInputStream()));\n hbmSecondEntity = buildControlDocument(new InputSource(MODEL_XML_TO_HBM_CONVERTER.convert(Utils.FULL_SECOND_ENTITY_XML_RESOURCE)[0].getInputStream()));\n hbmThirdEntity = buildControlDocument(new InputSource(MODEL_XML_TO_HBM_CONVERTER.convert(Utils.FULL_THIRD_ENTITY_XML_RESOURCE)[0].getInputStream()));\n}\n"
"public boolean sameAs(AEColor color, ItemStack comparableItem) {\n ItemStackSrc is = colors[color.ordinal()];\n if (comparableItem == null || is == null)\n return false;\n return comparableItem.getItem() == is.item && comparableItem.getItemDamage() == is.damage;\n}\n"
"public void render(IModuleRenderHelper renderHelper, FontRenderer fontRenderer, int currenty, IModuleDataContents screenData, ModuleRenderInfo renderInfo) {\n GlStateManager.disableLighting();\n if (screenData == null) {\n return;\n }\n int currentLevel = (int) screenData.getContents();\n int buttons = (int) screenData.getMaxContents();\n if (vertical) {\n renderButtonsVertical(fontRenderer, currenty, currentLevel, buttons);\n } else {\n renderButtonsHorizontal(fontRenderer, currenty, currentLevel, buttons);\n }\n}\n"
"public ArrayList<FilePath> newDirectoryStream() {\n String path = name;\n ArrayList<FilePath> list = New.arrayList();\n try {\n if (path.indexOf('!') < 0) {\n path += \"String_Node_Str\";\n }\n if (!path.endsWith(\"String_Node_Str\")) {\n path += \"String_Node_Str\";\n }\n ZipFile file = openZipFile();\n try {\n String dirName = getEntryName();\n String prefix = path.substring(0, path.length() - dirName.length());\n Enumeration<? extends ZipEntry> en = file.entries();\n while (en.hasMoreElements()) {\n ZipEntry entry = en.nextElement();\n String name = entry.getName();\n if (!name.startsWith(dirName)) {\n continue;\n }\n if (name.length() <= dirName.length()) {\n continue;\n }\n int idx = name.indexOf('/', dirName.length());\n if (idx < 0 || idx >= name.length() - 1) {\n list.add(getPath(prefix + name));\n }\n }\n }\n return list;\n } catch (IOException e) {\n throw DbException.convertIOException(e, \"String_Node_Str\" + path);\n }\n}\n"
"public Location getLocation() {\n return m_location;\n}\n"
"protected void writeExtraNamespaces(List extraNamespaces, XMLRecord xmlRecord, AbstractSession session) {\n if (extraNamespaces == null) {\n return;\n }\n for (int i = 0, extraNamespacesSize = extraNamespaces.size(); i < extraNamespacesSize; i++) {\n Namespace next = (Namespace) extraNamespaces.get(i);\n String prefix = next.getPrefix();\n if (((MarshalRecord) xmlRecord).hasCustomNamespaceMapper()) {\n prefix = ((MarshalRecord) xmlRecord).getNamespaceResolver().resolveNamespaceURI(next.getNamespaceURI());\n }\n ((MarshalRecord) xmlRecord).attribute(XMLConstants.XMLNS_URL, prefix, XMLConstants.XMLNS + XMLConstants.COLON + prefix, next.getNamespaceURI());\n }\n}\n"
"private void outputNormalizedImage(final int x0, final int y0, final int w, final int h, final double[][] gamma0ReferenceArea, final double[][] sigma0ReferenceArea, final Map<Band, Tile> targetTiles, final Rectangle targetRectangle) {\n try {\n for (Band tgtBand : targetBands) {\n final Tile targetTile = targetTiles.get(tgtBand);\n final ProductData targetData = targetTile.getDataBuffer();\n final TileIndex tgtIndex = new TileIndex(targetTile);\n final String unit = tgtBand.getUnit();\n final String bandName = tgtBand.getName();\n Band srcBand = null;\n Tile sourceTile = null;\n ProductData sourceData = null;\n TileIndex srcIndex = null;\n if (bandName.contains(\"String_Node_Str\") || bandName.contains(\"String_Node_Str\")) {\n srcBand = targetBandToSourceBandMap.get(tgtBand);\n sourceTile = getSourceTile(srcBand, targetRectangle);\n sourceData = sourceTile.getDataBuffer();\n srcIndex = new TileIndex(sourceTile);\n }\n double[][] simulatedImage = null;\n if (bandName.contains(\"String_Node_Str\")) {\n simulatedImage = sigma0ReferenceArea;\n }\n UnitType unitType = UnitType.AMPLITUDE;\n if (unit.contains(Unit.AMPLITUDE)) {\n unitType = UnitType.AMPLITUDE;\n } else if (unit.contains(Unit.INTENSITY)) {\n unitType = UnitType.INTENSITY;\n } else if (unit.contains(Unit.REAL) || unit.contains(Unit.IMAGINARY)) {\n unitType = UnitType.COMPLEX;\n } else if (unit.contains(\"String_Node_Str\")) {\n unitType = UnitType.RATIO;\n }\n if (unitType == UnitType.RATIO) {\n for (int y = y0; y < y0 + h; y++) {\n final int yy = y - y0;\n tgtIndex.calculateStride(y);\n for (int x = x0; x < x0 + w; x++) {\n final int xx = x - x0;\n final int tgtIdx = tgtIndex.getIndex(x);\n final double simVal = simulatedImage[yy][xx];\n if (simVal != noDataValue && simVal != 0.0) {\n targetData.setElemDoubleAt(tgtIdx, simVal / beta0);\n } else {\n targetData.setElemDoubleAt(tgtIdx, noDataValue);\n }\n }\n }\n } else {\n double v, simVal;\n int tgtIdx, srcIdx;\n for (int y = y0; y < y0 + h; y++) {\n final int yy = y - y0;\n tgtIndex.calculateStride(y);\n srcIndex.calculateStride(y);\n for (int x = x0; x < x0 + w; x++) {\n final int xx = x - x0;\n tgtIdx = tgtIndex.getIndex(x);\n srcIdx = srcIndex.getIndex(x);\n simVal = simulatedImage[yy][xx];\n if (simVal != noDataValue) {\n simVal /= beta0;\n if (isGRD) {\n simVal /= Math.sin(incidenceAngleTPG.getPixelDouble(x, y) * Constants.DTOR);\n }\n if (simVal > threshold) {\n switch(unitType) {\n case AMPLITUDE:\n v = sourceData.getElemDoubleAt(srcIdx);\n targetData.setElemDoubleAt(tgtIdx, v * v / simVal);\n break;\n case INTENSITY:\n v = sourceData.getElemDoubleAt(srcIdx);\n targetData.setElemDoubleAt(tgtIdx, v / simVal);\n break;\n case COMPLEX:\n v = sourceData.getElemDoubleAt(srcIdx);\n targetData.setElemDoubleAt(tgtIdx, v / Math.sqrt(simVal));\n break;\n }\n }\n } else {\n targetData.setElemDoubleAt(tgtIdx, noDataValue);\n }\n }\n }\n }\n }\n } catch (Throwable e) {\n OperatorUtils.catchOperatorException(getId(), e);\n }\n}\n"
"public String getDescription(int tagType) {\n switch(tagType) {\n case TAG_MAJOR_BRAND:\n return getMajorBrandDescription();\n case TAG_COMPATIBLE_BRANDS:\n return getCompatibleBrandsDescription();\n case TAG_DURATION_SECONDS:\n return getDurationDescription();\n default:\n return _directory.getString(tagType);\n }\n}\n"
"public void setCurrentSymbol(String name) throws PtalonRuntimeException {\n if (_currentActorTree != null) {\n _currentActorTree.setSymbol(name);\n } else {\n throw new PtalonRuntimeException(\"String_Node_Str\");\n }\n}\n"
"public SDOSequence getOldSequence(DataObject dataObject) {\n if ((dataObject == null) || (!isDeleted(dataObject) && ((((SDODataObject) dataObject).getChangeSummary() != null) && (((SDODataObject) dataObject).getChangeSummary() != this)))) {\n return null;\n }\n if (!isCreated(dataObject) && dataObject.getType().isSequenced()) {\n if (getOldSequences().containsKey(dataObject)) {\n return (SDOSequence) getOldSequences().get(dataObject);\n }\n SDOSequence originalSeq = (SDOSequence) getOriginalSequences().get(dataObject);\n if (originalSeq == null) {\n originalSeq = (SDOSequence) dataObject.getSequence();\n }\n SDOSequence seqWithDeepCopies = new SDOSequence((SDODataObject) dataObject);\n for (int i = 0; i < originalSeq.size(); i++) {\n Object nextOriginalSettingValue = originalSeq.getValue(i);\n if (nextOriginalSettingValue == null) {\n continue;\n }\n Property nextOriginalSettingProp = originalSeq.getProperty(i);\n if (nextOriginalSettingProp == null) {\n seqWithDeepCopies.addText(nextOriginalSettingValue.toString());\n } else if (nextOriginalSettingProp.getType().isDataType()) {\n seqWithDeepCopies.addSettingWithoutModifyingDataObject(nextOriginalSettingProp, nextOriginalSettingValue, false);\n } else {\n seqWithDeepCopies.addSettingWithoutModifyingDataObject(nextOriginalSettingProp, getOrCreateDeepCopy((DataObject) nextOriginalSettingValue), false);\n }\n }\n getOldSequences().put(dataObject, seqWithDeepCopies);\n return seqWithDeepCopies;\n }\n return null;\n}\n"
"private void addCallbackCases(MethodBuilder mb2, final String ROLE_PARAM, final String MESSAGE_VAR, final String OP, Module main, Role peer) {\n boolean first;\n mb2.addBodyLine(StateChannelApiGenerator.SCRIBMESSAGE_CLASS + \"String_Node_Str\" + MESSAGE_VAR + \"String_Node_Str\" + JavaBuilder.SUPER + \"String_Node_Str\" + getSessionApiRoleConstant(peer) + \"String_Node_Str\");\n first = true;\n for (EAction a : this.curr.getActions()) {\n EState succ = this.curr.getSuccessor(a);\n if (first) {\n first = false;\n } else {\n mb2.addBodyLine(\"String_Node_Str\");\n }\n mb2.addBodyLine(\"String_Node_Str\" + MESSAGE_VAR + \"String_Node_Str\" + StateChannelApiGenerator.SCRIBMESSAGE_OP_FIELD + \"String_Node_Str\" + getSessionApiOpConstant(a.mid) + \"String_Node_Str\");\n if (succ.isTerminal()) {\n mb2.addBodyLine(1, SCRIBSOCKET_SE_FIELD + \"String_Node_Str\");\n }\n String ln = \"String_Node_Str\";\n {\n ln += JavaBuilder.NEW + \"String_Node_Str\" + (succ.isTerminal() ? ScribSockGen.GENERATED_ENDSOCKET_NAME : this.apigen.getSocketClassName(succ)) + \"String_Node_Str\" + SCRIBSOCKET_SE_FIELD + \"String_Node_Str\";\n }\n ln += getSessionApiOpConstant(a.mid);\n if (a.mid.isOp()) {\n if (!a.payload.isEmpty()) {\n String buffSuper = JavaBuilder.NEW + \"String_Node_Str\" + BUF_CLASS + \"String_Node_Str\";\n int i = 0;\n for (PayloadType<?> pt : a.payload.elems) {\n DataTypeDecl dtd = main.getDataTypeDecl((DataType) pt);\n ln += \"String_Node_Str\" + buffSuper + \"String_Node_Str\" + dtd.extName + \"String_Node_Str\" + RECEIVE_MESSAGE_PARAM + \"String_Node_Str\" + SCRIBMESSAGE_PAYLOAD_FIELD + \"String_Node_Str\" + i++ + \"String_Node_Str\";\n }\n }\n } else {\n MessageSigNameDecl msd = main.getMessageSigDecl(((MessageSigName) a.mid).getSimpleName());\n ln += \"String_Node_Str\" + JavaBuilder.NEW + \"String_Node_Str\" + BUF_CLASS + \"String_Node_Str\" + msd.extName + \"String_Node_Str\" + RECEIVE_MESSAGE_PARAM + \"String_Node_Str\";\n }\n ln += \"String_Node_Str\";\n mb2.addBodyLine(1, ln);\n mb2.addBodyLine(\"String_Node_Str\");\n }\n mb2.addBodyLine(\"String_Node_Str\");\n mb2.addBodyLine(1, \"String_Node_Str\" + JavaBuilder.NEW + \"String_Node_Str\" + OP + \"String_Node_Str\");\n mb2.addBodyLine(\"String_Node_Str\");\n}\n"
"private static UserAgentRuntimeProperties createInstance() {\n return GWT.isClient() ? new UserAgentRuntimeProperties(getNativeUserAgent()) : new UserAgentRuntimeProperties(\"String_Node_Str\");\n}\n"
"private boolean loopSession() throws IOException {\n Screen s = getNextScreen();\n while (s != null) {\n try {\n s.init(mPlatform, mSession, mSandbox);\n System.out.println(\"String_Node_Str\");\n s.prompt(System.out);\n System.out.print(\"String_Node_Str\");\n String input = reader.readLine();\n if (input.startsWith(\"String_Node_Str\")) {\n if (input.equals(\"String_Node_Str\") || input.equals(\"String_Node_Str\")) {\n return false;\n }\n if (input.startsWith(\"String_Node_Str\")) {\n mUpdatePending = true;\n if (input.contains(\"String_Node_Str\")) {\n mForceLatestUpdate = true;\n }\n return true;\n }\n if (input.equals(\"String_Node_Str\")) {\n return true;\n }\n }\n s.updateSession(mSession, input);\n s = getNextScreen();\n } catch (CommCareSessionException ccse) {\n printErrorAndContinue(\"String_Node_Str\", ccse);\n return true;\n }\n }\n String formXmlns = mSession.getForm();\n XFormPlayer player = new XFormPlayer(System.in, System.out, null);\n player.setSessionIIF(mSession.getIIF());\n player.start(mEngine.loadFormByXmlns(formXmlns));\n return true;\n}\n"
"public URL getChangeSetLink(LogEntry changeSet) throws IOException {\n return new URL(url, String.format(\"String_Node_Str\", encodePath(repositoryInstance), changeSet.getRevision()));\n}\n"
"public void stand() {\n inAnim();\n posTween = null;\n renderer.startAnimation(standAnim, Tween.Type.SPRITE_DEFINED, -1, null, null);\n outAnim(Tween.Type.SPRITE_DEFINED);\n}\n"
"public void testConcurrent() throws Exception {\n List<Thread> threads = Lists.newArrayList();\n for (int i = 0; i < Runtime.getRuntime().availableProcessors(); i++) {\n Thread t = new Thread(new Runnable() {\n public void run() {\n IQuery<TestGlobalEntity> globalQuery = pinusClient.createQuery(TestGlobalEntity.class);\n for (int i = 0; i < 10000; i++) {\n globalQuery.limit(100).list();\n }\n }\n });\n t.start();\n threads.add(t);\n Thread.sleep(100);\n }\n for (Thread t : threads) {\n t.join();\n }\n}\n"
"public static void zip(File directory, File out) throws IOException {\n ZipOutputStream zos = null;\n try {\n OutputSupplier<FileOutputStream> s = Files.newOutputStreamSupplier(out);\n zos = new ZipOutputStream(s.getOutput());\n for (File f : FileUtils.listFiles(directory, FILE, DIRECTORY)) {\n String path = removeStart(f.getPath(), directory.getAbsolutePath() + File.separator);\n path = path.replace(File.separatorChar, '/');\n ZipEntry e = new ZipEntry(path);\n zos.putNextEntry(e);\n Files.asByteSource(f).copyTo(zos);\n zos.closeEntry();\n }\n } finally {\n Closeables.close(zos, false);\n }\n}\n"