content
stringlengths
40
137k
"private static ApicFrame decodeApicFrame(ParsableByteArray id3Data, int frameSize, int majorVersion) throws UnsupportedEncodingException {\n int encoding = id3Data.readUnsignedByte();\n String charset = getCharsetName(encoding);\n byte[] data = new byte[frameSize - 1];\n id3Data.readBytes(data, 0, frameSiz...
"public List<Integer> genRefreshs(int playerId, int type) {\n Player player = playerService.getPlayer(playerId);\n List<Integer> ids = new ArrayList<Integer>(ConfigData.RefreshIds.get(type));\n List<Integer> rates = new ArrayList<Integer>(ConfigData.RefreshRates.get(type));\n List<Integer> result = new Arra...
"public void build(ClassScope classScope, CrosscuttingMembers xcut) {\n EclipseWorld world = EclipseWorld.fromScopeLookupEnvironment(classScope);\n resolveOnType(classScope);\n binding = classScope.referenceContext.binding.resolveTypesFor(binding);\n if (ignoreFurtherInvestigation)\n return;\n if ...
"public String getUnlocalizedName(ItemStack is) {\n int damage = is.getItemDamage();\n return \"String_Node_Str\" + (damage >= 0 && damage < RuneType.values.length ? RuneType.values[damage].name().toLowerCase(Locale.ENGLISH) : damage == OreDictionary.WILDCARD_VALUE ? \"String_Node_Str\" : \"String_Node_Str\");\n}...
"public List<String> parse(Object[] message) throws IOException {\n List<String> adresses = new ArrayList<String>();\n if (message != null && message.length > 1) {\n Object[] data = (Object[]) message[1];\n for (int i = 0; i < message.length; i++) {\n String address = getSanitizedAddress(...
"public void load() throws Exception {\n if (init)\n return;\n StringBuffer sb = new StringBuffer();\n sb.append(\"String_Node_Str\");\n ClassPathResource res = new ClassPathResource(\"String_Node_Str\", KernelFunctionLoader.class.getClassLoader());\n if (!res.exists())\n throw new IllegalS...
"public boolean validateJoinRequest(JoinRequest joinRequest) throws Exception {\n boolean valid = Packet.PACKET_VERSION == joinRequest.packetVersion && buildNumber == joinRequest.buildNumber;\n if (valid) {\n try {\n valid = config.isCompatible(joinRequest.config);\n } catch (Exception e)...
"private void prepareLevels(QueryDefinition query, List resultMetaList, Map levelNameColumnNamePair, TabularHierarchyHandle hierHandle) {\n List levels = hierHandle.getContents(TabularHierarchyHandle.LEVELS_PROP);\n for (int j = 0; j < levels.size(); j++) {\n TabularLevelHandle level = (TabularLevelHandle)...
"private void requestPermissions() {\n boolean shouldProvideRationale = ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_COARSE_LOCATION);\n if (shouldProvideRationale) {\n Log.i(TAG, \"String_Node_Str\");\n showSnackbar(R.string.permission_rationale, android.R.st...
"public void update(float delta) {\n transform.rotate(Vector3.AXIS_Y, 60 * delta);\n if (Keyboard.isPressed(Keyboard.KEY_ESCAPE))\n end();\n float speed = 2 * delta;\n if (Keyboard.isPressed(Keyboard.KEY_W))\n perspCam.moveForward(speed);\n if (Keyboard.isPressed(Keyboard.KEY_S))\n p...
"public void shouldSerializeAndDeserializeAssociationKey() throws Exception {\n String[] columnNames = { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" };\n AssociationKeyMetadata keyMetadata = new AssociationKeyMetadata(\"String_Node_Str\", columnNames, null, null, null, null);\n Object[] value...
"public void firebase_initialize(final int instance_id) {\n activity.runOnUiThread(new Runnable() {\n public void run() {\n firebaseCurrentUser.init(instance_id);\n firebaseCurrentAnalytics.init(instance_id);\n firebaseCurrentInvite.init(instance_id);\n firebaseCurr...
"protected List<Double> getColumnValues(StatisticsClassification result) {\n List<Double> list = new ArrayList<Double>();\n list.add(result.getZeroRAccuracy());\n list.add(result.getOriginalAccuracy());\n list.add(result.getAccuracy());\n if (result.getOriginalAccuracy() - result.getZeroRAccuracy() == 0d...
"public int onStartCommand(Intent intent, int flags, int startId) {\n processStartIntent(intent);\n return START_STICKY;\n}\n"
"protected void actuallyClose() throws IOException {\n long currentOffset = 0;\n for (Map.Entry<File, EntryAccounting> mapEntry : entries.entrySet()) {\n EntryAccounting entry = mapEntry.getValue();\n entry.setOffset(currentOffset);\n currentOffset += entry.writeLocalFileHeader(delegate);\n ...
"public double computeHypervolume(List<S> solutionList, Point referencePoint) {\n double hv = 0.0;\n if (solutionList.size() == 0) {\n hv = 0.0;\n } else {\n numberOfObjectives = solutionList.get(0).getNumberOfObjectives();\n this.referencePoint = referencePoint;\n if (numberOfObjec...
"private static Collection<Artifact> findArtifactsMatching(IncludeRule rule, Map<ArtifactId, Artifact> allArtifacts) {\n Collection<Artifact> ret = new ArrayList<Artifact>();\n for (Entry<ArtifactId, Artifact> entry : allArtifacts.entrySet()) {\n if (MatcherHelper.matches(rule.getMatcher(), rule.getId(), e...
"public boolean remove(Point2 point) {\n assert (mIsValid);\n boolean removed = false;\n if (isLeaf) {\n for (int i = mMinIndex; i < mMaxIndex && !removed; i++) {\n if (mPoints[i].equals(point)) {\n mMaxIndex--;\n mPoints[i] = mPoints[mMaxIndex];\n ...
"protected JCodeModel generateModel() throws IllegalStateException {\n final JCodeModel codeModel = super.generateModel();\n definedClass().constructor(JMod.PROTECTED);\n ClassModelUtil.createReadResolveMethod(definedClass());\n addValidator(new MessageIdValidator(methodDescriptor));\n for (MethodDescrip...
"public Optional<ContentKey> getLatest(DirectionQuery query) {\n String channel = query.getChannelName();\n if (!channelExists(channel)) {\n return Optional.absent();\n }\n query = query.withStartKey(ContentKey.lastKey(TimeUtil.time(query.isStable())));\n query = configureQuery(query);\n Option...
"synchronized List<Message> get(String marker, Long limit, Boolean matchHidden, Long wait) {\n clean();\n List<Message> messages = new ArrayList<Message>();\n Iterator<Entry<String, MessageRecord>> iter;\n if (marker != null)\n iter = queue.newIteratorFrom(marker);\n else\n iter = queue.new...
"public void testCompare() {\n String[] script = new String[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \...
"public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {\n int choose = sURIMatcher.match(uri);\n dba = db.getDB();\n switch(choose) {\n case USER:\n int count = dba.update(SQLitehelper.USER_TABLE_NAME, values, selection, selectionArgs);\n getCo...
"public boolean exec(IPlayer player, String[] args) {\n if (plugin.getPlotMeCoreManager().isPlotWorld(player)) {\n if (player.hasPermission(PermissionNames.USER_BIOME)) {\n List<String> biomes = serverBridge.getBiomes();\n Collections.sort(biomes);\n int page = 1;\n ...
"private void removePolicyContextDirectory() {\n String directoryName = getContextDirectoryName();\n File f = new File(directoryName);\n if (f.exists()) {\n File[] files = f.listFiles();\n if (files != null && files.length > 0) {\n for (int i = 0; i < files.length; i++) {\n ...
"public void startMonitoringBeaconsInRegion(Region region, Callback callback) {\n LogManager.d(TAG, \"String_Node_Str\");\n synchronized (monitoredRegionState) {\n if (monitoredRegionState.containsKey(region)) {\n LogManager.i(TAG, \"String_Node_Str\");\n monitoredRegionState.remove(r...
"public void prune() {\n Iterator<S> iterator = getSolutionList().iterator();\n boolean removed = false;\n while (iterator.hasNext()) {\n S element = iterator.next();\n int location = grid.location(element);\n if (location == grid.getMostPopulatedHypercube()) {\n iterator.remove...
"double solve(double k, double kMin, double kMax) throws NoResultException {\n\tif (kMax < kMin){\n\t\tthrow new NoResultException();\n\t}\n\tif (k <= 0 || kMax <= 0){\n\t\tthrow new NoResultException();\n\t}\n\tdouble kRoot = Math.pow(k, 0.5);\n\tif (kRoot < kMin)\n\t\treturn kMin;\n\tif (kRoot > kMax)\n\t\treturn kMa...
"public void onPageFinished(WebView view, String url) {\n mainActivity.runOnUiThread(new Runnable() {\n public void run() {\n mainActivity.showWebview();\n }\n });\n UrlInspector.getInstance().inspectUrl(url);\n super.onPageFinished(view, url);\n Uri uri = Uri.parse(url);\n if...
"private void validate(ConfigBeanProxy check, String key, String... arguments) throws ValidationFailureException {\n if ((check == null) && (report != null)) {\n report.setMessage(MessageFormat.format(rb.getString(key), arguments));\n report.setActionExitCode(ActionReport.ExitCode.FAILURE);\n th...
"private static void checkNumberOfColumns(Keyspace keyspace, String expectedColumnFamilyName, RowModel expectedRowModel) throws Error {\n int numberOfColumns = countNumberOfColumnsByKey(keyspace, expectedColumnFamilyName, expectedRowModel);\n int expectedNumberOfColumns = expectedRowModel.getColumns().size();\n ...
"protected void setHighId(long highId) {\n if (idGenerator != null) {\n idGenerator.setHighId(highId);\n }\n}\n"
"public void fillTriggeredElements(Triggerable t, Vector<Triggerable> destination) {\n if (t.canCascade()) {\n for (int j = 0; j < t.getTargets().size(); j++) {\n TreeReference target = (TreeReference) t.getTargets().elementAt(j);\n Vector<TreeReference> updatedNodes = new Vector<TreeRef...
"public static List<Element> getConstraintElements(Object constrainedObject) {\n LinkedHashSet<Element> constraintElements = new LinkedHashSet<Element>();\n if (constrainedObject instanceof Element) {\n Element constrainedElement = ((Element) constrainedObject);\n if (elementIsConstraintOnItself(con...
"public void run() {\n while (!stopOperation) {\n try {\n if (LokemonServerVariables.playerList.size() >= 1) {\n for (LokemonPlayer pl : LokemonServerVariables.playerList) {\n if (pl.getPosition() != null) {\n Location center = pl.getPosition...
"protected Query newWildcardQuery(Term t) {\n if (\"String_Node_Str\".equals(t.text())) {\n String fieldName = t.field();\n if (SUPER.equals(fieldName)) {\n return addField(new MatchAllDocsQuery(), fieldName);\n } else {\n return new TermQuery(new Term(BlurConstants.FIELDS,...
"protected String doInBackground(WebviewInterceptParams... inputs) {\n AppConfig appConfig = AppConfig.getInstance(this.context);\n InputStream is = null;\n ByteArrayOutputStream baos = null;\n try {\n parsedUrl = inputs[0].url;\n webview = inputs[0].webview;\n boolean isReload = inputs...
"public void testProgram() {\n ProgramId programId = new ProgramId(\"String_Node_Str\", \"String_Node_Str\", ProgramType.MAPREDUCE, \"String_Node_Str\");\n Authorizable authorizable = Authorizable.fromEntityId(programId);\n Assert.assertEquals(programId.toString().replace(ApplicationId.DEFAULT_VERSION + \"Stri...
"public String getLink() {\n return StringUtils.notNullStr(link);\n}\n"
"void moveToCompleteFolder() throws IOException {\n boolean success = _incompleteFile.renameTo(_completeFile);\n if (!success) {\n success = CommonUtils.copy(_incompleteFile, _completeFile);\n if (success)\n _incompleteFile.delete();\n }\n}\n"
"public StoreFileWriter createWriterInTmp(long maxKeyCount, Compression.Algorithm compression, boolean isCompaction, boolean includeMVCCReadpoint, boolean includesTag, boolean shouldDropBehind) throws IOException {\n final CacheConfig writerCacheConf;\n if (isCompaction) {\n writerCacheConf = new CacheConf...
"private StringBuilder buildScenarioNameWithSpaces(String[] scenarioNameSplittedByCapitals) {\n StringBuilder scenarioNameWithSpaces = new StringBuilder(\"String_Node_Str\");\n for (String part : scenarioNameSplittedByCapitals) {\n String partTrim = part.trim();\n if (partTrim.length() > 0) {\n ...
"public boolean onTouchEvent(MotionEvent event) {\n if (!isEnabled() || event.getPointerCount() > 1 || mSourceImage == null || mGraffitiLayer == null) {\n return super.onTouchEvent(event);\n }\n switch(event.getActionMasked()) {\n case MotionEvent.ACTION_DOWN:\n mTouchPoint.set(event);...
"private RolapCalculation getScopedMaxSolveOrder() {\n RolapCalculation maxSolveMember = null;\n ScopedMaxSolveOrderFinderState state = ScopedMaxSolveOrderFinderState.START;\n for (int i = 0; i < calcMemberCount; i++) {\n RolapCalculation member = calcMembers[i];\n switch(state) {\n ca...
"public void endElement(String uri, String localName, String qName) {\n if (qName.equals(\"String_Node_Str\")) {\n finishLastImport();\n for (int uid : mListRestartUid) mAppAdapter.setMessage(uid, getString(R.string.msg_restart));\n if (mListAbortedUid.size() > 0) {\n int uid = mListA...
"public void importItemRecord(IProgressMonitor monitor, ResourcesManager resManager, ItemRecord selectedItemRecord, boolean overwrite, IPath destinationPath, Set<String> overwriteDeletedItems, Set<String> idDeletedBeforeImport) {\n monitor.subTask(Messages.getString(\"String_Node_Str\", selectedItemRecord.getItemNam...
"private void useCsvReader(File file, DelimitedFileConnection delimitedFileconnection, List<ModelElement> analysisElementList) {\n int limitValue = JavaSqlFactory.getLimitValue(delimitedFileconnection);\n int headValue = JavaSqlFactory.getHeadValue(delimitedFileconnection);\n CSVReader csvReader = null;\n t...
"public void writePidFile() {\n File pidFile = null;\n try {\n pidFile = SmartFile.sanitize(getPidFile());\n File pidFileCopy = new File(pidFile.getPath() + \"String_Node_Str\");\n String pidString = getPidString();\n FileUtils.writeStringToFile(pidString, pidFile);\n FileUtils....
"public void attemptLogin() {\n if (loginTask != null) {\n return;\n }\n usernameEdit.setError(null);\n passwordEdit.setError(null);\n username = usernameEdit.getText().toString();\n password = passwordEdit.getText().toString();\n boolean cancel = false;\n View focusView = null;\n if (...
"public void start() {\n stop = false;\n isRunning = true;\n reset();\n int treeCount = 0;\n while (!stop && !stoppingCriteriaSatisfied()) {\n treeStartTime = System.nanoTime();\n ELDescriptionTree startTree = new ELDescriptionTree(reasoner, startClass);\n addDescriptionTree(startTre...
"public void noInternetConnection() {\n if (_automaticallyConnecting) {\n return;\n }\n if (SystemUtils.supportsIdleTime() && SystemUtils.getIdleTime() < 30 * 1000 && !QuestionsHandler.NO_INTERNET.getValue()) {\n MessageService.showError(\"String_Node_Str\", QuestionsHandler.NO_INTERNET);\n } ...
"public WrappedInstruction getSharedEdge(I3DRenderEvent event1, I3DRenderEvent event2, double xOffset, double yOffset) {\n PrimitiveRenderEvent primEvent = (PrimitiveRenderEvent) event2;\n Fill background = primEvent.getBackground();\n if (!(background instanceof ColorDefinition))\n return null;\n Co...
"public void reload(Class<Entity> clz, String name) {\n DataHolder<DataStore<Entity>> holder = this.stores.get(name);\n if (holder != null) {\n DataStore<Entity> oldData = holder.get();\n oldData.unload();\n Type type = loader.findType(name);\n DataStore<Entity> newData = new EntityDbD...
"public List<Action> getActions() throws InterruptedException {\n try {\n int prevLength = actionBytes.pos;\n SWFInputStream rri = new SWFInputStream(swf, actionBytes.array);\n if (prevLength != 0) {\n rri.seek(prevLength);\n } else {\n prevLength = 0;\n r...
"private TldLocation getExplicitlyMappedTldLocation(final String uri) throws SAXException, IOException, TaglibCreationException {\n while (true) {\n final TldLocation tldLocation = (TldLocation) tldLocations.get(uri);\n if (tldLocation != null) {\n return tldLocation;\n }\n swi...
"public void stopCapture() throws IOException {\n _isAudioCaptureActive = false;\n if (_audioInputStream != null) {\n _audioInputStream.close();\n }\n if (_properFormatAudioInputStream != null) {\n _properFormatAudioInputStream.close();\n }\n if (_targetLine != null) {\n if (_targ...
"public static boolean checkConnectionStatus(String nexusURL, final String username, final String password) {\n if (StringUtils.isEmpty(nexusURL)) {\n return false;\n }\n final Authenticator defaultAuthenticator = NetworkUtil.getDefaultAuthenticator();\n if (StringUtils.isNotEmpty(username)) {\n ...
"protected void checkGeometry(SerializerPluginConfiguration serializerPluginConfiguration, PluginManager pluginManager, IfcModelInterface model, Project project, ConcreteRevision concreteRevision, Revision revision) throws BimserverDatabaseException, GeometryGeneratingException {\n SerializerPlugin serializerPlugin ...
"private void validateRules(Errors errors, List<SurveyQuestion> questions) {\n Set<String> alreadySeenIdentifiers = Sets.newHashSet();\n for (int i = 0; i < elements.size(); i++) {\n SurveyElement element = elements.get(i);\n if (element instanceof SurveyQuestion) {\n for (SurveyRule rule...
"public final void parse(Reader reader) {\n beginParsing(reader);\n try {\n while (!context.stopped && (ch = input.nextChar()) != '\\0') {\n if (ch == comment) {\n input.skipLines(1);\n continue;\n }\n output.clear();\n parseRecord()...
"private String execprozess(File file, String password) {\n try {\n LinkedList<String> params = new LinkedList<String>();\n if (password != \"String_Node_Str\") {\n params.add(\"String_Node_Str\" + password);\n } else {\n params.add(\"String_Node_Str\");\n }\n ...
"public Node get1(Var var) {\n try {\n HDTId id = idBinding.get(var);\n if (id == null)\n return null;\n return id.getNode();\n } catch (Exception ex) {\n Log.fatal(this, String.format(\"String_Node_Str\", var), ex);\n return null;\n }\n}\n"
"private GitModelObject extractFromCache(TreeWalk tw) throws IOException {\n DirCacheIterator cacheIterator = tw.getTree(dirCacheIteratorNth, DirCacheIterator.class);\n if (cacheIterator == null)\n return null;\n DirCacheEntry cacheEntry = cacheIterator.getDirCacheEntry();\n if (cacheEntry == null)\n...
"public InputStream simpleGet(URL url) throws IOException {\n if (android.os.Build.VERSION.SDK_INT > 11) {\n if (passwordAuthentication != null) {\n Authenticator.setDefault(new Authenticator() {\n protected PasswordAuthentication getPasswordAuthentication() {\n re...
"protected void serializeToStream(NulsOutputStreamBuffer stream) throws IOException {\n stream.writeVarInt(deposit.getValue());\n stream.writeString(agentAddress);\n stream.writeDouble(this.commissionRate);\n stream.writeString(this.introduction);\n stream.writeBoolean(seed);\n stream.writeString(agen...
"public void invalidate() {\n super.invalidate();\n if (worldObj.isRemote) {\n return;\n }\n for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {\n if (Reference.OC_AVAILABLE) {\n OpenComputersSharedStorage storage = getStorageOC(dir.ordinal());\n if (storage == n...
"private void handleDecisionMessage(int instNum, byte[] payload) {\n PaxosState state = this.rounds.get(instNum);\n if (state == null) {\n noteOutput(\"String_Node_Str\" + instNum + \"String_Node_Str\");\n state = new PaxosState(instNum, payload, false);\n this.rounds.put(instNum, state);\n ...
"protected IngestionResult addNewCollection(EntityType entityInfo, Connection connection) throws IngestException, SQLException {\n CollectionType collection = entityInfo.getCollection();\n IngestionResult ingestionResult = null;\n if (KomaduUtils.manageDBLock(DBLockConstants.LOCK_ACQUIRE, collection.getCollect...
"public static void fragmentHasLoaded(int entry) {\n if (base < 0) {\n base = entry;\n baseLoading = false;\n leftoversLoading = true;\n logEventProgress(LwmLabels.LEFTOVERS_DOWNLOAD, LwmLabels.BEGIN, leftoversFragmentNumber(), null);\n startLoadingFragment(leftoversFragmentNumber(...
"public long getNextTime(final long current, final int increment, final boolean modulus) {\n prevFileTime = nextFileTime;\n long nextTime;\n if (frequency == null) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n final Calendar currentCal = Calendar.getInstance();\n currentCal.se...
"public void render(Output output) throws IOException {\n output.setStatus(httpClientResponse.getStatusCode(), httpClientResponse.getStatusText());\n Resource.copyHeaders(target.getDriver().getConfiguration(), this, output);\n target.getDriver().getFilter().postRequest(httpClientResponse, target);\n copyHea...
"private void clearHighlightRows(IDType idType, IDataDomain dataDomain) {\n AEvent event = new SelectElementsEvent(Collections.<Integer>emptyList(), idType, this.previewSelectionType).to(receiver);\n event.setEventSpace(dataDomain.getDataDomainID());\n triggerEvent(event);\n}\n"
"private void autoVarSelCondition() {\n for (ColumnConfig config : columnConfigList) {\n if (isIDLikeVariable(config) && !config.isForceSelect()) {\n log.warn(\"String_Node_Str\", config.getColumnName());\n config.setFinalSelect(false);\n continue;\n }\n if (isHi...
"public boolean marshalSingleValue(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, Object objectValue, AbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext) {\n if (xPathFragment.hasLeafElementType()) {\n marshalRecord.setLeafElementType(xPathFra...
"public static boolean tryMatchOrError(ArrayDeque<HtmlTagEntry> openStack, ArrayDeque<HtmlTagEntry> closeQueue, ErrorReporter errorReporter) {\n while (!openStack.isEmpty() && !closeQueue.isEmpty()) {\n HtmlTagEntry openTag = openStack.peekFirst();\n HtmlTagEntry closeTag = closeQueue.peekFirst();\n ...
"public void onChildStatusEvent(MonitorStatusEvent statusEvent) {\n String id = statusEvent.getId();\n String instanceId = statusEvent.getInstanceId();\n LifeCycleState status1 = statusEvent.getStatus();\n if (status1 == ClusterStatus.Active || status1 == GroupStatus.Active) {\n onChildActivatedEvent...
"public org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePageComponent convertImplementationGuidePageComponent(org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePageComponent src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2.mod...
"public void onClick(View view) {\n handleZoom();\n if (zoomPressed == 0) {\n zoomPressed = -1;\n float zoomScalar = 1 / getResources().getDimension(R.dimen.zoom_scalar);\n ScaleAnimation anim = new ScaleAnimation(1, zoomScalar, 1, zoomScalar, editView.getWidth() / 2f, editView.getHeight() / ...
"private Class<?> getCTJacksonViewClass(Type valueType, String contentType, Class<?> defaultClazz) {\n int parameterIndex = contentType.indexOf(JACKSON_VIEW_PARAMETER);\n if (parameterIndex != -1) {\n String className = contentType.substring(parameterIndex + JACKSON_VIEW_PARAMETER.length());\n try {...
"public String toString() {\n StringBuffer sb = new StringBuffer();\n sb.append(\"String_Node_Str\");\n sb.append(Utils.timeToHMS(time));\n sb.append(\"String_Node_Str\");\n sb.append(iteration);\n sb.append(\"String_Node_Str\");\n sb.append(percentage);\n sb.append(\"String_Node_Str\");\n Ob...
"public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n NewsEntity newsEntity = mNewsList != null ? mNewsList.get(position) : null;\n if (newsEntity == null)\n return;\n Intent intent = new Intent();\n intent.putExtra(\"String_Node_Str\", newsEntity.id);\n intent.putE...
"private static String genGslbObjectName(Object... args) {\n StringBuffer buff = new StringBuffer();\n for (int i = 0; i < args.length; i++) {\n objectName += args[i];\n if (i != args.length - 1) {\n objectName += \"String_Node_Str\";\n }\n }\n return objectName;\n}\n"
"private void affect(Entity entity) {\n boolean isUser = entity.getUniqueId() == player.getUniqueId();\n if (!isUser || isFromOtherOrigin) {\n pushFactor = pushFactorForOthers;\n Vector velocity = entity.getVelocity();\n double max = speed / speedFactor;\n double factor = pushFactor;\n...
"public void event(Event event) {\n if (myTestEvents2.contains(event.type())) {\n myTestEvents2.remove(event.type());\n }\n}\n"
"private static AbstractAlgorithm createFullNone(final Lattice lattice, final INodeChecker checker, final FLASHStrategy strategy) {\n int binaryAnonymityProperty = Node.PROPERTY_ANONYMOUS;\n NodeTrigger binaryTriggerSkip = new NodeTrigger() {\n public boolean appliesTo(Node node) {\n return node...
"public void enqueue(final Object event, final Annotation[] qualifiers) {\n if (!firing)\n map.put(event, qualifiers);\n}\n"
"private ReturnWithExceptions<Void, ModelObserver> indexDIPFile(DIP dip, DIPFile file, boolean recursive) {\n ReturnWithExceptions<Void, ModelObserver> ret = new ReturnWithExceptions<>(this);\n SolrInputDocument dipFileDocument = SolrUtils.dipFileToSolrDocument(dip, file);\n SolrUtils.create(index, RodaConstan...
"public void mouseDragged(MouseEvent evt) {\n if (model == null) {\n return;\n }\n double w = getWidth();\n currentMousePositionX = evt.getX();\n if (currentMousePositionX > (int) w) {\n currentMousePositionX = (int) w;\n }\n if (currentMousePositionX < 0) {\n currentMousePosit...
"public void endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord) {\n unmarshalRecord.removeNullCapableValue(this);\n UnmarshalRecord childRecord = unmarshalRecord.getChildRecord();\n if (null != childRecord) {\n Object childObject = childRecord.getCurrentObject();\n if (xmlAn...
"public Long stopCluster(String clusterName) throws Exception {\n logger.info(\"String_Node_Str\" + clusterName);\n ClusterEntity cluster = clusterEntityMgr.findByName(clusterName);\n if (cluster == null) {\n logger.error(\"String_Node_Str\" + clusterName + \"String_Node_Str\");\n throw BddExcept...
"public void update(String applicationId, String newName, String newDescription) {\n Application application = getOrFail(applicationId);\n AuthorizationUtil.checkAuthorizationForApplication(application, ApplicationRole.APPLICATION_MANAGER);\n if (newName != null && !newName.isEmpty() && !application.getName()....
"public static void persistFlexibleElement(EntityManager em, Mapper mapper, PropertyMap changes, Object model) {\n FlexibleElementDTO flexibleEltDTO = null;\n if (changes.get(AdminUtil.PROP_FX_FLEXIBLE_ELEMENT) != null) {\n String name = (String) changes.get(AdminUtil.PROP_FX_NAME);\n ElementTypeEnu...
"private void open(String filePath) throws IOException {\n this.reader = new BufferedReader(new FileReader(filePath));\n String headerLine = reader.readLine();\n this.header = StringUtils.splitPreserveAllTokens(headerLine, delimiter);\n}\n"
"public void testWTD1() throws IOException {\n int[] values = new int[] { 2011, 3, 9, 4, 39, 5, 22, 265 };\n String[] types = new String[] { TimeMember.TIME_LEVEL_TYPE_YEAR, TimeMember.TIME_LEVEL_TYPE_QUARTER, TimeMember.TIME_LEVEL_TYPE_MONTH, TimeMember.TIME_LEVEL_TYPE_WEEK_OF_MONTH, TimeMember.TIME_LEVEL_TYPE_W...
"public static void RunSelfEquivLTLFile(Path filePath, TestThread tt) throws IOException {\n List<LTLNode> nodes = LTLParserProvider.parse(new FileReader(filePath.toFile()));\n for (LTLNode ltl : nodes) {\n Pair<BDDSolver, LTLFormula<BDD, BDD>> pair = LTLConverter.getLTLBDD(ltl);\n BDDSolver bdds = ...
"protected int getTimeout() {\n return 30;\n}\n"
"private MainContext newMainContext() {\n boolean debug = this.args.containsKey(ArgFlag.VERBOSE);\n boolean useOldWF = this.args.containsKey(ArgFlag.OLD_WF);\n boolean noLiveness = this.args.containsKey(ArgFlag.NO_LIVENESS);\n Path mainpath = CommandLine.parseMainPath(this.args.get(ArgFlag.MAIN)[0]);\n L...
"public Result send() throws Exception {\n UserSession session = getSession();\n return ok(Boolean.toString(session.isConsent()));\n}\n"
"public Connection getConnection() {\n if (this.connection == null) {\n Configuration conf = getConf();\n try {\n String url = conf.get(DBConfiguration.URL_PROPERTY);\n try {\n DriverManager.getDriver(url);\n } catch (SQLException e) {\n if...
"public void remove(Material mat, short data, int amount) {\n Inventory inv = getPlayer().getInventory();\n for (int i = 0; i < inv.getSize(); i++) {\n ItemStack stack = inv.getItem(i).clone();\n if (stack.getType().equals(mat) && stack.getDurability() == data) {\n if (stack.getAmount() >...