content
stringlengths
40
137k
"public TypeArgExpression resolveTypeArg(TypeVariableInfo typeVar) {\n for (TypeParamInfo.Method typeParam : typeParams) {\n if (typeParam.getName().equals(typeVar.getName())) {\n for (ParamInfo param : params) {\n if (param.getType().getKind() == ClassKind.CLASS_TYPE && param.getType().isParameterized()) {\n TypeInfo arg_ = ((ParameterizedTypeInfo) param.getType()).getArg(0);\n if (arg_.isVariable()) {\n TypeVariableInfo ttt = (TypeVariableInfo) arg_;\n if (ttt.getParam().equals(typeParam)) {\n return new TypeArgExpression(TypeArgExpression.CLASS_TYPE_ARG, ttt, param, 0);\n }\n }\n } else if (param.getType().getKind() == ClassKind.API && param.getType().isParameterized()) {\n ParameterizedTypeInfo type = (ParameterizedTypeInfo) param.getType();\n int index = 0;\n for (TypeInfo i : type.getArgs()) {\n if (i instanceof TypeVariableInfo) {\n TypeVariableInfo tt = (TypeVariableInfo) i;\n if (tt.getParam().equals(typeParam)) {\n return new TypeArgExpression(TypeArgExpression.API_ARG, tt, param, index);\n }\n }\n index++;\n }\n }\n }\n return null;\n }\n }\n return null;\n}\n"
"public View getView(final int position, View conView, ViewGroup parent) {\n if (conView == null) {\n conView = View.inflate(ctx, R.layout.conversation_add_members_item, null);\n }\n String userId = datas.get(position);\n LeanchatUser user = CacheService.lookupUser(userId);\n ImageView avatarView = ViewHolder.findViewById(conView, R.id.avatar);\n TextView nameView = ViewHolder.findViewById(conView, R.id.username);\n ImageLoader.getInstance().displayImage(((LeanchatUser) user).getAvatarUrl(), avatarView, PhotoUtils.avatarImageOptions);\n nameView.setText(user.getUsername());\n CheckBox checkBox = ViewHolder.findViewById(conView, R.id.checkbox);\n setCheckBox(checkBox, position);\n checkBox.setOnCheckedChangeListener(new CheckListener(position));\n return conView;\n}\n"
"public double getOffset(AnchorPoint anchor) {\n if (corr_.fPoint() == anchor)\n return line_.getCorridorInfo(corr_).offsetFrom_;\n if (corr_.tPoint() == anchor)\n return -line_.getCorridorInfo(corr_).offsetTo_;\n return -1;\n}\n"
"private static void setUpLocalRegistry() {\n System.setProperty(LOCAL_REGISTRY_FILE_KEY, \"String_Node_Str\");\n}\n"
"protected void saveSound(int i, JFileChooser chooser) {\n SoundFromCPPNUtil.saveRemixedFileFromCPPN(scores.get(i).individual.getPhenotype(), WAVDoubleArray, Parameters.parameters.integerParameter(\"String_Node_Str\"), FREQUENCY_DEFAULT, inputMultipliers, chooser.getSelectedFile().getName() + \"String_Node_Str\", format);\n}\n"
"public void registerHideableHeaderView(View hideableHeaderView) {\n if (mHeaderViewImpl != null) {\n mHeaderViewImpl.registerHideableHeaderView(hideableHeaderView);\n }\n}\n"
"public Result transfer(byte[] from, byte[] to, Na values, String password, String remark) {\n try {\n Result<Account> accountResult = accountService.getAccount(from);\n if (accountResult.isFailed()) {\n return accountResult;\n }\n Account account = accountResult.getData();\n if (accountService.isEncrypted(account).isSuccess() && account.isLocked()) {\n AssertUtil.canNotEmpty(password, \"String_Node_Str\");\n Result passwordResult = accountService.validPassword(account, password);\n if (passwordResult.isFailed()) {\n return passwordResult;\n }\n }\n TransferTransaction tx = new TransferTransaction();\n if (StringUtils.isNotBlank(remark)) {\n try {\n tx.setRemark(remark.getBytes(NulsConfig.DEFAULT_ENCODING));\n } catch (UnsupportedEncodingException e) {\n Log.error(e);\n }\n }\n tx.setTime(TimeService.currentTimeMillis());\n CoinData coinData = new CoinData();\n Coin toCoin = new Coin(to, values);\n coinData.getTo().add(toCoin);\n CoinDataResult coinDataResult = getCoinData(from, values, tx.size() + P2PKHScriptSig.DEFAULT_SERIALIZE_LENGTH);\n if (!coinDataResult.isEnough()) {\n return Result.getFailed(LedgerErrorCode.BALANCE_NOT_ENOUGH);\n }\n coinData.setFrom(coinDataResult.getCoinList());\n if (coinDataResult.getChange() != null) {\n coinData.getTo().add(coinDataResult.getChange());\n }\n tx.setCoinData(coinData);\n tx.setHash(NulsDigestData.calcDigestData(tx.serializeForHash()));\n P2PKHScriptSig sig = new P2PKHScriptSig();\n sig.setPublicKey(account.getPubKey());\n sig.setSignData(accountService.signData(tx.getHash().serialize(), account, password));\n tx.setScriptSig(sig.serialize());\n Result saveResult = verifyAndSaveUnconfirmedTransaction(tx);\n if (saveResult.isFailed()) {\n return saveResult;\n }\n Result sendResult = transactionService.broadcastTx(tx);\n if (sendResult.isFailed()) {\n this.rollbackTransaction(tx);\n return sendResult;\n }\n return Result.getSuccess().setData(tx.getHash().getDigestHex());\n } catch (IOException e) {\n Log.error(e);\n return Result.getFailed(e.getMessage());\n } catch (NulsException e) {\n Log.error(e);\n return Result.getFailed(e.getErrorCode());\n }\n}\n"
"public JCacheCacheLoader<K, T> create() {\n if (this.instance != null) {\n return (JCacheCacheLoader<K, T>) this.instance;\n } else {\n try {\n this.instance = new JCacheCacheLoader<>(DataStoreFactory.getDataStore(keyClass, persistentClass, new Configuration()));\n } catch (GoraException ex) {\n LOG.error(\"String_Node_Str\", ex);\n return null;\n }\n return (JCacheCacheLoader<K, T>) this.instance;\n }\n}\n"
"public double[] geoFromPixel(final double l, final double p) throws GeoLocationException {\n try {\n double[] results = new double[2];\n double lon = 0;\n double lat = 0;\n double t0 = 0;\n int idxStartT0 = 0;\n if (meta.getType().equalsIgnoreCase(\"String_Node_Str\") && meta.getProductType().equalsIgnoreCase(\"String_Node_Str\") && (meta.getMode().equalsIgnoreCase(\"String_Node_Str\") || meta.getMode().equalsIgnoreCase(\"String_Node_Str\"))) {\n double timeRef = meta.getOrbitStatePosVelox().get(0).timeStampInitSeconds - orbitInterpolation.getSecondsDiffFromRefTime()[0];\n } else {\n double t01 = (orbitInterpolation.getZeroDopplerTimeFirstRef()) * (meta.getNlines() - 1 - l);\n double t02 = orbitInterpolation.getZeroDopplerTimeLastRef() * l;\n t0 = (t01 + t02) / (meta.getNlines() - 1);\n for (idxStartT0 = 0; idxStartT0 < orbitInterpolation.getTimeStampInterp().size(); idxStartT0++) {\n if (orbitInterpolation.getTimeStampInterp().get(idxStartT0) >= t0) {\n break;\n }\n }\n if (idxStartT0 == statepVecInterp.size())\n idxStartT0--;\n }\n final double[] pT0 = statepVecInterp.get(idxStartT0);\n final double[] vT0 = statevVecInterp.get(idxStartT0);\n double distance = 0;\n if (meta.isPixelTimeOrderingAscending()) {\n distance = p * meta.getSamplePixelSpacing() - meta.getGroundRangeOrigin();\n } else {\n distance = (meta.getNumberOfSamplesPerLine() - 1 - p) * meta.getSamplePixelSpacing() - meta.getGroundRangeOrigin();\n }\n if (coordConv != null) {\n double zeroDopplerTime = t0;\n double timeRef = meta.getOrbitStatePosVelox().get(0).timeStampInitSeconds - orbitInterpolation.getSecondsDiffFromRefTime()[0];\n double[] groundToSlantRangePolyTimesSeconds = new double[coordConv.length];\n int index = 0;\n for (S1Metadata.CoordinateConversion cc : coordConv) {\n groundToSlantRangePolyTimesSeconds[index] = cc.groundToSlantRangePolyTimesSeconds - timeRef;\n index++;\n }\n int idx = 0;\n if (zeroDopplerTime < groundToSlantRangePolyTimesSeconds[0]) {\n idx = 1;\n } else if (zeroDopplerTime > groundToSlantRangePolyTimesSeconds[groundToSlantRangePolyTimesSeconds.length - 1]) {\n idx = groundToSlantRangePolyTimesSeconds.length - 2;\n } else {\n for (idx = groundToSlantRangePolyTimesSeconds.length - 1; idx > 0; idx--) {\n if (groundToSlantRangePolyTimesSeconds[idx] < zeroDopplerTime)\n break;\n }\n }\n double factor1 = (groundToSlantRangePolyTimesSeconds[idx + 1] - zeroDopplerTime) / (groundToSlantRangePolyTimesSeconds[idx + 1] - groundToSlantRangePolyTimesSeconds[idx]);\n double factor2 = (zeroDopplerTime - groundToSlantRangePolyTimesSeconds[idx]) / (groundToSlantRangePolyTimesSeconds[idx + 1] - groundToSlantRangePolyTimesSeconds[idx]);\n double[] groundToSlantRangeCoefficientsInterp = ArrayUtils.clone(coordConv[idx].groundToSlantRangeCoefficients);\n double[] groundToSlantRangeCoefficientsInterp2 = coordConv[idx + 1].groundToSlantRangeCoefficients;\n for (int idCoeff = 0; idCoeff < groundToSlantRangeCoefficientsInterp.length; idCoeff++) {\n groundToSlantRangeCoefficientsInterp[idCoeff] = factor1 * groundToSlantRangeCoefficientsInterp[idCoeff] + factor2 * groundToSlantRangeCoefficientsInterp2[idCoeff];\n }\n double[] slantToGroundRangeCoefficientsInterp = ArrayUtils.clone(coordConv[idx].slantToGroundRangeCoefficients);\n double[] slantToGroundRangeCoefficientsInterp2 = coordConv[idx + 1].slantToGroundRangeCoefficients;\n for (int idCoeff = 0; idCoeff < slantToGroundRangeCoefficientsInterp.length; idCoeff++) {\n slantToGroundRangeCoefficientsInterp[idCoeff] = factor1 * slantToGroundRangeCoefficientsInterp[idCoeff] + factor2 * slantToGroundRangeCoefficientsInterp2[idCoeff];\n }\n int nCoeffs = groundToSlantRangeCoefficientsInterp.length;\n int[] vExps = new int[nCoeffs];\n for (int i = 0; i < nCoeffs; i++) {\n vExps[i] = i;\n }\n double tmpD = distance - meta.getGroundRangeOrigin();\n double[] pows = MathUtil.powValue2Coeffs(tmpD, vExps);\n double sRdist = MathUtil.dot(groundToSlantRangeCoefficientsInterp, pows);\n logger.debug(\"String_Node_Str\" + sRdist);\n double normPt0 = MathUtil.norm(pT0);\n double vRadial = MathUtil.vectorProd1XN(vT0, pT0) / normPt0;\n double vTangential = FastMath.sqrt(FastMath.pow(MathUtil.norm(vT0), 2) - FastMath.pow(vRadial, 2));\n double tanPsi = vRadial / vTangential;\n double[] zsUnit = MathUtil.divVectByVal(pT0, -normPt0);\n double[] vTmp = MathUtil.crossProd3x3(zsUnit, vT0);\n double[] ysUnit = MathUtil.divVectByVal(vTmp, MathUtil.norm(vTmp));\n double[] xsUnit = MathUtil.crossProd3x3(ysUnit, zsUnit);\n double pH = 0;\n double rEarth = normPt0 / FastMath.sqrt((pT0[0] * pT0[0] + pT0[1] * pT0[1]) / GeoUtils.semiMajorAxis2 + (pT0[2] * pT0[2]) / GeoUtils.semiMinorAxis2);\n for (int iidx = 0; iidx < 2; iidx++) {\n rEarth = rEarth + pH;\n double rEarthOld = rEarth;\n double rEarthChange = 100000;\n double[] q = new double[3];\n for (; rEarthChange > 0.1; ) {\n double Rz = (normPt0 * normPt0 + sRdist * sRdist - rEarth * rEarth) / (2 * normPt0);\n double Rx = Rz * tanPsi;\n double Ry = FastMath.sqrt(sRdist * sRdist - Rz * Rz - Rx * Rx);\n if (!meta.getAntennaPointing().equalsIgnoreCase(\"String_Node_Str\")) {\n Ry = -Ry;\n }\n double[][] sRvect = new double[][] { { Rx }, { Ry }, { Rz - normPt0 } };\n double[][] qbig = new double[][] { xsUnit, ysUnit, zsUnit };\n qbig = MathUtil.transpose(qbig);\n double[][] qmat = MathUtil.multiplyMatrix(qbig, sRvect);\n q[0] = qmat[0][0];\n q[1] = qmat[1][0];\n q[2] = qmat[2][0];\n rEarth = MathUtil.norm(q) / FastMath.sqrt((q[0] * q[0] + q[1] * q[1]) / GeoUtils.semiMajorAxis2 + (q[2] * q[2] / GeoUtils.semiMinorAxis2)) + pH;\n rEarthChange = FastMath.abs(rEarth - rEarthOld);\n rEarthOld = rEarth;\n }\n lon = FastMath.atan2(q[1], q[0]) * 180 / FastMath.PI;\n double lattmp = FastMath.asin(q[2] / FastMath.sqrt(q[0] * q[0] + q[1] * q[1] + q[2] * q[2]));\n lat = FastMath.atan(FastMath.tan(lattmp) * FastMath.pow((GeoUtils.semiMajorAxis + pH), 2) / FastMath.pow((GeoUtils.semiMinorAxis + pH), 2)) * 180 / FastMath.PI;\n pH = GeoUtils.getGeoidH(lon, lat);\n }\n }\n logger.debug(\"String_Node_Str\" + lat + \"String_Node_Str\" + lon);\n results[0] = lon;\n results[1] = lat;\n return results;\n } catch (MathException me) {\n throw new GeoLocationException(GeoLocationException.MSG_CONV_FROM_PIXEL_TO_GEO + \"String_Node_Str\" + me.getMessage());\n }\n}\n"
"public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) {\n if (!((Token) offendingSymbol).getText().trim().isEmpty()) {\n errors.add(new Exception(String.format(\"String_Node_Str\", line, charPositionInLine, msg)));\n }\n}\n"
"public void setValueAt(Object editedValue, int row, int column) {\n if (tableFormat instanceof WritableTableFormat) {\n swingThreadSource.getReadWriteLock().writeLock().lock();\n try {\n final WritableTableFormat<E> writableTableFormat = (WritableTableFormat<E>) tableFormat;\n final E baseObject = swingThreadSource.get(row);\n final E updatedObject = writableTableFormat.setColumnValue(baseObject, editedValue, column);\n if (updatedObject != null) {\n final boolean baseObjectHasNotMoved = row < this.getRowCount() && swingThreadSource.get(row) == baseObject;\n if (baseObjectHasNotMoved)\n swingThreadSource.set(row, updatedObject);\n }\n } finally {\n swingThreadSource.getReadWriteLock().writeLock().unlock();\n }\n } else {\n throw new UnsupportedOperationException(\"String_Node_Str\");\n }\n}\n"
"public HmDatapointInfo parse(Object[] message) throws IOException {\n String address;\n Integer channel = 0;\n String addressWithChannel = toString(message[1]);\n if (\"String_Node_Str\".equals(addressWithChannel)) {\n address = HmDevice.ADDRESS_GATEWAY_EXTRAS;\n channel = HmChannel.CHANNEL_NUMBER_VARIABLE;\n } else {\n String[] configParts = StringUtils.trimToEmpty(addressWithChannel).split(\"String_Node_Str\");\n address = getSanitizedAddress(configParts[0]);\n if (configParts.length > 1) {\n channel = NumberUtils.createInteger(configParts[1]);\n }\n }\n String name = toString(message[2]);\n value = message[3];\n return new HmDatapointInfo(address, HmParamsetType.VALUES, channel, name);\n}\n"
"public int getContentX() {\n return PropertyUtil.getDimensionValue(style.getProperty(IStyle.STYLE_BORDER_LEFT_WIDTH), width) + PropertyUtil.getDimensionValue(style.getProperty(IStyle.STYLE_PADDING_LEFT), width);\n}\n"
"public final No_brackets_or_semicolonContext no_brackets_or_semicolon() throws RecognitionException {\n No_brackets_or_semicolonContext _localctx = new No_brackets_or_semicolonContext(_ctx, getState());\n enterRule(_localctx, 30, RULE_no_brackets_or_semicolon);\n int _la;\n try {\n enterOuterAlt(_localctx, 1);\n {\n setState(232);\n _la = _input.LA(1);\n if (_la <= 0 || ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << 12) | (1L << 29) | (1L << 46))) != 0))) {\n _errHandler.recoverInline(this);\n }\n consume();\n }\n } catch (RecognitionException re) {\n _localctx.exception = re;\n _errHandler.reportError(this, re);\n _errHandler.recover(this, re);\n } finally {\n exitRule();\n }\n return _localctx;\n}\n"
"protected void insert(Widget w, Element container, int beforeIndex) {\n if (w.getParent() == this) {\n return;\n }\n adopt(w, container);\n getChildren().insert(w, beforeIndex);\n return beforeIndex;\n}\n"
"protected By buildDefaultBy() {\n AnnotatedElement annotatedElement = annotatedElementContainer.getAnnotated();\n By defaultBy = null;\n FindBy findBy = annotatedElement.getAnnotation(FindBy.class);\n if (findBy != null) {\n defaultBy = super.buildByFromFindBy(findBy);\n if (defaultBy == null) {\n FindBys findBys = annotatedElement.getAnnotation(FindBys.class);\n if (findBys != null)\n defaultBy = super.buildByFromFindBys(findBys);\n }\n if (defaultBy == null) {\n FindAll findAll = annotatedElement.getAnnotation(FindAll.class);\n if (findAll != null)\n defaultBy = super.buildBysFromFindByOneOf(findAll);\n }\n return defaultBy;\n}\n"
"public byte[] getAvgSpeed() {\n return IKEGetRequest(0x0A, 0xF4);\n}\n"
"public static ComponentAlias ref(Var var, Var ref) {\n return new ComponentAlias(ref, Collections.<Arg>singletonList(null), var);\n}\n"
"public void setUp() throws MojoExecutionException, MojoFailureException {\n processLocales();\n if (sourcePaths == null) {\n List<String> sourceRoots;\n if (project.getExecutionProject() != null) {\n sourceRoots = project.getExecutionProject().getCompileSourceRoots();\n } else {\n sourceRoots = project.getCompileSourceRoots();\n }\n List<File> sources = getValidSourceRoots(sourceRoots);\n if (compiledLocales != null) {\n sources.add(new File(resourceBundlePath));\n }\n sourcePaths = sources.toArray(new File[sources.size()]);\n }\n if (configFile == null) {\n List<Resource> resources = build.getResources();\n for (Resource resource : resources) {\n File cfg = new File(resource.getDirectory(), \"String_Node_Str\");\n if (cfg.exists()) {\n configFile = cfg;\n break;\n }\n }\n }\n if (configFile == null) {\n getLog().debug(\"String_Node_Str\");\n configFile = MavenUtils.getConfigFile(build);\n }\n if (!configFile.exists()) {\n throw new MojoExecutionException(\"String_Node_Str\" + configFile);\n } else {\n getLog().info(\"String_Node_Str\" + configFile);\n }\n if (services == null) {\n List<Resource> resources = build.getResources();\n for (Resource resource : resources) {\n File cfg = new File(resource.getDirectory(), \"String_Node_Str\");\n if (cfg.exists()) {\n services = cfg;\n break;\n }\n }\n }\n if (rslUrls == null) {\n rslUrls = new String[] { \"String_Node_Str\" };\n }\n if (policyFileUrls == null) {\n policyFileUrls = new String[] { \"String_Node_Str\" };\n }\n if (metadata == null) {\n metadata = new Metadata();\n if (project.getDevelopers() != null && !project.getDevelopers().isEmpty()) {\n List<Developer> developers = project.getDevelopers();\n for (Developer d : developers) {\n metadata.setCreator(d.getName());\n break;\n }\n }\n if (project.getContributors() != null && !project.getContributors().isEmpty()) {\n List<Contributor> contributors = project.getContributors();\n for (Contributor c : contributors) {\n metadata.setContributor(c.getName());\n break;\n }\n }\n metadata.setDate(new Date());\n }\n if (licenses == null) {\n licenses = getLicenses();\n }\n validateLocales(runtimeLocales);\n validateLocales(compiledLocales);\n configuration = builder.getDefaultConfiguration();\n configure();\n compilationData = new File(build.getDirectory(), build.getFinalName() + \"String_Node_Str\");\n setMavenPathResolver();\n}\n"
"public List<? extends FirewallRule> searchStaticNatRules(Long ipId, Long id, Long vmId, Long start, Long size, String accountName, Long domainId, Long projectId, boolean isRecursive, boolean listAll) {\n Account caller = UserContext.current().getCaller();\n List<Long> permittedAccounts = new ArrayList<Long>();\n if (ipId != null) {\n IPAddressVO ipAddressVO = _ipAddressDao.findById(ipId);\n if (ipAddressVO == null || !ipAddressVO.readyToUse()) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + ipId + \"String_Node_Str\");\n }\n _accountMgr.checkAccess(caller, null, true, ipAddressVO);\n }\n Ternary<Long, Boolean, ListProjectResourcesCriteria> domainIdRecursiveListProject = new Ternary<Long, Boolean, ListProjectResourcesCriteria>(domainId, isRecursive, null);\n _accountMgr.buildACLSearchParameters(caller, id, accountName, projectId, permittedAccounts, domainIdRecursiveListProject, listAll, false);\n domainId = domainIdRecursiveListProject.first();\n isRecursive = domainIdRecursiveListProject.second();\n ListProjectResourcesCriteria listProjectResourcesCriteria = domainIdRecursiveListProject.third();\n Filter filter = new Filter(PortForwardingRuleVO.class, \"String_Node_Str\", false, start, size);\n SearchBuilder<FirewallRuleVO> sb = _firewallDao.createSearchBuilder();\n _accountMgr.buildACLSearchBuilder(sb, domainId, isRecursive, permittedAccounts, listProjectResourcesCriteria);\n sb.and(\"String_Node_Str\", sb.entity().getSourceIpAddressId(), Op.EQ);\n sb.and(\"String_Node_Str\", sb.entity().getPurpose(), Op.EQ);\n sb.and(\"String_Node_Str\", sb.entity().getId(), Op.EQ);\n if (vmId != null) {\n SearchBuilder<IPAddressVO> ipSearch = _ipAddressDao.createSearchBuilder();\n ipSearch.and(\"String_Node_Str\", ipSearch.entity().getAssociatedWithVmId(), Op.EQ);\n sb.join(\"String_Node_Str\", ipSearch, sb.entity().getSourceIpAddressId(), ipSearch.entity().getId(), JoinBuilder.JoinType.INNER);\n }\n SearchCriteria<FirewallRuleVO> sc = sb.create();\n _accountMgr.buildACLSearchCriteria(sc, domainId, isRecursive, permittedAccounts, listProjectResourcesCriteria);\n sc.setParameters(\"String_Node_Str\", Purpose.StaticNat);\n if (id != null) {\n sc.setParameters(\"String_Node_Str\", id);\n }\n if (ipId != null) {\n sc.setParameters(\"String_Node_Str\", ipId);\n }\n if (vmId != null) {\n sc.setJoinParameters(\"String_Node_Str\", \"String_Node_Str\", vmId);\n }\n return _firewallDao.search(sc, filter);\n}\n"
"public String getAtomSequence() {\n String prop = System.getProperty(PDBFileReader.LOAD_CHEM_COMP_PROPERTY);\n if (prop != null && prop.equalsIgnoreCase(\"String_Node_Str\")) {\n List<Group> groups = getAtomGroups();\n StringBuilder sequence = new StringBuilder();\n for (Group g : groups) {\n ChemComp cc = g.getChemComp();\n if (PolymerType.PROTEIN_ONLY.contains(cc.getPolymerType()) || PolymerType.POLYNUCLEOTIDE_ONLY.contains(cc.getPolymerType())) {\n String oneLetter = ChemCompGroupFactory.getOneLetterCode(cc);\n if (oneLetter == null)\n oneLetter = Character.toString(StructureTools.UNKNOWN_GROUP_LABEL);\n sequence.append(oneLetter);\n }\n }\n return sequence.toString();\n }\n List<Group> aminos = getAtomGroups(GroupType.AMINOACID);\n StringBuilder sequence = new StringBuilder();\n for (Group amino : aminos) {\n AminoAcid a = (AminoAcid) amino;\n sequence.append(a.getAminoType());\n }\n return sequence.toString();\n}\n"
"public void refreshUserInfos(boolean skipPendingTest, final ApiCallback<Void> callback) {\n if (!skipPendingTest) {\n boolean isPending;\n synchronized (this) {\n isPending = (null != mRefreshListeners);\n if (null == mRefreshListeners) {\n mRefreshListeners = new ArrayList<>();\n }\n if (null != callback) {\n mRefreshListeners.add(callback);\n }\n }\n if (isPending) {\n return;\n }\n }\n if (!mIsDislayNameRefreshed) {\n refreshUserDisplayname();\n return;\n }\n if (!mIsAvatarRefreshed) {\n refreshUserAvatarUrl();\n return;\n }\n if (!mAre3PIdsLoaded) {\n refreshThirdPartyIdentifiers();\n return;\n }\n synchronized (this) {\n if (null != mRefreshListeners) {\n for (ApiCallback<Void> listener : mRefreshListeners) {\n try {\n listener.onSuccess(null);\n } catch (Exception e) {\n }\n }\n }\n mRefreshListeners = null;\n }\n}\n"
"public void testAppendWithoutSync() throws IOException {\n File temp = File.createTempFile(LOGFILE, \"String_Node_Str\");\n SimpleLog log = new SimpleLog(temp);\n log.append(new Transaction(new Zxid(0, 0), ByteBuffer.wrap(\"String_Node_Str\".getBytes())));\n Log.LogIterator iter = log.getIterator(new Zxid(0, 0));\n Assert.assertEquals(iter.next().getZxid(), new Zxid(0, 0));\n}\n"
"public boolean OnInflateProperty(String nameSpace, String attrName, String attrValue) {\n String value = null;\n if (NAMESPACE_ANDROID.equals(nameSpace)) {\n if (ATTRIBUTE_SRC.equals(attrName)) {\n if (attrValue.startsWith(\"String_Node_Str\")) {\n src = IFlaterTools.getBackgroundColor(attrValue, getContext());\n } else if (attrValue.startsWith(\"String_Node_Str\")) {\n imageSrcuri = IFlaterTools.getDrawableInternet(attrValue);\n } else {\n src = IFlaterTools.getDrawableLocal(attrValue, getContext());\n }\n }\n } else {\n if ((NAMESPACE_ANDROID + \"String_Node_Str\" + ATTRIBUTE_SRC).equals(attrName)) {\n src = IFlaterTools.getDrawableLocal(attrValue, getContext());\n }\n }\n return false;\n}\n"
"private int indexOfDelegatesToTarget(Parameter[] parameters, String target) {\n for (int i = 0, n = parameters.length; i < n; i += 1) {\n List<AnnotationNode> annotations = parameters[i].getAnnotations();\n if (annotations != null && !annotations.isEmpty()) {\n for (AnnotationNode annotation : annotations) {\n if (annotation.getClassNode().getName().equals(\"String_Node_Str\")) {\n String value = (String) evaluateExpression(castX(STRING_CLASS_NODE, annotation.getMember(\"String_Node_Str\")), config);\n if (value.equals(target)) {\n return i;\n }\n }\n }\n }\n }\n return -1;\n}\n"
"int adjustWallpaperWindowsLocked() {\n mInnerFields.mWallpaperMayChange = false;\n boolean targetChanged = false;\n final DisplayInfo displayInfo = getDefaultDisplayContentLocked().getDisplayInfo();\n final int dw = displayInfo.appWidth;\n final int dh = displayInfo.appHeight;\n final WindowList windows = getDefaultWindowListLocked();\n int N = windows.size();\n WindowState w = null;\n WindowState foundW = null;\n int foundI = 0;\n WindowState topCurW = null;\n int topCurI = 0;\n int windowDetachedI = -1;\n int i = N;\n while (i > 0) {\n i--;\n w = windows.get(i);\n if ((w.mAttrs.type == TYPE_WALLPAPER)) {\n if (topCurW == null) {\n topCurW = w;\n topCurI = i;\n }\n continue;\n }\n topCurW = null;\n if (w != mAnimator.mWindowDetachedWallpaper && w.mAppToken != null) {\n if (w.mAppToken.hidden && w.mAppToken.mAppAnimator.animation == null) {\n if (DEBUG_WALLPAPER)\n Slog.v(TAG, \"String_Node_Str\" + w);\n continue;\n }\n }\n if (DEBUG_WALLPAPER)\n Slog.v(TAG, \"String_Node_Str\" + i + \"String_Node_Str\" + w + \"String_Node_Str\" + w.isOnScreen() + \"String_Node_Str\" + w.mWinAnimator.mDrawState);\n if ((w.mAttrs.flags & FLAG_SHOW_WALLPAPER) != 0 && w.isOnScreen() && (mWallpaperTarget == w || w.isDrawFinishedLw())) {\n if (DEBUG_WALLPAPER)\n Slog.v(TAG, \"String_Node_Str\" + i + \"String_Node_Str\" + w);\n foundW = w;\n foundI = i;\n if (w == mWallpaperTarget && w.mWinAnimator.isAnimating()) {\n if (DEBUG_WALLPAPER)\n Slog.v(TAG, \"String_Node_Str\" + w + \"String_Node_Str\");\n continue;\n }\n break;\n } else if (w == mAnimator.mWindowDetachedWallpaper) {\n windowDetachedI = i;\n }\n }\n if (foundW == null && windowDetachedI >= 0) {\n if (DEBUG_WALLPAPER_LIGHT)\n Slog.v(TAG, \"String_Node_Str\" + i + \"String_Node_Str\" + w);\n foundW = w;\n foundI = windowDetachedI;\n }\n if (mWallpaperTarget != foundW && (mLowerWallpaperTarget == null || mLowerWallpaperTarget != foundW)) {\n if (DEBUG_WALLPAPER_LIGHT) {\n Slog.v(TAG, \"String_Node_Str\" + foundW + \"String_Node_Str\" + mWallpaperTarget);\n }\n mLowerWallpaperTarget = null;\n mUpperWallpaperTarget = null;\n WindowState oldW = mWallpaperTarget;\n mWallpaperTarget = foundW;\n targetChanged = true;\n if (foundW != null && oldW != null) {\n boolean oldAnim = oldW.isAnimatingLw();\n boolean foundAnim = foundW.isAnimatingLw();\n if (DEBUG_WALLPAPER_LIGHT) {\n Slog.v(TAG, \"String_Node_Str\" + foundAnim + \"String_Node_Str\" + oldAnim);\n }\n if (foundAnim && oldAnim) {\n int oldI = windows.indexOf(oldW);\n if (DEBUG_WALLPAPER_LIGHT) {\n Slog.v(TAG, \"String_Node_Str\" + foundI + \"String_Node_Str\" + oldI);\n }\n if (oldI >= 0) {\n if (DEBUG_WALLPAPER_LIGHT) {\n Slog.v(TAG, \"String_Node_Str\" + oldI + \"String_Node_Str\" + oldW + \"String_Node_Str\" + foundI + \"String_Node_Str\" + foundW);\n }\n if (foundW.mAppToken != null && foundW.mAppToken.hiddenRequested) {\n if (DEBUG_WALLPAPER_LIGHT) {\n Slog.v(TAG, \"String_Node_Str\");\n }\n mWallpaperTarget = oldW;\n foundW = oldW;\n foundI = oldI;\n } else if (foundI > oldI) {\n if (DEBUG_WALLPAPER_LIGHT) {\n Slog.v(TAG, \"String_Node_Str\");\n }\n mUpperWallpaperTarget = foundW;\n mLowerWallpaperTarget = oldW;\n foundW = oldW;\n foundI = oldI;\n } else {\n if (DEBUG_WALLPAPER_LIGHT) {\n Slog.v(TAG, \"String_Node_Str\");\n }\n mUpperWallpaperTarget = oldW;\n mLowerWallpaperTarget = foundW;\n }\n }\n }\n }\n } else if (mLowerWallpaperTarget != null) {\n if (!mLowerWallpaperTarget.isAnimatingLw() || !mUpperWallpaperTarget.isAnimatingLw()) {\n if (DEBUG_WALLPAPER_LIGHT) {\n Slog.v(TAG, \"String_Node_Str\");\n }\n mLowerWallpaperTarget = null;\n mUpperWallpaperTarget = null;\n mWallpaperTarget = foundW;\n targetChanged = true;\n }\n }\n boolean visible = foundW != null;\n if (visible) {\n visible = isWallpaperVisible(foundW);\n if (DEBUG_WALLPAPER)\n Slog.v(TAG, \"String_Node_Str\" + visible);\n mWallpaperAnimLayerAdjustment = (mLowerWallpaperTarget == null && foundW.mAppToken != null) ? foundW.mAppToken.mAppAnimator.animLayerAdjustment : 0;\n final int maxLayer = mPolicy.getMaxWallpaperLayer() * TYPE_LAYER_MULTIPLIER + TYPE_LAYER_OFFSET;\n while (foundI > 0) {\n WindowState wb = windows.get(foundI - 1);\n if (wb.mBaseLayer < maxLayer && wb.mAttachedWindow != foundW && (foundW.mAttachedWindow == null || wb.mAttachedWindow != foundW.mAttachedWindow) && (wb.mAttrs.type != TYPE_APPLICATION_STARTING || foundW.mToken == null || wb.mToken != foundW.mToken)) {\n break;\n }\n foundW = wb;\n foundI--;\n }\n } else {\n if (DEBUG_WALLPAPER)\n Slog.v(TAG, \"String_Node_Str\");\n }\n if (foundW == null && topCurW != null) {\n foundW = topCurW;\n foundI = topCurI + 1;\n } else {\n foundW = foundI > 0 ? windows.get(foundI - 1) : null;\n }\n if (visible) {\n if (mWallpaperTarget.mWallpaperX >= 0) {\n mLastWallpaperX = mWallpaperTarget.mWallpaperX;\n mLastWallpaperXStep = mWallpaperTarget.mWallpaperXStep;\n }\n if (mWallpaperTarget.mWallpaperY >= 0) {\n mLastWallpaperY = mWallpaperTarget.mWallpaperY;\n mLastWallpaperYStep = mWallpaperTarget.mWallpaperYStep;\n }\n }\n int changed = 0;\n int curTokenIndex = mWallpaperTokens.size();\n while (curTokenIndex > 0) {\n curTokenIndex--;\n WindowToken token = mWallpaperTokens.get(curTokenIndex);\n if (token.hidden == visible) {\n if (DEBUG_WALLPAPER_LIGHT)\n Slog.d(TAG, \"String_Node_Str\" + token + \"String_Node_Str\" + !visible);\n changed |= ADJUST_WALLPAPER_VISIBILITY_CHANGED;\n token.hidden = !visible;\n getDefaultDisplayContentLocked().layoutNeeded = true;\n }\n int curWallpaperIndex = token.windows.size();\n while (curWallpaperIndex > 0) {\n curWallpaperIndex--;\n WindowState wallpaper = token.windows.get(curWallpaperIndex);\n if (visible) {\n updateWallpaperOffsetLocked(wallpaper, dw, dh, false);\n }\n dispatchWallpaperVisibility(wallpaper, visible);\n wallpaper.mWinAnimator.mAnimLayer = wallpaper.mLayer + mWallpaperAnimLayerAdjustment;\n if (DEBUG_LAYERS || DEBUG_WALLPAPER_LIGHT)\n Slog.v(TAG, \"String_Node_Str\" + wallpaper + \"String_Node_Str\" + wallpaper.mWinAnimator.mAnimLayer);\n if (wallpaper == foundW) {\n foundI--;\n foundW = foundI > 0 ? windows.get(foundI - 1) : null;\n continue;\n }\n int oldIndex = windows.indexOf(wallpaper);\n if (oldIndex >= 0) {\n if (DEBUG_WINDOW_MOVEMENT)\n Slog.v(TAG, \"String_Node_Str\" + oldIndex + \"String_Node_Str\" + wallpaper);\n windows.remove(oldIndex);\n mWindowsChanged = true;\n if (oldIndex < foundI) {\n foundI--;\n }\n }\n if (DEBUG_WALLPAPER_LIGHT || DEBUG_WINDOW_MOVEMENT || DEBUG_ADD_REMOVE) {\n Slog.v(TAG, \"String_Node_Str\" + wallpaper + \"String_Node_Str\" + oldIndex + \"String_Node_Str\" + 0);\n }\n windows.add(foundI, wallpaper);\n mWindowsChanged = true;\n changed |= ADJUST_WALLPAPER_LAYERS_CHANGED;\n }\n }\n final TaskStack targetStack = mWallpaperTarget == null ? null : mWallpaperTarget.getStack();\n if ((changed & ADJUST_WALLPAPER_LAYERS_CHANGED) != 0 && targetStack != null && !targetStack.isHomeStack()) {\n for (i = foundI - 1; i >= 0; --i) {\n WindowState win = windows.get(i);\n if (!win.isVisibleLw()) {\n continue;\n }\n final TaskStack winStack = win.getStack();\n if (winStack != null && !winStack.isHomeStack() && winStack != targetStack) {\n windows.remove(i);\n windows.add(foundI + 1, win);\n }\n }\n }\n if (targetChanged && DEBUG_WALLPAPER_LIGHT) {\n Slog.d(TAG, \"String_Node_Str\" + mWallpaperTarget + \"String_Node_Str\" + mLowerWallpaperTarget + \"String_Node_Str\" + mUpperWallpaperTarget);\n }\n return changed;\n}\n"
"public void endGameInfo(Match match) {\n if (!killed) {\n User user = UserManager.getInstance().getUser(userId);\n if (user != null) {\n user.fireCallback(new ClientCallback(\"String_Node_Str\", game.getId(), getGameEndView(playerId, table)));\n }\n }\n}\n"
"public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException {\n enlistResource();\n return getDelegate().prepareStatement(sql, columnNames);\n}\n"
"public void createMovienameCfgs() throws IOException {\n String[] prefixes = { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" };\n for (String prefix : prefixes) {\n PrintWriter pw = new PrintWriter(new FileWriter(\"String_Node_Str\" + prefix + \"String_Node_Str\"));\n pw.println(\"String_Node_Str\" + cfg.getMoviePath() + \"String_Node_Str\" + prefix + \"String_Node_Str\");\n pw.close();\n }\n}\n"
"public void processClass(ClassNode root, ClassNode node) {\n if (node.type == ClassNode.CLASS_LAMBDA && !node.lambda_information.is_method_reference) {\n ClassNode node_content = DecompilerContext.getClassprocessor().getMapRootClasses().get(node.classStruct.qualifiedName);\n if (node_content != null && node_content.wrapper != null) {\n node_content.wrapper.getHideMembers().add(node.lambda_information.content_method_key);\n }\n }\n if (node.nested.isEmpty()) {\n return;\n }\n if (node.type != ClassNode.CLASS_LAMBDA) {\n computeLocalVarsAndDefinitions(node);\n checkNotFoundClasses(root, node);\n }\n int nameless = 0, synthetics = 0;\n for (ClassNode child : node.nested) {\n if ((child.type == ClassNode.CLASS_LOCAL || child.type == ClassNode.CLASS_MEMBER) && child.simpleName == null) {\n StructClass cl = child.classStruct;\n if (((child.access | cl.access_flags) & CodeConstants.ACC_SYNTHETIC) != 0 || cl.getAttributes().containsKey(\"String_Node_Str\")) {\n child.simpleName = \"String_Node_Str\" + (++synthetics);\n } else {\n DecompilerContext.getLogger().writeMessage(\"String_Node_Str\" + cl.qualifiedName + \"String_Node_Str\", IFernflowerLogger.WARNING);\n child.simpleName = \"String_Node_Str\" + (++nameless);\n }\n }\n }\n for (ClassNode child : node.nested) {\n if (child.type == ClassNode.CLASS_LAMBDA) {\n setLambdaVars(node, child);\n } else {\n if (child.type != ClassNode.CLASS_MEMBER || (child.access & CodeConstants.ACC_STATIC) == 0) {\n insertLocalVars(node, child);\n if (child.type == ClassNode.CLASS_LOCAL) {\n setLocalClassDefinition(node.wrapper.getMethods().getWithKey(child.enclosingMethod), child);\n }\n }\n }\n }\n for (ClassNode child : node.nested) {\n processClass(root, child);\n }\n}\n"
"public void activateRead() {\n if (isHollow) {\n GenericObject go = context.getNode().readGenericObject(def, oid);\n if (go != this) {\n throw DBLogger.newFatalInternal(\"String_Node_Str\");\n }\n }\n}\n"
"public void setSequenceDictionary(final SAMSequenceDictionary dictionary) {\n this.contigMetaData.clear();\n for (final SAMSequenceRecord record : dictionary.getSequences()) {\n contigMetaData.add(new VCFContigHeaderLine(record, record.getAssembly()));\n }\n this.mMetaData.addAll(contigMetaData);\n}\n"
"public void getTasksForUser(ActionRequest request, ActionResponse response) {\n List<Map<String, String>> dataList = new ArrayList<Map<String, String>>();\n LocalDate todayDate = Beans.get(GeneralService.class).getTodayDate();\n List<ProjectPlanningLine> linesList = Beans.get(ProjectPlanningLineRepository.class).all().filter(\"String_Node_Str\", AuthUtils.getUser().getId(), todayDate.getYear(), todayDate.getWeekOfWeekyear()).fetch();\n for (ProjectPlanningLine line : linesList) {\n if (line.getMonday().compareTo(BigDecimal.ZERO) != 0) {\n LocalDate date = new LocalDate().withYear(line.getYear()).withWeekOfWeekyear(line.getWeek()).withDayOfWeek(DateTimeConstants.MONDAY);\n if (date.isAfter(todayDate) || date.isEqual(todayDate)) {\n Map<String, String> map = new HashMap<String, String>();\n map.put(\"String_Node_Str\", line.getProjectTask().getFullName());\n map.put(\"String_Node_Str\", line.getProjectTask().getProject().getFullName());\n map.put(\"String_Node_Str\", date.toString());\n map.put(\"String_Node_Str\", line.getMonday().toString());\n dataList.add(map);\n }\n }\n if (line.getTuesday().compareTo(BigDecimal.ZERO) != 0) {\n LocalDate date = new LocalDate().withYear(line.getYear()).withWeekOfWeekyear(line.getWeek()).withDayOfWeek(DateTimeConstants.TUESDAY);\n if (date.isAfter(todayDate) || date.isEqual(todayDate)) {\n Map<String, String> map = new HashMap<String, String>();\n map.put(\"String_Node_Str\", line.getProjectTask().getFullName());\n map.put(\"String_Node_Str\", line.getProjectTask().getProject().getFullName());\n map.put(\"String_Node_Str\", date.toString());\n map.put(\"String_Node_Str\", line.getTuesday().toString());\n dataList.add(map);\n }\n }\n if (line.getWednesday().compareTo(BigDecimal.ZERO) != 0) {\n LocalDate date = new LocalDate().withYear(line.getYear()).withWeekOfWeekyear(line.getWeek()).withDayOfWeek(DateTimeConstants.WEDNESDAY);\n if (date.isAfter(todayDate) || date.isEqual(todayDate)) {\n Map<String, String> map = new HashMap<String, String>();\n map.put(\"String_Node_Str\", line.getProjectTask().getFullName());\n map.put(\"String_Node_Str\", line.getProjectTask().getProject().getFullName());\n map.put(\"String_Node_Str\", date.toString());\n map.put(\"String_Node_Str\", line.getWednesday().toString());\n dataList.add(map);\n }\n }\n if (line.getThursday().compareTo(BigDecimal.ZERO) != 0) {\n LocalDate date = new LocalDate().withYear(line.getYear()).withWeekOfWeekyear(line.getWeek()).withDayOfWeek(DateTimeConstants.THURSDAY);\n if (date.isAfter(todayDate) || date.isEqual(todayDate)) {\n Map<String, String> map = new HashMap<String, String>();\n map.put(\"String_Node_Str\", line.getProjectTask().getFullName());\n map.put(\"String_Node_Str\", line.getProjectTask().getProject().getFullName());\n map.put(\"String_Node_Str\", date.toString());\n map.put(\"String_Node_Str\", line.getThursday().toString());\n dataList.add(map);\n }\n }\n if (line.getFriday().compareTo(BigDecimal.ZERO) != 0) {\n LocalDate date = new LocalDate().withYear(line.getYear()).withWeekOfWeekyear(line.getWeek()).withDayOfWeek(DateTimeConstants.FRIDAY);\n if (date.isAfter(todayDate) || date.isEqual(todayDate)) {\n Map<String, String> map = new HashMap<String, String>();\n map.put(\"String_Node_Str\", line.getProjectTask().getFullName());\n map.put(\"String_Node_Str\", line.getProjectTask().getProject().getFullName());\n map.put(\"String_Node_Str\", date.toString());\n map.put(\"String_Node_Str\", line.getFriday().toString());\n dataList.add(map);\n }\n }\n if (line.getSaturday().compareTo(BigDecimal.ZERO) != 0) {\n LocalDate date = new LocalDate().withYear(line.getYear()).withWeekOfWeekyear(line.getWeek()).withDayOfWeek(DateTimeConstants.SATURDAY);\n if (date.isAfter(todayDate) || date.isEqual(todayDate)) {\n Map<String, String> map = new HashMap<String, String>();\n map.put(\"String_Node_Str\", line.getProjectTask().getFullName());\n map.put(\"String_Node_Str\", line.getProjectTask().getProject().getFullName());\n map.put(\"String_Node_Str\", date.toString());\n map.put(\"String_Node_Str\", line.getSaturday().toString());\n dataList.add(map);\n }\n }\n if (line.getSunday().compareTo(BigDecimal.ZERO) != 0) {\n LocalDate date = new LocalDate().withYear(line.getYear()).withWeekOfWeekyear(line.getWeek()).withDayOfWeek(DateTimeConstants.SUNDAY);\n if (date.isAfter(todayDate) || date.isEqual(todayDate)) {\n Map<String, String> map = new HashMap<String, String>();\n map.put(\"String_Node_Str\", line.getProjectTask().getFullName());\n map.put(\"String_Node_Str\", line.getProjectTask().getProject().getFullName());\n map.put(\"String_Node_Str\", date.toString());\n map.put(\"String_Node_Str\", line.getSunday().toString());\n dataList.add(map);\n }\n }\n }\n response.setData(dataList);\n}\n"
"public void createControl(Composite parent) {\n List<MetadataColumn> analysisColumns = this.selectPatternsWizard.getSsIndicator().getAnalyzedColumns();\n GridTableViewer tableView = new GridTableViewer(parent, SWT.NONE);\n this.table = tableView.getGrid();\n table.setHeaderVisible(true);\n table.setLinesVisible(true);\n for (ModelElement element : analysisColumns) {\n GridColumn tableCum = new GridColumn(table, SWT.CHECK);\n tableCum.setText(analysisColumn.getName());\n }\n tableView.setContentProvider(new PatternSelectContentProvider());\n tableView.setLabelProvider(new PatternSelectLabelProvider());\n this.tableInputList = organizeTableInput();\n tableView.setInput(tableInputList);\n for (GridColumn tableCum : table.getColumns()) {\n tableCum.pack();\n }\n inItitemCheck();\n this.setControl(parent);\n this.setPageComplete(true);\n}\n"
"public void toLevel(int level) {\n EnumFacing side = worldObj.getBlockState(getPos()).getValue(GenericBlock.FACING_HORIZ);\n BlockPos controllerPos = findBottomElevator();\n for (int y = controllerPos.getY(); y < worldObj.getHeight(); y++) {\n BlockPos pos2 = getPosAtY(controllerPos, y);\n if (worldObj.getBlockState(pos2).getBlock() == ElevatorSetup.elevatorBlock) {\n TileEntity te2 = worldObj.getTileEntity(pos2);\n if (te2 instanceof ElevatorTileEntity) {\n EnumFacing side2 = worldObj.getBlockState(pos2).getValue(GenericBlock.FACING_HORIZ);\n if (side == side2) {\n if (level == 0) {\n ((ElevatorTileEntity) te2).movePlatformHere();\n return;\n }\n level--;\n }\n level--;\n }\n }\n }\n}\n"
"public <R> CompletableFuture<R> execute(final ExecutionEnvironment environment, final ExecutionHandler<R> handler) {\n Objects.requireNonNull(environment);\n Objects.requireNonNull(handler);\n class AsyncContext {\n WorkingDirectory workingDir;\n List<CommandExecution> parametersList;\n ExecutionReport report;\n }\n return CompletableFuture.completedFuture(new AsyncContext()).thenApplyAsync(ctxt -> {\n try {\n ctxt.workingDir = new WorkingDirectory(localDir, environment.getWorkingDirPrefix(), environment.isDebug());\n } catch (IOException e) {\n throw new UncheckedIOException(e);\n }\n try {\n ctxt.parametersList = handler.before(ctxt.workingDir.toPath());\n } catch (Throwable t) {\n try {\n ctxt.workingDir.close();\n } catch (IOException e2) {\n LOGGER.error(e2.toString(), e2);\n }\n throw new RuntimeException(t);\n }\n return ctxt;\n }, executorContext.getComputationExecutor()).thenComposeAsync(ctxt -> {\n if (ctxt.parametersList.isEmpty()) {\n ctxt.report = new ExecutionReport(Collections.emptyList());\n return CompletableFuture.completedFuture(ctxt);\n } else {\n CompletableFuture<ExecutionReport> last = null;\n for (CommandExecution execution : ctxt.parametersList) {\n ExecutionListener l = new DefaultExecutionListener() {\n public void onExecutionStart(int fromExecutionIndex, int toExecutionIndex) {\n try {\n for (int executionIndex = fromExecutionIndex; executionIndex <= toExecutionIndex; executionIndex++) {\n handler.onExecutionStart(execution, executionIndex);\n }\n } catch (Exception e) {\n LOGGER.error(e.toString(), e);\n }\n }\n public void onExecutionCompletion(int executionIndex) {\n try {\n handler.onExecutionCompletion(execution, executionIndex);\n } catch (Exception e) {\n LOGGER.error(e.toString(), e);\n }\n }\n };\n if (last == null) {\n last = scheduler.execute(execution, ctxt.workingDir.toPath(), environment.getVariables(), l);\n } else {\n last = last.thenCompose(report -> {\n if (report.getErrors().isEmpty()) {\n return scheduler.execute(execution, ctxt.workingDir.toPath(), environment.getVariables(), l);\n } else {\n return CompletableFuture.completedFuture(report);\n }\n });\n }\n }\n return last.thenApply(report -> {\n ctxt.report = report;\n return ctxt;\n });\n }\n }, executorContext.getComputationExecutor()).thenApplyAsync(ctxt -> {\n try {\n return handler.after(ctxt.workingDir.toPath(), ctxt.report);\n } catch (IOException e) {\n throw new UncheckedIOException(e);\n } finally {\n try {\n ctxt.workingDir.close();\n } catch (IOException e2) {\n throw new UncheckedIOException(e2);\n }\n }\n }, executorContext.getComputationExecutor());\n}\n"
"IOdaDataSourceDesign newOdaDataSource(OdaDataSourceHandle source) throws BirtException {\n OdaDataSourceDesign dteSource = new OdaDataSourceDesign(source.getQualifiedName());\n IBaseDataSourceEventHandler eventHandler = new DataSourceScriptExecutor(source, context);\n dteSource.setEventHandler(eventHandler);\n adaptBaseDataSource(source, dteSource);\n String driverName = source.getExtensionID();\n if (driverName == null || driverName.length() == 0) {\n throw new EngineException(MessageConstants.EXTENTION_ID_MISSING_ERROR, source.getName());\n }\n dteSource.setExtensionID(driverName);\n Map staticProps = getExtensionProperties(source, source.getExtensionPropertyDefinitionList());\n if (staticProps != null && !staticProps.isEmpty()) {\n Iterator propNamesItr = staticProps.keySet().iterator();\n while (propNamesItr.hasNext()) {\n String propName = (String) propNamesItr.next();\n assert (propName != null);\n String propValue;\n String bindingExpr = source.getPropertyBinding(propName);\n if (needPropertyBinding() && bindingExpr != null && bindingExpr.length() > 0) {\n propValue = evaluatePropertyBindingExpr(bindingExpr);\n } else {\n propValue = (String) staticProps.get(propName);\n }\n dteSource.addPublicProperty(propName, propValue);\n }\n }\n Iterator elmtIter = source.privateDriverPropertiesIterator();\n if (elmtIter != null) {\n while (elmtIter.hasNext()) {\n ExtendedPropertyHandle modelProp = (ExtendedPropertyHandle) elmtIter.next();\n dteSource.addPrivateProperty(modelProp.getName(), modelProp.getValue());\n }\n }\n addPropertyConfigurationId(dteSource);\n return dteSource;\n}\n"
"public Side giveSimpleDirection() {\n if (this.getNetmask() < 8 && (!(this.getStart().empty() ^ this.getEnd().empty())) && !this.isExactSubnet(this.getFirstStationNumber(), this.getNetmask()))\n return Side.RIGHT;\n return Side.LEFT;\n}\n"
"public void testjSLPDefaultsToECF2() {\n String expected = \"String_Node_Str\";\n Namespace namespaceByName = IDFactory.getDefault().getNamespaceByName(namespace);\n IServiceID aServiceID = ServiceIDFactory.getDefault().createServiceID(namespaceByName, DiscoveryTestHelper.SERVICES, DiscoveryTestHelper.PROTOCOLS, expected);\n assertNotNull(aServiceID);\n IServiceTypeID stid = aServiceID.getServiceTypeID();\n assertEquals(IServiceTypeID.DEFAULT_NA, stid.getNamingAuthority());\n assertEquals(\"String_Node_Str\" + IServiceTypeID.DEFAULT_SCOPE[0] + \"String_Node_Str\" + IServiceTypeID.DEFAULT_NA + \"String_Node_Str\" + expected, aServiceID.getName());\n}\n"
"public String getRegistrationStatus(String studyOid) {\n String ocUrl = CoreResources.getField(\"String_Node_Str\") + \"String_Node_Str\" + studyOid;\n String pManageUrl = CoreResources.getField(\"String_Node_Str\") + \"String_Node_Str\" + studyOid + \"String_Node_Str\" + ocUrl;\n RestTemplate rest = new RestTemplate();\n try {\n Authorization[] response = rest.getForObject(pManageUrl, Authorization[].class);\n if (response.length > 0 && response[0].getAuthorizationStatus() != null)\n return response[0].getAuthorizationStatus().getStatus();\n } catch (Exception e) {\n logger.error(e.getMessage());\n logger.error(ExceptionUtils.getStackTrace(e));\n }\n return \"String_Node_Str\";\n}\n"
"public Character getValue(double low, double high, Estimator estimator) {\n if (low > high)\n throw new IllegalArgumentException(\"String_Node_Str\" + \"String_Node_Str\");\n return getValue(new Interval<Character>(low, high, false, false), estimator);\n}\n"
"protected Object openDialogBox(Control cellEditorWindow) {\n String schemaToEdit = (String) this.getValue();\n String oldValue = schemaToEdit;\n boolean metaReadonly = false;\n final List<IMetadataTable> metadatas = node.getMetadataList();\n IMetadataTable tableToEdit = null;\n if (schemaToEdit == null || \"String_Node_Str\".equals(schemaToEdit)) {\n SAPConnectionItem sapItem = getSAPRepositoryItem();\n if (sapItem != null) {\n boolean readonly = node.getProcess().isReadOnly();\n if (node.getJobletNode() != null) {\n readonly = node.isReadOnly();\n }\n SchemaOperationChoiceDialog choiceDialog = new SchemaOperationChoiceDialog(cellEditorWindow.getShell(), node, sapItem, EProcessType.CREATE, schemaToEdit, readonly);\n if (choiceDialog.open() == Window.OK) {\n if (choiceDialog.getSelctionType() == ESelectionCategory.REPOSITORY) {\n org.talend.core.model.metadata.builder.connection.MetadataTable selectedMetadataTable = choiceDialog.getSelectedMetadataTable();\n if (selectedMetadataTable != null) {\n final IMetadataTable metaTable = ConvertionHelper.convert(selectedMetadataTable);\n int index = 0;\n if (getTableViewer() != null) {\n index = getTableViewer().getTable().getSelectionIndex();\n }\n SAPFunctionUnit functionUnit = null;\n if (selectedMetadataTable.eContainer() instanceof SAPFunctionUnit) {\n functionUnit = (SAPFunctionUnit) selectedMetadataTable.eContainer();\n }\n if (\"String_Node_Str\".equals(node.getComponent().getName())) {\n node.getMetadataFromConnector(schemaToEdit);\n executeCommand(new RepositoryChangeMetadataForSAPBapi(node, functionUnit, metaTable, null, index));\n } else {\n executeCommand(new RepositoryChangeMetadataForSAPCommand(node, ISAPConstant.TABLE_SCHEMAS, metaTable.getLabel(), metaTable, index));\n }\n if (getTableViewer() != null) {\n getTableViewer().refresh(true);\n }\n return selectedMetadataTable.getLabel();\n }\n return null;\n } else {\n }\n } else {\n this.setValue(oldValue);\n return oldValue;\n }\n }\n EbcdicConnectionItem repositoryItem = getRepositoryItem();\n if (repositoryItem != null) {\n SchemaOperationChoiceDialog choiceDialog = new SchemaOperationChoiceDialog(cellEditorWindow.getShell(), node, repositoryItem, EProcessType.CREATE, schemaToEdit, node.getProcess().isReadOnly());\n if (choiceDialog.open() == Window.OK) {\n if (choiceDialog.getSelctionType() == ESelectionCategory.REPOSITORY) {\n org.talend.core.model.metadata.builder.connection.MetadataTable selectedMetadataTable = choiceDialog.getSelectedMetadataTable();\n if (selectedMetadataTable != null) {\n final IMetadataTable metaTable = ConvertionHelper.convert(selectedMetadataTable);\n int index = 0;\n if (getTableViewer() != null) {\n index = getTableViewer().getTable().getSelectionIndex();\n }\n SAPFunctionUnit functionUnit = null;\n if (selectedMetadataTable.eContainer() instanceof SAPFunctionUnit) {\n functionUnit = (SAPFunctionUnit) selectedMetadataTable.eContainer();\n }\n if (\"String_Node_Str\".equals(node.getComponent().getName())) {\n executeCommand(new RepositoryChangeMetadataForSAPBapi(node, functionUnit, tableToEdit, metaTable));\n } else {\n executeCommand(new RepositoryChangeMetadataForEBCDICCommand(node, IEbcdicConstant.TABLE_SCHEMAS, metaTable.getLabel(), metaTable, index));\n }\n if (getTableViewer() != null) {\n getTableViewer().refresh(true);\n }\n return selectedMetadataTable.getLabel();\n }\n return null;\n } else {\n }\n } else {\n return null;\n }\n }\n InputDialog dialogInput = new InputDialog(cellEditorWindow.getShell(), Messages.getString(\"String_Node_Str\"), Messages.getString(\"String_Node_Str\"), \"String_Node_Str\", new IInputValidator() {\n public String isValid(String newText) {\n if (\"String_Node_Str\".equals(newText.trim())) {\n return Messages.getString(\"String_Node_Str\");\n }\n if (MetadataToolHelper.getMetadataTableFromNodeTableName(node, newText) != null || !node.getProcess().checkValidConnectionName(newText)) {\n return Messages.getString(\"String_Node_Str\");\n }\n return null;\n }\n });\n if (dialogInput.open() == InputDialog.OK) {\n Object newPropValue = dialogInput.getValue();\n if (!isRulesComponent(node)) {\n node.getProcess().addUniqueConnectionName(dialogInput.getValue());\n final MetadataTable table = new MetadataTable();\n table.setLabel(dialogInput.getValue());\n table.setTableName(dialogInput.getValue());\n tableToEdit = table;\n metadatas.add(table);\n executeCommand(new Command() {\n public void execute() {\n if (getTableViewer() != null) {\n Table tTable = getTableViewer().getTable();\n Object data = tTable.getItem(tTable.getSelectionIndex()).getData();\n if (data instanceof Map) {\n final Map<String, Object> valueMap = (Map<String, Object>) data;\n Object code = valueMap.get(IEbcdicConstant.FIELD_CODE);\n if (code == null || \"String_Node_Str\".equals(code)) {\n valueMap.put(IEbcdicConstant.FIELD_CODE, table.getTableName());\n valueMap.put(IEbcdicConstant.FIELD_SCHEMA, table.getTableName());\n }\n }\n getTableViewer().refresh();\n }\n }\n });\n } else {\n INode inputNode = null, outputNode = null;\n IMetadataTable originalInputTable = null, originalCurrentOutTable = null, finalOutTable = null, finalInputTable = null;\n MetadataDialog metaDialog = null;\n int index = getTableViewer().getTable().getSelectionIndex();\n if (node.getIncomingConnections().size() > 0) {\n if (node.getOutgoingConnections().size() > 0) {\n outputNode = node.getOutgoingConnections().get(0).getTarget();\n }\n originalInputTable = node.getIncomingConnections().get(0).getMetadataTable();\n inputNode = node.getIncomingConnections().get(0).getSource();\n if (outputNode == null) {\n outputNode = node;\n }\n List<IMetadataColumn> listColumns = new ArrayList<IMetadataColumn>();\n originalCurrentOutTable = new MetadataTable();\n originalCurrentOutTable.setListColumns(listColumns);\n metaDialog = new MetadataDialog(new Shell(), originalInputTable, inputNode, originalCurrentOutTable, outputNode, tableEditorView.getTableViewerCreator().getCommandStack());\n if (metaDialog.open() == Window.OK) {\n finalInputTable = metaDialog.getInputMetaData().clone();\n finalOutTable = metaDialog.getOutputMetaData().clone();\n ChangeRuleMetadataCommand changeRuleMetadataCommand = new ChangeRuleMetadataCommand(node, \"String_Node_Str\", newPropValue, finalOutTable, index);\n executeCommand(changeRuleMetadataCommand);\n if (getTableViewer() != null) {\n getTableViewer().refresh();\n }\n }\n } else {\n node.getProcess().addUniqueConnectionName(dialogInput.getValue());\n final MetadataTable table = new MetadataTable();\n table.setLabel(dialogInput.getValue());\n table.setTableName(dialogInput.getValue());\n tableToEdit = table;\n metadatas.add(table);\n executeCommand(new Command() {\n public void execute() {\n if (getTableViewer() != null) {\n Table tTable = getTableViewer().getTable();\n Object data = tTable.getItem(tTable.getSelectionIndex()).getData();\n if (data instanceof Map) {\n final Map<String, Object> valueMap = (Map<String, Object>) data;\n Object code = valueMap.get(IEbcdicConstant.FIELD_CODE);\n if (code == null || \"String_Node_Str\".equals(code)) {\n valueMap.put(IEbcdicConstant.FIELD_CODE, table.getTableName());\n valueMap.put(IEbcdicConstant.FIELD_SCHEMA, table.getTableName());\n }\n }\n getTableViewer().refresh();\n }\n }\n });\n }\n }\n }\n } else {\n if (isSAPNode(node) && getTableViewer() != null) {\n Table tTable = getTableViewer().getTable();\n Object data = tTable.getItem(tTable.getSelectionIndex()).getData();\n if (data instanceof Map) {\n final Map<String, Object> valueMap = (Map<String, Object>) data;\n Object code = valueMap.get(IEbcdicConstant.FIELD_SCHEMA);\n tableToEdit = MetadataToolHelper.getMetadataTableFromNodeTableName(node, code.toString());\n }\n } else {\n tableToEdit = MetadataToolHelper.getMetadataTableFromNodeTableName(node, schemaToEdit);\n }\n if (getTableViewer() != null && tableToEdit != null && isEBCDICNode(node)) {\n Table tTable = getTableViewer().getTable();\n Object data = tTable.getItem(tTable.getSelectionIndex()).getData();\n if (data instanceof Map) {\n final Map<String, Object> valueMap = (Map<String, Object>) data;\n final String key = IEbcdicConstant.FIELD_SCHEMA + IEbcdicConstant.REF_TYPE;\n Object repositoyType = valueMap.get(key);\n EbcdicConnectionItem repositoryItem = getRepositoryItem();\n EProcessType processType = EProcessType.BUILTIN;\n if (repositoryItem != null) {\n if (repositoyType != null && IEbcdicConstant.REF_ATTR_REPOSITORY.equals(repositoyType)) {\n processType = EProcessType.REPOSITORY;\n }\n }\n SchemaOperationChoiceDialog choiceDialog = new SchemaOperationChoiceDialog(cellEditorWindow.getShell(), node, repositoryItem, processType, schemaToEdit, node.getProcess().isReadOnly());\n if (choiceDialog.open() == Window.OK) {\n ESelectionCategory selctionType = choiceDialog.getSelctionType();\n switch(selctionType) {\n case SHOW_SCHEMA:\n if (processType == EProcessType.REPOSITORY) {\n metaReadonly = true;\n }\n break;\n case REPOSITORY:\n final org.talend.core.model.metadata.builder.connection.MetadataTable selectedMetadataTable = choiceDialog.getSelectedMetadataTable();\n if (selectedMetadataTable != null) {\n String newSchema = selectedMetadataTable.getLabel();\n if (!schemaToEdit.equals(newSchema) || processType == EProcessType.BUILTIN) {\n RepositoryChangeMetadataForEBCDICCommand cmd = new RepositoryChangeMetadataForEBCDICCommand(node, IEbcdicConstant.TABLE_SCHEMAS, newSchema, schemaToEdit, ConvertionHelper.convert(selectedMetadataTable), tableToEdit, tTable.getSelectionIndex());\n executeCommand(cmd);\n if (getTableViewer() != null) {\n getTableViewer().refresh();\n }\n }\n return newSchema;\n } else {\n }\n case BUILDIN:\n executeCommand(new Command() {\n public void execute() {\n valueMap.remove(key);\n if (getTableViewer() != null) {\n getTableViewer().refresh();\n }\n }\n });\n return schemaToEdit;\n default:\n }\n } else {\n return null;\n }\n }\n }\n if (getTableViewer() != null && tableToEdit != null && isSAPNode(node)) {\n Table tTable = getTableViewer().getTable();\n Object data = tTable.getItem(tTable.getSelectionIndex()).getData();\n if (data instanceof Map) {\n final Map<String, Object> valueMap = (Map<String, Object>) data;\n final String key = ISAPConstant.FIELD_SCHEMA + ISAPConstant.REF_TYPE;\n Object repositoyType = valueMap.get(key);\n SAPConnectionItem repositoryItem = getSAPRepositoryItem();\n EProcessType processType = EProcessType.BUILTIN;\n if (repositoryItem != null) {\n if (repositoyType != null && ISAPConstant.REF_ATTR_REPOSITORY.equals(repositoyType)) {\n processType = EProcessType.REPOSITORY;\n }\n }\n Object type = valueMap.get(ISAPConstant.TYPE);\n if (type != null && type.toString().equals(TABLE)) {\n SchemaOperationChoiceDialog choiceDialog = new SchemaOperationChoiceDialog(cellEditorWindow.getShell(), node, repositoryItem, processType, schemaToEdit, node.getProcess().isReadOnly());\n if (choiceDialog.open() == Window.OK) {\n ESelectionCategory selctionType = choiceDialog.getSelctionType();\n switch(selctionType) {\n case SHOW_SCHEMA:\n if (processType == EProcessType.REPOSITORY) {\n metaReadonly = true;\n }\n break;\n case REPOSITORY:\n final org.talend.core.model.metadata.builder.connection.MetadataTable selectedMetadataTable = choiceDialog.getSelectedMetadataTable();\n if (selectedMetadataTable != null) {\n String newSchema = selectedMetadataTable.getLabel();\n if (!schemaToEdit.equals(newSchema) || processType == EProcessType.BUILTIN) {\n RepositoryChangeMetadataForSAPCommand cmd = new RepositoryChangeMetadataForSAPCommand(node, ISAPConstant.TABLE_SCHEMAS, newSchema, schemaToEdit, ConvertionHelper.convert(selectedMetadataTable), tableToEdit, tTable.getSelectionIndex());\n executeCommand(cmd);\n if (getTableViewer() != null) {\n getTableViewer().refresh();\n }\n }\n return newSchema;\n } else {\n }\n case BUILDIN:\n executeCommand(new Command() {\n public void execute() {\n valueMap.remove(key);\n if (getTableViewer() != null) {\n getTableViewer().refresh();\n }\n }\n });\n return schemaToEdit;\n default:\n }\n } else {\n return null;\n }\n } else {\n if (processType == EProcessType.REPOSITORY) {\n metaReadonly = true;\n }\n }\n }\n }\n }\n Table tTable = getTableViewer().getTable();\n boolean hasParentRow = false;\n Object data = tTable.getItem(tTable.getSelectionIndex()).getData();\n Object type = null;\n Object parent_row = null;\n if (data instanceof Map) {\n final Map<String, Object> valueMap = (Map<String, Object>) data;\n if (valueMap.containsKey(PARENT_ROW)) {\n hasParentRow = true;\n }\n final String key = ISAPConstant.TYPE;\n type = valueMap.get(key);\n parent_row = valueMap.get(PARENT_ROW);\n if (isSAPNode(node) && type instanceof Integer) {\n type = SINGLE;\n valueMap.remove(key);\n valueMap.put(key, SINGLE);\n }\n }\n final boolean hasParentRowForExe = hasParentRow;\n if (tableToEdit != null) {\n if (isHL7OutputNode(node) && node.getIncomingConnections().size() > 0) {\n copyHL7OutputMetadata(node, tableToEdit);\n } else if (isSAPNode(node) && type != null && type.toString().equals(TABLE) && node.getIncomingConnections().size() > 0 && hasParentRow && (parent_row != null && !parent_row.equals(\"String_Node_Str\") && !(parent_row instanceof Integer))) {\n copySAPOutputMetadata(node, tableToEdit);\n } else {\n MetadataDialog dialog = new MetadataDialog(cellEditorWindow.getShell(), tableToEdit.clone(), node, null);\n dialog.setSingleAndStruct(false);\n dialog.setInputReadOnly(metaReadonly);\n dialog.setOutputReadOnly(metaReadonly);\n if (isSAPNode(node) && type != null && (type.equals(SINGLE) || type.equals(STRUCTURE)) && hasParentRow) {\n MetadataDialog.setSingleAndStruct(true);\n }\n final IMetadataTable oldTable = tableToEdit;\n if (dialog.open() == MetadataDialog.OK) {\n final IMetadataTable newTable = dialog.getOutputMetaData();\n if (!oldTable.sameMetadataAs(newTable, IMetadataColumn.OPTIONS_NONE)) {\n executeCommand(new Command() {\n public void execute() {\n oldTable.getListUsedColumns().clear();\n oldTable.getListUnusedColumns().clear();\n oldTable.setListColumns(newTable.getListColumns(true));\n List<IMetadataColumn> columns = newTable.getListColumns(true);\n if (node instanceof IGraphicalNode) {\n IGraphicalNode gNode = (IGraphicalNode) node;\n gNode.checkAndRefreshNode();\n }\n if (isSAPNode(node) && hasParentRowForExe) {\n oldTable.getAdditionalProperties().put(ISINPUT, TRUE);\n }\n if (getTableViewer() != null) {\n getTableViewer().refresh();\n }\n }\n });\n } else {\n if (isSAPNode(node) && hasParentRowForExe) {\n oldTable.getAdditionalProperties().put(ISINPUT, TRUE);\n }\n }\n } else {\n if (isSAPNode(node) && hasParentRowForExe) {\n oldTable.getAdditionalProperties().put(ISINPUT, TRUE);\n }\n }\n }\n return schemaToEdit;\n } else {\n return \"String_Node_Str\";\n }\n}\n"
"public void multiple_paragraphs_mixed() {\n final String content1 = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n final String content2 = \"String_Node_Str\";\n final String content = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + INPUT + \"String_Node_Str\" + SIGNATURE + \"String_Node_Str\" + content1 + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + INPUT + \"String_Node_Str\" + SIGNATURE + \"String_Node_Str\" + content2;\n final List<Paragraph> paragraphs = subject.createParagraphs(new ContentWithCredentials(content), updateContext);\n assertThat(paragraphs, hasSize(4));\n final PasswordCredential pass = new PasswordCredential(\"String_Node_Str\");\n final PasswordCredential pw = new PasswordCredential(\"String_Node_Str\");\n final PgpCredential pgpCredential = PgpCredential.createOfferedCredential(\"String_Node_Str\" + \"String_Node_Str\" + INPUT + \"String_Node_Str\" + SIGNATURE + \"String_Node_Str\", Charsets.ISO_8859_1);\n assertParagraphNoDryRun(paragraphs.get(0), \"String_Node_Str\", pass, pw, pgpCredential);\n assertParagraphNoDryRun(paragraphs.get(1), \"String_Node_Str\", pass, pw);\n assertParagraphNoDryRun(paragraphs.get(2), \"String_Node_Str\", pass, pw, pgpCredential);\n assertParagraphNoDryRun(paragraphs.get(3), \"String_Node_Str\", pass, pw);\n}\n"
"public String getSequenceNumber(Sequence sequence) {\n SequenceVersion sequenceVersion = getVersion(sequence);\n String seqPrefixe = StringUtils.defaultString(sequence.getPrefixe(), \"String_Node_Str\"), seqSuffixe = StringUtils.defaultString(sequence.getSuffixe(), \"String_Node_Str\"), padLeft = StringUtils.leftPad(sequenceVersion.getNextNum().toString(), sequence.getPadding(), PADDING_STRING);\n String nextSeq = (seqPrefixe + padLeft + seqSuffixe).replaceAll(PATTERN_YEAR, Integer.toString(refDate.getYearOfCentury())).replaceAll(PATTERN_MONTH, Integer.toString(refDate.getMonthOfYear())).replaceAll(PATTERN_FULL_MONTH, refDate.toString(\"String_Node_Str\")).replaceAll(PATTERN_DAY, Integer.toString(refDate.getDayOfMonth())).replaceAll(PATTERN_WEEK, Integer.toString(refDate.getWeekOfWeekyear()));\n log.debug(\"String_Node_Str\", nextSeq);\n sequenceVersion.setNextNum(sequenceVersion.getNextNum() + sequence.getToBeAdded());\n sequenceVersionRepository.save(sequenceVersion);\n return nextSeq;\n}\n"
"private static boolean isNewerTimestamp(long timestamp, long prevTimestamp) {\n if (timestamp - prevTimestamp == 0x80000000L) {\n return timestamp > prevTimestamp;\n }\n return timestamp != prevTimestamp && subtractAsUnsignedInt32(timestamp, prevTimestamp) < 0x80000000L;\n}\n"
"public VoidResult execute(final UpdateMonthlyReports cmd, final UserExecutionContext context) throws CommandException {\n Site site = em().find(Site.class, cmd.getSiteId());\n final Map<Month, ReportingPeriod> periods = new HashMap<>();\n for (ReportingPeriod period : site.getReportingPeriods()) {\n periods.put(Handlers.monthFromRange(period.getDate1(), period.getDate2()), period);\n }\n performChanges(cmd, periods, site);\n return new VoidResult();\n}\n"
"public List<Config> parseConfigs(String configsRespStr) throws JSONException {\n List<Config> resultList = null;\n JSONObject configs = new JSONObject(configsRespStr);\n resultList = new ArrayList<Config>();\n Config tempConfig = null;\n JSONArray dishArray = configs.getJSONArray(\"String_Node_Str\");\n for (int i = 0; i < dishArray.length(); i++) {\n tempConfig = new Config();\n JSONObject dishObj = dishArray.getJSONObject(i);\n tempConfig.setId(dishObj.getInt(\"String_Node_Str\"));\n tempConfig.setName(dishObj.getString(\"String_Node_Str\"));\n tempConfig.setValue(dishObj.getString(\"String_Node_Str\"));\n tempConfig.setDescription(dishObj.getString(\"String_Node_Str\"));\n resultList.add(tempConfig);\n }\n return resultList;\n}\n"
"private Set<InputKind> assembleInputKindSet(List<String> subPath) {\n Set<InputKind> kinds = new HashSet<InputKind>();\n ResponseMessage response = service.get(this.path + \"String_Node_Str\" + Util.join(\"String_Node_Str\", subPath));\n AtomFeed feed = AtomFeed.parseStream(response.getContent());\n for (AtomEntry entry : feed.entries) {\n String itemKeyName = itemKey(entry);\n boolean hasCreateLink = false;\n for (String linkName : entry.links.keySet()) {\n if (linkName.equals(\"String_Node_Str\")) {\n hasCreateLink = true;\n }\n }\n List<String> thisSubPath = new ArrayList<String>(subPath);\n thisSubPath.add(relpath);\n if (entry.title.equals(\"String_Node_Str\") || Util.join(\"String_Node_Str\", thisSubPath).equals(\"String_Node_Str\")) {\n continue;\n } else if (hasCreateLink) {\n InputKind newKind = InputKind.create(relpath);\n kinds.add(newKind);\n } else {\n Set<InputKind> subKinds = assembleInputKindSet(thisSubPath);\n kinds.addAll(subKinds);\n }\n }\n return kinds;\n}\n"
"public void showFBAlbum(String albumId) {\n fac.setCurrentAlbumId(albumId);\n model.resetModel(NavigationEnum.FB_ALBUM_PREVIEW, getLoggedUser(), null, null, null, null);\n}\n"
"public void addImageData(IImageContent image, IStyle style, HyperlinkDef link, BookmarkDef bookmark) {\n XlsContainer container = getCurrentContainer();\n ContainerSizeInfo parentSizeInfo = container.getSizeInfo();\n int imageWidthDpi = reportDpi;\n int imageHeightDpi = reportDpi;\n int imageHeight;\n int imageWidth;\n byte[] imageData = null;\n try {\n Image imageInfo = EmitterUtil.parseImage(image, image.getImageSource(), image.getURI(), image.getMIMEType(), image.getExtension());\n int imageFileWidthDpi = imageInfo.getPhysicalWidthDpi() == -1 ? 0 : imageInfo.getPhysicalWidthDpi();\n int imageFileHeightDpi = imageInfo.getPhysicalHeightDpi() == -1 ? 0 : imageInfo.getPhysicalHeightDpi();\n if (image.getWidth() == null) {\n imageWidthDpi = PropertyUtil.getImageDpi(image, imageFileWidthDpi, 0);\n } else {\n imageWidthDpi = reportDpi;\n }\n if (image.getHeight() == null) {\n imageHeightDpi = PropertyUtil.getImageDpi(image, imageFileHeightDpi, 0);\n } else {\n imageHeightDpi = reportDpi;\n }\n } catch (IOException ex) {\n imageWidthDpi = reportDpi;\n imageHeightDpi = reportDpi;\n }\n XlsContainer container = getCurrentContainer();\n ContainerSizeInfo parentSizeInfo = container.getSizeInfo();\n ColumnsInfo imageColumnsInfo = LayoutUtil.createImage(image, parentSizeInfo.getWidth(), imageWidthDpi);\n splitColumns(imageColumnsInfo, parentSizeInfo);\n ContainerSizeInfo imageSize = new ContainerSizeInfo(parentSizeInfo.getStartCoordinate(), imageColumnsInfo.getTotalWidth());\n StyleEntry entry = engine.getStyle(style, imageSize, parentSizeInfo, getParentStyle(container));\n setlinkStyle(entry, link);\n SheetData data = createImageData(image, imageSize.getWidth(), entry, container, imageHeightDpi, imageWidthDpi);\n data.setHyperlinkDef(link);\n data.setBookmark(bookmark);\n data.setStartX(imageSize.getStartCoordinate());\n data.setEndX(imageSize.getEndCoordinate());\n addData(data);\n}\n"
"private ResourceResponse patchResource(Context context, Request request, ResourceResponse resource, String revision, List<PatchOperation> patchOperations) throws ResourceException {\n boolean forceUpdate = (revision == null);\n boolean retry = forceUpdate;\n String rev = revision;\n do {\n logger.debug(\"String_Node_Str\", name, request.getResourcePath());\n try {\n JsonValue decrypted = decrypt(resource.getContent());\n if (revision == null) {\n rev = decrypted.get(\"String_Node_Str\").asString();\n }\n final JsonValue relationships = fetchRelationshipFields(context, resource.getId());\n decrypted.asMap().putAll(relationships.asMap());\n JsonValue newValue = decrypted.copy();\n boolean modified = JsonValuePatch.apply(newValue, patchOperations);\n if (!modified) {\n return null;\n }\n if (enforcePolicies) {\n JsonValue propertiesToValidate = json(object());\n for (PatchOperation operation : patchOperations) {\n JsonPointer field = operation.getField();\n propertiesToValidate.putPermissive(field, newValue.get(field));\n }\n ActionRequest policyAction = Requests.newActionRequest(ResourcePath.valueOf(\"String_Node_Str\").concat(managedId(resource.getId())).toString(), \"String_Node_Str\").setContent(propertiesToValidate);\n if (ContextUtil.isExternal(context)) {\n policyAction.setAdditionalParameter(\"String_Node_Str\", \"String_Node_Str\");\n }\n JsonValue result = connectionFactory.getConnection().action(context, policyAction).getJsonContent();\n if (!result.isNull() && !result.get(\"String_Node_Str\").asBoolean()) {\n logger.debug(\"String_Node_Str\", result);\n throw new ForbiddenException(\"String_Node_Str\").setDetail(result);\n }\n }\n ResourceResponse patchedResource = update(context, request, resource.getId(), rev, resource.getContent(), newValue);\n activityLogger.log(context, request, \"String_Node_Str\", managedId(patchedResource.getId()).toString(), resource.getContent(), patchedResource.getContent(), Status.SUCCESS);\n retry = false;\n logger.debug(\"String_Node_Str\");\n return prepareResponse(context, patchedResource, request.getFields());\n } catch (PreconditionFailedException e) {\n if (forceUpdate) {\n logger.debug(\"String_Node_Str\");\n } else {\n throw e;\n }\n } catch (ResourceException e) {\n throw e;\n } catch (Exception e) {\n throw new InternalServerErrorException(e.getMessage(), e);\n }\n } while (retry);\n return null;\n}\n"
"private void onErrorPluginDefect(DownloadLink downloadLink2, PluginForHost currentPlugin2) {\n String rev = downloadLink.getPlugin() == null ? \"String_Node_Str\" : downloadLink.getPlugin().getVersion();\n logger.warning(\"String_Node_Str\" + currentPlugin.getHost() + \"String_Node_Str\" + rev + \"String_Node_Str\");\n if (downloadLink2.getLinkStatus().getErrorMessage() != null)\n logger.warning(downloadLink2.getLinkStatus().getErrorMessage());\n try {\n logger.finest(currentPlugin2.getBrowser().getRequest().getHttpConnection() + \"String_Node_Str\");\n } catch (Exception e) {\n JDLogger.exception(e);\n }\n try {\n logger.finest(currentPlugin2.getBrowser() + \"String_Node_Str\");\n } catch (Exception e) {\n JDLogger.exception(e);\n }\n downloadLink2.getLinkStatus().setErrorMessage(JDL.L(\"String_Node_Str\", \"String_Node_Str\"));\n downloadLink.requestGuiUpdate();\n}\n"
"public static AsyncAggScaleExecutionNode create(QueryExecutionPlan plan, AggExecutionNode aggNode) throws VerdictDBException {\n AsyncAggScaleExecutionNode node = new AsyncAggScaleExecutionNode(plan);\n List<SelectItem> newSelectList = aggNode.getSelectQuery().deepcopy().getSelectList();\n for (SelectItem selectItem : newSelectList) {\n if (selectItem instanceof AliasedColumn) {\n int index = newSelectList.indexOf(selectItem);\n UnnamedColumn col = ((AliasedColumn) selectItem).getColumn();\n if (AsyncAggScaleExecutionNode.isAggregateColumn(col)) {\n ColumnOp aggColumn = new ColumnOp(\"String_Node_Str\", Arrays.<UnnamedColumn>asList(ConstantColumn.valueOf(node.scaleFactor), new BaseColumn(\"String_Node_Str\", ((AliasedColumn) selectItem).getAliasName())));\n node.aggColumnlist.add(aggColumn);\n newSelectList.set(index, new AliasedColumn(aggColumn, ((AliasedColumn) selectItem).getAliasName()));\n }\n }\n }\n Pair<BaseTable, ExecutionTokenQueue> baseAndQueue = node.createPlaceHolderTable(\"String_Node_Str\");\n SelectQuery query = SelectQuery.create(newSelectList, baseAndQueue.getLeft());\n node.setSelectQuery(query);\n for (QueryExecutionNode parent : aggNode.getParents()) {\n int index = parent.dependents.indexOf(aggNode);\n ExecutionTokenQueue queue = new ExecutionTokenQueue();\n parent.getListeningQueues().set(index, queue);\n node.addBroadcastingQueue(queue);\n parent.dependents.set(index, node);\n }\n aggNode.getBroadcastingQueues().clear();\n aggNode.addBroadcastingQueue(baseAndQueue.getRight());\n aggNode.getParents().clear();\n aggNode.getParents().add(node);\n return node;\n}\n"
"private void callFunctionExpression(Context context, SwiftAST tree, List<Var> oList, Map<String, String> renames) throws UserException {\n FunctionCall f = FunctionCall.fromAST(context, tree, true);\n FunctionType concrete = TypeChecker.concretiseFunctionCall(context, f.function(), f.type(), f.args(), oList, false);\n try {\n if (Builtins.isAssertVariant(f.function()) && Settings.getBoolean(Settings.OPT_DISABLE_ASSERTS)) {\n return;\n }\n } catch (InvalidOptionException e) {\n throw new STCRuntimeError(\"String_Node_Str\" + e.toString());\n }\n ArrayList<Var> argVars = new ArrayList<Var>(f.args().size());\n for (int i = 0; i < f.args().size(); i++) {\n SwiftAST argtree = f.args().get(i);\n Type expType = concrete.getInputs().get(i);\n Type exprType = TypeChecker.findSingleExprType(context, argtree);\n Type argtype = TypeChecker.checkFunArg(context, f.function(), i, expType, exprType).val2;\n argVars.add(eval(context, argtree, argtype, false, renames));\n }\n Var priorityVal = null;\n boolean openedWait = false;\n List<Var> waitVars = null;\n List<Var> usedVariables = null;\n List<Var> keepOpen = RefCounting.filterWriteRefcount(oList);\n Context callContext = context;\n if (tree.getChildCount() == 3) {\n SwiftAST priorityT = tree.child(2);\n Var priorityFuture = eval(context, priorityT, Types.F_INT, false, renames);\n usedVariables = new ArrayList<Var>();\n usedVariables.addAll(argVars);\n usedVariables.addAll(oList);\n backend.startWaitStatement(context.getFunctionContext().constructName(\"String_Node_Str\"), Arrays.asList(priorityFuture), usedVariables, keepOpen, null, WaitMode.DATA_ONLY, false, TaskMode.LOCAL_CONTROL);\n openedWait = true;\n callContext = new LocalContext(context);\n priorityVal = varCreator.fetchValueOf(callContext, priorityFuture);\n }\n callFunction(context, f.function(), concrete, oList, argVars, priorityVal);\n if (openedWait) {\n backend.endWaitStatement(usedVariables, keepOpen);\n }\n}\n"
"protected View onCreateView(ViewGroup parent) {\n View layout = super.onCreateView(parent);\n layout.setOnClickListener(this);\n CharSequence title = getTitle();\n if (!TextUtils.isEmpty(title)) {\n TextView cta = (TextView) layout.findViewById(R.id.cta_title);\n cta.setText(title);\n }\n mStoreNotFoundView = layout.findViewById(R.id.no_store_found_error);\n mStoreNotFoundView.setVisibility(View.GONE);\n return layout;\n}\n"
"public static boolean renameAndDelete(File file) {\n String filePath = pathComponent(file.getPath());\n String fileName = getFileName(file.getPath());\n String timeStr = \"String_Node_Str\" + System.currentTimeMillis();\n String renamed = filePath + removeExtension(fileName) + \"String_Node_Str\" + timeStr + \"String_Node_Str\" + getExtension(fileName);\n File renamedFile = new File(renamed);\n file.renameTo(renamedFile);\n renamedFile.delete();\n if (renamedFile.exists()) {\n renamedFile.setWritable(false);\n renamedFile.delete();\n if (renamedFile.exists()) {\n return false;\n }\n }\n return true;\n}\n"
"private DataHandle getData() {\n ModelConfiguration config = model.getOutputConfig();\n if (config == null) {\n config = model.getInputConfig();\n }\n DataHandle data;\n if (target == ModelPart.INPUT) {\n data = config.getInput().getHandle();\n } else {\n data = model.getOutput();\n }\n if (data != null && model.getViewConfig().isSubset()) {\n data = data.getView(config.getConfig());\n if ((config == null) || (data == null)) {\n return null;\n } else {\n return data;\n }\n}\n"
"public boolean removeRoadSouthEast(PlotArea plotArea, Plot plot) {\n ClassicPlotWorld dpw = (ClassicPlotWorld) plotArea;\n Location location = getPlotTopLocAbs(dpw, plot.getId());\n int sx = location.getX() + 1;\n int ex = sx + dpw.ROAD_WIDTH - 1;\n int sz = location.getZ() + 1;\n int ez = sz + dpw.ROAD_WIDTH - 1;\n LocalBlockQueue queue = plotArea.getQueue(false);\n queue.setCuboid(new Location(plotArea.worldname, sx, dpw.ROAD_HEIGHT + 1, sz), new Location(plotArea.worldname, ex, plotArea.getPlotManager().getWorldHeight(), ez), PlotBlock.get((short) 0, (byte) 0));\n queue.setCuboid(new Location(plotArea.worldname, sx, 1, sz), new Location(plotArea.worldname, ex, dpw.ROAD_HEIGHT - 1, ez), dpw.MAIN_BLOCK);\n queue.setCuboid(new Location(plotArea.worldname, sx, dpw.ROAD_HEIGHT, sz), new Location(plotArea.worldname, ex, dpw.ROAD_HEIGHT, ez), dpw.TOP_BLOCK);\n queue.enqueue();\n return true;\n}\n"
"private void prepareSheet(Sheet masterSheet, FishLinkSheet metaSheet, Sheet dataSheet, Sheet copySheet) throws XLWrapMapException {\n int lastMetaRow = prepareColumnA(masterSheet, metaSheet, dataSheet);\n int lastColumn = dataSheet.getColumns();\n metaSheet.createFreezePane(\"String_Node_Str\", lastMetaRow + 2);\n for (int zeroDataColumn = 0; zeroDataColumn < lastColumn; zeroDataColumn++) {\n String metaColumn = FishLinkUtils.indexToAlpha(zeroDataColumn + 1);\n prepareDropDowns(masterSheet, lastMetaRow, metaSheet, metaColumn);\n copyData(lastMetaRow + 2, metaSheet, dataSheet, metaColumn);\n }\n if (copySheet != null) {\n copyMetaData(masterSheet, metaSheet, copySheet, lastMetaRow, lastColumn);\n }\n}\n"
"public void biConsumer() {\n var result = new HashMap<String, String>();\n var biConsumer = new BiConsumer<String, String>() {\n public void accept(String key, String value) {\n result.put(key.toUpperCase(), value.toUpperCase());\n }\n };\n biConsumer.accept(\"String_Node_Str\", \"String_Node_Str\");\n Assert.assertEquals(Map.of(\"String_Node_Str\", \"String_Node_Str\"), result);\n var lowercaseMap = Map.of(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n lowercaseMap.forEach(biConsumer);\n Assert.assertEquals(Map.of(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"), result);\n}\n"
"private void modifyInheritanceHierarchy() {\n IContainer contextContainer = (IContainer) sourceFile.getParent();\n PackageDeclaration contextPackageDeclaration = sourceCompilationUnit.getPackage();\n IContainer rootContainer = contextContainer;\n if (contextPackageDeclaration != null) {\n String packageName = contextPackageDeclaration.getName().getFullyQualifiedName();\n String[] subPackages = packageName.split(\"String_Node_Str\");\n for (int i = 0; i < subPackages.length; i++) rootContainer = (IContainer) rootContainer.getParent();\n }\n String abstractClassFullyQualifiedName = typeCheckElimination.getAbstractClassName();\n IFile abstractClassFile = getFile(rootContainer, abstractClassFullyQualifiedName);\n IJavaElement abstractJavaElement = JavaCore.create(abstractClassFile);\n ITextEditor abstractEditor = null;\n try {\n abstractEditor = (ITextEditor) JavaUI.openInEditor(abstractJavaElement);\n } catch (PartInitException e) {\n e.printStackTrace();\n } catch (JavaModelException e) {\n e.printStackTrace();\n }\n ICompilationUnit abstractICompilationUnit = (ICompilationUnit) abstractJavaElement;\n ASTParser abstractParser = ASTParser.newParser(AST.JLS3);\n abstractParser.setKind(ASTParser.K_COMPILATION_UNIT);\n abstractParser.setSource(abstractICompilationUnit);\n abstractParser.setResolveBindings(true);\n CompilationUnit abstractCompilationUnit = (CompilationUnit) abstractParser.createAST(null);\n AST abstractAST = abstractCompilationUnit.getAST();\n ASTRewrite abstractRewriter = ASTRewrite.create(abstractAST);\n TypeDeclaration abstractClassTypeDeclaration = null;\n List<AbstractTypeDeclaration> abstractTypeDeclarations = abstractCompilationUnit.types();\n for (AbstractTypeDeclaration abstractTypeDeclaration : abstractTypeDeclarations) {\n if (abstractTypeDeclaration instanceof TypeDeclaration) {\n TypeDeclaration typeDeclaration = (TypeDeclaration) abstractTypeDeclaration;\n if (typeDeclaration.resolveBinding().getQualifiedName().equals(typeCheckElimination.getAbstractClassName())) {\n abstractClassTypeDeclaration = typeDeclaration;\n break;\n }\n }\n }\n int abstractClassModifiers = abstractClassTypeDeclaration.getModifiers();\n if ((abstractClassModifiers & Modifier.ABSTRACT) == 0) {\n ListRewrite abstractModifiersRewrite = abstractRewriter.getListRewrite(abstractClassTypeDeclaration, TypeDeclaration.MODIFIERS2_PROPERTY);\n abstractModifiersRewrite.insertLast(abstractAST.newModifier(Modifier.ModifierKeyword.ABSTRACT_KEYWORD), null);\n }\n ListRewrite abstractBodyRewrite = abstractRewriter.getListRewrite(abstractClassTypeDeclaration, TypeDeclaration.BODY_DECLARATIONS_PROPERTY);\n MethodDeclaration abstractMethodDeclaration = abstractAST.newMethodDeclaration();\n String abstractMethodName = typeCheckElimination.getTypeCheckMethodName();\n abstractRewriter.set(abstractMethodDeclaration, MethodDeclaration.NAME_PROPERTY, abstractAST.newSimpleName(abstractMethodName), null);\n abstractRewriter.set(abstractMethodDeclaration, MethodDeclaration.RETURN_TYPE2_PROPERTY, typeCheckElimination.getTypeCheckMethodReturnType(), null);\n ListRewrite abstractMethodModifiersRewrite = abstractRewriter.getListRewrite(abstractMethodDeclaration, MethodDeclaration.MODIFIERS2_PROPERTY);\n abstractMethodModifiersRewrite.insertLast(abstractAST.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD), null);\n abstractMethodModifiersRewrite.insertLast(abstractAST.newModifier(Modifier.ModifierKeyword.ABSTRACT_KEYWORD), null);\n ListRewrite abstractMethodParametersRewrite = abstractRewriter.getListRewrite(abstractMethodDeclaration, MethodDeclaration.PARAMETERS_PROPERTY);\n for (SingleVariableDeclaration abstractMethodParameter : typeCheckElimination.getAccessedParameters()) {\n abstractMethodParametersRewrite.insertLast(abstractMethodParameter, null);\n }\n for (VariableDeclarationFragment fragment : typeCheckElimination.getAccessedLocalVariables()) {\n if (!fragment.equals(returnedVariable)) {\n SingleVariableDeclaration parameter = abstractAST.newSingleVariableDeclaration();\n VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) fragment.getParent();\n abstractRewriter.set(parameter, SingleVariableDeclaration.TYPE_PROPERTY, variableDeclarationStatement.getType(), null);\n abstractRewriter.set(parameter, SingleVariableDeclaration.NAME_PROPERTY, fragment.getName(), null);\n abstractMethodParametersRewrite.insertLast(parameter, null);\n }\n }\n if (typeCheckElimination.getAccessedFields().size() > 0) {\n SingleVariableDeclaration parameter = abstractAST.newSingleVariableDeclaration();\n SimpleName parameterType = abstractAST.newSimpleName(sourceTypeDeclaration.getName().getIdentifier());\n abstractRewriter.set(parameter, SingleVariableDeclaration.TYPE_PROPERTY, abstractAST.newSimpleType(parameterType), null);\n String parameterName = sourceTypeDeclaration.getName().getIdentifier();\n parameterName = parameterName.substring(0, 1).toLowerCase() + parameterName.substring(1, parameterName.length());\n abstractRewriter.set(parameter, SingleVariableDeclaration.NAME_PROPERTY, abstractAST.newSimpleName(parameterName), null);\n abstractMethodParametersRewrite.insertLast(parameter, null);\n }\n ListRewrite abstractMethodThrownExceptionsRewrite = abstractRewriter.getListRewrite(abstractMethodDeclaration, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY);\n for (ITypeBinding typeBinding : thrownExceptions) {\n abstractMethodThrownExceptionsRewrite.insertLast(abstractAST.newSimpleName(typeBinding.getName()), null);\n }\n abstractBodyRewrite.insertLast(abstractMethodDeclaration, null);\n generateRequiredImportDeclarationsBasedOnSignature();\n for (ITypeBinding typeBinding : requiredImportDeclarationsBasedOnSignature) {\n addImportDeclaration(typeBinding, abstractCompilationUnit, abstractRewriter);\n }\n ITextFileBufferManager bufferManager = FileBuffers.getTextFileBufferManager();\n ITextFileBuffer abstractTextFileBuffer = bufferManager.getTextFileBuffer(abstractClassFile.getFullPath(), LocationKind.IFILE);\n IDocument abstractDocument = abstractTextFileBuffer.getDocument();\n TextEdit abstractEdit = abstractRewriter.rewriteAST(abstractDocument, null);\n try {\n UndoEdit abstractUndoEdit = abstractEdit.apply(abstractDocument, UndoEdit.CREATE_UNDO);\n undoRefactoring.put(abstractClassFile, abstractDocument, abstractUndoEdit);\n } catch (MalformedTreeException e) {\n e.printStackTrace();\n } catch (BadLocationException e) {\n e.printStackTrace();\n }\n abstractEditor.doSave(null);\n List<ArrayList<Statement>> typeCheckStatements = typeCheckElimination.getTypeCheckStatements();\n List<String> subclassNames = typeCheckElimination.getSubclassNames();\n DefaultMutableTreeNode root = typeCheckElimination.getExistingInheritanceTree().getRootNode();\n Enumeration<DefaultMutableTreeNode> enumeration = root.children();\n while (enumeration.hasMoreElements()) {\n DefaultMutableTreeNode child = enumeration.nextElement();\n String childClassName = (String) child.getUserObject();\n if (!subclassNames.contains(childClassName))\n subclassNames.add(childClassName);\n }\n List<DefaultMutableTreeNode> remainingIfStatementExpressions = typeCheckElimination.getRemainingIfStatementExpressions();\n for (int i = 0; i < subclassNames.size(); i++) {\n ArrayList<Statement> statements = null;\n DefaultMutableTreeNode remainingIfStatementExpression = null;\n if (i < typeCheckStatements.size()) {\n statements = typeCheckStatements.get(i);\n if (!remainingIfStatementExpressions.isEmpty())\n remainingIfStatementExpression = remainingIfStatementExpressions.get(i);\n } else {\n statements = typeCheckElimination.getDefaultCaseStatements();\n }\n IFile subclassFile = getFile(rootContainer, subclassNames.get(i));\n IJavaElement subclassJavaElement = JavaCore.create(subclassFile);\n ITextEditor subclassEditor = null;\n try {\n subclassEditor = (ITextEditor) JavaUI.openInEditor(subclassJavaElement);\n } catch (PartInitException e) {\n e.printStackTrace();\n } catch (JavaModelException e) {\n e.printStackTrace();\n }\n ICompilationUnit subclassICompilationUnit = (ICompilationUnit) subclassJavaElement;\n ASTParser subclassParser = ASTParser.newParser(AST.JLS3);\n subclassParser.setKind(ASTParser.K_COMPILATION_UNIT);\n subclassParser.setSource(subclassICompilationUnit);\n subclassParser.setResolveBindings(true);\n CompilationUnit subclassCompilationUnit = (CompilationUnit) subclassParser.createAST(null);\n AST subclassAST = subclassCompilationUnit.getAST();\n ASTRewrite subclassRewriter = ASTRewrite.create(subclassAST);\n TypeDeclaration subclassTypeDeclaration = null;\n List<AbstractTypeDeclaration> subclassAbstractTypeDeclarations = subclassCompilationUnit.types();\n for (AbstractTypeDeclaration abstractTypeDeclaration : subclassAbstractTypeDeclarations) {\n if (abstractTypeDeclaration instanceof TypeDeclaration) {\n TypeDeclaration typeDeclaration = (TypeDeclaration) abstractTypeDeclaration;\n if (typeDeclaration.resolveBinding().getQualifiedName().equals(subclassNames.get(i))) {\n subclassTypeDeclaration = typeDeclaration;\n break;\n }\n }\n }\n ListRewrite subclassBodyRewrite = subclassRewriter.getListRewrite(subclassTypeDeclaration, TypeDeclaration.BODY_DECLARATIONS_PROPERTY);\n MethodDeclaration concreteMethodDeclaration = subclassAST.newMethodDeclaration();\n String concreteMethodName = typeCheckElimination.getTypeCheckMethodName();\n subclassRewriter.set(concreteMethodDeclaration, MethodDeclaration.NAME_PROPERTY, subclassAST.newSimpleName(concreteMethodName), null);\n subclassRewriter.set(concreteMethodDeclaration, MethodDeclaration.RETURN_TYPE2_PROPERTY, typeCheckElimination.getTypeCheckMethodReturnType(), null);\n ListRewrite concreteMethodModifiersRewrite = subclassRewriter.getListRewrite(concreteMethodDeclaration, MethodDeclaration.MODIFIERS2_PROPERTY);\n concreteMethodModifiersRewrite.insertLast(subclassAST.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD), null);\n ListRewrite concreteMethodParametersRewrite = subclassRewriter.getListRewrite(concreteMethodDeclaration, MethodDeclaration.PARAMETERS_PROPERTY);\n for (SingleVariableDeclaration abstractMethodParameter : typeCheckElimination.getAccessedParameters()) {\n concreteMethodParametersRewrite.insertLast(abstractMethodParameter, null);\n }\n for (VariableDeclarationFragment fragment : typeCheckElimination.getAccessedLocalVariables()) {\n if (!fragment.equals(returnedVariable)) {\n SingleVariableDeclaration parameter = subclassAST.newSingleVariableDeclaration();\n VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) fragment.getParent();\n subclassRewriter.set(parameter, SingleVariableDeclaration.TYPE_PROPERTY, variableDeclarationStatement.getType(), null);\n subclassRewriter.set(parameter, SingleVariableDeclaration.NAME_PROPERTY, fragment.getName(), null);\n concreteMethodParametersRewrite.insertLast(parameter, null);\n }\n }\n Set<VariableDeclarationFragment> accessedFields = typeCheckElimination.getAccessedFields();\n Set<VariableDeclarationFragment> assignedFields = typeCheckElimination.getAssignedFields();\n Set<MethodDeclaration> accessedMethods = typeCheckElimination.getAccessedMethods();\n if (accessedFields.size() > 0 || assignedFields.size() > 0 || accessedMethods.size() > 0) {\n SingleVariableDeclaration parameter = subclassAST.newSingleVariableDeclaration();\n SimpleName parameterType = subclassAST.newSimpleName(sourceTypeDeclaration.getName().getIdentifier());\n subclassRewriter.set(parameter, SingleVariableDeclaration.TYPE_PROPERTY, subclassAST.newSimpleType(parameterType), null);\n String parameterName = sourceTypeDeclaration.getName().getIdentifier();\n parameterName = parameterName.substring(0, 1).toLowerCase() + parameterName.substring(1, parameterName.length());\n subclassRewriter.set(parameter, SingleVariableDeclaration.NAME_PROPERTY, subclassAST.newSimpleName(parameterName), null);\n concreteMethodParametersRewrite.insertLast(parameter, null);\n }\n ListRewrite concreteMethodThrownExceptionsRewrite = subclassRewriter.getListRewrite(concreteMethodDeclaration, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY);\n for (ITypeBinding typeBinding : thrownExceptions) {\n concreteMethodThrownExceptionsRewrite.insertLast(subclassAST.newSimpleName(typeBinding.getName()), null);\n }\n Block concreteMethodBody = subclassAST.newBlock();\n ListRewrite concreteMethodBodyRewrite = subclassRewriter.getListRewrite(concreteMethodBody, Block.STATEMENTS_PROPERTY);\n ExpressionExtractor expressionExtractor = new ExpressionExtractor();\n ListRewrite ifStatementBodyRewrite = null;\n if (remainingIfStatementExpression != null) {\n IfStatement enclosingIfStatement = subclassAST.newIfStatement();\n Expression enclosingIfStatementExpression = constructExpression(subclassAST, subclassRewriter, remainingIfStatementExpression);\n Expression newEnclosingIfStatementExpression = (Expression) ASTNode.copySubtree(subclassAST, enclosingIfStatementExpression);\n List<Expression> variableInstructions = expressionExtractor.getVariableInstructions(newEnclosingIfStatementExpression);\n modifyVariableInstructionsInSubclass(variableInstructions, subclassAST, subclassRewriter, accessedFields, assignedFields);\n List<Expression> oldMethodInvocations = expressionExtractor.getMethodInvocations(enclosingIfStatementExpression);\n List<Expression> newMethodInvocations = expressionExtractor.getMethodInvocations(newEnclosingIfStatementExpression);\n modifyMethodInvocationsInSubclass(oldMethodInvocations, newMethodInvocations, subclassAST, subclassRewriter, accessedMethods);\n subclassRewriter.set(enclosingIfStatement, IfStatement.EXPRESSION_PROPERTY, newEnclosingIfStatementExpression, null);\n Block ifStatementBody = subclassAST.newBlock();\n ifStatementBodyRewrite = subclassRewriter.getListRewrite(ifStatementBody, Block.STATEMENTS_PROPERTY);\n subclassRewriter.set(enclosingIfStatement, IfStatement.THEN_STATEMENT_PROPERTY, ifStatementBody, null);\n concreteMethodBodyRewrite.insertLast(enclosingIfStatement, null);\n }\n if (returnedVariable != null) {\n VariableDeclarationFragment variableDeclarationFragment = subclassAST.newVariableDeclarationFragment();\n subclassRewriter.set(variableDeclarationFragment, VariableDeclarationFragment.NAME_PROPERTY, returnedVariable.getName(), null);\n subclassRewriter.set(variableDeclarationFragment, VariableDeclarationFragment.INITIALIZER_PROPERTY, returnedVariable.getInitializer(), null);\n VariableDeclarationStatement variableDeclarationStatement = subclassAST.newVariableDeclarationStatement(variableDeclarationFragment);\n subclassRewriter.set(variableDeclarationStatement, VariableDeclarationStatement.TYPE_PROPERTY, typeCheckElimination.getTypeCheckMethodReturnType(), null);\n if (ifStatementBodyRewrite != null)\n ifStatementBodyRewrite.insertFirst(variableDeclarationStatement, null);\n else\n concreteMethodBodyRewrite.insertFirst(variableDeclarationStatement, null);\n }\n SimpleName invokerSimpleName = null;\n for (Statement statement : statements) {\n Statement newStatement = (Statement) ASTNode.copySubtree(subclassAST, statement);\n boolean insert = true;\n if (statement instanceof VariableDeclarationStatement) {\n VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) statement;\n List<VariableDeclarationFragment> fragments = variableDeclarationStatement.fragments();\n VariableDeclarationFragment fragment = fragments.get(0);\n if (fragment.getInitializer() instanceof CastExpression) {\n CastExpression castExpression = (CastExpression) fragment.getInitializer();\n if (castExpression.getType().resolveBinding().isEqualTo(subclassTypeDeclaration.resolveBinding())) {\n invokerSimpleName = fragment.getName();\n insert = false;\n }\n }\n }\n if (invokerSimpleName != null) {\n List<Expression> methodInvocations = expressionExtractor.getMethodInvocations(newStatement);\n for (Expression expression : methodInvocations) {\n if (expression instanceof MethodInvocation) {\n MethodInvocation methodInvocation = (MethodInvocation) expression;\n Expression methodInvocationExpression = methodInvocation.getExpression();\n if (methodInvocationExpression instanceof SimpleName) {\n SimpleName simpleName = (SimpleName) methodInvocationExpression;\n if (simpleName.getIdentifier().equals(invokerSimpleName.getIdentifier())) {\n subclassRewriter.remove(simpleName, null);\n }\n }\n }\n }\n }\n List<Expression> variableInstructions = expressionExtractor.getVariableInstructions(newStatement);\n modifyVariableInstructionsInSubclass(variableInstructions, subclassAST, subclassRewriter, accessedFields, assignedFields);\n List<Expression> oldMethodInvocations = expressionExtractor.getMethodInvocations(statement);\n List<Expression> newMethodInvocations = expressionExtractor.getMethodInvocations(newStatement);\n modifyMethodInvocationsInSubclass(oldMethodInvocations, newMethodInvocations, subclassAST, subclassRewriter, accessedMethods);\n if (insert) {\n if (ifStatementBodyRewrite != null)\n ifStatementBodyRewrite.insertLast(newStatement, null);\n else\n concreteMethodBodyRewrite.insertLast(newStatement, null);\n }\n }\n if (returnedVariable != null) {\n ReturnStatement returnStatement = subclassAST.newReturnStatement();\n subclassRewriter.set(returnStatement, ReturnStatement.EXPRESSION_PROPERTY, returnedVariable.getName(), null);\n if (ifStatementBodyRewrite != null)\n ifStatementBodyRewrite.insertLast(returnStatement, null);\n else\n concreteMethodBodyRewrite.insertLast(returnStatement, null);\n }\n subclassRewriter.set(concreteMethodDeclaration, MethodDeclaration.BODY_PROPERTY, concreteMethodBody, null);\n subclassBodyRewrite.insertLast(concreteMethodDeclaration, null);\n for (ITypeBinding typeBinding : requiredImportDeclarationsBasedOnSignature) {\n addImportDeclaration(typeBinding, subclassCompilationUnit, subclassRewriter);\n }\n Set<ITypeBinding> requiredImportDeclarationsBasedOnBranch = generateRequiredImportDeclarationsBasedOnBranch(statements);\n for (ITypeBinding typeBinding : requiredImportDeclarationsBasedOnBranch) {\n if (!requiredImportDeclarationsBasedOnSignature.contains(typeBinding))\n addImportDeclaration(typeBinding, subclassCompilationUnit, subclassRewriter);\n }\n ITextFileBuffer subclassTextFileBuffer = bufferManager.getTextFileBuffer(subclassFile.getFullPath(), LocationKind.IFILE);\n IDocument subclassDocument = subclassTextFileBuffer.getDocument();\n TextEdit subclassEdit = subclassRewriter.rewriteAST(subclassDocument, null);\n try {\n UndoEdit subclassUndoEdit = subclassEdit.apply(subclassDocument, UndoEdit.CREATE_UNDO);\n undoRefactoring.put(subclassFile, subclassDocument, subclassUndoEdit);\n } catch (MalformedTreeException e) {\n e.printStackTrace();\n } catch (BadLocationException e) {\n e.printStackTrace();\n }\n subclassEditor.doSave(null);\n }\n}\n"
"public void moveTo(Session session, int newPos) throws SQLException {\n PageStore store = index.getPageStore();\n PageBtreeLeaf p2 = new PageBtreeLeaf(index, newPos, store.createData());\n readAllRows();\n p2.rows = rows;\n p2.entryCount = entryCount;\n p2.offsets = offsets;\n p2.onlyPosition = onlyPosition;\n p2.parentPageId = parentPageId;\n p2.start = start;\n store.updateRecord(p2);\n if (parentPageId == ROOT) {\n index.setRootPageId(session, newPos);\n } else {\n PageBtreeNode p = (PageBtreeNode) store.getPage(parentPageId);\n p.moveChild(getPos(), newPos);\n }\n store.freePage(getPos(), true, data);\n}\n"
"public void fire() throws CloneNotSupportedException, IllegalActionException {\n if (_firstFiring) {\n _plot.setXRange(getStartTime(), getStopTime());\n _plot.setYRange(getYMin(), getYMax());\n _firstFiring = false;\n }\n int numEmptyChannel = 0;\n int width = input.getWidth();\n for (int i = 0; i < width; i++) {\n if (input.hasToken(i)) {\n double curTime = ((DECQDirector) getDirector()).getCurrentTime();\n while (input.hasToken(i)) {\n DoubleToken curToken = null;\n try {\n curToken = (DoubleToken) input.get(i);\n } catch (NoSuchItemException e) {\n }\n double curValue = curToken.doubleValue();\n _plot.addPoint(i, curTime, curValue, false);\n }\n } else {\n numEmptyChannel++;\n }\n }\n if (numEmptyChannel == width) {\n throw new InternalErrorException(\"String_Node_Str\" + \"String_Node_Str\");\n }\n}\n"
"public boolean LoadHomes() {\n warpString.clear();\n warps.clear();\n File warpFile;\n warpFile = new File(BenCmd.propDir + \"String_Node_Str\");\n String str = \"String_Node_Str\";\n BufferedReader br;\n try {\n br = new BufferedReader(new InputStreamReader(new FileInputStream(warpFile)));\n } catch (FileNotFoundException e) {\n BenCmd.log(Level.WARNING, \"String_Node_Str\");\n try {\n warpFile.createNewFile();\n br = new BufferedReader(new InputStreamReader(new FileInputStream(warpFile)));\n } catch (IOException ex) {\n BenCmd.log(Level.SEVERE, \"String_Node_Str\");\n BenCmd.log(ex);\n return false;\n }\n }\n try {\n while ((str = br.readLine()) != null) {\n try {\n warpString.add(str);\n String name = str.split(\"String_Node_Str\")[0];\n double x = Double.parseDouble(str.split(\"String_Node_Str\")[1].split(\"String_Node_Str\")[0]);\n double y = Double.parseDouble(str.split(\"String_Node_Str\")[1].split(\"String_Node_Str\")[1]);\n double z = Double.parseDouble(str.split(\"String_Node_Str\")[1].split(\"String_Node_Str\")[2]);\n double yaw;\n double pitch;\n try {\n yaw = Double.parseDouble(str.split(\"String_Node_Str\")[1].split(\"String_Node_Str\")[3]);\n pitch = Double.parseDouble(str.split(\"String_Node_Str\")[1].split(\"String_Node_Str\")[4]);\n } catch (IndexOutOfBoundsException e) {\n yaw = 0;\n pitch = 0;\n }\n String world = str.split(\"String_Node_Str\")[2];\n String group = \"String_Node_Str\";\n if (str.split(\"String_Node_Str\").length == 4) {\n group = str.split(\"String_Node_Str\")[3];\n }\n if (Bukkit.getWorld(world) != null) {\n warps.put(name, new Warp(x, y, z, yaw, pitch, world, name, group));\n }\n } catch (IndexOutOfBoundsException e) {\n BenCmd.log(Level.WARNING, \"String_Node_Str\");\n BenCmd.log(e);\n } catch (NumberFormatException e) {\n BenCmd.log(Level.WARNING, \"String_Node_Str\");\n BenCmd.log(e);\n }\n }\n br.close();\n } catch (IOException e) {\n BenCmd.log(Level.SEVERE, \"String_Node_Str\");\n BenCmd.log(e);\n return false;\n }\n return true;\n}\n"
"public static ReportItemHandle getBindingHolder(DesignElementHandle handle) {\n if (handle instanceof ReportElementHandle) {\n if (handle instanceof ListingHandle) {\n return (ReportItemHandle) handle;\n }\n if (handle instanceof ReportItemHandle) {\n if (((ReportItemHandle) handle).getDataSet() != null || ((ReportItemHandle) handle).columnBindingsIterator().hasNext()) {\n return (ReportItemHandle) handle;\n }\n }\n ReportItemHandle result = getBindingHolder(handle.getContainer());\n if (result == null && handle instanceof ReportItemHandle) {\n result = (ReportItemHandle) handle;\n }\n return result;\n }\n return null;\n}\n"
"public Result stopAgent(StopAgentForm form) throws NulsException, IOException {\n AssertUtil.canNotEmpty(form);\n AssertUtil.canNotEmpty(form.getAddress());\n if (!AddressTool.validAddress(form.getAddress())) {\n throw new NulsRuntimeException(KernelErrorCode.PARAMETER_ERROR);\n }\n Account account = accountService.getAccount(form.getAddress()).getData();\n if (null == account) {\n return Result.getFailed(AccountErrorCode.ACCOUNT_NOT_EXIST);\n }\n if (account.isEncrypted() && account.isLocked()) {\n AssertUtil.canNotEmpty(form.getPassword());\n try {\n if (!account.decrypt(form.getPassword())) {\n return Result.getFailed(AccountErrorCode.PASSWORD_IS_WRONG);\n }\n } catch (NulsException e) {\n return Result.getFailed(AccountErrorCode.PASSWORD_IS_WRONG);\n }\n }\n StopAgentTransaction tx = new StopAgentTransaction();\n StopAgent stopAgent = new StopAgent();\n stopAgent.setAddress(AddressTool.getAddress(form.getAddress()));\n List<Agent> agentList = PocConsensusContext.getChainManager().getMasterChain().getChain().getAgentList();\n Agent agent = null;\n for (Agent a : agentList) {\n if (Arrays.equals(a.getAgentAddress(), account.getAddress().getBase58Bytes())) {\n agent = a;\n break;\n }\n }\n if (agent == null || agent.getDelHeight() > 0) {\n return Result.getFailed(\"String_Node_Str\");\n }\n NulsDigestData createTxHash = agent.getTxHash();\n stopAgent.setCreateTxHash(createTxHash);\n tx.setTxData(stopAgent);\n CoinData coinData = new CoinData();\n List<Coin> toList = new ArrayList<>();\n toList.add(new Coin(stopAgent.getAddress(), agent.getDeposit(), 0));\n coinData.setTo(toList);\n CreateAgentTransaction transaction = (CreateAgentTransaction) ledgerService.getTx(createTxHash);\n if (null == transaction) {\n return Result.getFailed(\"String_Node_Str\");\n }\n List<Coin> fromList = new ArrayList<>();\n for (int index = 0; index < transaction.getCoinData().getTo().size(); index++) {\n Coin coin = transaction.getCoinData().getTo().get(index);\n if (coin.getLockTime() == -1L && coin.getNa().equals(agent.getDeposit())) {\n coin.setOwner(ArraysTool.joinintTogether(transaction.getHash().serialize(), new VarInt(index).encode()));\n fromList.add(coin);\n break;\n }\n }\n if (fromList.isEmpty()) {\n return Result.getFailed(KernelErrorCode.DATA_ERROR);\n }\n coinData.setFrom(fromList);\n Na fee = TransactionFeeCalculator.getFee(tx.size());\n coinData.getTo().get(0).setNa(coinData.getTo().get(0).getNa().subtract(fee));\n tx.setCoinData(coinData);\n Result result1 = this.txProcessing(tx, null, account, form.getPassword());\n if (result1.isFailed()) {\n return result1;\n }\n return Result.getSuccess().setData(tx.getHash().getDigestHex());\n}\n"
"public void setStatus(GroupStatus status) {\n log.info(String.format(\"String_Node_Str\" + \"String_Node_Str\", id, this.status, status));\n this.status = status;\n if (status == GroupStatus.Inactive && !this.hasDependent) {\n log.info(\"String_Node_Str\" + this.id + \"String_Node_Str\" + \"String_Node_Str\");\n } else {\n MonitorStatusEventBuilder.handleGroupStatusEvent(this.parent, this.status, this.id);\n }\n}\n"
"public boolean getFire() {\n return this.getHandle().isFlammable();\n}\n"
"Task getTask() {\n return mAppToken != null ? mAppToken.mTask : null;\n}\n"
"private void incEdgeCounterIdx(int counters, int scratch, int base, int counterIdx) {\n asm.emitADDI(counters, base << 2, counters);\n asm.emitLIntX(scratch, counterIdx, counters);\n asm.emitADDI(scratch, 1, scratch);\n asm.emitCMPI(scratch, 0);\n VM_ForwardReference fr = asm.emitForwardBC(VM_Assembler.LT);\n asm.emitSTWX(scratch, counterIdx, counters);\n}\n"
"protected void init() {\n super.init();\n extractDataFromBundle();\n adapter = new GiftListAdapter(context, galleries);\n mRecyclerView.setAdapter(adapter);\n linearLayoutManager = new LinearLayoutManager(context);\n mRecyclerView.setLayoutManager(linearLayoutManager);\n apiRequest.getGifts(new GetGiftPathQuery(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", category.categoryId, null));\n}\n"
"public boolean isLoggable(LogRecord record) {\n if (record.getMessage() == null && record.getThrown() == null) {\n return false;\n }\n String recordString = \"String_Node_Str\";\n if (record.getMessage() != null) {\n if (!record.getMessage().contains(\"String_Node_Str\")) {\n if (record.getThrown() == null) {\n return false;\n }\n if (record.getThrown().getMessage() == null) {\n return false;\n }\n if (!record.getThrown().getMessage().contains(\"String_Node_Str\")) {\n return false;\n }\n }\n recordString = buildString(record);\n } else {\n if (record.getThrown() != null) {\n if (record.getThrown().getMessage() == null) {\n return false;\n }\n if (!record.getThrown().getMessage().contains(\"String_Node_Str\")) {\n return false;\n }\n recordString = buildString(record);\n }\n ProjectKorra.handler.publish(record);\n ProjectKorra.handler.flush();\n return false;\n }\n return true;\n}\n"
"public boolean hasUser(String userName) {\n if (this.permissions.isConfigurationSection(buildPath(\"String_Node_Str\", userName))) {\n return true;\n }\n ConfigurationSection userSection = this.permissions.getConfigurationSection(\"String_Node_Str\");\n if (userSection != null) {\n for (String name : userSection.getKeys(false)) {\n if (userName.equalsIgnoreCase(name)) {\n return true;\n }\n }\n }\n return false;\n}\n"
"protected void populateReplacementPatterns(String baseProperty, List<String> regexPatterns) {\n replacementPattern = new LinkedHashMap<String, String>();\n Pattern p = Pattern.compile(\"String_Node_Str\");\n for (String regexPattern : regexPatterns) {\n Matcher m = p.matcher(regexPattern);\n if (!m.matches()) {\n logger.warn(\"String_Node_Str\" + regexPattern + \"String_Node_Str\");\n }\n m = m.reset();\n while (m.find()) {\n String matchPattern = m.group(1);\n String replacement = m.group(2);\n if (matchPattern != null && !matchPattern.isEmpty() && replacement != null) {\n replacementPattern.put(matchPattern, replacement);\n if (logger.isDebugEnabled()) {\n logger.debug(baseProperty + \"String_Node_Str\" + matchPattern + \"String_Node_Str\" + replacement);\n }\n }\n }\n }\n}\n"
"public <T> T invokeEffectorMethodSync(final Entity entity, final Effector<T> eff, final Object args) throws ExecutionException {\n try {\n Task<?> current = Tasks.current();\n if (current == null || !entity.equals(BrooklynTasks.getContextEntity(current)) || !isManagedLocally(entity)) {\n manageIfNecessary(entity, eff.getName());\n Task<T> task = runAtEntity(EffectorUtils.getTaskFlagsForEffectorInvocation(entity, eff), entity, new Callable<T>() {\n public T call() {\n return invokeEffectorMethodLocal(entity, eff, args);\n }\n });\n return task.get();\n } else {\n return invokeEffectorMethodLocal(entity, eff, args);\n }\n } catch (Exception e) {\n throw new ExecutionException(e);\n }\n}\n"
"protected void commitCowMaps() {\n super.commitCowMaps();\n lock.writeLock().lock();\n try {\n if (relationshipMap == null) {\n relationshipMap = new ArrayMap<String, ArrayIntSet>();\n }\n if (cowRelationshipAddMap != null) {\n for (String type : cowRelationshipAddMap.keySet()) {\n ArrayIntSet source = cowRelationshipAddMap.get(type);\n if (source.size() == 0) {\n continue;\n }\n ArrayIntSet dest = relationshipMap.get(type);\n if (dest == null) {\n dest = new ArrayIntSet();\n relationshipMap.put(type, dest);\n }\n for (int relId : source.values()) {\n dest.add(relId);\n }\n }\n if (dest.size() > 0) {\n newMap.put(type, dest);\n }\n }\n }\n if (cowRelationshipAddMap != null) {\n for (String type : cowRelationshipAddMap.keySet()) {\n ArrayIntSet source = cowRelationshipAddMap.get(type);\n ArrayIntSet dest = newMap.get(type);\n if (dest == null) {\n dest = new ArrayIntSet();\n newMap.put(type, dest);\n }\n for (int relId : source.values()) {\n dest.add(relId);\n }\n }\n }\n cowRelationshipAddMap = null;\n cowRelationshipRemoveMap = null;\n relationshipMap = newMap;\n}\n"
"public void determineAccessRights(String page, State currentState) {\n if (currentState.getCaseID() == 1) {\n if (currentState.getUserProjectRole() == ProjectRole.Acquisition_Organization_Engineer) {\n currentState.setMode(GwtModesType.ReadOnly);\n } else if (currentState.getUserProjectRole() == ProjectRole.Contractor) {\n currentState.setMode(GwtModesType.ReadWrite);\n } else if (currentState.getUserProjectRole() == ProjectRole.Security_Specialist) {\n currentState.setMode(GwtModesType.NoAccess);\n } else if (currentState.getUserProjectRole() == ProjectRole.COTS_Vendor) {\n currentState.setMode(GwtModesType.NoAccess);\n } else if (currentState.getUserProjectRole() == ProjectRole.None) {\n currentState.setMode(GwtModesType.NoAccess);\n } else if (currentState.getUserProjectRole() == ProjectRole.Administrator) {\n currentState.setMode(GwtModesType.ReadWrite);\n } else {\n currentState.setMode(GwtModesType.ReadOnly);\n }\n } else if (currentState.getCaseID() == 3) {\n if (currentState.getUserProjectRole() == ProjectRole.Acquisition_Organization_Engineer) {\n currentState.setMode(GwtModesType.ReadOnly);\n } else if (currentState.getUserProjectRole() == ProjectRole.Contractor) {\n currentState.setMode(GwtModesType.NoAccess);\n } else if (currentState.getUserProjectRole() == ProjectRole.Security_Specialist) {\n currentState.setMode(GwtModesType.ReadWrite);\n } else if (currentState.getUserProjectRole() == ProjectRole.COTS_Vendor) {\n currentState.setMode(GwtModesType.NoAccess);\n } else if (currentState.getUserProjectRole() == ProjectRole.None) {\n currentState.setMode(GwtModesType.NoAccess);\n } else if (currentState.getUserProjectRole() == ProjectRole.Administrator) {\n currentState.setMode(GwtModesType.ReadWrite);\n } else {\n currentState.setMode(GwtModesType.ReadOnly);\n }\n }\n}\n"
"public void saveFinished(IDataSetCacheObject dsco) throws DataException {\n switchCacheMap(dataSetDesign);\n cacheMapManager.saveFinishOnCache(DataSourceAndDataSet.newInstance(this.dataSourceDesign, this.dataSetDesign, this.parameterHints, this.cacheID, this.enableSamplePreview), dsco);\n}\n"
"public static String getSQLSelectString(PoiCategoryFilter filter) {\n return SELECT_STATEMENT + getSQLWhereClauseString(filter) + \"String_Node_Str\";\n}\n"
"public Object visitTupleTypeSpecifier(cqlParser.TupleTypeSpecifierContext ctx) {\n TupleType resultType = new TupleType();\n TupleTypeSpecifier typeSpecifier = of.createTupleTypeSpecifier();\n for (cqlParser.TupleElementDefinitionContext definitionContext : ctx.tupleElementDefinition()) {\n TupleElementDefinition element = (TupleElementDefinition) visit(definitionContext);\n resultType.addElement(new TupleTypeElement(element.getName(), element.getType().getResultType()));\n typeSpecifier.getElement().add(element);\n }\n typeSpecifier.setResultType(resultType);\n return typeSpecifier;\n}\n"
"public String toString(List<Object> localData) {\n if (rightSide.precedence >= precedence) {\n String ret = \"String_Node_Str\";\n if (leftSide.precedence > precedence) {\n ret += \"String_Node_Str\" + leftSide.toString(localData) + \"String_Node_Str\";\n } else {\n ret += leftSide.toString(localData);\n }\n ret += \"String_Node_Str\";\n ret += hilight(operator);\n ret += \"String_Node_Str\";\n ret += \"String_Node_Str\" + rightSide.toString(localData) + \"String_Node_Str\";\n return ret;\n } else {\n ret += leftSide.toString(localData);\n }\n ret += hilight(operator);\n ret += \"String_Node_Str\" + rightSide.toString(localData) + \"String_Node_Str\";\n return ret;\n}\n"
"public DatabaseCall buildCall(AbstractSession session) {\n SQLCall call = (SQLCall) super.buildCall(session);\n Writer writer = new CharArrayWriter(100);\n try {\n writer.write(call.getSQLString());\n boolean whereWasPrinted = true;\n if (selectCallForExist != null) {\n if (shouldExtractWhereClauseFromSelectCallForExist) {\n whereWasPrinted = writeWhere(writer, selectCallForExist, call);\n } else {\n writer.write(\"String_Node_Str\");\n writeSelect(writer, selectCallForExist, tableAliasInSelectCallForExist, call);\n writer.write(\"String_Node_Str\");\n }\n } else if (inheritanceExpression != null) {\n writer.write(\"String_Node_Str\");\n ExpressionSQLPrinter printer = new ExpressionSQLPrinter(session, getTranslationRow(), call, false, getBuilder());\n printer.setWriter(writer);\n printer.printExpression(inheritanceExpression);\n } else {\n whereWasPrinted = false;\n }\n if (selectCallForNotExist != null) {\n if (whereWasPrinted) {\n writer.write(\"String_Node_Str\");\n } else {\n writer.write(\"String_Node_Str\");\n }\n writer.write(\"String_Node_Str\");\n writeSelect(writer, selectCallForNotExist, tableAliasInSelectCallForNotExist, call);\n writer.write(\"String_Node_Str\");\n }\n call.setSQLString(writer.toString());\n } catch (IOException exception) {\n throw ValidationException.fileError(exception);\n }\n return call;\n}\n"
"protected UrlMapping evalUrlMapping(NutConfig config, Class<?> mainModule, Ioc ioc) throws Exception {\n UrlMapping mapping = createUrlMapping(config);\n if (log.isInfoEnabled())\n log.infof(\"String_Node_Str\", mapping.getClass().getName());\n ViewMaker[] makers = createViewMakers(mainModule, ioc);\n ActionChainMaker maker = createChainMaker(config, mainModule);\n ActionInfo mainInfo = Loadings.createInfo(mainModule);\n Set<Class<?>> modules = Loadings.scanModules(ioc, mainModule);\n if (modules.isEmpty()) {\n if (log.isWarnEnabled())\n log.warn(\"String_Node_Str\");\n }\n int atMethods = 0;\n for (Class<?> module : modules) {\n ActionInfo moduleInfo = Loadings.createInfo(module).mergeWith(mainInfo);\n for (Method method : module.getMethods()) {\n if (!Modifier.isPublic(method.getModifiers()) || !method.isAnnotationPresent(At.class))\n continue;\n ActionInfo info = Loadings.createInfo(method).mergeWith(moduleInfo);\n info.setViewMakers(makers);\n mapping.add(maker, info, config);\n atMethods++;\n }\n if (null != moduleInfo.getPathMap()) {\n for (Entry<String, String> en : moduleInfo.getPathMap().entrySet()) {\n config.getAtMap().add(en.getKey(), en.getValue());\n }\n }\n }\n if (atMethods == 0) {\n if (log.isWarnEnabled())\n log.warn(\"String_Node_Str\");\n } else {\n log.infof(\"String_Node_Str\", atMethods);\n }\n return mapping;\n}\n"
"public void sendEvent(String e) {\n for (String event : myEventQueue.getEventListenerMap().keySet()) {\n if (event.equals(e)) {\n for (EventListener listener : mapEventToEventListnerList.get(event)) {\n listener.actionPerformed(event);\n }\n }\n }\n}\n"
"public void mute() {\n logger.info(\"String_Node_Str\");\n String api_key = HubProperties.getProperty(\"String_Node_Str\", \"String_Node_Str\");\n String app_key = HubProperties.getProperty(\"String_Node_Str\", \"String_Node_Str\");\n String name = HubHost.getLocalName();\n if (\"String_Node_Str\".equals(api_key) || \"String_Node_Str\".equals(app_key)) {\n logger.warn(\"String_Node_Str\");\n return;\n }\n logger.info(\"String_Node_Str\" + api_key + \"String_Node_Str\" + app_key);\n try {\n String url = \"String_Node_Str\" + api_key + \"String_Node_Str\" + app_key;\n ObjectNode root = mapper.createObjectNode();\n root.put(\"String_Node_Str\", \"String_Node_Str\" + name);\n root.put(\"String_Node_Str\", \"String_Node_Str\");\n root.put(\"String_Node_Str\", (new Instant()).getMillis() + (4 * 60 * 60 * 1000));\n ClientResponse response = RestClient.defaultClient().resource(url).type(MediaType.APPLICATION_JSON).post(ClientResponse.class, root);\n int status = response.getStatus();\n if (status >= 200 && status <= 299) {\n logger.info(\"String_Node_Str\" + name + \"String_Node_Str\");\n } else {\n logger.warn(\"String_Node_Str\" + name);\n }\n } catch (Exception e) {\n logger.warn(\"String_Node_Str\", e);\n }\n}\n"
"public static EditType getBestValidType(EntityDelta state, DataKind kind, boolean includeSecondary, int exactValue) {\n if (kind.typeColumn == null)\n return null;\n final SparseIntArray typeCount = getTypeFrequencies(state, kind);\n final ArrayList<EditType> validTypes = getValidTypes(state, kind, null, includeSecondary, typeCount);\n if (validTypes.size() == 0)\n return null;\n final EditType lastType = validTypes.get(validTypes.size() - 1);\n Iterator<EditType> iterator = validTypes.iterator();\n while (iterator.hasNext()) {\n final EditType type = iterator.next();\n final int count = typeCount.get(type.rawValue);\n if (exactValue == type.rawValue) {\n return type;\n }\n if (count > 0) {\n iterator.remove();\n }\n }\n if (validTypes.size() > 0) {\n return validTypes.get(0);\n } else {\n return lastType;\n }\n}\n"
"protected Frame getLexicalScope(Frame frame) {\n Object[] args = frame.getArguments();\n if (args.length > 0) {\n return (Frame) frame.getArguments()[0];\n } else {\n return null;\n }\n}\n"
"public static Vector checkAndConvertState(Vector state, InferredPath path) {\n final Vector adjState;\n if (path.isNullPath() && state.getDimensionality() != 4) {\n final double dist = AbstractRoadTrackingFilter.getOr().times(state).getElement(0);\n final PathEdge edge = path.getEdgeForDistance(dist, false);\n adjState = getGroundStateFromRoad(state, edge, true);\n } else if (!path.isNullPath() && state.getDimensionality() != 2) {\n adjState = getRoadStateFromGround(state, path, false);\n } else {\n adjState = state;\n }\n return adjState;\n}\n"
"public ExecutionResult execute(Item item) {\n if (GenericWizardServiceFactory.getGenericWizardService().isGenericItem(item)) {\n try {\n GenericConnectionItem connectionItem = (GenericConnectionItem) item;\n GenericConnection connection = (GenericConnection) connectionItem.getConnection();\n String serialized = connection.getCompProperties();\n ComponentService service = ComponentsUtils.getComponentService();\n ComponentWizard componentWizard = service.getComponentWizard(NewSalesforceWizardMigrationTask.TYPE_NAME, item.getProperty().getId());\n ComponentProperties newProperties = (ComponentProperties) componentWizard.getForms().get(0).getProperties();\n newProperties.init();\n ComponentProperties properties = loadProperties(serialized, newProperties);\n updateSubProperties(properties, newProperties);\n newProperties.copyValuesFrom(properties, true, false);\n connection.setCompProperties(newProperties.toSerialized());\n Set<MetadataTable> tables = new HashSet<MetadataTable>();\n PackageHelper.getAllTables(connection, tables);\n for (MetadataTable table : tables) {\n EList<TaggedValue> values = table.getTaggedValue();\n for (TaggedValue value : values) {\n if (IComponentConstants.COMPONENT_PROPERTIES_TAG.equals(value.getTag())) {\n Object object = ReflectionUtils.newInstance(NewSalesforceWizardMigrationTask.REFLECTION_SALESFORCE_MODULE_PROPERTIES, newProperties.getClass().getClassLoader(), new Object[] { table.getName() });\n if (object != null && object instanceof ComponentProperties) {\n ComponentProperties newSalesforceModuleProperties = (ComponentProperties) object;\n ComponentProperties moduleProperties = loadProperties(serialized, newSalesforceModuleProperties);\n updateSubProperties(moduleProperties, newSalesforceModuleProperties);\n connection.setCompProperties(moduleProperties.toSerialized());\n }\n }\n }\n }\n ProxyRepositoryFactory.getInstance().save(connectionItem, true);\n return ExecutionResult.SUCCESS_NO_ALERT;\n } catch (Exception e) {\n ExceptionHandler.process(e);\n return ExecutionResult.FAILURE;\n }\n }\n return ExecutionResult.NOTHING_TO_DO;\n}\n"
"public void get_WithNonKeyKey() {\n ArrayList<Integer> key1 = new ArrayList<Integer>();\n key1.add(1);\n key1.add(2);\n LinkedList<Integer> key2 = new LinkedList<Integer>(key1);\n CacheLoader<ArrayList<Integer>, String> loader = new ArrayListCacheLoader();\n Cache<ArrayList<Integer>, String> cache = getCacheManager().configureCache(getTestCacheName(), new MutableConfiguration<ArrayList<Integer>, String>().setCacheLoaderFactory(Factories.of(loader)));\n}\n"
"private EntityManagerFactoryImpl getEntityManagerFactory(String property) {\n Map<String, Object> props = new HashMap<String, Object>();\n props.put(Constants.PERSISTENCE_UNIT_NAME, pu);\n props.put(PersistenceProperties.KUNDERA_CLIENT_FACTORY, \"String_Node_Str\");\n props.put(PersistenceProperties.KUNDERA_NODES, \"String_Node_Str\");\n props.put(PersistenceProperties.KUNDERA_PORT, \"String_Node_Str\");\n props.put(PersistenceProperties.KUNDERA_KEYSPACE, keyspace);\n props.put(PersistenceProperties.KUNDERA_DDL_AUTO_PREPARE, property);\n if (useLucene) {\n props.put(PersistenceProperties.KUNDERA_INDEX_HOME_DIR, \"String_Node_Str\");\n }\n KunderaMetadata.INSTANCE.setApplicationMetadata(null);\n ApplicationMetadata appMetadata = KunderaMetadata.INSTANCE.getApplicationMetadata();\n PersistenceUnitMetadata puMetadata = new PersistenceUnitMetadata();\n puMetadata.setPersistenceUnitName(pu);\n Properties p = new Properties();\n p.putAll(props);\n puMetadata.setProperties(p);\n Map<String, PersistenceUnitMetadata> metadata = new HashMap<String, PersistenceUnitMetadata>();\n metadata.put(pu, puMetadata);\n appMetadata.addPersistenceUnitMetadata(metadata);\n Map<String, List<String>> clazzToPu = new HashMap<String, List<String>>();\n List<String> pus = new ArrayList<String>();\n pus.add(pu);\n clazzToPu.put(CassandraEntityPersonnelUniMToM.class.getName(), pus);\n clazzToPu.put(CassandraEntityHabitatUniMToM.class.getName(), pus);\n appMetadata.setClazzToPuMap(clazzToPu);\n EntityMetadata m = new EntityMetadata(CassandraEntityPersonnelUniMToM.class);\n EntityMetadata m1 = new EntityMetadata(CassandraEntityHabitatUniMToM.class);\n TableProcessor processor = new TableProcessor(null);\n processor.process(CassandraEntityPersonnelUniMToM.class, m);\n processor.process(CassandraEntityHabitatUniMToM.class, m1);\n m.setPersistenceUnit(pu);\n MetamodelImpl metaModel = new MetamodelImpl();\n metaModel.addEntityMetadata(CassandraEntityPersonnelUniMToM.class, metadataBuilder.buildEntityMetadata(CassandraEntityPersonnelUniMToM.class));\n metaModel.addEntityMetadata(CassandraEntityHabitatUniMToM.class, metadataBuilder.buildEntityMetadata(CassandraEntityHabitatUniMToM.class));\n metaModel.assignManagedTypes(appMetadata.getMetaModelBuilder(pu).getManagedTypes());\n metaModel.assignEmbeddables(appMetadata.getMetaModelBuilder(pu).getEmbeddables());\n metaModel.assignMappedSuperClass(appMetadata.getMetaModelBuilder(pu).getMappedSuperClassTypes());\n appMetadata.getMetamodelMap().put(pu, metaModel);\n new ClientFactoryConfiguraton(null, pu).configure();\n new SchemaConfiguration(null, pu).configure();\n return null;\n}\n"
"public void setContainer(Container container) {\n if ((this.container != null) && (this.container instanceof Context))\n ((Context) this.container).removePropertyChangeListener(this);\n Container oldContainer = this.container;\n this.container = container;\n support.firePropertyChange(\"String_Node_Str\", oldContainer, this.container);\n if (this.container instanceof Context) {\n setReloadable(((Context) this.container).getReloadable());\n ((Context) this.container).addPropertyChangeListener(this);\n }\n}\n"
"public KVDocument build() {\n KVDocument updatedDocument;\n updatedDocument = buildRoot();\n clear();\n return updatedDocument;\n}\n"
"public boolean isConnected() {\n boolean isConnected = false;\n if (mongoClient != null) {\n try {\n mongoClient.getConnectPoint();\n isConnected = true;\n } catch (Exception error) {\n logger.error(\"String_Node_Str\" + error.getMessage(), error);\n }\n }\n return isConnected;\n}\n"
"public Move createMove(Invoice invoice) throws AxelorException {\n Move move = null;\n if (invoice != null && invoice.getInvoiceLineList() != null) {\n Journal journal = invoice.getJournal();\n Company company = invoice.getCompany();\n Partner partner = invoice.getPartner();\n Account account = invoice.getPartnerAccount();\n log.debug(\"String_Node_Str\", new Object[] { invoice.getInvoiceId(), company.getName(), journal.getCode() });\n move = moveCreateService.createMove(journal, company, invoice, partner, invoice.getInvoiceDate(), invoice.getPaymentMode());\n if (move != null) {\n boolean isPurchase = InvoiceToolService.isPurchase(invoice);\n boolean isDebitCustomer = moveToolService.isDebitCustomer(invoice, false);\n boolean consolidate = moveToolService.toDoConsolidate();\n move.getMoveLineList().addAll(moveLineService.createMoveLines(invoice, move, company, partner, account, consolidate, isPurchase, isDebitCustomer));\n moveRepository.save(move);\n invoice.setMove(move);\n invoice.setCompanyInTaxTotalRemaining(moveToolService.getInTaxTotalRemaining(invoice));\n moveValidateService.validateMove(move);\n }\n }\n return move;\n}\n"
"public IngestFormatOptionProvider getIngestFormatOptionProvider() {\n return new MultiOptionProvider(getIngestFormatOptionProviders().toArray(new IngestFormatOptionProvider[] {}));\n}\n"
"private void timeUpdateDo(long frame) {\n if (!user_drag && PLAYBACK.state.status.get() == PLAYING) {\n long Δt = posLastFrame == 0 ? 0 : (frame - posLastFrame) / 1000000;\n double Δp = Δt / timeTot.get().toMillis();\n posLast += Δp;\n long now = System.currentTimeMillis();\n if (now - polastUpdate > posUpdateInterval) {\n polastUpdate = now;\n seeker.setValue(p);\n }\n }\n posLastFrame = frame;\n}\n"
"public List<PrimaryKey> getPrimaryKeys(String catalogName, String schemaPattern, String tableName) throws SQLException {\n List<PrimaryKey> pks = new ArrayList<PrimaryKey>();\n ResultSet primaryKeys = null;\n try {\n primaryKeys = ConnectionUtils.getConnectionMetadata(connection).getPrimaryKeys(catalogName, schemaPattern, tableName);\n try {\n while (primaryKeys.next()) {\n PrimaryKey pk = createPrimaryKey(primaryKeys);\n pks.add(pk);\n }\n } catch (SQLException e) {\n throw e;\n } finally {\n if (primaryKeys != null) {\n primaryKeys.close();\n }\n }\n } catch (Exception e1) {\n log.warn(\"String_Node_Str\", e1);\n }\n return pks;\n}\n"
"public boolean applies(GameEvent event, Ability source, Game game) {\n if (event.getType() == GameEvent.EventType.LOST_CONTROL) {\n if (event.getTargetId().equals(source.getSourceId())) {\n this.used = true;\n return false;\n }\n }\n if (event.getType() == GameEvent.EventType.ZONE_CHANGE && event.getTargetId().equals(source.getSourceId())) {\n ZoneChangeEvent zEvent = (ZoneChangeEvent) event;\n if (zEvent.getFromZone() == Zone.BATTLEFIELD) {\n this.used = true;\n return false;\n }\n }\n if (game.getTurn().getStepType() == Constants.PhaseStep.UNTAP && event.getType() == GameEvent.EventType.UNTAP) {\n if (event.getTargetId().equals(targetPointer.getFirst(game, source))) {\n return true;\n }\n }\n return false;\n}\n"
"public boolean equals(Object obj) {\n if (!getClass().equals(obj.getClass())) {\n return false;\n } else {\n ClassLoaderReference o = (ClassLoaderReference) obj;\n return name.equals(o.name);\n }\n ClassLoaderReference o = (ClassLoaderReference) obj;\n return name.equals(o.name);\n}\n"