content
stringlengths
40
137k
"public ArrayList<String> getRowValues(int rowNr) {\n ArrayList<String> valuesList = new ArrayList<String>();\n if (rowCount > 0) {\n HashMap<String, String> rowData = resultList.get(rowNr);\n for (int i = 0; i < nameList.size(); i++) {\n valuesList.add(rowData.get(nameList.get(i)));\n ...
"public static String getNewQueryLabel() {\n return Messages1.getString(\"String_Node_Str\", num++);\n}\n"
"public boolean hasPrevPage() {\n if (offset > 0) {\n return true;\n }\n return false;\n}\n"
"public Collection<DistributedObject> getDistributedObjects() {\n try {\n ClientMessage request = ClientGetDistributedObjectsCodec.encodeRequest();\n final Future<ClientMessage> future = new ClientInvocation(this, request, getName()).invoke();\n ClientMessage response = future.get();\n Cl...
"public static Resource[] getJndiLocations(final String[] filePathJndiNames) {\n final ResourceLoader resourceLoader = new DefaultResourceLoader();\n try {\n final InitialContext initCtx = new InitialContext();\n final Context envCtx = (Context) initCtx.lookup(\"String_Node_Str\");\n final Re...
"public String getBootArgs() {\n String eth1Ip = (proxy.getPrivateIpAddress() == null) ? \"String_Node_Str\" : proxy.getPrivateIpAddress();\n String eth1NetMask = (proxy.getPrivateNetmask() == null) ? \"String_Node_Str\" : proxy.getPrivateNetmask();\n String eth2Ip = (proxy.getPublicIpAddress() == null) ? \"St...
"public void configure(Context context) {\n awsAccessKeyId = context.getString(\"String_Node_Str\");\n Preconditions.checkArgument(awsAccessKeyId != null && !awsAccessKeyId.isEmpty(), \"String_Node_Str\");\n awsSecretKey = context.getString(\"String_Node_Str\");\n Preconditions.checkArgument(awsSecretKey !=...
"public String toString() {\n return String.format(\"String_Node_Str\", maxIdx + 1, itIdx, Arrays.toString(elements));\n}\n"
"private void setAvailabilityProperties() throws ConnectorRuntimeException {\n if (!isClustered())\n return;\n try {\n Domain domain = Globals.get(Domain.class);\n ServerContext serverContext = Globals.get(ServerContext.class);\n Server server = domain.getServerNamed(serverContext.getI...
"public GenericType clone() {\n GenericType t = new GenericType();\n t.theClass = this.theClass;\n t.name = this.name;\n t.qualifiedName = this.qualifiedName;\n t.fullName = this.fullName;\n t.arrayDimensions = this.arrayDimensions;\n if (this.generics != null) {\n t.generics = new ArrayList...
"private void call(TreeNode treeNode) {\n List<UIContactDetail> telephonyContacts = ((ContactNode) treeNode).getContactDescriptor().getContactDetailsForOperationSet(OperationSetBasicTelephony.class);\n ChooseCallAccountPopupMenu chooseAccountDialog = null;\n if (telephonyContacts.size() == 1) {\n UICont...
"protected void renderLines(int start, int stop) {\n report(\"String_Node_Str\");\n gl.glPushMatrix();\n gl.glScalef(1, -1, 1);\n gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);\n gl.glEnableClientState(GL10.GL_COLOR_ARRAY);\n for (int j = 0; j < pathCount; j++) {\n int i = pathOffset[j];\n ...
"private String getWmicResult(String alias, String verb, String property) {\n String res = \"String_Node_Str\";\n BufferedReader in = null;\n try {\n ProcessBuilder pb = new ProcessBuilder(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", alias, verb, property);\n Process p = pb.star...
"protected Attribute[] attributes() {\n if (null == attributes) {\n if (tree.getType() == JSONLexer.NULL) {\n attributes = new Attribute[1];\n attributes[0] = new Attribute(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.SCHEMA_NIL_ATTRIBUTE, XMLConstants.SCHEMA_NIL_ATTRIBUTE, \"String_No...
"public void buttonPressed(int button) {\n result = button;\n if (button == Window.OK) {\n pass1 = password1.getText();\n pass2 = password2.getText();\n if (!pass1.equals(pass2)) {\n MessageDialog.openError(getShell(), Messages.ChangePasswordDialog_PASSWORDS_NO_MATCH_TITLE, Message...
"void setKeyboardMode(int mode, int imeOptions, boolean enableVoice, boolean isSymbols) {\n if (mInputView == null)\n return;\n mMode = mode;\n mImeOptions = imeOptions;\n if (enableVoice != mHasVoice) {\n setVoiceMode(mHasVoice, mVoiceOnPrimary);\n }\n mIsSymbols = isSymbols;\n mInpu...
"public static void defineDataSourceAndDataSet(DataSetHandle dataSet, DataEngine dataEngine, IModelAdapter modelAdaptor) throws BirtException {\n if (dataSet == null)\n return;\n DataSourceHandle dataSource = dataSet.getDataSource();\n if (dataSource != null && ((DataEngineImpl) dataEngine).getDataSourc...
"private static void addParticleAndAttributeInfo(ATreeNode node, XSComplexTypeDecl complexType, ATreeNode complexTypesRoot) throws OdaException {\n XSParticle particle = complexType.getParticle();\n if (particle != null) {\n addElementToNode(node, complexTypesRoot, (XSModelGroupImpl) particle.getTerm());\n...
"protected Object invokeSync(RSARemoteCall remoteCall) throws ECFException {\n if (remoteCall.getClass().isAssignableFrom(RSARemoteCall.class)) {\n Callable<Object> c = getSyncCallable(remoteCall);\n if (c == null)\n throw new ECFException(\"String_Node_Str\" + remoteCall.getMethod(), new Nu...
"public void updateEntity() {\n if (!init) {\n initData();\n markDirty();\n }\n if (FMLCommonHandler.instance().getEffectiveSide().isClient())\n return;\n if (!worldObj.isRemote) {\n if (!addedToEnergyNet) {\n EnergyTileLoadEvent event = new EnergyTileLoadEvent(this);\...
"private IStatus processResultTree(IProgressMonitor monitor, boolean reportSuccess, boolean reportFailure) {\n Map<String, String> taskIdToComment = new HashMap<String, String>();\n TestResult resultTestModel = TestResultBP.getInstance().getResultTestModel();\n TestResultNode rootResultNode = resultTestModel.g...
"private static String sampleFactTable(String factTableName, int sampleRatio) throws IOException, JobException {\n String sampleTableName = factTableName + \"String_Node_Str\" + sampleRatio;\n String settingQueries = \"String_Node_Str\";\n String dropQuery = \"String_Node_Str\" + sampleTableName + \"String_Nod...
"public boolean isPause() {\n if (!openSocket) {\n return false;\n }\n InputStream in;\n try {\n askForStatus();\n ois = new NoHeaderObjectInputStream(s.getInputStream());\n TraceBean traceBean = (TraceBean) ois.readObject();\n return traceBean.equals(TraceStatusBean.PAUSE...
"public Question getNextQuestion() throws SurveyException {\n Question next = nextQ();\n SurveyDatum[] options = next.getOptListByIndex();\n if (next.randomize)\n if (next.ordered) {\n if (random.nextBoolean())\n for (int i = 0; i < options.length / 2; i++) {\n ...
"public ExtantNetwork extantNetwork() throws NotEnoughResourcesException, TransientEntityException {\n if (!NetworkGroups.networkingConfiguration().hasNetworking()) {\n ExtantNetwork bogusNet = ExtantNetwork.bogus(this);\n if (!this.hasExtantNetwork())\n this.setExtantNetwork(bogusNet);\n ...
"public static PropertyValue multiply(PropertyValue aValue, PropertyValue bValue) {\n int aType = checkNumericalAndGetType(aValue);\n int bType = checkNumericalAndGetType(bValue);\n boolean sameType = aType == bType;\n int returnType = maxType(aType, bType);\n if (returnType == INT) {\n int a = aT...
"public void simpleMode(InventoryClickEvent event) {\n DecimalFormat f = new DecimalFormat(\"String_Node_Str\");\n int slot = event.getSlot();\n if (slot < 0) {\n event.setCursor(null);\n return;\n }\n boolean top = event.getView().convertSlot(event.getRawSlot()) == event.getRawSlot();\n ...
"private void verifyServiceDeclaration() {\n final PackageManager packageManager = mContext.getPackageManager();\n final Intent intent = new Intent(mContext, BeaconService.class);\n List<ResolveInfo> resolveInfo = packageManager.queryIntentServices(intent, PackageManager.MATCH_DEFAULT_ONLY);\n if (resolveIn...
"public void onDraw(Canvas canvas) {\n doDraw(mState, canvas);\n if (errorArrow != -1) {\n canvas.save();\n canvas.rotate(errorArrow, centerX, centerY);\n canvas.drawPath(arrow, paint);\n canvas.restore();\n }\n}\n"
"private ServiceName createModuleService(DeploymentPhaseContext phaseContext, final DeploymentUnit deploymentUnit, final List<ResourceRoot> resourceRoots, final ModuleSpecification moduleSpecification, final ModuleIdentifier moduleIdentifier) throws DeploymentUnitProcessingException {\n final ModuleSpec.Builder spec...
"public void canComputeLikelihoodForIntegerData() {\n for (double u : photons) {\n PoissonDistribution pd = new PoissonDistribution(u);\n for (int x = 0; x < 100; x++) {\n double e = pd.probability(x);\n double o = PoissonCalculator.likelihood(u, x);\n if (e > 1e-100)\n...
"public void dirtyEntries(long fromTimeStamp) {\n try (CompiledReplicatedMapIterationContext<K, KI, MKI, V, VI, MVI, R, ?> c = iterationContext()) {\n boolean debugEnabled = LOG.isDebugEnabled();\n for (int i = 0; i < actualSegments; i++) {\n final int segmentIndex = i;\n c.initTh...
"public Map<Integer, String> retrieveUsernames(Collection<Integer> ids) {\n if (ids.isEmpty())\n return Collections.EMPTY_MAP;\n Map<Integer, String> names = new HashMap<Integer, String>();\n UserExample example = new UserExample();\n example.createCriteria().andUser_idIn(Lists.newArrayList(ids));\n ...
"public Call showCheckoutConfirmationForm(final String language) {\n return CheckoutPaymentController.show(language);\n}\n"
"public final Path findPath(IPathCalculateable requester, final short sx, final short sy, final short tx, final short ty) {\n final boolean blockedAtStart;\n if (!isInBounds(sx, sy)) {\n throw new InvalidStartPositionException(\"String_Node_Str\", sx, sy);\n } else if (!isInBounds(tx, ty) || isBlocked(r...
"public void run() {\n try {\n for (; ; ) {\n final String line = bufferedReader.readLine();\n if (line == null) {\n eofReached = true;\n break;\n } else {\n try {\n lineQueue.put(line);\n } catch (...
"public void onResume() {\n super.onResume();\n Intent intent = getIntent();\n contentUri = intent.getData();\n contentType = intent.getIntExtra(CONTENT_TYPE_EXTRA, inferContentType(contentUri, intent.getStringExtra(CONTENT_EXT_EXTRA)));\n contentId = intent.getStringExtra(CONTENT_ID_EXTRA);\n provide...
"protected void computeMethodMapIfNeeded() throws InvalidClassFileException {\n if (methodMap == null) {\n synchronized (this) {\n if (methodMap == null) {\n IMethod[] methods = computeDeclaredMethods();\n if (methods.length > 5) {\n tmpMethodMap = H...
"public void testMixedProtocol() throws Exception {\n DatagramPacket pack = null;\n UDP_ACCESS = new DatagramSocket();\n for (int i = 0; i < testUP.length; i++) {\n assertTrue(\"String_Node_Str\", testUP[i].isOpen());\n assertTrue(\"String_Node_Str\", testUP[i].isSupernodeClientConnection());\n ...
"protected void onPause() {\n super.onPause();\n dropView(this);\n}\n"
"public void testAddNote_issue134() {\n SQLiteDatabase db = TestUtils.loadDBFromDump(targetContext, testContext, \"String_Node_Str\");\n WordPressDB wpdb = new WordPressDB(targetContext);\n Note note = createEmptyNote();\n wpdb.addNote(note, true);\n db.close();\n}\n"
"public Page<T> findPaginated(Integer page, Integer size) {\n Assert.isTrue(page > 0, \"String_Node_Str\");\n Assert.isTrue(direction.isEmpty() || direction.equalsIgnoreCase(Sort.Direction.ASC.toString()) || direction.equalsIgnoreCase(Sort.Direction.DESC.toString()), \"String_Node_Str\");\n if (direction.isEmp...
"private int[] getArea(String string) {\n String[] rawDatas = string.split(\"String_Node_Str\");\n if (rawDatas.length == 8) {\n int[] area = new int[4];\n area[0] = Integer.parseInt(rawDatas[0]);\n area[1] = Integer.parseInt(rawDatas[1]);\n area[2] = Integer.parseInt(rawDatas[4]) - ar...
"public void onKeyDown(KeyDownEvent event) {\n final int keyCode = event.getNativeKeyCode();\n log.fine(\"String_Node_Str\" + keyCode + \"String_Node_Str\" + event.getNativeEvent().getKeyCode());\n Selection selection = getTextArea().getDocument().getSelection();\n if (selection.getRangeCount() > 0) {\n ...
"protected boolean calculateEnabled() {\n RepositoryNode rootNode = ((ProjectRepositoryNode) ProjectRepositoryNode.getInstance()).getRootRepositoryNode(ERepositoryObjectType.METADATA);\n if (getSelectedObjects().isEmpty() || rootNode == null) {\n return false;\n } else {\n Object s = getSelectedO...
"public IWSResponse execute(int operation, String input) {\n if (operation == PublicWSProvider2.GET) {\n return new WSResponse(getAccelerationXml(), \"String_Node_Str\");\n }\n return null;\n}\n"
"public Vector sampleObservation(VehicleState vehicleState, PathEdge edge) {\n final MultivariateGaussian gbelief = vehicleState.getBelief().clone();\n StandardRoadTrackingFilter.convertToGroundBelief(gbelief, edge);\n final Vector gMean = StandardRoadTrackingFilter.getOg().times(gbelief.getMean());\n final...
"public static SphereClient ofRetry(final SphereClient delegate) {\n final List<RetryRule> retryRules = singletonList(RetryRule.of(isDeleteAndNewVersionIsKnown(), retryWithNewVersion()));\n return RetrySphereClientDecorator.of(delegate, retryRules);\n}\n"
"private GraphViewerPanel createViewerPanel() {\n return new GraphViewerPanel<G>(frame, viewerConfig, graphmlLoader, iconMapLoader, edgeStrokeMapLoader, edgeColorMapLoader, entireGraph, projectPath, versionDir, graphmlDir, initialNode);\n}\n"
"public int getBlockEndIndex() {\n return currentBlock.getEndIndex();\n}\n"
"public void testCountDistinctAgg() {\n boolean use_agg_orig = props.UseAggregates.get();\n boolean do_caching_orig = props.DisableCaching.get();\n props.DisableCaching.setString(\"String_Node_Str\");\n assertQueryReturns(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", fold(\"String_Node_St...
"public boolean verify() {\n for (EdgeDraftImpl edge : edgeMap.values().toArray(new EdgeDraftImpl[0])) {\n if (edge.getWeight() <= 0f) {\n if (parameters.isRemoveEdgeWithWeightZero()) {\n String id = edge.getId();\n String sourceTargetId = edge.getSource().getId() + \"...
"public void run() {\n JavaThreadModel.setCurrentCollector(collector);\n collector.run();\n}\n"
"protected void eyeTransform(Eye eye) {\n eyeType = eye.getType();\n eyeViewPort = eye.getViewport();\n eyeFov = eye.getFov();\n eyePerspective = eye.getPerspective(cameraNear, cameraFar);\n perspectiveMatrix.set(eyePerspective[0], eyePerspective[4], eyePerspective[8], eyePerspective[12], eyePerspective[...
"public void testResolveWildcardArtifactId() throws Exception {\n DependencyQuery query = DependencyQueryBuilder.create(CoordinateBuilder.create().setGroupId(\"String_Node_Str\").setArtifactId(\"String_Node_Str\").setClassifier(\"String_Node_Str\"));\n Set<Dependency> coreAddons = resolver.resolveDependencies(que...
"private EntityManagerFactoryImpl getEntityManagerFactory(String property) {\n Map<String, Object> props = new HashMap<String, Object>();\n props.put(Constants.PERSISTENCE_UNIT_NAME, _persistenceUnit);\n props.put(PersistenceProperties.KUNDERA_CLIENT_FACTORY, ThriftClientFactory.class.getName());\n props.pu...
"String buildEnvironmentString() {\n if (environment.isEmpty()) {\n return null;\n }\n StringBuilder sb = new StringBuilder();\n for (Map.Entry<String, String> entry : environment.entrySet()) {\n if (sb.length() != 0) {\n sb.append(\"String_Node_Str\");\n }\n sb.append...
"public static void projectJoinInputs(RelNode[] inputRels, List<RexNode> leftJoinKeys, List<RexNode> rightJoinKeys, int systemColCount, List<Integer> leftKeys, List<Integer> rightKeys, List<Integer> outputProj) {\n RelNode leftRel = inputRels[0];\n RelNode rightRel = inputRels[1];\n RexBuilder rexBuilder = lef...
"private static void streamToFile(InputStream stm, String targetFilename, boolean append) {\n FileOutputStream stmOut = null;\n byte[] buffer = new byte[FILE_WRITE_BUFFER_SIZE];\n int bytecount;\n File outFile = new File(folder, targetFilename);\n FileOutputStream stmOut = new FileOutputStream(outFile, a...
"public void redraw() {\n if (debug > 0)\n System.err.println(\"String_Node_Str\");\n if (backingStore != null) {\n Graphics g = backingStore.getGraphics();\n int xoffset = (super.getSize().width - size.width * charWidth) / 2;\n int yoffset = (super.getSize().height - size.height * cha...
"protected boolean isBeginDragValid() throws Exception {\n Point2D.Double cartesianPt = pane.awtScreen2Cartesian(mouseDown);\n Point2D.Double geoPt = pane.cartesian2Geo(cartesianPt);\n return !map.selectedPointHitted(GeometryUtils.createPoint(geoPt));\n}\n"
"public InstanceExample nextInstance() {\n Instance x = (Instance) ((Instance) this.inputStream.nextInstance().getData());\n if (dataset == null) {\n System.out.println(\"String_Node_Str\");\n initialize(x);\n }\n System.out.println(\"String_Node_Str\");\n double[] z_ = new double[dataset.n...
"public boolean executeFromConsole() {\n try {\n SarImageReader sar = (SarImageReader) SumoPlatform.getApplication().getCurrentImageReader();\n ImageLayer layer = LayerManager.getIstanceManager().getCurrentImageLayer();\n if (layer != null && commandLine.length >= 3) {\n String arg0 =...
"private void initTestImportsType() {\n testImportsType = ComponentFactory.eINSTANCE.createIMPORTSType();\n IMPORTType importType1 = ComponentFactory.eINSTANCE.createIMPORTType();\n importType1.setMODULE(\"String_Node_Str\");\n importType1.setREQUIREDIF(\"String_Node_Str\");\n testImportsType.getIMPORT()...
"public Factor getClamped(VarConfig clmpVarConfig) {\n if (clmpVarConfig.size() == 0) {\n return this;\n } else if (clmpVarConfig.size() == vars.size()) {\n return new ProjDepTreeFactor(0, VarType.OBSERVED);\n } else {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n ret...
"private void reportDisconnect() {\n if (mListeners.isEmpty())\n return;\n for (MavLinkConnectionListener listener : mListeners.values()) {\n listener.onDisconnect();\n }\n}\n"
"public void testMultipleTypesInOneFile03() {\n runConformTest(new String[] { \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" ...
"public void mapreduceSpecification(HttpRequest request, HttpResponder responder, final String appId, final String mapreduceId) {\n programLifecycleHttpHandler.runnableSpecification(RESTMigrationUtils.rewriteV2RequestToV3(request), responder, Constants.DEFAULT_NAMESPACE, appId, ProgramType.MAPREDUCE.getCategoryName(...
"public Community getCommunity(Integer communityId, String expand, String user_ip, String user_agent, String xforwarderfor, HttpHeaders headers, HttpServletRequest request) throws WebApplicationException {\n log.info(\"String_Node_Str\" + communityId + \"String_Node_Str\");\n org.dspace.core.Context context = nul...
"public void runMain(String[] args, boolean useSystemExit) {\n boolean verbose = (-1 != (\"String_Node_Str\" + LangUtil.arrayAsList(args)).indexOf(\"String_Node_Str\"));\n IMessageHolder holder = clientHolder;\n if (null == holder) {\n holder = ourHandler;\n if (verbose) {\n ourHandler...
"public static Map getImplementorsMap(Class clazz) {\n Map matches = new HashMap();\n try {\n Properties props = ResourceUtil.getProperties(clazz);\n Iterator it = props.keySet().iterator();\n while (it.hasNext()) {\n try {\n String key = (String) it.next();\n ...
"public void setCells(Set<GridCell> c) {\n this.cells = new TreeSet<GridCell>(new CellComparator());\n this.cells.addAll(cells);\n}\n"
"private void renderRemoteViewsLevel_2_3_Active(GL gl) {\n float fright = 0.0f;\n float ftop = viewFrustum.getTop();\n float fleftOffset = 0.09f + GAP_BETWEEN_LEVELS + renderStyle.getWidthLevel2() * fAnimationScale;\n if (bIsHeatmapInFocus) {\n fright += viewFrustum.getWidth() - 0.725f;\n } else {...
"protected Pool loadTransitionMatricesAscii(String path) throws FileNotFoundException, IOException {\n String location = \"String_Node_Str\";\n InputStream inputStream = StreamFactory.getInputStream(location, path);\n LogMath logMath = ConfigurationManager.getInstance(LogMath.class);\n logger.info(\"String_...
"public void compile() throws Exception {\n LifecycleManager.getDefault().saveAll();\n for (CoffeeScriptDataObject coffeeFile : data) {\n ProgressHandle handle = ProgressHandleFactory.createHandle(\"String_Node_Str\" + coffeeFile.getPrimaryFile().getNameExt(), this);\n try {\n handle.star...
"protected static List<IComponent> getRelatedComponents(final IComponentsFactory compFac, String keyword, boolean needCheckVisible) {\n Collection<IComponent> componentSet = null;\n IComponentsHandler componentsHandler = compFac.getComponentsHandler();\n String lowerCasedKeyword = null;\n if (keyword != nul...
"public ICompletableFuture<V> getAsyncInternal(final Data keyData) {\n Object cached = nearCache.get(keyData);\n if (cached != null && NULL_OBJECT != cached) {\n return new CompletedFuture<V>(getContext().getSerializationService(), cached, getContext().getExecutionService().getAsyncExecutor());\n }\n ...
"public static void addCatalogOrSchema(IMetadataConnection metadataConnection, DatabaseConnection dbconn) {\n EDatabaseSchemaOrCatalogMapping catalog = null;\n EDatabaseSchemaOrCatalogMapping schema = null;\n EDatabaseTypeName type = EDatabaseTypeName.getTypeFromDbType(metadataConnection.getDbType());\n if ...
"public GestureDetector createGestureDetector(Context appContext, AskOnGestureListener listener) {\n return new AskV8GestureDetector(appContext, listener);\n}\n"
"public Object getKey(T item) {\n return (keyProvider == null || item == null) ? item : keyProvider.getKey(item);\n}\n"
"public IRegion documentChanged2(DocumentEvent e) {\n try {\n IDocument d = e.getDocument();\n Position[] category = d.getPositions(fPositionCategory);\n IRegion line = d.getLineInformationOfOffset(e.getOffset());\n int reparseStart = line.getOffset();\n int partitionStart = -1;\n ...
"public Object doInTransaction(TransactionStatus status) {\n try {\n final RpslObject rpslObject = RpslObject.parse(object);\n final RpslObject dummyObject = dummifier.dummify(3, rpslObject);\n jdbcTemplate.update(\"String_Node_Str\" + table + \"String_Node_Str\", dummyObject.toByteArray(), obje...
"public FnID defineFunction(String name, FunctionType type, DefaultVals<Var> defaultVals) throws UserException {\n DefInfo def = lookupDef(name);\n if (def != null && def.kind == DefKind.FUNCTION) {\n fnID = overloadFunction(name, type, defaultVals);\n declareVariable(type, fnID.uniqueName(), Alloc....
"private void createCatalogTableColumns(Table table) {\n TableColumn tableColumn = new TableColumn(table, SWT.LEFT | SWT.FILL);\n tableColumn.setText(DefaultMessagesImpl.getString(\"String_Node_Str\"));\n tableColumn.setWidth(COL1_WIDTH);\n createNbRowsCol(table, CATALOG);\n createCommonStatisticalColumn...
"protected void restoreWidgetValuesForPOJO() {\n IDialogSettings settings = getDialogSettings();\n if (settings != null) {\n String[] directoryNames = settings.getArray(STORE_DESTINATION_NAMES_ID);\n String fileName = getDefaultFileNameWithType();\n if (!fileName.endsWith(FileConstants.ZIP_FI...
"private void handleCharacter(int primaryCode, int[] keyCodes, int x, int y) {\n mVoiceProxy.handleCharacter();\n if (mJustAddedMagicSpace && mSettingsValues.isMagicSpaceStripper(primaryCode)) {\n removeTrailingSpaceWhileInBatchEdit(ic);\n }\n int code = primaryCode;\n if ((isAlphabet(code) || mSe...
"public void updateComponents(SWF swf) {\n this.swf = swf;\n boolean isRunning = Main.isRunning();\n boolean isDebugRunning = Main.isDebugRunning();\n boolean isDebugPaused = Main.isDebugPaused();\n boolean isRunningOrDebugging = isRunning || isDebugRunning;\n boolean swfSelected = swf != null;\n b...
"public void onServerTick(TickEvent.ServerTickEvent event) {\n final MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();\n final World world = server.getEntityWorld();\n if (Reference.pauseForPlayers && world.playerEntities.size() > 0)\n return;\n if (Reference.maxChunk...
"public void registerTopicSubscriber(final TopicSubscriber<T, M> topicSubscriber) throws AssetNotFoundException {\n if (hub.outBytesLock().isHeldByCurrentThread())\n throw new IllegalStateException(\"String_Node_Str\");\n hub.subscribe(new AbstractAsyncSubscription(hub, csp, \"String_Node_Str\") {\n\n ...
"public final Object readFrom(Class<Object> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException {\n try {\n final Class elementType = getElementClass(type, genericType);\n final Unmarshaller u = ...
"private static boolean isWithinError(double val, double correctVal, double errorPercent) {\n if (val == correctVal) {\n return true;\n } else {\n return correctVal * (1 - errorPercent) < val && val < correctVal * (1 + errorPercent);\n }\n}\n"
"public static void clearOldFiles(File dir, long millisAgo) {\n if (dir == null) {\n return;\n }\n File[] files = dir.listFiles();\n if (files == null) {\n return;\n }\n long olderThan = System.currentTimeMillis() - millisAgo;\n for (File f : files) {\n if (f.isDirectory()) {\n...
"protected String toStringWithIndent(String indent) {\n StringBuilder s = new StringBuilder(1000);\n s.append(indent);\n s.append(String.format(\"String_Node_Str\", lateralFunc.toString(), tableAlias, columnAlias));\n return s.toString();\n}\n"
"public boolean dispatchKeyEvent(KeyEvent event) {\n if (getFragmentMaster().dispatchKeyEventToWindow(event)) {\n return true;\n }\n View view = mMasterFragment.getView();\n boolean handled = KeyEventCompat2.dispatch(event, mMasterFragment, view != null ? KeyEventCompat2.getKeyDispatcherState(view) :...
"protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n int widthSize = MeasureSpec.getSize(widthMeasureSpec) - ViewCompat.getPaddingEnd(this) - ViewCompat.getPaddingStart(this);\n int widthMode = MeasureSpec.getMode(widthMeasureSpec);\n boolean growHeight = widthMode != MeasureSpec.UNSPECIF...
"public static void setUp() throws WSDLException {\n if (conn == null) {\n try {\n conn = buildConnection();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n String ddlCreateProp = System.getProperty(DATABASE_DDL_CREATE_KEY, DEFAULT_DATABASE_DDL_CREATE);\n ...
"public void onSiteChanged(OnSiteChanged event) {\n if (getSelectedSite() == null && mSiteStore.hasSite()) {\n setSelectedSite(mSiteStore.getSites().get(0));\n }\n if (getSelectedSite() == null) {\n return;\n }\n SiteModel site = mSiteStore.getSiteByLocalId(getSelectedSite().getId());\n ...
"public void startRenderer(String author, String description, String paperSize, int paperTrayCode, String duplex, int copies, boolean collate, String resolution, boolean color, int scale) throws IOException {\n this.scale = scale;\n if (author != null) {\n out.println(\"String_Node_Str\" + author);\n }\...
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == SignInActivity.REQUEST_CODE) {\n if (resultCode == RESULT_CANCELED) {\n finish();\n }\n mResultCode = resultCode;\n ...
"protected void buildProperties(IContent content, LayoutContext context) {\n IStyle style = content.getComputedStyle();\n boxStyle = new BoxStyle();\n Color color = PropertyUtil.getColor(style.getProperty(IStyle.STYLE_BACKGROUND_COLOR));\n if (color != null) {\n boxStyle.setBackgroundColor(color);\n ...