content
stringlengths
40
137k
"public void display(GLAutoDrawable drawable, int flags) {\n this.drawable = drawable;\n this.gl = drawable.getGL().getGL3();\n if (!myInternalRenderListValid) {\n buildInternalRenderList();\n }\n if (selectTrigger) {\n mySelector.setupSelection(gl);\n selectEnabled = true;\n ...
"public void testAwait() throws InterruptedException {\n HazelcastInstance instance = createHazelcastInstance();\n final ICountDownLatch latch = instance.getCountDownLatch(randomString());\n latch.trySetCount(1);\n Thread thread = (new Thread() {\n public void run() {\n latch.countDown();\...
"private void showPerspective(final ToggleButton source, final IPluginPerspective perspective) {\n Widget w = MantleApplication.getInstance().getContentDeck().getWidget(MantleApplication.getInstance().getContentDeck().getVisibleWidget());\n if (w instanceof Frame && !perspective.getId().equals(w.getElement().getI...
"public static ClassDeclNode ASTClassDeclNode(Class myClass) {\n int modifiers = Modifier.convertModifiers(myClass.getModifiers());\n String fullClassName = myClass.getName();\n NameNode className = new NameNode(AbsentTreeNode.instance, fullClassName.substring(1 + fullClassName.lastIndexOf('.')));\n List in...
"public void createRefund(Invoice invoice) throws AxelorException {\n LOG.debug(\"String_Node_Str\", new Object[] { invoice.getInvoiceId() });\n Invoice refund = new RefundInvoice(invoice).generate();\n invoice.addRefundInvoiceListItem(refund);\n save(invoice);\n}\n"
"public void restore() {\n super.update(true);\n try {\n if (hasNeighbor()) {\n neighbor.update(true);\n Inventory i = ((InventoryHolder) chest.getState()).getInventory();\n ItemStack[] both;\n ItemStack[] otherInv = neighborInventory;\n ItemStack[] ne...
"public List checkCompatibility() {\n List errorList = new ArrayList(1);\n if (checkVersion(handle.getExtensionVersion()) < 0) {\n try {\n handle.setExtensionVersion(CROSSTAB_CURRENT_VERSION);\n } catch (SemanticException e) {\n errorList.add(e);\n }\n }\n if (getH...
"private void updateTtlDays() {\n logger.info(\"String_Node_Str\");\n ActiveTraces.start(\"String_Node_Str\");\n ArrayList<BucketLifecycleConfiguration.Rule> rules = new ArrayList<>();\n for (ChannelConfig config : configurations) {\n if (config.getTtlDays() > 0) {\n if (config.isSingle() ...
"public void testMetamodelMinimalSanityTest() {\n EntityManager em = createEntityManager();\n if (!this.isOnServer()) {\n ((EntityManagerFactoryImpl) ((EntityManagerImpl) em).getEntityManagerFactory()).setMetamodel(null);\n }\n}\n"
"public OutputStream getBody() throws IOException {\n ByteArrayOutputStream output = new ByteArrayOutputStream() {\n private ArrayList<Byte> firstEight = new ArrayList<Byte>(8);\n private ArrayList<Byte> secondEight = new ArrayList<Byte>(8);\n private ArrayList<Byte> overflow = new ArrayList<Byt...
"public List<ArtifactDownloadInfo> getArtifactDownloadInfos(String groupId, String artifactId, String version, String repositoryId) throws ArchivaRestServiceException {\n List<String> selectedRepos = getSelectedRepos(repositoryId);\n List<ArtifactDownloadInfo> artifactDownloadInfos = new ArrayList<ArtifactDownloa...
"public void setParentAndTagName(Dom parent, String tagName) {\n this.parent = parent;\n this.tagName = tagName;\n if (parent != null) {\n entity = parent.leafElements(tagName);\n if (parent.getImplementationClass().equals(JavaConfig.class)) {\n target = parent.parent().attribute(\"Str...
"public void testInstanceOf_javaInstance() {\n Object object = new MyJsFunctionInterfaceImpl();\n assertTrue(object instanceof MyJsFunctionInterface);\n assertTrue(object instanceof MyJsFunctionInterfaceImpl);\n assertTrue(object instanceof MyJsFunctionIdentityInterface);\n assertTrue(object instanceof M...
"public Reader loadResource(File f) {\n LOG.info(\"String_Node_Str\", f.getAbsolutePath());\n if (f.isDirectory()) {\n LOG.error(\"String_Node_Str\", f.getAbsolutePath());\n throw new ResourceIsDirectoryException(\"String_Node_Str\" + f + \"String_Node_Str\");\n }\n try {\n return Files...
"static Map<String, List<String>> getPivot(Map<String, List<String>> source) {\n Map<String, List<String>> pivot = new HashMap<String, List<String>>();\n for (Map.Entry<String, List<String>> entry : source.entrySet()) {\n List<String> values = entry.getValue();\n for (String value : values) {\n ...
"private <T> T doToBean(final String text, final Class<T> clazz) throws ReflectiveOperationException {\n Field[] fields = clazz.getDeclaredFields();\n T bean = clazz.newInstance();\n String fieldName = null;\n if (fields.length == 1 && List.class.isAssignableFrom(fields[0].getType())) {\n fieldName =...
"public DataInstance map(String value) throws Exception {\n DataInstance dataInstance = new DataInstanceFromDataRow(new DataRowWeka(attributes, value));\n if (normalize) {\n attributesToNormalize.stream().forEach(att -> dataInstance.setValue(att, (dataInstance.getValue(att) - ((RealStateSpace) att.getState...
"public void testDiff() throws IOException {\n log.info(\"String_Node_Str\");\n JenaConnect diffJC = new MemJenaConnect();\n JenaConnect previousJC = new MemJenaConnect(new ByteArrayInputStream(this.previousRDF.getBytes()), null, null);\n JenaConnect incomingJC = new MemJenaConnect(new ByteArrayInputStream(...
"protected void writeObject(Object object) throws IOException {\n if (object == null) {\n getRandomAccessFile().writeShort(NULL_VALUE);\n return;\n }\n randomAccessFile.writeShort(NORMAL_VALUE);\n if (fieldWriter == null) {\n fieldWriter = IOUtil.getRandomWriter(DataType.getDataType(obj...
"protected void fillValue(final FacetOptionViewModel viewModel, final TermFacetResult stats, final Category category, final Category selectedValue) {\n productReverseRouter.productOverviewPageCall(category).ifPresent(call -> {\n viewModel.setValue(buildUri(call.url(), extractQueryString(Http.Context.current()...
"public boolean isHandled(Method m) {\n if (m.isAnnotationPresent(Transient.class))\n return false;\n final String name = m.getName();\n if (name.startsWith(\"String_Node_Str\")) {\n try {\n final String getter = toGetter(toAttrName(m));\n final Method getMethod = Classes.ge...
"public long[] fetchTsIndexs() {\n Set<Long> indexSET = ImmutableSet.copyOf(tsSegments.keySet());\n if (indexSET.size() < 3) {\n return null;\n }\n Long[] indexArr = indexSET.toArray(new Long[indexSET.size()]);\n Arrays.sort(indexArr);\n if (indexArr.length > 5) {\n Long[] tmpArr = new L...
"public float getLowestVisibleX() {\n PointD pos = getTransformer(AxisDependency.LEFT).getValuesByTouchPoint(mViewPortHandler.contentLeft(), mViewPortHandler.contentBottom());\n return (float) Math.max(mXAxis.mAxisMinimum, pos.y);\n}\n"
"private void saveThemeResourceLocked(CustomTheme customTheme, boolean isDiff) {\n if (isDiff) {\n SystemProperties.set(Configuration.THEME_ID_PERSISTENCE_PROPERTY, t.getThemeId());\n SystemProperties.set(Configuration.THEME_PACKAGE_NAME_PERSISTENCE_PROPERTY, t.getThemePackageName());\n }\n}\n"
"public void run() {\n curState = ThreadState.RUNNING;\n boolean initialized = waitUntilDbInitialized();\n if (initialized) {\n LogLog.debug(\"String_Node_Str\");\n List<Entry> messages = db.getNext(batchSize);\n while (curState == ThreadState.RUNNING || (curState == ThreadState.STOP_REQUE...
"private void lazyInitialize() {\n if (initialized) {\n return;\n }\n synchronized (this) {\n if (initialized) {\n return;\n }\n XMLDescriptor xmlDescriptor = (XMLDescriptor) getDescriptor();\n Iterator mappingIterator = xmlDescriptor.getMappings().iterator();\n ...
"public void layout() {\n boolean isInline = parent instanceof IInlineStackingLayout;\n if (isInline) {\n if (parent instanceof LineLayout) {\n ContainerLayout inlineContainer = new InlineContainerLayout(context, parent, content);\n inlineContainer.initialize();\n addTempla...
"public void read(PortableReader reader) throws IOException {\n super.read(reader);\n int size = reader.readInt(\"String_Node_Str\");\n final ObjectDataInput in = reader.getRawDataInput();\n dataList = new ArrayList<Data>(size);\n for (int i = 0; i < size; i++) {\n Data data = new Data();\n ...
"public void clear() {\n this.vertices().points().clear();\n this.vertices().uvs().clear();\n this.vertices().normals().clear();\n if (this.vertices().colors() != null)\n this.vertices().colors().clear();\n _textures.clear();\n if (this.parent() != null)\n this.parent().removeChild(this)...
"public void splitSegments() {\n SplitMergeLineFitSegment alg = new SplitMergeLineFitSegment(0.15, MIN_SPLIT, 100);\n alg.contour = new ArrayList<Point2D_I32>();\n for (int i = 0; i < 10; i++) alg.contour.add(new Point2D_I32(i, 0));\n alg.contour.get(4).y = 5;\n alg.splits.add(0);\n alg.splits.add(9);...
"public void addCharacter(List<Tag> tags, char character) {\n glyphShapeTable.add(SHAPERECORD.systemFontCharacterToSHAPE(getFontName(tags), getFontStyle(), getDivider() * 1024, character));\n ensureFontInfo(tags);\n if (fontInfoTag != null) {\n fontInfoTag.codeTable.add((int) character);\n }\n if ...
"public static void main(String[] args) throws Exception {\n Options opts = new Options();\n CmdLineParser parser = new CmdLineParser(InstancesSplitter.class, opts);\n String[] data = null;\n try {\n parser.parse(args);\n data = opts.crossValidationMode.split(\"String_Node_Str\");\n if ...
"private LocalDate computeFirstWeekStartDate(DateTime fromDate) {\n LocalDate startDateForFirstWeek = fourDayRecallDateService.treatmentWeekStartDate(fromDate.toLocalDate(), patient, treatmentAdvice);\n DateTime recallDateTimeForFirstWeek = fourDayRecallDateService.nextRecallOn(startDateForFirstWeek, patient);\n ...
"private void sendChecksumRequestForFile(String filename, ReplicaClient replicaClient) {\n NetarkivetMessage msg;\n msg = replicaClient.getChecksum(Channels.getTheRepos(), filename);\n outstandingChecksumFiles.put(msg.getID(), filename);\n log.debug(\"String_Node_Str\" + filename + \"String_Node_Str\" + msg...
"private static Map loadBinding(InputStream inputStream, int version) throws IOException, DataException {\n DataInputStream dis = new DataInputStream(inputStream);\n Map exprMap = new HashMap();\n int size = IOUtil.readInt(dis);\n for (int i = 0; i < size; i++) {\n String exprName = IOUtil.readString...
"protected Iterator<WebMethod> getLoop(TemplateModel model) throws TemplateException {\n EndpointInterface endpointInterface = this.endpointInterface;\n if (endpointInterface == null) {\n throw new MissingParameterException(\"String_Node_Str\");\n }\n return endpointInterface.getWebMethods().iterator...
"protected IRemoteService registerAndGetRemoteService() {\n final IRemoteServiceContainerAdapter[] adapters = getRemoteServiceAdapters();\n return registerAndGetRemoteService(adapters[0], adapters[1], IConcatService.class.getName(), 1500);\n}\n"
"public final void writeTileNBT(NBTTagCompound tag) {\n tag.setString(AgriCraftNBT.MATERIAL, this.getMaterial().getRegistryName().toString());\n tag.setInteger(AgriCraftNBT.MATERIAL_META, this.getMaterialMeta());\n this.writeNBT(tag);\n}\n"
"public void run() {\n if (mPanelFraction == 0.0f) {\n mBar.makeExpandedInvisible();\n }\n}\n"
"private void initializeNodeValue() {\n XMLMapping xmlMapping = xmlChoiceCollectionMapping.getChoiceElementMappings().get(xmlField);\n if (xmlMapping instanceof XMLBinaryDataCollectionMapping) {\n choiceElementNodeValue = new XMLBinaryDataCollectionMappingNodeValue((XMLBinaryDataCollectionMapping) xmlMappi...
"public void handleEvent(Event event) {\n if (event.data instanceof ISelectDataComponent) {\n if (event.type == IChartDataSheet.EVENT_QUERY && event.detail == IChartDataSheet.DETAIL_UPDATE_COLOR) {\n refreshTableColor();\n }\n return;\n }\n if (event.type == CustomPreviewTable.M...
"public boolean updateUser(Usr user) {\n for (Usr u : getAllUsers()) {\n if (u.equals(user)) {\n u.setActiveState(user.isActive());\n u.setFirstname(user.getFirstname());\n u.setHoliday(user.getHoliday());\n u.setName(user.getName());\n u.setPassword(user...
"private <T extends SkyValue> EvaluationResult<T> constructResult(ValueVisitor visitor, Iterable<SkyKey> skyKeys, Map<SkyKey, ValueWithMetadata> bubbleErrorInfo, boolean catastrophe) {\n Preconditions.checkState(catastrophe == (keepGoing && bubbleErrorInfo != null), \"String_Node_Str\", skyKeys, catastrophe, keepGoi...
"public static String getSafeInfoExtractor() {\n try {\n File candidateByAPI = InstalledFileLocator.getDefault().locate(getInfoExtractor(), null, false);\n if (candidateByAPI != null) {\n return candidateByAPI.getAbsolutePath();\n } else {\n return \"String_Node_Str\";\n ...
"public void end() throws SAXException {\n super.end();\n if (StringUtil.compareVersion(handler.getVersion(), \"String_Node_Str\") >= 0)\n return;\n String content = (String) element.getLocalProperty(handler.getModule(), TextItem.CONTENT_PROP);\n if (StringUtil.isBlank(content))\n return;\n ...
"public Object evaluate(IBaseExpression expr) throws BirtException {\n return ExprEvaluateUtil.evaluateRawExpression2(expr, scope);\n}\n"
"protected void setFontStyle(IStyle style, Value fontStyle) {\n setProperty(style, IStyle.STYLE_FONT_STYLE, fontStyle);\n}\n"
"public void tick() {\n double xa = 0;\n double ya = 0;\n if (input != null) {\n if (input.getUp().isPressed() && input.isIgnoreInput() == false) {\n ya -= speed;\n }\n if (input.getDown().isPressed()) {\n ya += speed;\n }\n if (input.getLeft().isPressed...
"protected void parseRemaining(IToken token) {\n if (token == null || this.hasStopped) {\n return;\n }\n while (this.parser != null) {\n token = token.next();\n Parser prevParser = this.parser;\n int mode = prevParser.getMode();\n this.tryParse(token, prevParser);\n if...
"boolean doesLoadFromCache(DataSourceAndDataSet dsAndDs, int requiredCapability) {\n synchronized (cacheMap) {\n IDataSetCacheObject cacheObject = (IDataSetCacheObject) cacheMap.get(dsAndDs);\n if (cacheObject != null) {\n boolean reusable = cacheObject.isCachedDataReusable(requiredCapabilit...
"public void onSignChange(SignChangeEvent event) {\n Block signBlock = event.getBlock();\n String[] line = event.getLines();\n boolean isAlmostReady = uSign.isValidPreparedSign(line);\n Player player = event.getPlayer();\n ItemStack stock = Items.getItemStack(line[3]);\n Material mat = stock == null ?...
"private List<EntityPK> coverToEntityPK() {\n List<EntityPK> entityPkList = Lists.newArrayList();\n PKName[] pkNames = entityMetaManager.getPkName(this.clazz);\n if (pkNames.length != this.condList.size()) {\n return null;\n }\n boolean isMatch = true;\n Condition cond = null;\n for (int i =...
"private Set<Long> addPredicateString(Set<Long> thePids, List<IQueryParameterType> theOrParams) {\n if (theOrParams == null || theOrParams.isEmpty()) {\n return thePids;\n }\n CriteriaBuilder builder = myEntityManager.getCriteriaBuilder();\n CriteriaQuery<Long> cq = builder.createQuery(Long.class);\n...
"public static boolean isRefreshManually() {\n return true;\n}\n"
"public List<URL> getUniqueClasspathElementURLs() {\n final List<URL> classpathElementOrderURLs = new ArrayList<>();\n for (final ClasspathElement classpathElement : classpathOrder) {\n final ModuleRef modRef = classpathElement.getClasspathElementModuleRef();\n if (modRef != null) {\n try...
"private SyncContactNumber createSyncContactNumberFromCursor(Cursor numberCursor) {\n long dataId = numberCursor.getLong(numberCursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone._ID));\n String number = numberCursor.getString(numberCursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n...
"public SQLWarning getWarnings() throws SQLException {\n return getDelegate().getWarnings();\n}\n"
"private void runAndWait(ProgramRunner programRunner, Program program, ProgramOptions options) throws Exception {\n Closeable closeable = createCloseable(programRunner, program);\n RunId runId = ProgramRunners.getRunId(options);\n String twillRunId = options.getArguments().getOption(ProgramOptionConstants.TWIL...
"public void addClass(ICorpusClass c) {\n if (null == c)\n return;\n ((CorpusClass) c).setParent(this);\n this.classes.add(c);\n}\n"
"public void upgradeLoadBalancingRules(Connection conn) {\n try {\n PreparedStatement pstmt = conn.prepareStatement(\"String_Node_Str\");\n ResultSet rs = pstmt.executeQuery();\n ArrayList<Object[]> lbs = new ArrayList<Object[]>();\n while (rs.next()) {\n Object[] lb = new Obje...
"public Object apply(List args) {\n if (args.size() == 1) {\n List firstArg = (List) args.get(0);\n return firstArg.subList(1, firstArg.size());\n } else {\n return Environment.FALSE;\n }\n}\n"
"public void setRepositoryValueUsed(boolean repositoryUsed) {\n Property property = getProperty();\n if (property != null) {\n property.setTaggedValue(IGenericConstants.REPOSITORY_VALUE, repositoryUsed ? property.getName() : null);\n }\n}\n"
"private void createMetadataEditorTab() {\n CTabItem item = new CTabItem(tabFolderEditors, SWT.BORDER);\n item.setText(Messages.getString(\"String_Node_Str\"));\n SashForm inOutMetaEditorContainer = new SashForm(tabFolderEditors, SWT.SMOOTH | SWT.HORIZONTAL | SWT.SHADOW_OUT);\n inOutMetaEditorContainer.setL...
"public void writeFromObjectIntoRow(Object object, AbstractRecord row, AbstractSession session, WriteType writeType) throws DescriptorException {\n if (this.isReadOnly()) {\n return;\n }\n DOMRecord record = (DOMRecord) row;\n Object attributeValue = this.getAttributeValueFromObject(object);\n Nod...
"public int getApplicabilityRating(PresentationType presentationType, IArtifact artifact) throws OseeCoreException {\n Artifact aArtifact = artifact.getFullArtifact();\n if (!aArtifact.isHistorical() && !presentationType.matches(GENERALIZED_EDIT, PRODUCE_ATTRIBUTE) && aArtifact.isOfType(AtsArtifactTypes.AtsArtifa...
"private Interval<T> getInterval(IndexNode index, String sValue) {\n DataTypeWithRatioScale<T> type = (DataTypeWithRatioScale<T>) getDataType();\n T tValue = type.parse(sValue);\n if (adjustment == DynamicAdjustment.OUT_OF_BOUNDS_LABEL) {\n if (type.compare(tValue, min) < 0) {\n return OUT_OF...
"public void checkPreconditions(BankOrderLine bankOrderLine) throws AxelorException {\n if (bankOrderLine.getBankOrder().getPartnerTypeSelect() == BankOrderRepository.PARTNER_TYPE_COMPANY) {\n if (bankOrderLine.getReceiverCompany() == null) {\n throw new AxelorException(I18n.get(IExceptionMessage.B...
"private void toRGBDouble(UnpackedImageData src, int[] srcComponentSize, WritableRaster dest, int[] destComponentSize) {\n double[] iBuf = src.getDoubleData(0);\n double[] hBuf = src.getDoubleData(1);\n double[] sBuf = src.getDoubleData(2);\n double normr = 1.0, normg = 1.0, normb = 1.0;\n int dstType = ...
"private Location createJobJarTempCopy(Location jobJarLocation) throws IOException {\n Location programJarCopy = locationFactory.create(\"String_Node_Str\");\n InputStream src = jobJarLocation.getInputStream();\n try {\n OutputStream dest = programJarCopy.getOutputStream();\n try {\n B...
"public ISeedRequirements getSeedRequirements(ItemStack seed) {\n if (CropPlantHandler.isValidSeed(seed)) {\n SeedRequirements result = new SeedRequirements();\n GrowthRequirement growthRequirement = GrowthRequirements.getGrowthRequirement((ItemSeeds) seed.getItem(), seed.getItemDamage());\n res...
"public AbstractRecord buildIntoNestedRow(AbstractRecord row, Object originalObject, Object object, AbstractSession session, XMLDescriptor refDesc, XMLField xmlField, boolean wasXMLRoot) {\n XMLRecord record = (XMLRecord) row;\n record.setSession(session);\n XMLMarshaller marshaller = record.getMarshaller();\n...
"protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n mContentRect.set(getPaddingLeft() + (mAxisLeft.isInside() ? 0 : mAxisLeft.getLabelWidth()) + (mAxisLeft.isInside() ? 0 : mAxisLeft.getLabelSeparation()), getPaddingTop(), getWidth() - getPaddingRight() - (mAxisRight.isInside() ? 0 : mAxisRight.getLa...
"private void createGroupInstanceOnScaling(final NetworkPartitionContext networkPartitionContext, final String parentInstanceId) {\n if (groupScalingEnabled) {\n if (((ParentLevelNetworkPartitionContext) networkPartitionContext).getPendingInstancesCount(parentInstanceId) == 0) {\n if (log.isDebugEn...
"private void verifySuperClass(ClassDefinition cls) {\n int superId = cls.getSuperClassObjectId();\n if (classes.containsKey(superId)) {\n verifySuperClass(classes.get(superId));\n } else if (!className.equals(\"String_Node_Str\")) {\n throw new IllegalStateException(\"String_Node_Str\" + classNa...
"public void abstractMethodMustBeImplemented(SourceTypeBinding type, MethodBinding abstractMethod) {\n if (isPointcutDeclaration(abstractMethod)) {\n return;\n }\n if (CharOperation.prefixEquals(\"String_Node_Str\".toCharArray(), abstractMethod.selector)) {\n return;\n }\n ResolvedTypeX onT...
"public boolean validatePlacementPolicies(ClusterCreate cluster, Map<String, NodeGroupCreate> groups, List<String> failedMsgList, List<String> warningMsgList) {\n boolean valid = true;\n TopologyType topologyType = cluster.getTopologyPolicy();\n if (topologyType != null && (topologyType.equals(TopologyType.HVE...
"public void testJSONMarshalToOutputStream_FORMATTED() throws Exception {\n getJSONMarshaller().setProperty(MarshallerProperties.MEDIA_TYPE, \"String_Node_Str\");\n getJSONMarshaller().setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);\n ByteArrayOutputStream os = new ByteArrayOutputStream();\n try {\n ...
"public boolean execute(Editor editor, DataContext context, ExCommand cmd) throws ExException {\n char mark = cmd.getArgument().charAt(0);\n int line = cmd.getLine(editor, context);\n int offset = EditorHelper.getLineStartOffset(editor, line);\n return CommandGroups.getInstance().getMark().setMark(editor, c...
"public byte[] getData(int version) {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n OutputStream os = baos;\n SWFOutputStream sos = new SWFOutputStream(os, version);\n try {\n sos.writeUI16(fontId);\n sos.writeUI8(fontName.getBytes(\"String_Node_Str\").length);\n sos.wri...
"public void init(final State currentState, final Throwable cause) {\n executor.execute(new Runnable() {\n public void run() {\n listener.init(currentState, cause);\n }\n }, \"String_Node_Str\");\n}\n"
"private void setText(String text) {\n lines = StringMethods.splitLines(text);\n level1Headers.clear();\n lineTypes = new ArrayList<KLineType>(lines.size());\n pageObjects.clear();\n Header dummyTopHeader = new Header(1, 0, \"String_Node_Str\", null);\n level1Headers.add(dummyTopHeader);\n Header c...
"public void handleMessage(Message msg) {\n int baseMsgWhat = getMsgBase(msg.what);\n switch(baseMsgWhat) {\n case MSG_SET_SYSTEM_VOLUME:\n setSystemVolume((VolumeStreamState) msg.obj);\n break;\n case MSG_PERSIST_VOLUME:\n persistVolume((VolumeStreamState) msg.obj);...
"public Boolean execute() throws UserException, BimDatabaseException, BimDeadlockException {\n User actingUser = getUserByUoid(actingUoid);\n final Project project = getProjectByPoid(poid);\n if (actingUser.getUserType() == UserType.ADMIN || (actingUser.getHasRightsOn().contains(project) && bimServer.getSettin...
"public String getValue(String str) {\n String sTmp = \"String_Node_Str\";\n sTmp = getKey(str);\n if (\"String_Node_Str\".equals(sTmp)) {\n int iSeparator = str.indexOf(SEPARATOR) + SEPARATOR.length();\n if (iSeparator == (-1 + SEPARATOR.length())) {\n iSeparator = 0;\n }\n ...
"public static void configCheck(ConfigType type) {\n FileConfiguration config;\n switch(type) {\n case DEATH_MESSAGE:\n config = deathMsgConfig.getConfig();\n config.addDefault(\"String_Node_Str\", true);\n config.addDefault(\"String_Node_Str\", \"String_Node_Str\");\n ...
"public void run() {\n int newPosition = getScrollY();\n if (initialPosition - newPosition == 0) {\n if (onScrollStoppedListener != null) {\n onScrollStoppedListener.onScrollStopped();\n }\n } else {\n initialPosition = getScrollY();\n CustomScrollView.this.postDelayed(sc...
"public void handleResponse(final Response<Object> response) {\n final HandlerKey handlerKey = new HandlerKey(response.returnAddress(), response.address(), response.id(), now);\n final Callback<Object> handler = handlers.remove(handlerKey);\n if (handler == null) {\n return;\n }\n if (response.was...
"void executeCommand(int commandType, Intent intent) {\n boolean opSymbol = true;\n if (commandType == COMMAND_SYNC_DINING_TABLE) {\n HashMap<String, ArrayList<DiningTable>> diningTableMap = new HashMap<String, ArrayList<DiningTable>>();\n ArrayList<DiningTable> diningTableList = ServiceHelper.getDi...
"private static PreservationMetadata convertResourceToPreservationMetadata(Resource resource) throws RequestNotValidException {\n if (resource == null) {\n throw new RequestNotValidException(\"String_Node_Str\");\n }\n StoragePath resourcePath = resource.getStoragePath();\n String filename = resource...
"private void setHomeTargetMethodInfo(InvocationInfo invInfo, boolean isLocal) throws EJBException {\n Class homeIntfClazz = isLocal ? javax.ejb.EJBLocalHome.class : javax.ejb.EJBHome.class;\n Class methodClass = invInfo.method.getDeclaringClass();\n Class[] paramTypes = invInfo.method.getParameterTypes();\n ...
"public AnnotationVisitor visitAnnotation(String desc, boolean visible) {\n hasConfiguredAnnotation |= \"String_Node_Str\".equals(desc);\n if (\"String_Node_Str\".equals(desc) && classDef != null) {\n classDef.setDeprecated(true);\n }\n return null;\n}\n"
"public Collection<? extends IRelation> getRelations() {\n Collection<? extends IRelation> s = HashSetFactory.make();\n s.addAll(a.getRelations());\n s.addAll(b.getRelations());\n return s;\n}\n"
"protected Object encode(ChannelHandlerContext ctx, Channel channel, Object msg) throws Exception {\n if (!(msg instanceof RpcDataPackage)) {\n return msg;\n }\n RpcDataPackage dataPackage = (RpcDataPackage) msg;\n byte[] encodeBytes = dataPackage.write();\n if (encodeBytes != null) {\n LOG...
"private void populateData(IRowResultSet rowResultSet, IResultClass rsMeta, SortSpec sortSpec) throws DataException {\n long startTime = System.currentTimeMillis();\n SizeOfUtil sizeOfUtil = new SizeOfUtil(rsMeta);\n long memoryCacheSize = CacheUtil.computeMemoryBufferSize(eventHandler.getAppContext());\n i...
"public static InetSocketAddress toInetSocketAddress(String address) {\n try {\n URI uri = new URI(\"String_Node_Str\" + address);\n return new InetSocketAddress(uri.getHost(), uri.getPort());\n } catch (URISyntaxException ignore) {\n }\n return null;\n}\n"
"private void createTestData() {\n DBDAO.upsertDB(dbName, dbProps, new ObjectId(), false);\n final CollectionDAO collectionDAO = new CollectionDAO();\n collectionDAO.upsertCollection(dbName, collection1Name, coll1Props, new ObjectId(), false, false);\n collectionDAO.upsertCollection(dbName, collection2Name,...
"public static PortletDescriptorRegistry getRegistry() {\n return REGISTRY;\n}\n"
"public void getAll() {\n this.instanceManager.registerSingle(PARENT, ACTUAL_1);\n this.instanceManager.registerSingle(PARENT, ACTUAL_2);\n this.instanceManager.registerMultiple(PARENT, SEL_1, ACTUAL_1);\n this.instanceManager.registerMultiple(PARENT, SEL_2, ACTUAL_2);\n final List<String> all = this.ins...
"private void selectFromList(List<WebElement> els, int index) {\n if (index <= 0)\n throw asserter.exception(\"String_Node_Str\", index);\n if (els == null)\n throw asserter.exception(\"String_Node_Str\", index);\n if (els.size() < index)\n throw asserter.exception(\"String_Node_Str\", ind...
"public synchronized void reload() {\n if (!SETTINGS_FILE.isFile()) {\n setExpireValue();\n return;\n }\n FileInputStream fis = null;\n try {\n fis = new FileInputStream(SETTINGS_FILE);\n try {\n PROPS.load(fis);\n } catch (IllegalArgumentException ignored) {\n ...