content
stringlengths
40
137k
"public void testParseLargeFile() throws Exception {\n Path p = new Path(JsonLexerTest.class.getResource(\"String_Node_Str\").getPath());\n long l = Files.length(p);\n long fd = Files.openRO(p);\n JsonListener listener = new NoOpListener();\n try {\n long buf = Unsafe.malloc(l);\n try {\n ...
"public AbstractPipelineOutput execute(final AbstractPipelineInput input) throws DITAOTException {\n if (logger == null) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n final File maplinksFile = new File(input.getAttribute(ANT_INVOKER_PARAM_MAPLINKS));\n final MapLinksReader indexRead...
"protected void initializeConversions(Class enumClass) {\n if (getFieldToAttributeValues().isEmpty()) {\n EnumSet theEnums = EnumSet.allOf(enumClass);\n Iterator<Enum> i = theEnums.iterator();\n while (i.hasNext()) {\n Enum theEnum = i.next();\n if (m_useOrdinalValues) {\n ...
"public void onConnect() {\n System.out.println(\"String_Node_Str\");\n mMeteor.registerAndLogin(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", new ResultListener() {\n public void onSuccess(String result) {\n System.out.println(\"String_Node_Str\" + result);\n }\n ...
"public static <K, V extends Comparable<? super V>> SortedSet<Entry<K, V>> sortMapByValueAscending(Map<K, V> map) {\n SortedSet<Entry<K, V>> sorted = new TreeSet<>(new Comparator<Entry<K, V>>() {\n public int compare(Entry<K, V> e1, Entry<K, V> e2) {\n int r = e1.getValue().compareTo(e2.getValue())...
"public void execute() {\n setParallelization(this.node);\n if (!isExistParalInSubjob(existParallelMap, node.getProcessStartNode(false))) {\n MessageDialog.openInformation(new Shell(), Messages.getString(\"String_Node_Str\"), Messages.getString(\"String_Node_Str\"));\n }\n}\n"
"private CoordinateOperation search(final CoordinateReferenceSystem sourceCRS, final CoordinateReferenceSystem targetCRS) throws IllegalArgumentException, IncommensurableException, FactoryException {\n final List<String> sources = findCode(sourceCRS);\n if (sources.isEmpty())\n return null;\n }\n fin...
"public SparseVector addInPlace(Vector vector) {\n checkVectorSize(vector);\n if (vector.type() != VectorType.SPARSE) {\n for (int i = 0; i < size; i++) {\n this.set(i, this.get(i) + vector.get(i));\n }\n } else {\n List<Integer> keysUnion = new ArrayList<>(hashMap.keySet());\n ...
"public void generate() {\n final Rule startRule = rules.getStartRule();\n Object generatedStartRuleType = new Object() {\n public String toString() {\n return \"String_Node_Str\";\n }\n };\n Rule newStartRule = new Rule(generatedStartRuleType, new Object[] { startRule.getType() }) ...
"public SQLEditor openInSqlEditor(TdDataProvider tdDataProvider, String query, String editorName) {\n if (editorName == null) {\n editorName = String.valueOf(SQLExplorerPlugin.getDefault().getEditorSerialNo());\n }\n SQLExplorerPlugin sqlPlugin = SQLExplorerPlugin.getDefault();\n AliasManager aliasMa...
"public void onNext(Object o) {\n if (operationCode != 99) {\n showResultImage(true, false);\n } else {\n CallOverall callOverall = (CallOverall) o;\n callSession = callOverall.getOcs().getData().getSessionId();\n initiateCall(false);\n }\n}\n"
"private void applyZoomAndAbsolutePan(float newZoom, float deltaX, float deltaY, boolean allowOverScroll, boolean allowOverPinch) {\n mMatrix.preTranslate(deltaX, deltaY);\n mMatrix.mapRect(mContentRect, mContentBaseRect);\n newZoom = ensureScaleBounds(newZoom, allowOverPinch);\n float scaleFactor = newZoom...
"protected ClientRequest doWork(ClientRequest clientRequest) {\n Optional<String> requestId = Optional.fromNullable(MDC.get(RequestTrackerConstants.DEFAULT_MDC_KEY));\n clientRequest.getHeaders().add(header, requestId.or(ID_SUPPLIER));\n return clientRequest;\n}\n"
"protected void readColumns(DatabaseSnapshot snapshot, String schema, DatabaseMetaData databaseMetaData) throws SQLException, DatabaseException {\n Database database = snapshot.getDatabase();\n updateListeners(\"String_Node_Str\" + database.toString() + \"String_Node_Str\");\n Statement selectStatement = null;...
"private static boolean inBetweenDates(String ddy, String ddm, String ddd, String stDate, String endDate) {\n if (ddd.length() == 1)\n ddd = \"String_Node_Str\" + ddd;\n if (ddm.length() == 1)\n ddm = \"String_Node_Str\" + ddm;\n String dirDate = ddy + ddm + ddd;\n int dDate = Integer.parseInt...
"private void validateMethod(final VjoValidationCtx ctx, final JstMethod jstMethod) {\n final List<JstArg> parameters = jstMethod.getArgs();\n if (parameters != null && parameters.size() > 0) {\n for (int it = 0, len = parameters.size(); it < len; it++) {\n final JstArg argument = parameters.get...
"public static void stopServer() {\n org.dragonet.DragonetServer.instance().getServer().savePlayers();\n for (Player plr : org.dragonet.DragonetServer.instance().getServer().getOnlinePlayers()) {\n plr.kickPlayer(msg);\n }\n org.dragonet.DragonetServer.instance().getServer().shutdown();\n}\n"
"void init(RangerServiceDef serviceDef, List<RangerPolicy> policies) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"String_Node_Str\" + serviceDef + \"String_Node_Str\" + policies.size() + \"String_Node_Str\");\n }\n this.serviceDef = serviceDef;\n contextEnrichers = new ArrayList<RangerContextEnriche...
"public int compareTo(final Version version) {\n if (version == null) {\n return 1;\n }\n final int compMajor = Integer.compare(getMajor(), version.getMajor());\n if (compMajor != 0) {\n return compMajor;\n }\n final int compMinor = Integer.compare(getMinor(), version.getMinor());\n i...
"public void listChanged(ListEvent listChanges) {\n sourceSize = source.size();\n updates.beginEvent();\n while (listChanges.next()) {\n int sortedIndex = listChanges.getIndex();\n int type = listChanges.getType();\n int value = Integer.MIN_VALUE;\n if (type != ListEvent.DELETE && s...
"public boolean get(int feature) {\n if (!BOOLEAN_FEATURES.contains(feature)) {\n throw new IllegalArgumentException(feature + \"String_Node_Str\");\n }\n try {\n if (checkService()) {\n return sService.get(feature);\n }\n } catch (RemoteException e) {\n }\n return fals...
"public Classifier createSpecialClassifier(Namespace container, List<RedefinableElement> traveled, List<Classifier> visited) {\n for (final Class<? extends Classifier> c : UNSPECIALIZABLE_CLASSIFIERS) {\n if (c.isAssignableFrom(classifier.getClass())) {\n return null;\n }\n }\n Classif...
"public void configure(Context context) {\n String table = context.getString(CONF_TABLE, DEFAULT_TABLE);\n String host = context.getString(CONF_HOST, DEFAULT_HOST);\n String keyspace = context.getString(CONF_KEYSPACE, DEFAULT_KEYSPACE);\n int port = context.getInteger(CONF_PORT, DEFAULT_PORT);\n String u...
"public void deleteVolume(String volumeId) {\n IaasProvider iaasInfo = getIaasProvider();\n ComputeServiceContext context = iaasInfo.getComputeService().getContext();\n String region = ComputeServiceBuilderUtil.extractRegion(iaasInfo);\n if (region == null) {\n log.fatal(String.format(\"String_Node_S...
"public static void tearDown() {\n if (ddlDrop) {\n runDdl(conn, DROP_PACKAGE1_PACKAGE_BODY, ddlDebug);\n runDdl(conn, DROP_PACKAGE1_PACKAGE, ddlDebug);\n runDdl(conn, DROP_PACKAGE1_MRECORD_TYPE, ddlDebug);\n runDdl(conn, DROP_PACKAGE1_NRECORD_TYPE, ddlDebug);\n runDdl(conn, DROP_P...
"public void onClick(View v) {\n Intent intent = new Intent(WelcomeActivity.this, AddDeviceToAccountActivity.class);\n startActivityForResult(intent, ADD_THIS_DEVICE);\n}\n"
"public ToroTransaction createTransaction() throws ImplementationDbException {\n SessionTransaction sessionTransaction = executor.createTransaction();\n return new DefaultToroTransaction(session, sessionTransaction, d2r, executor, documentBuilderFactory, cursorManager);\n}\n"
"public void onCreate() {\n versionName = getVersionName();\n wpDB = new WordPressDB(this);\n requestQueue = Volley.newRequestQueue(this);\n int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024);\n int cacheSize = maxMemory / 32;\n imageLoader = new ImageLoader(requestQueue, new BitmapLruCac...
"public void testViews() {\n Collection<ViewInfo> views = evaluatorProvider.getViews(EvaluatorComponent.class.getName());\n Assert.assertEquals(views.size(), 3);\n Assert.assertTrue(views.contains(new ViewInfo(ExpressionsViewManifestation.class, \"String_Node_Str\", ViewType.CENTER)));\n Iterator<ViewInfo> ...
"protected void sendSharedObjectMsgToSelf(SharedObjectMsg msg) {\n if (msg == null)\n throw new NullPointerException(\"String_Node_Str\");\n ISharedObjectContext context = getContext();\n if (context == null)\n return;\n IQueueEnqueue queue = context.getQueue();\n try {\n queue.enque...
"public void test() throws Exception {\n String dataJsonText = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n JsonNode dataJson = BridgeObjectMapper.get().readTree(dataJsonText);\n HealthDataRecord intermediateRecord = createValidRecordBuilder(dataJson).withId(TEST_REC...
"protected int doProcess(Buffer inputBuffer, Buffer outputBuffer) {\n byte[] input = (byte[]) inputBuffer.getData();\n int inputLength = inputBuffer.getLength();\n if (offsets.size() == 0 && ((inputLength > ilbc_constants.NO_OF_BYTES_20MS && inputLength != ilbc_constants.NO_OF_BYTES_30MS) || inputLength > ilbc...
"public Object getFinalValue() throws Exception, IllegalAccessException, InvocationTargetException {\n if (value != null && \"String_Node_Str\".equals(value.trim())) {\n if (formatter == null) {\n return typeClass.getConstructor(new Class[] { String.class }).newInstance(new Object[] { value });\n ...
"public List<String> getChainIds() {\n List<String> chains = new ArrayList<String>(getSubunitCount());\n for (int c = 0; c < clusters.size(); c++) {\n for (int s = 0; s < clusters.get(c).size(); s++) chains.add(clusters.get(c).getSubunits().get(s).getName());\n }\n return chains;\n}\n"
"public static Object evalConditionalExpr(Object obj, int operator, Object[] ops) throws DataException {\n ExprTextAndValue[] opTextAndValue = new ExprTextAndValue[ops.length];\n for (int i = 0; i < ops.length; i++) {\n opTextAndValue[i] = createExprTextAndValueInstance(ops[i]);\n }\n Object resultOb...
"public void testTruncateAndAppend() throws IOException {\n SimpleLog log = initLog();\n log.truncate(new Zxid(0, 0));\n log.append(new Transaction(new Zxid(1, 2), ByteBuffer.wrap(\"String_Node_Str\".getBytes())));\n Log.LogIterator iter = log.getIterator(new Zxid(0, 0));\n Assert.assertEquals(iter.next(...
"protected void drawLabels(Canvas c, float pos) {\n float[] position = new float[] { 0f, 0f };\n int maxx = mMaxX;\n int minx = mMinX;\n if (maxx >= mXAxis.getValues().size())\n maxx = mXAxis.getValues().size() - 1;\n if (minx < 0)\n minx = 0;\n for (int i = minx; i <= maxx; i += mXAxis....
"public Object getEntity(String serviceEndpoint, Type responseType, String identifierPlaceHolder, String identifier, String entityName) {\n try {\n return executeGet(serviceEndpoint.replace(identifierPlaceHolder, identifier), responseType);\n } catch (Exception e) {\n String message = String.format(...
"public void testLargeSortAcrossMultipleWindows() throws Exception {\n try {\n final int NUM_RECORDS = 1000000;\n final TestData.Generator generator = new TestData.Generator(SEED, KEY_MAX, VALUE_LENGTH, KeyMode.RANDOM, ValueMode.CONSTANT, VAL);\n final MutableObjectIterator<PactRecord> source = ...
"public static Vector2 toVector2(Vector3 o) {\n return new Vector2(o.x, o.z);\n}\n"
"public boolean blockActivated(World world, int i, int j, int k, EntityPlayer entityplayer) {\n ItemStack current = entityplayer.inventory.getCurrentItem();\n if (current != null) {\n LiquidStack liquid = LiquidManager.getLiquidForFilledItem(current);\n TileTank tank = (TileTank) world.getBlockTileE...
"protected void processInstalledExtensions() {\n allInstalledLibs = new HashMap<String, List<LibDependencyDeclaration>>();\n allInstalledExtensions = new HashMap<String, DependencyMetadata>();\n if (installedExtensions == null)\n installedExtensions = new DependencyMetadata[0];\n for (DependencyMetad...
"public static Application addApplication(String name) throws SkypeException {\n Application application = new Application(name);\n application.initalize();\n return application;\n}\n"
"private boolean authorizeCORBA(byte[] object_id, String method) throws Exception {\n ProtocolManager protocolMgr = orbHelper.getProtocolManager();\n if (protocolMgr == null) {\n return true;\n }\n if (protocolMgr.getEjbDescriptor(object_id) != null) {\n return true;\n }\n CORBAObjectPer...
"private void doIntegrationTest(int bitWidth) throws Exception {\n long modValue = 1L << bitWidth;\n RunLengthBitPackingHybridEncoder encoder = new RunLengthBitPackingHybridEncoder(bitWidth, 1000);\n for (int i = 0; i < 100; i++) {\n encoder.writeInt((int) (i % modValue));\n }\n for (int i = 0; i ...
"public static ChangeBlockEvent.Place callBlockPlaceEvent(Event event) {\n if (!(event instanceof ChangeBlockEvent.Place)) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n ChangeBlockEvent.Place spongeEvent = (ChangeBlockEvent.Place) event;\n if (spongeEvent.getCause().first(Player....
"public void update() {\n if (lastSteam != getSteamShare() >= STEAM_CONSUMPTION) {\n markForResync();\n }\n lastSteam = getSteamShare() > STEAM_CONSUMPTION;\n if (!isInitialized) {\n powered = worldObj.isBlockIndirectlyGettingPowered(pos) > 0;\n setDistributionDirections(new EnumFacing[...
"public boolean isValid() {\n fIsTracepoints = fTracepointsActivateButton.getSelection();\n fIsWildcard = fWildcardActivateButton.getSelection();\n fIsLogLevel = fLogLevelActivateButton.getSelection();\n fIsAllTracepoints = false;\n fSelectedEvents = new ArrayList<String>();\n if (fIsTracepoints) {\n ...
"public ResourceApk packWithDataAndResources(Artifact resourceApk, RuleContext ruleContext, boolean isLibrary, ResourceDependencies resourceDeps, Artifact rTxt, Artifact symbols, ResourceConfigurationFilter configurationFilters, List<String> uncompressedExtensions, boolean crunchPng, List<String> densities, boolean inc...
"private void createRemoteReferencesUpdate(DiffGroup root, EReference reference, Match3Elements mapping, List<EObject> remotelyAdded, List<EObject> remotelyDeleted) {\n if (!reference.isMany() && remotelyAdded.size() > 0 && remotelyDeleted.size() > 0) {\n final UpdateReference operation = DiffFactory.eINSTANC...
"public void focusTo(int row, int column, boolean fireFocusEvent) {\n spreadsheet.focusTo(row, column);\n if (fireFocusEvent) {\n org.zkoss.zk.ui.event.Events.sendEvent(new CellEvent(Events.ON_CELL_FOUCSED, spreadsheet, spreadsheet.getSelectedSheet(), row, column, null));\n }\n}\n"
"public static Graph extract(Iterable<Triple> triples, String namedGraph) {\n final Graph aGraph = new GraphImpl();\n for (Triple triple : triples) {\n Statement aStatement = extractAsSesameStatement(triple, namedGraph, valueFactory);\n if (aStatement != null) {\n aGraph.add(aStatement);\...
"protected void createFormElements(Composite editArea) {\n bindings().createLabel(editArea, type.name());\n if (!allowSelectionOfSecurity) {\n bindings.createLabel(editArea, ((Model) getModel()).getSecurity().getName());\n } else {\n bindings.bindComboViewer(editArea, Messages.ColumnSecurity, \"S...
"private static void notNullStringPut(MultivaluedHashMap<String, Object> map, String key, Object val) {\n if (val != null) {\n map.put(key, val.toString());\n }\n}\n"
"public void updateStructure(SparseBlockMatrix M, SparseBlockMatrix GT) {\n if (mySolver == null) {\n mySolver = new KKTSolver();\n }\n if (myStructureVersion != mySys.getStructureVersion() || myBilateralVersion != GTversion) {\n doUpdateStructure(M, GT);\n myStructureVersion = mySys.getSt...
"public void adjustBeforeOptimize(Polygon2D_F64 polygon) {\n center.x = 0;\n center.y = 0;\n for (int j = 0; j < 4; j++) {\n Point2D_F64 p = polygon.get(j);\n center.x += p.x;\n center.y += p.y;\n }\n center.x /= 4.0;\n center.y /= 4.0;\n for (int j = 0; j < 4; j++) {\n ...
"protected List<Snippet> results(State state) {\n ProtoSnippet[] protos = state.results.contents();\n Arrays.sort(protos, ProtoSnippetComparators.OFFSETS);\n int lastSnippetEnd = 0;\n for (ProtoSnippet proto : protos) {\n proto.pickedBounds = proto.memo.pickBounds(lastSnippetEnd, Integer.MAX_VALUE);\...
"private void sendFIN() {\n System.out.println(\"String_Node_Str\");\n TCPPacket packet = createPacket();\n packet.flags |= TCPPacket.FIN;\n try {\n send(packet);\n } catch (IOException e) {\n e.printStackTrace();\n }\n}\n"
"public String toString() {\n return \"String_Node_Str\" + \"String_Node_Str\" + name + '\\'' + \"String_Node_Str\" + className + '\\'' + \"String_Node_Str\" + jarLocation + \"String_Node_Str\" + jarLocationPath + \"String_Node_Str\" + types + \"String_Node_Str\" + usesModules + \"String_Node_Str\" + usedByModules +...
"public TrainerBuilder lowerCaseFirstLetterFrequency(int count) {\n this.lowerCaseFirstLetterFrequency = count;\n return this;\n}\n"
"public void run() {\n try {\n mVideoCodec = MediaCodec.createDecoderByType(mVideoFormat.getString(MediaFormat.KEY_MIME));\n mVideoCodec.configure(mVideoFormat, mSurface, null, 0);\n mVideoCodec.start();\n mVideoCodecInputBuffers = mVideoCodec.getInputBuffers();\n mVideoCodecOutput...
"public static int[] deserializeInteger(List<MPIBuffer> buffers, int byteLength) {\n int noOfDoubles = byteLength / 4;\n int[] returnDoubles = new int[noOfDoubles];\n int bufferIndex = 0;\n for (int i = 0; i < noOfDoubles; i++) {\n ByteBuffer byteBuffer = buffers.get(bufferIndex).getByteBuffer();\n ...
"private void inline(Var v, Reference decl, Reference init, Reference ref) {\n Node value = init.getAssignedValue();\n Preconditions.checkState(value != null);\n boolean isFunctionDeclaration = NodeUtil.isFunctionDeclaration(value);\n compiler.reportChangeToEnclosingScope(decl.getNode());\n compiler.repo...
"public void run() {\n final ConcurrentMap<K, ScheduledEntry<K, V>> entries = scheduledEntries.remove(second);\n if (entries == null || entries.isEmpty())\n return;\n for (K key : entries.keySet()) {\n Integer removed = secondsOfKeys.remove(key);\n if (removed != null) {\n value...
"public void test_by_buffer() throws IOException {\n RemountBytes boundary = RemountBytes.create(\"String_Node_Str\");\n String str = \"String_Node_Str\";\n str += \"String_Node_Str\";\n str += \"String_Node_Str\";\n str += \"String_Node_Str\";\n str += \"String_Node_Str\";\n str += \"String_Node_S...
"public String getFunctionSignature() {\n String retval = getIdentifier().getEscapedCodeStr();\n if (getParameterList() != null)\n retval += \"String_Node_Str\" + getParameterList().getEscapedCodeStr() + \"String_Node_Str\";\n else\n retval += \"String_Node_Str\";\n return retval;\n}\n"
"public Vector getPointOnEdge(Coordinate obsPoint) {\n if (this == InferredEdge.emptyEdge)\n return null;\n final Coordinate revObsPoint = new Coordinate(obsPoint.y, obsPoint.x);\n final LinearLocation here = locationIndexedLine.project(revObsPoint);\n final Coordinate pointOnLine = locationIndexedLi...
"private void smooth(ArrayList<Point2D> pixels) {\n for (Point2D p : pixels) {\n int x = (int) Math.round(p.x);\n int y = (int) Math.round(p.y);\n double attenuatedInc = Math.round(increment * pencil.strength * pencil.getApplicationRatio(new Point2D(x, y).getMult(ModelManager.getBattlefield().ge...
"public void execute(ExecutionContext executionContext) throws Exception {\n NodeRef pkg = ((JBPMNode) executionContext.getContextInstance().getVariable(\"String_Node_Str\")).getNodeRef();\n Pair<Integer, String> pkgPath = AVMNodeConverter.ToAVMVersionPath(pkg);\n String description = (String) executionContext...
"public void on_saveTimeIntervalButton_clicked() {\n ArrayList<String> timeIntervallData = getTimeFromTID();\n WorkshopController.newTimeIntervall(timeIntervallData);\n sImpl.ui.treeWidget.clear();\n sImpl.init();\n int hours = WorkshopController.getDuration(sImpl.mDImpl.workShopID);\n sImpl.mDImpl.se...
"public static ProgramInfo getProgramInfo(byte[] program) throws IOException {\n ProgramInfo info = new ProgramInfo();\n if (program.length <= 2) {\n }\n byte end = program[program.length - 1];\n byte[] temp = new byte[program.length - 1];\n System.arraycopy(program, 0, temp, 0, program.length - 1);\n...
"private void recuperaIntent() {\n Intent intent = getIntent();\n this.configuracao = (ConfiguracaoParatida) intent.getSerializableExtra(ConfiguracaoParatida.CONFIGURACAO);\n this.jogador = (Jogador) intent.getSerializableExtra(Jogador.JOGADOR);\n}\n"
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n switch(requestCode) {\n case ChooseFile.FILE_TRANSFER_CODE:\n if (data == null)\n return;\n ArrayList<Uri> uris = new ArrayList<>(...
"public void onAvatarClick(String roomId, String userId) {\n Intent startRoomInfoIntent = new Intent(mContext, MemberDetailsActivity.class);\n startRoomInfoIntent.putExtra(MemberDetailsActivity.EXTRA_ROOM_ID, roomId);\n startRoomInfoIntent.putExtra(MemberDetailsActivity.EXTRA_MEMBER_ID, userId);\n startRoom...
"public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {\n this.viewer = viewer;\n try {\n if (fileProvider != null) {\n fileProvider.dispose();\n }\n if (newInput instanceof IFileProvider) {\n AlertUtils.showStatusErrorMessage(null, viewpart);\n ...
"protected final void prepare(ExecuteContext ctx) throws SQLException {\n if (resultSetConcurrency != 0 || resultSetType != 0 || resultSetHoldability != 0) {\n int type = resultSetType != 0 ? resultSetType : ResultSet.TYPE_FORWARD_ONLY;\n int concurrency = resultSetConcurrency != 0 ? resultSetConcurren...
"protected String serializeValue(final String type, final Object value) {\n throw new MediaTypeNotSupportedException(Response.Status.NOT_ACCEPTABLE, supported, requested);\n}\n"
"public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(NetworkMonitorService.NEW_ENDPOINT)) {\n String address = (String) intent.getExtras().get(NetworkMonitorService.ENDPOINT_ADDRESS), hardware = (String) intent.getExtras().get(NetworkMonitorService.ENDPOINT_HARDWARE);\n ...
"public void beginSpan(MarkPos pos, Span span) {\n copyUpTo(pos);\n buf.append(\"String_Node_Str\");\n if (!inContext) {\n buf.append(\"String_Node_Str\");\n buf.append(Integer.toString(span.rank + 1));\n buf.append(\"String_Node_Str\");\n buf.append(Integer.toString((int) (span.sco...
"protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {\n int cmpcount = 0;\n if (formLayout instanceof FormLayoutContainer) {\n FormLayoutContainer layoutCont = (FormLayoutContainer) formLayout;\n layoutCont.contextPut(\"String_Node_Str\", entry);\n la...
"public void renameCleanupActions(Map<String, Arg> renames, boolean inputsOnly) {\n for (CleanupAction a : cleanupActions) {\n a.renameVars(renames, inputsOnly);\n }\n}\n"
"private void setCapacities() {\n Constants.DIMENSION = dimension;\n Constants.MAX_CHILDREN = 10;\n Constants.MIN_CHILDREN = 4;\n}\n"
"private void testMap(Map<String, Integer> datasets, TestSuite testSuite, SchemaSource ontologySource) {\n DatasetOverviewResults overviewResults = new DatasetOverviewResults();\n for (Map.Entry<String, Integer> entry : datasets.entrySet()) {\n String resource = resourcePrefix + entry.getKey();\n in...
"public ArrayList<ItemStack> getNewInventory() {\n ArrayList<ItemStack> ret = new ArrayList<ItemStack>();\n for (int i = 0; i < item_mats.size(); i++) {\n ItemStack item = new ItemStack(item_mats.get(i), item_amounts.get(i), item_data.get(i));\n item.setDurability(item_durability.get(i));\n I...
"private synchronized void init(Context context) {\n try {\n String agencyProviderMetaData = getAgencyProviderMetaData(context);\n String agencyProviderTypeMetaData = context.getString(R.string.agency_provider_type);\n String rtsProviderMetaData = context.getString(R.string.rts_provider);\n ...
"public CsdlActionImport getActionImport(final FullQualifiedName entityContainer, final String name) throws ODataException {\n if (entityContainer.equals(nameContainer)) {\n if (name.equals(AIRT_STRING)) {\n return new CsdlActionImport().setName(AIRT_STRING).setAction(ActionProvider.nameUARTString)...
"public static IOseeBranch getTestBranch() {\n return CoverageBranches.COVERAGE_TEST_BRANCH;\n}\n"
"public AccountId channelSignIn(ChannelType channelType, CriteriaContext context, SignIn signIn, Validator validator) {\n Validate.entityThrowingException(validator, signIn);\n CacheKey cacheKey = null;\n if (channelType == EMAIL) {\n cacheKey = CacheKeys.emailSignInRequest(signIn);\n } else if (chan...
"public Response execute() {\n DatabaseAccessor db = null;\n try {\n db = initDB();\n ArrayList<String> annotations = db.getAllAnnotationLabels();\n if (annotations.contains(name)) {\n db.deleteAnnotation(name);\n return new MinimalResponse(200);\n } else {\n ...
"public void registerKeySubscriber(Subscriber<K> subscriber, Filter filter, Set<RequestContext.Operation> contextOperations) {\n final KVSSubscription<K, V> subscription = (KVSSubscription<K, V>) asset.subscription(true);\n final RequestContext rc = RequestContext.requestContext().type(keyClass).type2(valueType);...
"protected void drawGuiContainerBackgroundLayer(float v, int i, int i2) {\n updateList();\n if (tileEntity != null) {\n viewMode.setCurrentChoice(tileEntity.getViewMode());\n sortMode.setCurrentChoice(tileEntity.getSortMode());\n groupMode.setCurrentChoice(tileEntity.isGroupMode() ? 1 : 0);\n...
"public void ajustWidth(Widget aChild, int aValue) {\n if (aChild != null) {\n if (aChild.getParent() instanceof PlatypusFieldSet)\n aChild.getParent().setPixelSize(aValue, Sizer.getWidgetHeight(aChild));\n else\n aChild.setPixelSize(aValue, Sizer.getWidgetHeight(aChild));\n }\...
"public <E> List<E> getColumnsById(String joinTableName, String joinColumnName, String inverseJoinColumnName, String parentId) {\n Selector selector = Pelops.createSelector(PelopsUtils.generatePoolName(getPersistenceUnit()));\n List<Column> columns = selector.getColumnsFromRow(joinTableName, Bytes.fromUTF8(parent...
"public Expr call(Expr expr) {\n if (expr instanceof FuncExpr) {\n FuncExpr f = (FuncExpr) expr;\n FuncExpr s = (FuncExpr) exprWithTableNamesSubstituted(expr, tablesNamesSub);\n List<Expr> samplingProbExprs = source.samplingProbabilityExprsFor(f);\n if (f.getFuncName().equals(FuncExpr.Fun...
"public final void add(long value) {\n if (size == data.length)\n resize(Math.max(size + 5, size * 3 / 2));\n data[size++] = value;\n}\n"
"public String convertToConLLTypes(String neType) {\n String conllType = null;\n if (neType.equalsIgnoreCase(\"String_Node_Str\") || neType.equalsIgnoreCase(\"String_Node_Str\") || neType.equalsIgnoreCase(\"String_Node_Str\") || neType.length() == 3) {\n conllType = neType.substring(0, 3);\n } else if (...
"private void initializeJmsSource(String destination, int messageReceive, String initialContextFactory, String providerUrl) {\n jmsSource = new JmsSource(new JmsPluginConfig(destination, messageReceive, initialContextFactory, providerUrl, JmsSource.DEFAULT_CONNECTION_FACTORY));\n}\n"
"public Object addingService(ServiceReference reference) {\n EndpointListener listener = (EndpointListener) machine.getContext().getService(reference);\n Object ofilter = reference.getProperty(ENDPOINT_LISTENER_SCOPE);\n EndpointListerInterrest interrest = getEndpointListenerInterrest(reference);\n try {\n ...
"private void singleResultsProcess(List<TaskTrackerJobResult> results) {\n TaskTrackerJobResult result = results.get(0);\n if (!needRetry(result)) {\n if (result.getJobWrapper().getJob().isNeedFeedback()) {\n clientNotifier.send(results);\n } else {\n jobFinishHandler.onComplet...
"public void setBaby(boolean flag) {\n if (flag) {\n this.datawatcher.watch(12, new Integer(-24000));\n } else {\n this.datawatcher.watch(12, 0);\n }\n ((MyOcelot) myPet).isBaby = flag;\n}\n"