content
stringlengths
40
137k
"private static boolean isJDK16OrAbove(byte[] code) {\n final int majorOffset = 4 + 2;\n int major = (((code[majorOffset] << 8) & 0xFF00) | ((code[majorOffset + 1]) & 0xFF));\n return major >= 50;\n}\n"
"private void removeLob(int tableId, long lobId) {\n Object[] value = lobMap.remove(lobId);\n byte[] streamStoreId = (byte[]) value[0];\n Object[] key = new Object[] { streamStoreId, lobId };\n refMap.remove(key);\n key = new Object[] { streamStoreId, 0 };\n value = refMap.ceilingKey(key);\n boolea...
"public void updateAnimation() {\n Minecraft minecraft = Minecraft.getMinecraft();\n World world = minecraft.theWorld;\n EntityPlayer player = minecraft.thePlayer;\n double angel = 0;\n if (world != null) {\n double xDifference = 0;\n double zDifference = 0;\n ItemStack itemStack = p...
"public void setState(final VmState newState, SystemState.Reason reason, String... extra) {\n this.updateWatch.split();\n if (this.updateWatch.getSplitTime() > 1000 * 60 * 60) {\n this.store();\n this.updateWatch.unsplit();\n } else {\n this.updateWatch.unsplit();\n }\n this.resetSto...
"private MetadataSearchResponse filterAuthorizedSearchResult(MetadataSearchResponse results) throws Exception {\n Principal principal = authenticationContext.getPrincipal();\n final Predicate<EntityId> filter = authorizationEnforcer.createFilter(principal);\n return new MetadataSearchResponse(results.getSort()...
"public void doCreateExplosion(World world, double x, double y, double z, Entity entity) {\n new BlastRedmatter(world, entity, x, y, z, 35).explode();\n}\n"
"public void processDone() {\n if (baseTokenLayingEnabled) {\n if (selectedHex != null) {\n if (selectedHex.getHexModel().getStations().size() == 1)\n selectedHex.fixToken(0);\n else {\n Object[] stations = selectedHex.getHexModel().getStations().toArray();\...
"public void acquireMulticastLock(IBinder binder, String tag) {\n enforceMulticastChangePermission();\n synchronized (mMulticasters) {\n mMulticastEnabled++;\n mMulticasters.add(new Multicaster(tag, binder));\n synchronized (mWifiStateTracker) {\n WifiNative.stopPacketFiltering();\...
"public void load() {\n try {\n mainConfig.load(mainConfigFile);\n regionConfig.load(regionConfigFile);\n grillConfig.load(grillConfigFile);\n bridgeConfig.load(bridgeConfigFile);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n ...
"public double getFeatureLearningRate(String feature) {\n return initialLearningRate / Math.sqrt(summedGradients.getCoordinate(feature));\n}\n"
"public FeatureExpr getContextOf(Function<T, Boolean> function) {\n FeatureExpr result = FeatureExprFactory.False();\n for (Entry<T, FeatureExpr> element : map.entrySet()) {\n if (function.apply(element.getKey())) {\n result = or(result, element.getValue());\n }\n }\n return result;...
"private boolean canGoDeeper() {\n return this.sharedFrozenDepth.value == null && this.sharedCurrentDepth.value < maxDepth;\n}\n"
"public void approve(CoinData coinData, Transaction tx) throws NulsException {\n UtxoData utxoData = (UtxoData) coinData;\n for (UtxoInput input : utxoData.getInputs()) {\n input.setTxHash(tx.getHash());\n }\n for (UtxoOutput output : utxoData.getOutputs()) {\n output.setTxHash(tx.getHash());\...
"public static boolean hasRewardSmelting(Player player) {\n return player.hasPermission(REWARDS_SMELTING);\n}\n"
"public void inject(int splitPoint, LoadErrorHandler loadErrorHandler) {\n if (haveInitialFragmentsLoaded()) {\n logDownloadStart(splitPoint);\n startLoadingFragment(splitPoint, loadErrorHandler);\n return;\n }\n if (isInitial(splitPoint)) {\n initialFragmentErrorHandlers.put(splitP...
"public boolean onCommand(final CommandSender sender, final Command command, final String label, final String[] split) {\n if (!(sender instanceof Player)) {\n return false;\n }\n final Player player = (Player) sender;\n if (!VaultHelper.checkPerm(player, Settings.PERMPREFIX + \"String_Node_Str\")) {...
"private JsExpression mapExpression(Node exprNode) throws JsParserException {\n JsNode unknown = map(exprNode);\n if (unknown instanceof JsExpression) {\n return (JsExpression) unknown;\n } else {\n throw createParserException(\"String_Node_Str\", exprNode);\n }\n}\n"
"protected String createGameStartMessage() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"String_Node_Str\");\n for (MatchPlayer mp : this.getPlayers()) {\n sb.append(\"String_Node_Str\").append(mp.getPlayer().getLogName());\n sb.append(\"String_Node_Str\").append(mp.getWins()).append(...
"public void render(HttpServletRequest req, HttpServletResponse resp, Object obj) throws Exception {\n Mirror<?> mirror = Mirror.me(obj);\n boolean isMap = null != obj && obj instanceof Map<?, ?>;\n Map<?, ?> map = isMap ? null : (Map<?, ?>) obj;\n Set<String> keySet = dest.keys();\n Iterator<String> it ...
"protected Dimension getChildSize(IFigure child, int wHint, int hHint) {\n updateChild(child, wHint);\n ReportItemConstraint constraint = (ReportItemConstraint) getConstraint(child);\n Dimension preferredDimension;\n if (DesignChoiceConstants.REPORT_LAYOUT_PREFERENCE_FIXED_LAYOUT.equals(layoutPreference) &&...
"public void createRefund(ActionRequest request, ActionResponse response) {\n Invoice invoice = request.getContext().asType(Invoice.class);\n try {\n invoice = invoiceRepo.find(invoice.getId());\n Invoice refund = invoiceService.createRefund(invoice);\n response.setReload(true);\n resp...
"public ConfiguredAspect create(ConfiguredTarget base, RuleContext ruleContext, AspectParameters parameters) throws InterruptedException {\n ConfiguredAspect.Builder aspectBuilder = new ConfiguredAspect.Builder(NAME, ruleContext);\n ObjcConfiguration objcConfiguration = ruleContext.getFragment(ObjcConfiguration.c...
"private static Object doPalette(Object object, String type) {\n assert (object instanceof PaletteRoot);\n PaletteRoot root = (PaletteRoot) object;\n List list = root.getChildren();\n List exts = ExtensionPointManager.getInstance().getExtendedElementPoints();\n if (exts == null) {\n return root;\n...
"protected void visitHtmlOpenTagNode(HtmlOpenTagNode node) {\n visitHtmlTagNode(node);\n}\n"
"private void addTypeToUsedTypes(final CompilationUnit compilationUnit, final ITypeName recType, final IClass clazz) {\n final String fingerprint = fingerprint(clazz);\n final org.eclipse.recommenders.internal.commons.analysis.codeelements.TypeReference recTypeRef = org.eclipse.recommenders.internal.commons.analy...
"public Project createProject(Project projectInfor) throws PersistenceException {\n IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();\n String technicalLabel = Project.createTechnicalName(projectInfor.getLabel());\n IProject prj = root.getProject(technicalLabel);\n final IWorkspace workspace =...
"public UserVm createAdvancedVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, List<Long> networkIdList, Account owner, String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, String userData, String sshKeyPair, Ma...
"public int[] getSpecialGroups(Context context, HttpServletRequest request) {\n try {\n if (!context.getCurrentUser().getNetid().equals(\"String_Node_Str\")) {\n String groupName = ConfigurationManager.getProperty(\"String_Node_Str\");\n if ((groupName != null) && (!groupName.trim().equa...
"boolean hasAnyTemplateTypesInternal() {\n for (JSType templateValue : addUnknownValues().resolvedTemplateValues) {\n if (templateValue.hasAnyTemplateTypes()) {\n return true;\n }\n }\n return false;\n}\n"
"public void close() throws IOException {\n if (wsSession != null) {\n clientClose = true;\n wsSession.close();\n this.closeClient();\n }\n}\n"
"protected Dimension getChildSize(IFigure child, int wHint, int hHint) {\n if (child instanceof TableFigure) {\n IFigure grandFigure = getParent().getParent();\n if (grandFigure instanceof ListFigure && ((ListFigure) grandFigure).isDirty()) {\n int oldWidth = getBounds().width;\n ...
"public void render(Map<Series, LegendItemRenderingHints> htRenderers, Bounds bo) throws ChartException {\n final boolean bFirstInSequence = (iSeriesIndex == 0);\n final boolean bLastInSequence = (iSeriesIndex == iSeriesCount - 1);\n boolean bStarted = bFirstInSequence;\n Block bl = cm.getBlock();\n fina...
"public Object getId() {\n return doOp(ClusterOperation.GET_ID, null, null);\n}\n"
"protected ScheduledExecutorService executor() {\n executor.set(super.executor());\n return executor.get();\n}\n"
"public org.hl7.fhir.dstu2.model.HealthcareService convertHealthcareService(org.hl7.fhir.dstu3.model.HealthcareService src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2.model.HealthcareService tgt = new org.hl7.fhir.dstu2.model.HealthcareService();\n cop...
"public Integer[] getColumnIndexArray() {\n if (!DrillDownEditorInput.judgeMenuType(this.getMenuType(), DrillDownEditorInput.MENU_VALUE_TYPE) || DuplicateCountIndicator.class.isInstance(currIndicator)) {\n return null;\n }\n List<Integer> indexArray = new ArrayList<Integer>();\n Indicator indicator =...
"public void onEntityCollidedWithBlock(Entity entity) {\n if (destination == -1 || entity.worldObj.isRemote) {\n return;\n }\n if (entity.timeUntilPortal > TELEPORT_DELAY) {\n entity.timeUntilPortal = entity.getPortalCooldown() + TELEPORT_DELAY;\n return;\n }\n if (!RegistryEnderAttu...
"public Map.Entry<Interval, T> next() {\n if (!hasNext()) {\n throw new NoSuchElementException(\"String_Node_Str\");\n }\n final IntervalTree.Node<T> node = mTreeIterator.next();\n if (!mTreeIterator.hasNext()) {\n advanceSequence();\n }\n final Interval key = new Interval(sequence, node...
"public void setLibraryType(String libraryType) {\n setSampleAttribute(\"String_Node_Str\", String.valueOf(libraryType));\n this.libraryType = libraryType;\n}\n"
"private static boolean equalsStr(String s, String t) {\n if (s == null && t == null)\n return true;\n if ((s != null) && (t != null)) {\n return s.equals(t);\n }\n return false;\n}\n"
"public boolean initialize() {\n LSMSensorMetaData metadata;\n VSensorConfig vsensor = getVirtualSensorConfiguration();\n try {\n metadata = LSMRepository.getInstance().loadMetadata(vsensor);\n } catch (Exception e) {\n e.printStackTrace();\n logger.error(\"String_Node_Str\" + vsensor.g...
"public String nextString() throws IOException, JsonParseException {\n _numTypesValid = NR_UNKNOWN;\n if (_pendingLF > 0) {\n if (_inputSource != null) {\n _handleLF();\n }\n return null;\n }\n int i;\n if (_trimSpaces) {\n i = _skipLeadingSpace();\n } else {\n ...
"private void createMatchAlternative(List<OptimizerNode> target, List<OptimizerNode> preds1, List<OptimizerNode> preds2, ShipStrategy ss1, ShipStrategy ss2, LocalStrategy ls, Order order, boolean grouped, LocalProperties outLpp, CostEstimator estimator) {\n GlobalProperties gp1;\n GlobalProperties gp2;\n if (p...
"private void viewResults() {\n if (Experiment.csvLabel != null) {\n String csv = (String) Experiment.csvLabel.getSelectedItem();\n System.out.println(csv);\n Survey survey = cachedSurveys.get(csv);\n if (survey != null) {\n try {\n ResponseManager.Record record ...
"public static String getDisplayName(String name, boolean isSpeaking, boolean isMuted) {\n if (isMuted) {\n return LEFT_MUTE + name + RIGHT_MUTE;\n } else {\n if (isSpeaking) {\n return name + SPEAKING;\n }\n }\n return name;\n}\n"
"public void writeInvJump(MethodWriter writer, int varIndex, Label elseLabel) throws BytecodeException {\n if (varIndex < 0) {\n varIndex = writer.localCount();\n writer.writeVarInsn(Opcodes.ASTORE, varIndex);\n }\n writer.writeVarInsn(Opcodes.ALOAD, varIndex);\n writer.writeTypeInsn(Opcodes.I...
"public CommandLineParser generateParser(UICommand command, Map<String, InputComponent<?, Object>> inputs) {\n ParserBuilder builder = new ParserBuilder();\n UICommandMetadata metadata = command.getMetadata();\n ParameterInt parameter = new ParameterInt(ShellUtil.shellifyName(metadata.getName()), metadata.getD...
"public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int rowIndex, int vColIndex) {\n DotBorderedCellLabel label;\n int columnId;\n columnId = convertColumnIndexToModel(vColIndex);\n label = cellLabels[columnId];\n if (columnId == ACTION_DESCRI...
"private void handleFoundDevice(ScanResult scanResult) {\n long timeStamp = scanResult.getTimestampNanos();\n long now = TimeUnit.MILLISECONDS.toNanos(System.currentTimeMillis());\n if (now - timeStamp < TimeUnit.SECONDS.toNanos(TIMEOUT_FOR_OLD_BEACONS)) {\n UriBeacon uriBeacon = UriBeacon.parseFromByte...
"protected void onMethodCalled(int from, String methodName, Vector<String> params) {\n Vector<String> returnParams = new Vector();\n String returnMethodName = \"String_Node_Str\";\n try {\n String returnValue = null;\n if (methodName.startsWith(\"String_Node_Str\")) {\n this.createUser...
"public Set<Image> find(Set<Long> ids, List<QueryConstraint> constraints) throws IOException {\n Set<Image> foundSet = new HashSet<Image>();\n if (query.getConstraints() == null || query.getConstraints().isEmpty()) {\n Set<Long> ids = query.getIdSet();\n if (ids != null && !ids.isEmpty()) {\n ...
"public static ThriftServer createServer(int serverIndex, BlurConfiguration configuration) throws Exception {\n Configuration config = new Configuration();\n TableContext.setSystemBlurConfiguration(configuration);\n TableContext.setSystemConfiguration(config);\n String bindAddress = configuration.get(BLUR_S...
"public void setLockModeType(LockModeType lockModeType, AbstractSession session) {\n if (lockModeType != null) {\n if (super.setLockModeType(lockModeType, session)) {\n return true;\n } else {\n if (!lockModeType.equals(PESSIMISTIC) && !lockModeType.equals(NONE)) {\n ...
"private boolean addPredicateMissingFalseIfPresent(String theParamName, Root<? extends BaseResourceIndexedSearchParam> from, List<Predicate> codePredicates, IQueryParameterType nextOr) {\n boolean missingFalse = false;\n if (nextOr.getMissing() != null) {\n if (nextOr.getMissing().booleanValue() == true) {...
"public void testImplicationBetweenConflicts() throws IOException {\n Diff deletePackageY = setupImplicationBetweenConflicts();\n MergeDependenciesChecker checker = getChecker(deletePackageY);\n checker.rightToLeft().implies(1).rejects(0).check();\n checker.leftToRight().implies(1).rejects(0).check();\n}\n"...
"public void doOpenGraph(File selectedFile) {\n try {\n if (\"String_Node_Str\".equals(selectedFile.getName()) || \"String_Node_Str\".equals(selectedFile.getName())) {\n GraphViewerPanelManager<UndirectedGraph<String, String>> viewerPanelManager = new GraphViewerPanelManager<UndirectedGraph<String,...
"private static String getOrderByProperty(String property, Order order) {\n if (order == null)\n order = Order.ascending;\n String propertyXPath = XPathUtils.generateJcrPathForPropertyPath(property, true);\n switch(order) {\n case ascending:\n case descending:\n boolean property...
"public static void getBaselines(final Product[] sourceProduct, final Product targetProduct) {\n try {\n final MetadataElement abstractedMetadata = AbstractMetadata.getAbstractedMetadata(targetProduct);\n final MetadataElement baselinesElem = getBaselinesElem(abstractedMetadata);\n final InSARSt...
"public void addLayout(GlimpseLayout layout, GlimpsePainterCallback callback, int zOrder) {\n lock.lock();\n try {\n manager.addLayout(layout, zOrder);\n layoutDelegate.addLayout(layout, callback, zOrder);\n invalidateLayout();\n } finally {\n lock.unlock();\n }\n}\n"
"public int compare(ARankColumnModel o1, ARankColumnModel o2) {\n return Float.compare((float) o2.getParentData(), (float) o1.getParentData());\n}\n"
"public void treeComplete(String treeName, KooKooIVRContext kooKooIVRContext) {\n TAMAIVRContext ivrContext = factory.create(kooKooIVRContext);\n ivrContext.lastCompletedTree(treeName);\n if ((onCurrentDosage(treeName) && previousDosageCaptured(ivrContext) && CallState.AUTHENTICATED.equals(ivrContext.callState...
"public void loginUser(String userName) throws SecurityException, ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {\n doingWork = true;\n if (loggedInUser != null) {\n printError(\"String_Node_Str\" + loggedInUser);\n doingWork = false;\n retur...
"private void writeConstructor(TypeSpec.Builder builder) {\n MethodSpec.Builder constructor = MethodSpec.constructorBuilder().addModifiers(Modifier.PUBLIC).addParameter(ClassNames.DATABASE_HOLDER, \"String_Node_Str\");\n for (TableDefinition tableDefinition : manager.getTableDefinitions(elementClassName)) {\n ...
"void sendAccessibilityEventUncheckedInternal(AccessibilityEvent event) {\n if (!isShown() || !isImportantForAccessibility()) {\n return;\n }\n onInitializeAccessibilityEvent(event);\n if ((event.getEventType() & POPULATING_ACCESSIBILITY_EVENT_TYPES) != 0) {\n dispatchPopulateAccessibilityEven...
"public void parse(IParserManager pm, IToken token) throws SyntaxError {\n int type = token.type();\n if (this.mode == NAME) {\n if (ParserUtil.isIdentifier(type)) {\n Name name = token.nameValue();\n this.annotation.name = name;\n this.annotation.type = new NamedType(token...
"public CandidateProgram<TYPE>[] crossover(CandidateProgram<TYPE> program1, CandidateProgram<TYPE> program2) {\n int swapPoint1 = getCrossoverPoint(program1);\n int swapPoint2 = getCrossoverPoint(program2);\n Node<TYPE> subtree1 = (Node<TYPE>) program1.getNthNode(swapPoint1);\n Node<TYPE> subtree2 = (Node<T...
"public void start(HashMap<String, String> disks) throws Exception {\n this.node.start();\n if (sharedDisks != null) {\n for (java.util.Map.Entry<String, String> disk : sharedDisks.entrySet()) {\n SharedDiskManager.addSharedToMachine(disk.getKey(), disk.getValue(), this);\n }\n }\n}\n"...
"protected void setUp(ModelStep step) throws Exception {\n if (hasInitialized()) {\n return;\n }\n loadModelConfig();\n validateModelConfig(step);\n this.pathFinder = new PathFinder(modelConfig, this.getOtherConfigs());\n checkAlgorithmParam();\n LOG.info(String.format(\"String_Node_Str\", m...
"public void run() {\n init();\n long timer = System.currentTimeMillis();\n int frames = 0;\n while (!Display.isCloseRequested()) {\n long now = System.nanoTime();\n delta += (now - last) / ns;\n last = now;\n if (delta >= 1) {\n render();\n update();\n ...
"public String getSqlStatement() {\n return (logic.isPresent() ? logic.get().toString() + \"String_Node_Str\" : \"String_Node_Str\") + column.getSqlKeyword() + \"String_Node_Str\" + operator.getSqlStatement();\n}\n"
"public DesignElementHandleAdapter getDesignElementHandleAdapter(Object obj, IModelAdapterHelper mark) {\n if (obj instanceof IAdaptable) {\n Object adapter = ((IAdaptable) obj).getAdapter(DesignElementHandle.class);\n if (adapter != null) {\n obj = adapter;\n }\n }\n if (obj in...
"public void registerDownstream(EventConsumer<K, V> subscription) {\n registerSubscriber(rc.clone().messageType(rc.messageType()).elementType(MapEvent.class), subscription::notifyEvent, Filter.empty());\n}\n"
"private DB openDB(DBType dbType) {\n DB db = dbRegistry.get(dbType);\n if (!isOpenDB(db)) {\n DBMaker m;\n boolean permitCaching = true;\n if (dbType == DBType.PRIMARY_DB) {\n m = DBMaker.newFileDB(getDefaultPath().toFile());\n } else if (dbType == DBType.TEMP_DB_CACHED || ...
"private Integer getEdge(String switchId, boolean throwException) {\n Integer edge = switches.get(switchId);\n if (throwException && edge == null) {\n throw createSwitchNotFoundException(switchId);\n }\n return edge;\n}\n"
"public void writeExpression(MethodWriter writer) {\n this.value.writeExpression(writer);\n if (this.type.isPrimitive()) {\n OpcodeUtil.writePrimitiveCast(this.value.getType(), (PrimitiveType) this.type, writer);\n } else {\n writer.visitTypeInsn(Opcodes.CHECKCAST, this.type);\n }\n}\n"
"public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {\n Element element;\n if (namespaceURI == null) {\n element = document.createElement(qName);\n } else {\n element = document.createElementNS(namespaceURI, qName);\n }\n node ...
"public void testNotAutorizedException() {\n responseHeaders.setContentType(MediaType.APPLICATION_JSON);\n mockServer.expect(requestTo(\"String_Node_Str\")).andExpect(method(GET)).andRespond(withStatus(UNAUTHORIZED));\n yammerTemplate.userOperations().getUsers(1);\n}\n"
"public Resource getResource(Resource resource, ResourceTO resourceTO) throws SyncopeClientCompositeErrorException {\n SyncopeClientCompositeErrorException compositeErrorException = new SyncopeClientCompositeErrorException(HttpStatus.BAD_REQUEST);\n SyncopeClientException requiredValuesMissing = new SyncopeClient...
"public void loadDataSet(NodeRef filePlan, String dataSetId) {\n ParameterCheck.mandatory(\"String_Node_Str\", filePlan);\n ParameterCheck.mandatoryString(\"String_Node_Str\", dataSetId);\n DataSet dataSet = getDataSets().get(dataSetId);\n InputStream is = null;\n try {\n is = getClass().getClassL...
"public void process_simple() {\n SquaresIntoCrossClusters alg = new SquaresIntoCrossClusters(0.05, -1);\n List<Polygon2D_F64> squares = new ArrayList<Polygon2D_F64>();\n squares.add(createSquare(7, 8));\n squares.add(createSquare(9, 8));\n squares.add(createSquare(8, 9));\n squares.add(createSquare(7...
"private void initiateConversation(boolean dismissView, List<String> spreedCapabilities) {\n Bundle bundle = new Bundle();\n boolean hasChatCapability;\n if (baseUrl != null && !baseUrl.equals(currentUser.getBaseUrl())) {\n bundle.putString(BundleKeys.KEY_MODIFIED_BASE_URL, baseUrl);\n hasChatCap...
"public void generateJSON(Class clazz) {\n Field[] SMClasses = getAllFields(clazz);\n searchForClasses(clazz, SMClasses);\n}\n"
"public ImmutableMap<MapHex, HexSidesSet> getReachableSides() {\n Map<MapHex, HexSidesSet.Builder> hexSides = Maps.newHashMap();\n for (NetworkVertex vertex : graph.vertexSet()) {\n if (vertex.isSide() && iterator.getSeenData().get(vertex) != NetworkIterator.greedyState.greedy) {\n MapHex hex = ...
"public String postText(Representation entity) throws IOException, Exception {\n NEDAlgo_HITS agdistis = null;\n log.info(\"String_Node_Str\");\n String result = \"String_Node_Str\";\n InputStream input = entity.getStream();\n byte[] byteArray = IOUtils.toByteArray(input);\n InputStream input1 = new B...
"public void testRepeatOfSmallImage() {\n List expected = new ArrayList();\n for (float y = -1.0f; y <= 8.0f; y += 3.0) {\n for (float x = -1.0f; x <= 8.0f; x += 3.0) {\n expected.add(new Position(x, y));\n }\n }\n Collections.sort(expected);\n BackgroundImageLayout layout = getL...
"public void removeListener(int uid) {\n synchronized (mListeners) {\n if (mClientUids.indexOfKey(uid) < 0) {\n Log.w(TAG, \"String_Node_Str\" + uid);\n return;\n }\n mClientUids.delete(uid);\n if (mNavigating) {\n try {\n mBatteryStats.note...
"public static String getResultSetId(ReportContent report, InstanceID instanceID) {\n Report design = report.getDesign();\n ArrayList<QueryTask> plan = createPlan(design, instanceID);\n StringBuilder sb = new StringBuilder();\n ExecutionContext executionContext = report.getExecutionContext();\n try {\n ...
"private boolean doProcess(String idOfComponent, String appId, String instanceId) {\n ParentComponent component;\n Map<String, Group> groups;\n Map<String, ClusterDataHolder> clusterData;\n if (log.isDebugEnabled()) {\n log.debug(\"String_Node_Str\" + \"String_Node_Str\" + idOfComponent + \"String_No...
"protected void paintColorScale(GlimpseContext context) {\n Axis1D axis = getAxis1D(context);\n if (colorTexture != null && axis instanceof TaggedAxis1D) {\n TaggedAxis1D taggedAxis = (TaggedAxis1D) axis;\n GlimpseBounds bounds = getBounds(context);\n GL3 gl = context.getGL().getGL3();\n ...
"public void processFile(String path) {\n try {\n System.out.println(\"String_Node_Str\" + path);\n ResourceProducer producer = ProducerUtils.getProducer(path);\n ResourceFactoryMapper mapper = new ExtractingResourceFactoryMapper();\n ExtractingResourceProducer exProducer = new Extracting...
"public void postTransfer() {\n Validator requiredValidator = BankValidators.getRequiredValidator();\n Validator destinationValidator = BankValidators.getDestinationValidator();\n if (requiredValidator.isValid() && destinationValidator.isValid()) {\n this.accountManager.transact(this.currentUser(), this...
"private IndexReader getReader() throws CorruptIndexException, LockObtainFailedException, IOException {\n RAMDirectory directory = new RAMDirectory();\n IndexWriterConfig conf = new IndexWriterConfig(LUCENE_VERSION, new KeywordAnalyzer());\n IndexWriter writer = new IndexWriter(directory, conf);\n Document ...
"protected <T> ICompletableFuture<T> invoke(ClientMessage req, Data keyData, boolean completionOperation) {\n Integer completionId = null;\n if (completionOperation) {\n registerCompletionLatch(completionId, 1);\n }\n try {\n int partitionId = clientContext.getPartitionService().getPartitionId...
"private void reduceSuperTypes(List<Class> iflist) {\n Iterator<Class> it = iflist.iterator();\n while (it.hasNext()) {\n Class<?> intf = it.next();\n for (Class<?> other : iflist) {\n if (intf != other && intf.isAssignableFrom(other)) {\n it.remove();\n }\n ...
"public static Test suite() {\n TestSuite suite = new TestSuite(\"String_Node_Str\");\n Test baseTest = TestConfiguration.embeddedSuite(LuceneSupportTest.class);\n Test localizedTest = new LocaleTestSetup(baseTest, new Locale(\"String_Node_Str\", \"String_Node_Str\"));\n suite.addTest(SecurityManagerSetup.n...
"protected void mouseClicked(int mouseX, int mouseY, int buttonId) {\n if (buttonId == 1)\n actionPerformed((GuiButton) buttonList.get(2));\n else if (buttonId == 0 && !(mouseX < 24 || mouseX > width - 24 || mouseY < 24 || mouseY > height - 24)) {\n int offY = (int) offsetY.value();\n for (Ca...
"public static void main(String[] args) {\n LOG.info(\"String_Node_Str\");\n CommandLineParser parser = new PosixParser();\n CommandLine line = null;\n Options options = new Options();\n options.addOption(\"String_Node_Str\", \"String_Node_Str\", false, \"String_Node_Str\");\n options.addOption(\"Stri...
"private JAXBProperty createProperty(String string, IMember m) {\n boolean isElement = m.hasAnnotation(XmlElement.class.getSimpleName());\n boolean isAttribute = m.hasAnnotation(XmlAttribute.class.getSimpleName()) || m.hasAnnotation(XmlAnyAttribute.class.getSimpleName());\n ;\n boolean isValue = m.hasAnnota...
"private boolean wallBetween(Square a, Square b) {\n assert (a.getRow() == b.getRow() || a.getCol() == b.getCol());\n Square topLeftMost;\n Square other;\n Pair<Square> topLeftCandidate;\n boolean wallDirection;\n Pair<Wall> candidateWalls;\n if (a.getRow() == b.getRow()) {\n assert (Math.ab...
"public void setupRepository() throws Exception {\n if (repositoryManagerSetup) {\n return;\n }\n setupTypeManager();\n blobStoreAccessFactory = createBlobAccess();\n blobManager = new BlobManagerImpl(hbaseTableFactory, blobStoreAccessFactory, false);\n RecordFactory recordFactory = new RecordF...