content
stringlengths
40
137k
"public static int[] generateColorMap(int[] gradient, int size, double opacity) {\n int[] values = new int[gradient.length];\n int[] colors = new int[gradient.length];\n int interval = (size - 1) / (gradient.length - 1);\n int i;\n for (i = 0; i < gradient.length; i++) {\n values[i] = i * interval...
"public void testQuery() {\n final int entityCount = 10;\n final int queryCount = 3;\n insertDummyEntities(entityCount);\n sleep(2);\n List<DummyEntity> list = null;\n for (int i = 0; i < queryCount; i++) {\n list = executeQuery(sf);\n assertEquals(entityCount, list.size());\n sle...
"public void buildWidgetPanel() {\n add(getLabel());\n value = config.getConfigOptionValue(component, configOption);\n if (((URLConfigOption) configOption).refersToOWLClass()) {\n comboBox = new JComboBox();\n ReasonerComponent reasoner = config.getReasoner();\n String baseURI = reasoner.g...
"public List getGlobal(String whereSql, String clusterName, String tableName) {\n if (StringUtil.isBlank(whereSql)) {\n return null;\n }\n try {\n String versionKey = _buildGlobalVersion(clusterName, tableName);\n if (_exists(versionKey)) {\n int version = Integer.parseInt((Stri...
"public InputStream getInputStream(String url) throws IOException {\n HttpGet get = new HttpGet(url);\n HttpResponse response = this.client.execute(get);\n StatusLine statusLine = response.getStatusLine();\n if (!SardineUtil.isGoodResponse(statusLine.getStatusCode()))\n throw new IOException(\"String...
"public void onOptionClick(IconMenu.OptionClickEvent event) {\n event.setWillClose(false);\n event.setWillDestroy(false);\n IconMenu menu = event.getMenu();\n switch(event.getPosition()) {\n case 5:\n event.setWillClose(true);\n event.setWillDestroy(true);\n return;\n...
"public Enumeration collectTests() {\n return new ArrayEnumeration(new String[] { name });\n}\n"
"public void objectToEntry(final Page page, final TupleOutput output) {\n try {\n final DataOutputStream dataOutput = new DataOutputStream(mByteHandler.serialize(output));\n PagePersistenter.serializePage(dataOutput, page);\n ByteStreams.copy(new ByteArrayInputStream(output.toByteArray()), dataO...
"private CacheConnection getAvailableConnection() throws DataException {\n Iterator it = this.getOdaConnections().iterator();\n while (it.hasNext()) {\n CacheConnection c = (CacheConnection) (it.next());\n if (c.currentStatements < c.maxStatements)\n return c;\n }\n return newConnec...
"public void testProjectFacet() throws Exception {\n Project project = projectFactory.createTempProject();\n ConfigurationFacet facet = facetFactory.install(project, ConfigurationFacet.class);\n Assert.assertFalse(facet.getConfigLocation().exists());\n Configuration config = facet.getConfiguration();\n c...
"public void onLoadMore(boolean loadMore) {\n if (mCanLoadMorePosts && !mIsFetchingPosts)\n requestPosts(loadMore);\n}\n"
"public void onResponse(Call call, Response response) {\n if (response.body() instanceof SystemUser) {\n SystemUser systemUser = ((SystemUser) response.body());\n SystemUser currentSystemuser = mSystemUser;\n currentSystemuser.setOutgoingCli(systemUser.getOutgoingCli());\n currentSystemus...
"public void setRuntimeArgs(ProgramId program, Map<String, String> runtimeArgs) throws IOException, UnauthenticatedException, ProgramNotFoundException, UnauthorizedException {\n String path = String.format(\"String_Node_Str\", program.getApplication(), program.getVersion(), program.getType().getCategoryName(), progr...
"public IConsumerContainerSelector run() {\n synchronized (consumerContainerSelectorTrackerLock) {\n if (consumerContainerSelectorTracker == null) {\n consumerContainerSelectorTracker = new ServiceTracker(getRSABundleContext(), IConsumerContainerSelector.class.getName(), null);\n consume...
"public boolean equals(Object theObj) {\n if (this == theObj) {\n return true;\n }\n if (theObj == null) {\n return false;\n }\n if (!(theObj instanceof ResourceIndexedSearchParamDate)) {\n return false;\n }\n ResourceIndexedSearchParamDate obj = (ResourceIndexedSearchParamDate...
"public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {\n IJavaElement javaElement = getContext();\n if (javaElement != null) {\n initializeJavaProject(javaElement, configuration);\n } else {\n configuration.setAttribute(ATTR_PROJECT_NAME, \"String_Node_Str\");\n }\n Jetty...
"private void fillinSearchResult(HttpServletRequest aRequest, HttpServletResponse aResponse) throws ServletException, IOException {\n URLCodec theURLCodec = new URLCodec();\n String theQueryString = aRequest.getParameter(\"String_Node_Str\");\n String theBasePath = basePath;\n String theBackLink = basePath;...
"public void initTable(List<String> headers, List<MetadataColumn> columnMap) {\n TableLayout tLayout = new TableLayout();\n innerTable.setLayout(tLayout);\n innerTable.setHeaderVisible(true);\n innerTable.setLinesVisible(true);\n GridData gd = new GridData(GridData.FILL_BOTH);\n innerTable.setLayoutDa...
"LayoutInflater getInflater() {\n if (mInflater == null) {\n Context wrappedContext = new ContextThemeWrapper(getContext(), THEME_RES_FOR_TYPE[mMenuType]);\n mInflater = (LayoutInflater) wrappedContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n }\n return mInflater;\n}\n"
"public <IdType> List<IdType> persistArrayApi11(Class<?> modelClass, JSONArray jsonArray) throws JSONException {\n try {\n enableWriteAheadLogging();\n mDatabase.beginTransactionNonExclusive();\n List<IdType> id_list = persistArrayOfObjects(modelClass, jsonArray);\n mDatabase.setTransacti...
"public ExitStatus afterStep(StepExecution se) {\n logger.info(\"String_Node_Str\" + se.getStepName());\n if (clusteringService != null) {\n VmEventProcessor processor = clusteringService.getEventProcessor();\n processor.tryResume();\n }\n ExecutionContext jec = se.getJobExecution().getExecuti...
"public org.osgi.service.remoteserviceadmin.ImportReference getImportReference() {\n Throwable t = getException();\n if (t != null)\n return null;\n return importReference;\n}\n"
"public Object runSave() {\n switch(event.getID()) {\n case ControlEvent.CONTROL_DOWNLOAD_START:\n stopButton.setEnabled(true);\n pauseButton.setEnabled(true);\n playButton.setEnabled(false);\n speedmeter.start();\n break;\n case ControlEvent.CONTR...
"private void applyBackgroundVerticalPosition(BackgroundInfo binfo, String yposition) {\n if (yposition.endsWith(\"String_Node_Str\")) {\n binfo.setBackgroundYPositionAbsolute(false);\n try {\n binfo.setBackgroundYPosition((int) Double.parseDouble(yposition.substring(0, yposition.length() - ...
"private String[] getCipherSuites(final List<CipherSuites> cipherSuites) {\n final List<String> suites = new ArrayList<>();\n if (cipherSuites != null && !cipherSuites.isEmpty()) {\n cipherSuites.stream().forEach(cs -> {\n suites.add(cs.getSuiteName());\n });\n }\n return suites.toA...
"protected void onDragEnd(String id, int x, int y, AjaxRequestTarget ajaxRequestTarget) {\n if (getCurrentDragOperation() != DRAGNDROP.NONE) {\n JSDNDEvent event = WebCellBasedView.this.createScriptEvent(EventType.onDragEnd, getDragComponent(), null);\n event.setData(getDragData());\n event.setD...
"private void doAppendMessage(final Request<RpcWireRequest, RpcReply> request) {\n final AppendEntries appendMessage = request.getRequest().getAppendMessage();\n if (appendMessage.getTerm() < currentTerm) {\n AppendEntriesReply m = new AppendEntriesReply(currentTerm, false, 0);\n RpcReply reply = ne...
"protected IFigure createFigure() {\n IConnection conn = (IConnection) getModel();\n ConnectionFigure connection = new ConnectionFigure(conn, conn.getSourceNodeConnector().getConnectionProperty(conn.getLineStyle()), conn.getSource());\n if (((Connection) getModel()).isActivate()) {\n connection.setAlpha...
"private void rollback0(long address, boolean writeDiscard) throws JournalException {\n if (address == -1L) {\n notifyTxError(JournalEvents.EVT_JNL_UNKNOWN_TRANSACTION);\n throw new IncompatibleJournalException(\"String_Node_Str\", this.getLocation());\n }\n txLog.read(address, tx);\n if (tx.a...
"public static void render(float renderYaw, float renderPitch) {\n GL11.glRotatef(180F, 0F, 0F, 1F);\n GL11.glRotatef(180F, 0F, 1F, 0F);\n GL11.glRotatef(renderYaw, 0F, 1F, 0F);\n MODEL.renderBody(0.0625F);\n MODEL.renderRadar(0.0625F);\n MODEL.renderCannon(0.0625F, (float) Math.toRadians(renderPitch)...
"public static boolean isSigned(Item book) {\n return book != null && book.getType() == ItemType.WrittenBook;\n}\n"
"public synchronized int getNumberOfStartsNotFinished() {\n for (DatenDownload datenDownload : this) {\n Start s = datenDownload.start;\n if (s != null) {\n if (s.status < Start.STATUS_FERTIG) {\n return this.size();\n }\n }\n }\n return 0;\n}\n"
"public Control createPart(Composite parent) {\n if (shell == null) {\n shell = parent.getShell();\n }\n Composite main = new Composite(parent, SWT.NONE);\n GridLayoutFactory.fillDefaults().numColumns(1).applyTo(main);\n GridDataFactory.fillDefaults().grab(true, true).applyTo(main);\n Label com...
"private void updateRankedList() {\n selectedTablePerspectiveIndex = 0;\n updateScoredTablePerspectives();\n rankColumn.clear();\n rankedElementToElementLayout.clear();\n rankedElements = new ArrayList<RankedElement>();\n for (TablePerspective scoredTablePerspective : tablePerspectives) {\n if ...
"public void testXmlSchemaUnqualified() throws Exception {\n InputStream inputStream = ClassLoader.getSystemResourceAsStream(XMLSCHEMA_UNQUALIFIED);\n jaxbContext = DynamicJAXBContextFactory.createContextFromXSD(inputStream, null, null, null);\n DynamicEntity person = jaxbContext.newDynamicEntity(PACKAGE + \"S...
"public void debug(Object message, Throwable t) {\n if (isDebugEnabled())\n logger.log(SELF_FQCN, Level.DEBUG, message, t);\n}\n"
"public Object getEntityFromDocument(Class<?> entityClass, EntityMetadata m, DBObject document, List<String> relations) {\n Object entity = null;\n try {\n entity = entityClass.newInstance();\n String rowKey = (String) document.get(\"String_Node_Str\");\n PropertyAccessorHelper.setId(entity, ...
"public String getSigningProfile() {\n if (model.getProfiles() != null && model.getProfiles().getProfile() != null) {\n for (Profile profile : model.getProfiles().getProfile()) {\n List<Plugin> plugin = profile.getBuild().getPlugins().getPlugin();\n for (Plugin plugin2 : plugin) {\n ...
"public boolean equals(Object o) {\n if (this == o)\n return true;\n if (o == null || getClass() != o.getClass())\n return false;\n if (null == this.getColumnNames())\n return false;\n UniqueConstraint that = (UniqueConstraint) o;\n boolean result = false;\n result = !(getColumnNa...
"public boolean checkVisuals(Player player, Block targetBlock, Block playerClick) {\n if (isInteracting(player) || playerClick.isLiquid()) {\n return false;\n }\n double x = targetBlock.getX() - playerClick.getX() * ((targetBlock.getX() - playerClick.getX() * 1) < 0 ? -1 : 1);\n double y = targetBloc...
"public Collection<IEventExecTestCasePO> getAllEventEventExecTC() {\n Collection<IEventExecTestCasePO> evHandlers = getEventExecTcMap().values();\n setParents(evHandlers);\n return Collections.unmodifiableCollection(evHandlers);\n}\n"
"public void loginOnClickListener(View view) {\n String userEmail = emailEditText.getText().toString();\n String userPassword = passwordEditText.getText().toString();\n if (isValidUserDate(userEmail, userPassword)) {\n login(userEmail, userPassword);\n } else {\n DialogUtils.showLong(LoginActi...
"public void setProperties(Property[] properties) {\n this.properties = ArrayUtils.clone(properties);\n}\n"
"public void onResponseReceived(Request request, Response response) {\n if (response.getStatusCode() != Response.SC_OK) {\n errorLogger.log(Level.SEVERE, \"String_Node_Str\" + url + \"String_Node_Str\" + response.getStatusCode() + \"String_Node_Str\" + response.getText());\n callback.onFailure(new Thro...
"public static TypedReturnCode<IndicatorUnit> createIndicatorUnit(Pattern pattern, ModelElementIndicator modelElementIndicator, Analysis analysis, IndicatorDefinition indicatorDefinition) {\n TypedReturnCode<IndicatorUnit> result = new TypedReturnCode<IndicatorUnit>();\n for (Indicator indicator : modelElementInd...
"private File getJrxmlFolderFromReport(TdReport rep, IFolder folder) {\n File jrxmlFolderFile = null;\n String repFileString = new File(rep.eResource().getURI().toFileString()).getAbsolutePath();\n String projectString = folder.getProject().getLocation().toFile().getAbsolutePath();\n if (repFileString.start...
"public void disableFollow() {\n if (isFollowEnabled.compareAndSet(true, false)) {\n if (GuidedPoint.isGuidedMode(drone)) {\n drone.getGuidedPoint().pauseAtCurrentLocation();\n }\n roiEstimator.disableFollow();\n }\n roiEstimator.disableFollow();\n}\n"
"public String parse(int ident) {\n String space, content;\n if (ident < 0)\n ident = 0;\n space = \"String_Node_Str\";\n for (int i = 0; i < ident; i++) space += \"String_Node_Str\";\n content = space + \"String_Node_Str\";\n content += space + \"String_Node_Str\";\n content += space + \"St...
"private void addTypeArgumentsIfAvailable(String signature) {\n int firstParen = signature.indexOf('(');\n if (firstParen == 0)\n return;\n int p = 1;\n boolean lastMappingFound = false;\n while (!lastMappingFound) {\n int q = signature.indexOf(':', p);\n String typeVar = signature.s...
"public final GLCanvas getParentGLCanvas() {\n if (this.isRenderedRemote())\n return getRemoteRenderingGLView().getParentGLCanvas();\n return parentGLCanvas;\n}\n"
"private static void doHoist(Logger logger, Instruction inst, int hoistDepth, HoistTracking state) {\n assert (hoistDepth > 0);\n logger.trace(\"String_Node_Str\" + hoistDepth + \"String_Node_Str\" + inst.toString());\n HoistTracking ancestor = state.getAncestor(hoistDepth);\n logger.trace(\"String_Node_Str...
"public synchronized String getPluginLocalizedValue(String key, boolean keepAmpersands) throws MissingResourceException {\n if (myBundle == null) {\n ServiceTracker localizationTracker;\n BundleContext context = Activator.getDefault().getBundle().getBundleContext();\n localizationTracker = new S...
"public static Uri makeAndInsertUri(Context context, Uri sourceUri) {\n long time = System.currentTimeMillis();\n String filename = new SimpleDateFormat(TIME_STAMP_NAME).format(new Date(time));\n File saveDirectory = getFinalSaveDirectory(context, sourceUri);\n File file = new File(saveDirectory, filename +...
"private void testResultMarginalsHelper(boolean logDomain) {\n double[] root = new double[] { 1, 2, 3 };\n double[][] child = new double[][] { { 0, 4, 5 }, { 6, 0, 7 }, { 8, 9, 0 } };\n FactorGraph fg = new FactorGraph();\n int n = root.length;\n ProjDepTreeFactor treeFac = new ProjDepTreeFactor(n, VarTy...
"public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.menu_sync, menu);\n syncItem = menu.findItem(R.id.action_sync);\n if (centerId != -1) {\n List<MeetingCenter> center = new ArrayList<MeetingCenter>();\n c...
"public void actionPerformed(ActionEvent e) {\n String searchText = parentWindow.getCurrentSearchText();\n if (searchText == null)\n return;\n Vector<ProtocolProviderService> telephonyProviders = CallManager.getTelephonyProviders();\n ProtocolProviderService callProvider = null;\n if (telephonyPro...
"public void verifySubtypeChain(List<JSType> typeChain, boolean checkSubtyping) throws Exception {\n for (int i = 0; i < typeChain.size(); i++) {\n for (int j = 0; j < typeChain.size(); j++) {\n JSType typeI = typeChain.get(i);\n JSType typeJ = typeChain.get(j);\n JSType named...
"public Response deleteCollectionItem(Integer collectionId, Integer itemId, String user_ip, String user_agent, String xforwarderfor, HttpHeaders headers, HttpServletRequest request) throws WebApplicationException {\n log.info(\"String_Node_Str\" + itemId + \"String_Node_Str\" + collectionId + \"String_Node_Str\");\n...
"public static boolean cancellingBlockBreak(Block block, Player player) {\n if (block == null)\n return false;\n if (player != null && (Permission.has(player, Permission.ADMIN) || Permission.has(player, Permission.MOD)))\n return false;\n if (uSign.isSign(block))\n block.getState().update(...
"public void creeperDeathEvent(LivingDeathEvent evt) {\n if (evt.entityLiving instanceof EntityCreeper) {\n if (CREEPER_BLOW_UP_IN_FIRE) {\n if (evt.source == DamageSource.onFire || evt.source == DamageSource.inFire) {\n evt.setCanceled(true);\n boolean flag = evt.enti...
"public ImageProcessingThread(int numThread, int numProcessors, File[] imageFiles, boolean storeResults, boolean showResults, String storeDir) {\n this.numThread = numThread;\n this.numThreads = numThreads;\n this.imageFiles = imageFiles;\n this.storeResults = storeResults;\n this.showResults = showResul...
"void writeGetConstructionProxy() throws IOException {\n out.writeLine(\"String_Node_Str\", SuppressWarnings.class).openScope(\"String_Node_Str\", ConstructionProxy.class, Class.class);\n for (Map.Entry<Class<?>, ConstructionProxy<?>> entry : constructionProxies.entrySet()) {\n Class<?> implementation = en...
"private String processConstantString(String s) throws PathEngineException {\n StringBuilder b = new StringBuilder();\n int i = 1;\n while (i < s.length() - 1) {\n char ch = s.charAt(i);\n if (ch == '\\\\') {\n i++;\n switch(s.charAt(i)) {\n case 't':\n ...
"public static void main(String[] args) {\n Display display = Display.getDefault();\n Shell shell = new Shell(display, SWT.CLOSE);\n shell.setSize(600, 400);\n shell.setLayout(new GridLayout());\n c3dViewer = new SwtLiveChartViewer(shell, SWT.NO_BACKGROUND);\n c3dViewer.setLayoutData(new GridData(Grid...
"public ResponseEntity searchDomain(String name, HttpServletRequest request, HttpServletResponse response) {\n String decodeDomain = name;\n String punyDomainName = decodeDomain;\n try {\n decodeDomain = DomainUtil.iso8859Decode(name);\n decodeDomain = DomainUtil.decodeAndTrimAndReplaceAsciiToLow...
"public void doRepaint() {\n currentViewer.repaint();\n}\n"
"public void onNameTag(AsyncPlayerReceiveNameTagEvent e) {\n List<Element> elements = Methods.getBendingPlayer(e.getNamedPlayer().getName()).getElements();\n if (elements != null && plugin.getConfig().getBoolean(\"String_Node_Str\")) {\n if (elements.size() < 1)\n e.setTag(ChatColor.LIGHT_PURPLE...
"public synchronized void drawPlot(Graphics graphics, boolean clearfirst) {\n if (graphics == null) {\n System.out.println(\"String_Node_Str\");\n return;\n }\n Thread.yield();\n Rectangle drawRect = bounds();\n graphics.setPaintMode();\n if (clearfirst) {\n graphics.clearRect(0, ...
"private static Date today() {\n Calendar calendar = Calendar.getInstance(timeZone);\n calendar.set(Calendar.HOUR_OF_DAY, 0);\n calendar.clear(Calendar.MINUTE);\n calendar.clear(Calendar.SECOND);\n calendar.clear(Calendar.MILLISECOND);\n return calendar.getTime();\n}\n"
"public void checkReadyStatus() {\n LeanUtils.runJavascriptOnWebView(this.mWebview, \"String_Node_Str\");\n}\n"
"public String getMalesRanking() {\n url.append(\"String_Node_Str\");\n String result = YoubuyService.handleGet(YoubuyService.handleArguments(url, vc));\n url = new StringBuffer(url.substring(0, 21));\n return result;\n}\n"
"public void updateRepresentationType(String aipId, String representationId, String type) throws RequestNotValidException, NotFoundException, GenericException, AuthorizationDeniedException {\n Representation representation = this.retrieveRepresentation(aipId, representationId);\n representation.setType(type);\n ...
"public void drawHighlighted(Canvas c, Highlight[] indices) {\n for (int i = 0; i < indices.length; i++) {\n LineDataSet set = mChart.getLineData().getDataSetByIndex(indices[i].getDataSetIndex());\n if (set == null || !set.isHighlightEnabled())\n continue;\n mHighlightPaint.setColor(s...
"private static void updateLibrariesAndClasspath(IProcess process) {\n try {\n Set<String> neededLibraries = getNeededLibrariesForProcess(process);\n ILibraryManagerService repositoryBundleService = CorePlugin.getDefault().getRepositoryBundleService();\n File libDir = getJavaProjectLibFolder();\...
"public static int hasPermissionRange(Player player, String stub, int range) {\n if (player == null || player.isOp()) {\n return range;\n }\n if (player.hasPermission(stub + \"String_Node_Str\")) {\n return range;\n }\n for (int i = range; i > 0; i--) {\n if (player.hasPermission(stu...
"public void processOK(ClientTransaction clientTransatcion, Response response) {\n int requestedExpiration = 0;\n Request register = clientTransatcion.getRequest();\n ContactHeader contactHeader = (ContactHeader) register.getHeader(ContactHeader.NAME);\n if (contactHeader != null)\n requestedExpirati...
"public void loadInMemoryStorage(final ColumnBinary columnBinary, final IMemoryAllocator allocator) throws IOException {\n ByteBuffer headerWrapBuffer = ByteBuffer.wrap(columnBinary.binary, columnBinary.binaryStart, columnBinary.binaryLength);\n int minCharLength = headerWrapBuffer.getInt();\n headerWrapBuffer...
"private void failContentTypeCreation(final String contentType, final Class<? extends Throwable> expectedExceptionClass) throws Throwable {\n try {\n ContentType mt = ContentType.create(contentType);\n Assert.fail(\"String_Node_Str\" + expectedExceptionClass + \"String_Node_Str\" + contentType + \"Stri...
"public static void recordSourceMap(List<Map<Range, SourceInfo>> sourceInfoMaps, List<SyntheticArtifact> artifacts, int permutationId) {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n SourceMapGenerator generator = SourceMapGeneratorFactory.getInstance(SourceMapFormat.V3);\n OutputStreamWriter o...
"private boolean checkProperty(Property property, String[] field) {\n if (property == null) {\n log.debug(\"String_Node_Str\");\n return false;\n }\n if (field.length > 1) {\n if (property.getTarget() == null) {\n log.debug(\"String_Node_Str\", property.getName());\n ...
"public long entriesPerSegment() {\n long epg1 = (long) ((entries * INCREASE_ENTRIES_PER_SECTOR) / segments);\n return (Math.max(1, epg1) + 63) & ~63;\n}\n"
"public void testIndexerExceptions() throws Exception {\n RepositoryIndexingFactory factory = (RepositoryIndexingFactory) lookup(RepositoryIndexingFactory.ROLE);\n Artifact artifact = createArtifact(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n try {\n File notIndexDir = new File(\"S...
"private void hilightBlock(int index) {\n if (index == -1) {\n return;\n }\n Coordinate c = indexToCoordinate.get(index);\n RFTools.instance.hilightBlock(c, mc.theWorld.getTotalWorldTime() + 20 * NetworkMonitorItem.hilightTime);\n mc.getMinecraft().thePlayer.closeScreen();\n}\n"
"static String checkEmptyQuery(String myquery) {\n if (myquery == null || myquery.equals(\"String_Node_Str\") || myquery.equals(\"String_Node_Str\")) {\n myquery = \"String_Node_Str\";\n }\n return myquery;\n}\n"
"public void drawValues(Canvas c) {\n PointF center = mChart.getCenterCircleBox();\n float r = mChart.getRadius();\n float rotationAngle = mChart.getRotationAngle();\n float[] drawAngles = mChart.getDrawAngles();\n float[] absoluteAngles = mChart.getAbsoluteAngles();\n float off = r / 10f * 3.6f;\n ...
"public void testGetDbTypeByClassNameAndDriverJar() {\n Assert.assertNull(extractMetaManger.getDbTypeByClassNameAndDriverJar(null, null));\n Assert.assertEquals(extractMetaManger.getDbTypeByClassNameAndDriverJar(\"String_Node_Str\", null), EDatabaseTypeName.MYSQL.getXmlName());\n Assert.assertEquals(extractMet...
"public GameResult checkGameOver(int turnCount, GameRecord record) {\n if (!boardModel_.isAlive_p0()) {\n return new GameResult(s0_, inactivePlayerIndex, turnCount + 1, record);\n } else if (!boardModel_.isAlive_p1()) {\n return new GameResult(s0_, s0_, turnCount + 1, record);\n }\n return nul...
"public boolean addFilters(FilterDescriptorBase... newFilters) {\n List<FilterDescriptorBase> filtersCopy = filters == null ? new ArrayList<>() : new ArrayList<>(Arrays.asList(filters));\n List<FilterDescriptorBase> newFilterList = Arrays.asList(newFilters);\n boolean result = filtersCopy.addAll(newFilterList)...
"public boolean ircCommand(String host, String nick, String[] command) {\n if (!j2.ircEnable)\n return false;\n int lvl = 0;\n String adminName = \"String_Node_Str\";\n synchronized (adminsLock) {\n for (ircAdmin admin : admins) {\n if (admin != null && admin.getHostname().equals(ho...
"private int incrementAndGet(long hash) {\n final int count;\n try {\n lock.lock();\n Integer i = playerToPacketCount.get(hash);\n if (i == null) {\n count = 1;\n } else {\n count = i + 1;\n }\n playerToPacketCount.put(hash, count);\n }\n retur...
"public void addGesture(String entryName, Gesture gesture) {\n if (entryName == null || entryName.length() == 0) {\n return;\n }\n ArrayList<Gesture> gestures = mNamedGestures.get(entryName);\n if (gestures == null) {\n gestures = new ArrayList<Gesture>();\n mNamedGestures.put(entryName...
"public void notTest5() {\n System.out.println(\"String_Node_Str\");\n final short[] content = new short[32768 - 5];\n content[0] = 0;\n content[1] = 2;\n content[2] = 4;\n content[3] = 6;\n content[4] = 8;\n for (int i = 10; i <= 32767; ++i) content[i - 10 + 5] = (short) i;\n final Mappeable...
"public void updateView(boolean forceUpdatePoster, GUIMain gui) {\n boolean posterFileUpdateOccured = false;\n boolean fanartFileUpdateOccured = false;\n if (!forceUpdatePoster && gui.getCurrentlySelectedMovieFileList().size() > 0) {\n File potentialOtherPosterJpg = new File(Movie.getFileNameOfPoster(gu...
"public void testCursorModel3() throws OLAPException, BirtException {\n ICubeQueryDefinition cqd = new CubeQueryDefinition(CubeCreator.cubeName);\n cqd.createMeasure(\"String_Node_Str\");\n cqd.createMeasure(\"String_Node_Str\");\n IEdgeDefinition columnEdge = cqd.createEdge(ICubeQueryDefinition.ROW_EDGE);\...
"public void initComponents() {\n setLayout(new GridBagLayout());\n GridBagConstraints c = new GridBagConstraints();\n humanPlay = new JButton(\"String_Node_Str\");\n humanPlay.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent arg0) {\n if (!clicked) {\n ...
"private void processCategoryChildren(AtlasGlossaryCategory newObj, AtlasGlossaryCategory existing, RelationshipOperation op) throws AtlasBaseException {\n Set<AtlasRelatedCategoryHeader> newChildren = newObj.getChildrenCategories();\n Set<AtlasRelatedCategoryHeader> existingChildren = existing.getChildrenCategor...
"public ImmutableMap<String, String> getReverseClasses() {\n return this.reverseClasses.build();\n}\n"
"protected void adjustLength(int adjustment) {\n if (length != UNKNOWN_LENGTH)\n length += adjustment;\n if (parent != null)\n parent.adjustLength(newArraySize, adjustment);\n}\n"
"static void train(Config config) throws Exception {\n String archive = config.getString(\"String_Node_Str\");\n int numIterations = config.getInt(\"String_Node_Str\");\n int numLeaves = config.getInt(\"String_Node_Str\");\n double learningRate = config.getDouble(\"String_Node_Str\");\n int minDataPerLea...
"private Pair<Integer, JSONObject> handleHTTPResponse(HttpURLConnection connection, Boolean skipError) throws OCSyncException {\n BufferedReader reader;\n String response;\n try {\n BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n StringBuilder str...