content stringlengths 40 137k |
|---|
"public Texture getTexture(String name, byte[] bytes, int width, int height, int srcPixelFormat, int target, int dstPixelFormat, int minFilter, int magFilter) {\n int textureID = createTextureID();\n Texture texture = new Texture(target, textureID);\n gl.glBindTexture(target, textureID);\n texture.setWidth(... |
"private void handleConfigUpdateException(ConfigUpdateException e) {\n Tr.error(tc, \"String_Node_Str\", e.getMessage());\n if (ErrorHandler.INSTANCE.getOnError().equals(OnError.FAIL)) {\n quit(e);\n }\n}\n"
|
"public void run(GPModel<TYPE> model) {\n this.model = model;\n GPCrossover<TYPE> crossover = new GPCrossover<TYPE>(model);\n Initialiser<TYPE> init = model.getInitialiser();\n List<CandidateProgram<TYPE>> pop = init.getInitialPopulation();\n double bestFitness = Double.POSITIVE_INFINITY;\n CandidateP... |
"protected boolean isEventRequiresViewReset(Intent eventIntent, Context context) {\n KeyboardTheme selectedTheme = getCurrentKeyboardTheme(context.getApplicationContext());\n if ((selectedTheme != null) && (selectedTheme.getPackageName().equals(eventIntent.getData().getSchemeSpecificPart()))) {\n Log.d(TAG... |
"public static void main(String[] args) {\n try {\n if (args.length == 0) {\n System.err.println(\"String_Node_Str\");\n return;\n }\n if (args.length == 1) {\n new ConvertToLazy(args[0], 100);\n return;\n }\n int threshold = Integer.pars... |
"private static Object getDatabaseValue(DatabaseConnection connection, String value) {\n String databaseType = connection.getDatabaseType();\n if (value.equals(\"String_Node_Str\")) {\n String typeByProduct = getStandardDbTypeFromConnection(databaseType);\n if (databaseType.equals(EDatabaseTypeName.... |
"public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n if (\"String_Node_Str\".equals(method.getName()) && method.getParameterTypes().length == 0) {\n returningResult.setUpdateCount(delegate.executeUpdate());\n ResultSet rs = delegate.getGeneratedKeys();\n return ... |
"public Object execute(ExecutionEvent arg0) throws ExecutionException {\n IRosterEntry rosterEntry = getRosterEntry();\n if (rosterEntry != null) {\n IRoster roster = rosterEntry.getRoster();\n IRosterManager rosterManager = roster.getPresenceContainerAdapter().getRosterManager();\n final ICo... |
"public static void clearOldFiles(File f, long millisAgo) {\n if (f == null) {\n return;\n }\n long olderThan = System.currentTimeMillis() - millisAgo;\n if (f.isDirectory()) {\n File[] files = f.listFiles();\n if (files == null) {\n return;\n }\n for (File file... |
"private void controlPointsModified(boolean justDistorted) {\n synchronized (pointsUndistorted) {\n try {\n alg.setSource(pointsDistorted);\n alg.setDestination(pointsUndistorted);\n validTransform = true;\n } catch (RuntimeException e) {\n System.out.println... |
"private void __processWithDiv() throws BirtException, Exception, IOException {\n if (!reportServiceInitialized) {\n initializeReportService();\n }\n HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();\n IViewingSession session = ViewingSessionUtil.createSession(request);\n ... |
"public void onPackageModified(String packageName) {\n final int eventUserId = getChangingUserId();\n final IPackageManager pm = AppGlobals.getPackageManager();\n final ArrayList<Pair<Intent, Integer>> recentTaskIntents = new ArrayList<Pair<Intent, Integer>>();\n final HashSet<ComponentName> componentsKnown... |
"private Block getSurfaceBlock(int depth, int height, CoreBiome type) {\n switch(type) {\n case FOREST:\n case PLAINS:\n case MOUNTAINS:\n if (depth == 0 && height > seaLevel && height < seaLevel + 96) {\n return grass;\n } else if (depth == 0 && height >= 12... |
"public static void closeStatementIfOpen(PreparedStatement s) {\n if (s != null) {\n try {\n s.close();\n } catch (SQLException e) {\n log.warn(\"String_Node_Str\" + s + \"String_Node_Str\" + ExceptionUtils.getSQLExceptionCause(e), e);\n }\n }\n}\n"
|
"public void run() {\n TreeModelEvent e = new TreeModelEvent(source, path, childIndices, children);\n for (int i = listeners.size() - 1; i >= 0; i--) {\n listeners.get(i).treeNodesRemoved(e);\n }\n}\n"
|
"protected void helpTestGroupByCount(boolean mutable, boolean localIndex) throws Exception {\n String dataTableName = generateUniqueName();\n String fullDataTableName = INDEX_DATA_SCHEMA + QueryConstants.NAME_SEPARATOR + dataTableName;\n String indexName = generateUniqueName();\n Properties props = Properti... |
"public PriceListLine getPriceListLine(SalesOrderSubLine salesOrderSubLine, PriceList priceList) {\n return priceListService.getPriceListLine(salesOrderSubLine.getProduct(), salesOrderSubLine.getQty(), priceList);\n}\n"
|
"public void testUnsignedId() {\n try {\n IdGeneratorImpl.createGenerator(idGeneratorFile());\n IdGenerator idGenerator = new IdGeneratorImpl(idGeneratorFile(), 1, IdType.PROPERTY_INDEX.getMaxValue());\n idGenerator.setHighId(IdType.PROPERTY_INDEX.getMaxValue() - 1);\n long id = idGenerat... |
"public void queueInputBuffer(SubtitleInputBuffer inputBuffer) throws SubtitleDecoderException {\n Assertions.checkArgument(inputBuffer != null);\n Assertions.checkArgument(inputBuffer == dequeuedInputBuffer);\n if (inputBuffer.isDecodeOnly()) {\n releaseInputBuffer(inputBuffer);\n } else {\n ... |
"public static org.hl7.fhir.dstu2016may.model.Resource convertResource(org.hl7.fhir.dstu3.model.Resource src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n if (src instanceof org.hl7.fhir.dstu3.model.Parameters)\n return convertParameters((org.hl7.fhir.dstu3.model.Param... |
"public static boolean isJarFile(String fileName) {\n if (fileName == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n return fileName.endsWith(JAR_SUFFIX);\n}\n"
|
"protected void doMessageReceived(final IoSessionEx session, Object message) throws Exception {\n DefaultHttpSession httpSession = HTTP_SESSION_KEY.get(session);\n HttpMessage httpMessage = (HttpMessage) message;\n switch(httpMessage.getKind()) {\n case RESPONSE:\n HttpResponseMessage httpRes... |
"protected Collection<ECRFStatusEntryVO> handleSignVerifiedEcrfs(AuthenticationVO auth, Long trialId, Long probandListEntryId, boolean signAll) throws Exception {\n if (trialId != null) {\n CheckIDUtil.checkTrialId(trialId, this.getTrialDao(), LockMode.PESSIMISTIC_WRITE);\n }\n if (probandListEntryId !=... |
"public void onResourceManagerReload(IResourceManager resourceManager) {\n invalidate();\n}\n"
|
"public int indexOf(E e) {\n Objects.requireNonNull(e);\n lock.lock();\n try {\n if (!reverse.containsKey(e)) {\n return -1;\n }\n return reverse.get(e);\n } finally {\n lock.unlock();\n }\n return reverse.get(e);\n}\n"
|
"public void enableScreenAfterBoot() {\n readLidState();\n updateRotation(0);\n}\n"
|
"public static AtlasTypesDef defineHiveTypes() {\n String _description = \"String_Node_Str\";\n AtlasEntityDef superTypeDefinition = AtlasTypeUtil.createClassTypeDef(SUPER_TYPE_NAME, \"String_Node_Str\", ImmutableSet.<String>of(), AtlasTypeUtil.createOptionalAttrDef(\"String_Node_Str\", \"String_Node_Str\"), Atla... |
"protected Class<?> findClass(String name, boolean checkGlobal) throws ClassNotFoundException {\n Class<?> result = classes.get(name);\n if (result == null) {\n result = super.findClass(name);\n if (result == null && checkGlobal) {\n result = loader.getClassByName(name);\n }\n ... |
"public Object extractValueFromBytes(int offset, byte[] bytes) {\n int len;\n for (len = offset; len < bytes.length - 1; len += 2) {\n if (bytes[len] == 0 && bytes[len + 1] == 0) {\n break;\n }\n }\n char[] chars = new char[len / 2];\n for (int i = 0; i < chars.length; i++) {\n ... |
"public boolean hasNext() {\n return firstValidItem();\n}\n"
|
"public String toString() {\n StringBuffer sbuffer = new StringBuffer(100);\n sbuffer.append(\"String_Node_Str\");\n sbuffer.append(\"String_Node_Str\").append(delegateConn.toString());\n sbuffer.append(\"String_Node_Str\").append(borrowed);\n if (heartbeatTime > 0) {\n sbuffer.append(\"String_Nod... |
"public final int hashCode() {\n if (!mEntryValid) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n return result;\n}\n"
|
"public boolean isValueAcceptable() {\n return _resolvedType.isInstantiable();\n}\n"
|
"public boolean hasNext() {\n fetchIfNeeded();\n if (page.size() > nextItem) {\n return true;\n } else if (statementIterator.hasNext()) {\n statementIterator.nextShard();\n currentPage = 0;\n nextItem = 0;\n fetchIfNeeded();\n return true;\n } else {\n return... |
"private void schedulePendingTasks() {\n Iterator<Entry<String, Method>> tasks = pendingTasks.iterator();\n while (tasks.hasNext()) {\n Entry<String, Method> task = tasks.next();\n Method method = task.getValue();\n Class<?> controller = method.getDeclaringClass();\n String URI = linke... |
"public String toString() {\n String s = \"String_Node_Str\" + position.x + \"String_Node_Str\" + position.y + \"String_Node_Str\" + position.z + \"String_Node_Str\";\n if (hasSecond)\n s += \"String_Node_Str\" + second.x + \"String_Node_Str\" + second.y + \"String_Node_Str\" + second.z + \"String_Node_Str... |
"public void setTimeMultiplier(int nAve) {\n spectrogramPlot.setTimeMultiplier(nAve);\n}\n"
|
"private <A extends AppleNativeTargetDescriptionArg> BuildRule requireUnstrippedBuildRule(BuildRuleParams params, BuildRuleResolver resolver, CellPathResolver cellRoots, TargetGraph targetGraph, A args, Optional<Linker.LinkableDepType> linkableDepType, Optional<SourcePath> bundleLoader, ImmutableSet<BuildTarget> blackl... |
"public void createSystemPerson(String cmsRepositoryId, String identityStoreId) {\n InputStream inputStream = null;\n try {\n ContentObjectCriteria personCriteria = CmsCriteriaFactory.newContentObjectCriteria(\"String_Node_Str\");\n personCriteria.addCriterion(CriterionFactory.equalsCaseInsensitive(... |
"private void get(String path, File target, ProxiedArtifactRepository repository, ArtifactRepository managedRepository, ProxyInfo wagonProxy) throws ProxyException {\n ArtifactRepositoryPolicy policy = null;\n if (path.endsWith(\"String_Node_Str\") || path.endsWith(\"String_Node_Str\")) {\n } else if (path.end... |
"public static KBP2015Scorer fromParameters(Parameters params, Map<String, SimpleResultWriter> additionalResultWriters, Map<String, BootstrappedResultWriterSource> additionalBootstrapWriters) {\n final EALScorer2015Style documentScorer = EALScorer2015Style.create(params);\n final ImmutableMap.Builder<String, Simp... |
"private void saveLossItems(List<LossItem> lossItems) {\n GenericDao<LossItem> lossItemDao = new GenericDao<>(LossItem.class, context);\n for (LossItem lossItem : lossItems) {\n lossItemDao.create(lossItem);\n saveLossItemDetails(lossItem.getLossItemDetails());\n snapshotService.add(adjustSto... |
"private static Map parseProperties(XmlPullParser parser) throws Exception {\n Map properties = new HashMap();\n while (true) {\n int eventType = parser.next();\n if (eventType == parser.START_TAG && parser.getName().equals(\"String_Node_Str\")) {\n parser.next();\n String name... |
"public void checkErrors(DownloadLink theLink, boolean checkAll, String passCode, boolean loggedIn) throws NumberFormatException, PluginException {\n if (checkAll) {\n if (BRBEFORE.contains(\"String_Node_Str\") || BRBEFORE.contains(\"String_Node_Str\") || BRBEFORE.contains(\"String_Node_Str\")) {\n ... |
"public void testInvokeCommand() throws Exception {\n final List<UIInputComponent<?, ?>> inputs = new ArrayList<UIInputComponent<?, ?>>();\n final UIBuilder builder = new UIBuilder() {\n public UIBuilder add(UIInput<?> input) {\n inputs.add(input);\n return this;\n }\n };\n ... |
"public String getLabel(Object object) {\n if (object instanceof XWikiEclipseObjectSummary) {\n XWikiEclipseObjectSummary objectSummary = (XWikiEclipseObjectSummary) object;\n int number = objectSummary.getNumber();\n String label = \"String_Node_Str\" + number + \"String_Node_Str\";\n Li... |
"void init(ChannelPipeline pipeline) throws Exception {\n pipeline.addLast(\"String_Node_Str\", sslHandlerFactory.create());\n pipeline.addFirst(\"String_Node_Str\", new IdleStateHandler(0, 0, Constants.DEFAULT_CONNECT_TIMEOUT));\n pipeline.addAfter(\"String_Node_Str\", \"String_Node_Str\", new MoquetteIdleTim... |
"public static Optional<UnsafeCodec> factory(CodecSupplier registry, FieldWrapper field) {\n Class<?> arrayType = field.type();\n if (arrayType.isArray()) {\n Class<?> componentType = arrayType.getComponentType();\n FieldWrapper componentWrapper = FieldWrapper.clazz(componentType);\n UnsafeCo... |
"public boolean passesParameters() {\n return isExplicit() || kind == THREAD || kind == EXIT || kind == FINALIZE || kind == PRIVILEGED || kind == NEWINSTANCE;\n}\n"
|
"private ZonedDateTime dateTimeAfterValidFromAndOldValidUntil(final CartDiscount cartDiscount) {\n return cartDiscount.getValidUntil().orElse(cartDiscount.getValidFrom().orElse(SphereTestUtils.now()).plusSeconds(1000)).plusSeconds(1);\n}\n"
|
"public void process(MutatableAction mutatableAction) throws IOException {\n _writeLock.lock();\n waitUntilNotNull(_writer);\n BlurIndexWriter writer = _writer.get();\n IndexSearcherClosable indexSearcher = null;\n try {\n indexSearcher = getIndexSearcher();\n indexAction.performMutate(inde... |
"public List<ElementParameter> resetParameters() {\n final List<ElementParameter> newParameters = new ArrayList<>();\n List<ElementParameter> currentParameters = (List<ElementParameter>) element.getElementParameters();\n List<ElementParameter> parameters = new ArrayList<>();\n ComponentService componentServ... |
"private String getOriginalStyleDeclaration() {\n String qualifiers = Modifier.toString(modifiers) + \"String_Node_Str\" + type.toQuotedString();\n qualifiers = qualifiers.trim();\n if (qualifiers.equals(\"String_Node_Str\"))\n return Scene.v().quotedNameOf(name);\n else\n return qualifiers + ... |
"public RecordReplicationInfo createRecordReplicationInfo(MapContainer mapContainer, Record record, Data key) {\n final RecordInfo info = constructRecordInfo(mapContainer, record, key, replicaWaitSecondsForScheduledTasks);\n final RecordReplicationInfo replicationInfo = new RecordReplicationInfo(record.getKey(), ... |
"public MultipleAlignment analyze(Atom[] atoms, CESymmParameters param) throws StructureException {\n if (atoms.length < 1) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n this.params = param;\n if (params.isMultipleAxes() && params.getRefineMethod() != RefineMethod.NOT_REFINED) {\... |
"private static void rewriteExistingFile() {\n Utils.logToConsole(\"String_Node_Str\" + jtsIniFile.getPath());\n boolean foundLogon = false;\n boolean foundIBGateway = false;\n try (BufferedWriter w = new BufferedWriter(new FileWriter(jtsIniFile))) {\n ListIterator<String> it = lines.listIterator();\... |
"public void progress() {\n for (int t : messages.keySet()) {\n boolean canProgress = true;\n Map<Integer, Queue<Object>> messagePerTarget = messages.get(t);\n Map<Integer, Integer> countsPerTarget = counts.get(t);\n Map<Integer, Integer> totalCountMap = totalCounts.get(t);\n while... |
"public boolean isValid() {\n return mIsValid && !hasError();\n}\n"
|
"protected void onDestroy() {\n Log.d(TAG, \"String_Node_Str\");\n super.onDestroy();\n nativeStop();\n nativeFinalize();\n super.onDestroy();\n}\n"
|
"public void pressOptionsShouldBuildProperly() throws Exception {\n final Map<String, Object> actualOpts = new PressOptions().withElement(DUMMY_ELEMENT).build();\n final Map<String, Object> expectedOpts = new HashMap<>();\n expectedOpts.put(\"String_Node_Str\", ((HasIdentity) dummyElement).getId());\n asser... |
"public static Record create(ResultSet rs) {\n try {\n Record re = new Record();\n ResultSetMetaData meta = rs.getMetaData();\n int count = meta.getColumnCount();\n for (int i = 1; i <= count; i++) {\n String name = meta.getColumnLabel(i);\n switch(meta.getColumnType... |
"public void testLocation_POST() {\n JSONObject json = new JSONObject();\n JSONArray jTravellers = new JSONArray();\n json.put(\"String_Node_Str\", jTravellers);\n JSONObject jTraveller = new JSONObject();\n jTraveller.put(\"String_Node_Str\", \"String_Node_Str\");\n jTravellers.put(jTraveller);\n ... |
"public Set<BinaryItemSet> getCandidateSets(SortedMap<BinaryItemSet, Integer> frequentSupportMap, int generation) {\n Set<BinaryItemSet> output = new TreeSet<BinaryItemSet>();\n for (BinaryItemSet itemSet : frequentSupportMap) {\n for (BinaryItemSet singleItemSet : this.levelOneSet) {\n if (item... |
"public void doImport(TreeObject[] objs, IProgressMonitor monitor) {\n monitor.beginTask(\"String_Node_Str\", IProgressMonitor.UNKNOWN);\n Reader reader = null;\n Arrays.sort(objs, new Comparator<Object>() {\n public int compare(Object o1, Object o2) {\n return ((TreeObject) o1).getType() - (... |
"public void onNext(GenericOverall genericOverall) {\n inCall = true;\n if (!hasChatSupport) {\n ApplicationWideCurrentRoomHolder.getInstance().setCurrentRoomId(roomId);\n ApplicationWideCurrentRoomHolder.getInstance().setInCall(true);\n ApplicationWideCurrentRoomHolder.getInstance().setUserI... |
"public void forceConstraintIntegrity() throws DelaunayError {\n ArrayList<MyPoint> eventPoints = new ArrayList<MyPoint>();\n for (MyEdge edge : constraintEdges) {\n addPointToSortedList(edge.getStart(), eventPoints);\n addPointToSortedList(edge.getEnd(), eventPoints);\n }\n MyPoint currentEve... |
"public void testNameInputIncorrectValues() {\n fillNameInputWithIncorrectValues(nameInput, 3, 12, false);\n}\n"
|
"public double h(Node n) {\n final double distance = ((Point) n.getObject()).getCoordinate().distance(toCoord);\n if (distance < obsStdDevDistance)\n return 0d;\n return (distance - obsStdDevDistance) / 15d;\n}\n"
|
"public void updateEntity() {\n int[] target = getTarget(1);\n int x = target[0], y = yCoord, z = target[1];\n if (extendedTicks == 3 && this.worldObj.isRemote) {\n for (int i = 0; i < 10; i++) {\n }\n }\n if (this.hasBlockUpdate && this.hasPartner()) {\n if (this.hasSomethingToSmash... |
"public boolean getFiducialToCamera(int which, Se3_F64 fiducialToCamera) {\n if (!hasCameraModel)\n return false;\n detectedPixels = getDetectedControl(which);\n if (detectedPixels.size() < 3)\n return false;\n createDetectedList(which, detectedPixels);\n return estimatePose(which, detected... |
"public static ECPoint addPoint(EllipticCurve curve, ECPoint ecPointQ, ECPoint ecPointP) {\n BigInteger p = ((ECFieldFp) curve.getField()).getP();\n BigInteger xq = ecPointQ.getAffineX();\n BigInteger yq = ecPointQ.getAffineY();\n BigInteger xp = ecPointP.getAffineX();\n BigInteger yp = ecPointP.getAffin... |
"private List<ClassNode> getMethodCallArgumentTypes(ASTNode node) {\n Expression arguments = null;\n if (node instanceof MethodCallExpression) {\n arguments = ((MethodCallExpression) node).getArguments();\n } else if (node instanceof ConstructorCallExpression) {\n arguments = ((ConstructorCallExp... |
"public long getItemId(int position) {\n return mItems.get(position).hashCode();\n}\n"
|
"private DSSDocument getAttachment() {\n logger.debug(\"String_Node_Str\");\n DSSDocument attachment;\n if (dataFiles.size() == 0) {\n String errorMessage = \"String_Node_Str\";\n logger.error(errorMessage);\n throw new DigiDoc4JException(errorMessage);\n }\n Iterator<String> iterato... |
"public static Map<Integer, Integer> fromConciseAlignmentString(String string) {\n char[] chars = string.toCharArray();\n Map<Integer, Integer> map = new HashMap<Integer, Integer>();\n boolean matches = true;\n while (matches) {\n Pattern pattern = Pattern.compile(\"String_Node_Str\");\n Match... |
"private void handle(Exception e) {\n if (failonerror) {\n throw (e instanceof BuildException) ? (BuildException) e : new BuildException(e);\n }\n log(e.getMessage(), quiet ? Project.MSG_VERBOSE : verbosity);\n}\n"
|
"private String getCustomerPaymentMethod(String email) {\n Singleton singleton = new Singleton();\n PaymentMethod pm = singleton.createCustomerFromDB(email).getPaymentMethod();\n String strExpiration = dateFormat.format(pm.getExpirationDate());\n return pm.getNumber() + \"String_Node_Str\" + pm.getName() + ... |
"private String[] getQueryPresetTextArray() {\n final String[] lines;\n if (((OdaDataSetHandle) getContainer().getModel()).getExtensionID().equals(\"String_Node_Str\"))\n lines = new String[] { \"String_Node_Str\" };\n else\n lines = new String[] { \"String_Node_Str\", \"String_Node_Str\" };\n ... |
"public void actionPerformed(ActionEvent actor) {\n JComponent source = (JComponent) actor.getSource();\n List<PossibleAction> actions;\n PossibleAction chosenAction = null;\n if (source instanceof ClickField) {\n gbc = gb.getConstraints(source);\n actions = ((ClickField) source).getPossibleAc... |
"public static Intent getIntentOld(String uri) throws URISyntaxException {\n Intent intent;\n int i = uri.lastIndexOf('#');\n if (i >= 0) {\n Uri data = null;\n String action = null;\n final int intentFragmentStart = i;\n boolean isIntentFragment = false;\n i++;\n if (... |
"private boolean initPaymentProcess() {\n String clientId = arguments.getClientId();\n OAuth2Session session = new OAuth2Session(new DefaultApiClient(clientId));\n parameterProvider = new ExternalPaymentProcess.ParameterProvider() {\n\n public String getPatternId() {\n return arguments.getPat... |
"public void fixContext() {\n if (getLibrary() == null)\n return;\n if (isEditable()) {\n if (getExampleHandler() != null)\n exampleHandler.fix(null);\n if (getEquivalentHandler() != null)\n equivalentHandler.fix(null);\n }\n}\n"
|
"public void r() {\n if (k != null && k.G) {\n k = null;\n }\n X++;\n K = L;\n m = p;\n n = q;\n o = r;\n y = w;\n x = v;\n if (v()) {\n if (!ab && !c) {\n float f1 = MathHelper.a(s * s * 0.20000000298023224D + t * t + u * u * 0.20000000298023224D) * 0.2F;\n ... |
"public String execCreate(final String containerId, final String[] cmd, final ExecCreateParam... params) throws DockerException, InterruptedException {\n final WebTarget resource = resource().path(\"String_Node_Str\").path(containerId).path(\"String_Node_Str\");\n final StringWriter writer = new StringWriter();\n... |
"public void onReceive(Context context, Intent intent) {\n String action = intent.getAction();\n if (action.equals(Intent.ACTION_MEDIA_EJECT) || action.equals(Intent.ACTION_SCREEN_OFF)) {\n stopVideoRecording();\n RotateTextToast.makeText(mActivity, mActivity.getResources().getString(R.string.video_... |
"private double sum(double hval) {\n LinkNode<HistogramUnit> posHistogramUnit = null;\n LinkNode<HistogramUnit> tmp = this.header;\n while (tmp != this.tail) {\n HistogramUnit chu = tmp.data();\n HistogramUnit nhu = tmp.next().data();\n if (chu.getHval() <= hval && hval < nhu.getHval()) {\... |
"private String getColumnValue(Database database) {\n if (getDefaultValue() != null) {\n if (\"String_Node_Str\".equalsIgnoreCase(getDefaultValue())) {\n return \"String_Node_Str\";\n }\n return \"String_Node_Str\" + getDefaultValue().replaceAll(\"String_Node_Str\", \"String_Node_Str\... |
"protected void process(ComplexEventChunk<StreamEvent> streamEventChunk, Processor nextProcessor, StreamEventCloner streamEventCloner, ComplexEventPopulater complexEventPopulater) {\n while (streamEventChunk.hasNext()) {\n StreamEvent event = streamEventChunk.next();\n Object[] data;\n String[] ... |
"public boolean attachTo(Char target) {\n if (super.attachTo(target) && target.sprite != null) {\n CellEmitter.center(target.pos).burst(PoisonParticle.SPLASH, 5);\n return true;\n } else\n return false;\n}\n"
|
"public void setParams(HashMap<String, String> params) {\n actor = params.get(\"String_Node_Str\");\n if (params.get(\"String_Node_Str\") != null) {\n pos = Param.parseVector2(params.get(\"String_Node_Str\"));\n } else if (params.get(\"String_Node_Str\") != null) {\n target = params.get(\"String_... |
"private void writeText(XhtmlNode node) throws IOException {\n for (char c : node.getContent().toCharArray()) {\n if (c == '&')\n dst.append(\"String_Node_Str\");\n else if (c == '<')\n dst.append(\"String_Node_Str\");\n else if (c == '>')\n dst.append(\"String_N... |
"public int delete(Uri url, String where, String[] whereArgs) {\n SqlArguments args = new SqlArguments(url, where, whereArgs);\n if (TABLE_FAVORITES.equals(args.table)) {\n return 0;\n } else if (TABLE_OLD_FAVORITES.equals(args.table)) {\n args.table = TABLE_FAVORITES;\n }\n checkWritePermi... |
"public void testHashCode() {\n String[] testStrings = { \"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 i... |
"public void onReceiveComplete(SocketChannel channel, TCPMessage readRequest) {\n ByteBuffer data = readRequest.getByteBuffer();\n byte[] id = new byte[RequestID.ID_SIZE];\n data.get(id);\n String messageType = ByteUtils.unPackString(data);\n int clientId = data.getInt();\n RequestID requestID = Reque... |
"private XMLStreamReader createXMLStreamReader(InputStream stream) {\n try {\n if (null == XML_INPUT_FACTORY) {\n return null;\n }\n XMLStreamReader xmlStreamReader = XML_INPUT_FACTORY.createXMLStreamReader(stream);\n return xmlStreamReader;\n } catch (XMLStreamException e) ... |
"public static boolean hasAggregationInExpr(IBaseExpression expression) {\n if (expression == null || BaseExpression.constantId.equals(expression.getScriptId()))\n return false;\n if (expression instanceof IScriptExpression) {\n String text = ((IScriptExpression) expression).getText();\n retu... |
"public void run() {\n try {\n loadSettingsBlocking(notifyOnClearFinal);\n } catch (Throwable t) {\n _callback.error(t);\n }\n}\n"
|
"public String getReport() {\n Map<Double, Integer> dist = new HashMap<Double, Integer>();\n for (int i = 0; i < N; i++) {\n Double d = nodeClustering[i];\n if (dist.containsKey(d)) {\n Integer v = dist.get(d);\n dist.put(d, v + 1);\n } else {\n dist.put(d, 1)... |
"public void delete(List<? extends Object> entityList) {\n if (entityList == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n List<Object> globalList = Lists.newArrayList();\n List<Object> shardingList = Lists.newArrayList();\n for (Object entity : entityList) {\n if... |
"public void save() {\n File folder = getDataFolder();\n if (!folder.exists()) {\n folder.mkdir();\n }\n File datafile = new File(folder.getAbsolutePath() + \"String_Node_Str\");\n if (!datafile.exists()) {\n try {\n datafile.createNewFile();\n } catch (IOException e) {\n ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.