content
stringlengths
40
137k
"public void setCaCertificate(X509Certificate cert) {\n if (cert != null) {\n if (cert.getBasicConstraints() >= 0) {\n mCaCert = cert;\n } else {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n } else {\n throw new IllegalArgumentException(\"Strin...
"private void lazyInitialize() {\n if (initialized) {\n return;\n }\n synchronized (this) {\n if (initialized) {\n return;\n }\n XMLDescriptor xmlDescriptor = (XMLDescriptor) getDescriptor();\n Iterator mappingIterator = xmlDescriptor.getMappings().iterator();\n ...
"public void update() {\n if (world.isRemote) {\n if (clientLaserMoveInterval.markTimeIfDelay(world) || targetPos == null) {\n updateLaser();\n }\n return;\n }\n avgPower.tick();\n BlockPos previousTargetPos = targetPos;\n if (targetPositions == null) {\n findPossib...
"public static void preInit() {\n if (PAConfig.allowWoodenLevel)\n woodUpgrade = new ItemWoodUpgrade();\n if (PAConfig.allowStoneLevel)\n stoneUpgrade = new ItemStoneUpgrade();\n if (PAConfig.allowIronLevel)\n ironUpgrade = new ItemIronUpgrade();\n if (PAConfig.allowDiamondLevel)\n ...
"private void multiCapacityCreate() {\n DateTime now = DateTime.now();\n Utilization u1 = new Utilization();\n u1.timestamp = now;\n u1.spacesAvailable = 1;\n u1.capacityType = CapacityType.CAR;\n u1.usage = usageCar;\n Utilization u2 = new Utilization();\n u2.timestamp = now.minusSeconds(10);\n...
"public void onClick(DialogInterface dialog, int which) {\n final String query = General.asciiLowercase(editText.getText().toString()).trim();\n if (StringUtils.isEmpty(query)) {\n listener.onSearch(null);\n } else {\n listener.onSearch(query);\n }\n}\n"
"public T withTags(final Set<String> tags) {\n this.bTags = tags == null ? ImmutableSet.of() : ImmutableSet.copyOf(tags.stream().filter(StringUtils::isNotBlank).collect(Collectors.toSet()));\n return (T) this;\n}\n"
"public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) {\n long start = Util.timeMS();\n String[] split = event.getMessage().split(\"String_Node_Str\");\n Player player = event.getPlayer();\n if (split[0].equalsIgnoreCase(Config.commands_user_login) || split[0].equalsIgnoreCase(Config.al...
"public static void dropInventoryItems(World world, BlockPos pos, IDrawerGroup group) {\n for (int i = 0; i < group.getDrawerCount(); i++) {\n IDrawer drawer = group.getDrawerIfEnabled(i);\n if (drawer == null)\n continue;\n while (drawer.getStoredItemCount() > 0) {\n ItemS...
"protected List<NodeEntity> getNodesToBeSetLocalRepo(ChunkContext chunkContext, String clusterName) throws TaskException {\n List<NodeEntity> toBeSetLocalRepo = null;\n List<NodeEntity> nodesInGroup = null;\n List<NodeEntity> addNodes = new ArrayList<NodeEntity>();\n List<String> nodeGroupNames = null;\n ...
"private static ArrayList<Check> constructChecks(ArrayList<String> scriptingObjects) {\n ArrayList<Check> checks = new ArrayList<>();\n for (int i = 0; i < scriptingObjects.size(); i++) {\n String object = scriptingObjects.get(i);\n if (ScriptingTypes.DATA.list().contains(object) || object.matches(\...
"public String resolveHostForKerberos(KerberosConfig kerberosConfig, String defaultHost) {\n String host = Optional.ofNullable(kerberosConfig.getUrl()).orElse(\"String_Node_Str\").trim();\n return host.isEmpty() ? defaultHost : host;\n}\n"
"public View getView(int position, View convertView, ViewGroup parent) {\n ImageView imageView = null;\n TextView editText = null;\n View view = null;\n try {\n if (convertView == null) {\n LayoutInflater inflater = (LayoutInflater) ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n ...
"public Address allocCopy(ObjectReference original, int bytes, int align, int offset, int allocator) throws InlinePragma {\n if (Assert.VERIFY_ASSERTIONS) {\n Assert._assert(bytes <= Plan.LOS_SIZE_THRESHOLD);\n Assert._assert(allocator == GenCopy.ALLOC_MATURE_MINORGC || allocator == GenCopy.ALLOC_MATUR...
"protected boolean isHidden() {\n if (content != null) {\n IStyle style = content.getComputedStyle();\n if (!IStyle.NONE_VALUE.equals(style.getProperty(IStyle.STYLE_DISPLAY))) {\n return isHiddenByVisibility();\n } else {\n return true;\n }\n }\n return false;\...
"public void initializeUI(UIBuilder builder) throws Exception {\n Set<AddonId> choices = new HashSet<AddonId>();\n for (AddonRepository repository : forge.getRepositories()) {\n if (repository instanceof MutableAddonRepository) {\n for (AddonId id : repository.listEnabled()) {\n c...
"public Answer createVolumeFromSnapshot(CopyCommand cmd) {\n try {\n DataTO srcData = cmd.getSrcTO();\n SnapshotObjectTO snapshot = (SnapshotObjectTO) srcData;\n DataTO destData = cmd.getDestTO();\n PrimaryDataStoreTO pool = (PrimaryDataStoreTO) destData.getDataStore();\n DataStore...
"public void run() {\n if (DEBUG)\n Log.v(TAG, \"String_Node_Str\");\n android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_URGENT_DISPLAY);\n RawInputEvent ev = new RawInputEvent();\n while (true) {\n try {\n InputDevice di;\n readEvent(ev);\n ...
"public Resource create(IProject project, Item item, int classID, IPath path) {\n String fileExtension = FileConstants.ITEM_EXTENSION;\n Resource itemResource = null;\n try {\n switch(classID) {\n case org.talend.dataquality.properties.PropertiesPackage.TDQ_ANALYSIS_ITEM:\n fil...
"public void setMapViewport(MapRectangle screenArea) {\n int centerX = screenArea.getLineStartX(screenArea.getHeight() / 2) + screenArea.getWidth() / 2;\n int centerY = screenArea.getLineY(screenArea.getHeight() / 2);\n ShortPoint2D displayCenter = new ShortPoint2D(centerX, centerY);\n controlsAdapter.onPos...
"public boolean getAutoCommit() throws SQLException {\n if (jdbcPooledConnection == null)\n throw new SQLException(\"String_Node_Str\");\n if (jdbcPooledConnection.isParticipatingInActiveGlobalTransaction())\n return false;\n return getDelegate().getAutoCommit();\n}\n"
"private void recalculateAggregation(List<IAggregationResultRow> aggregationRows) throws DataException, IOException {\n Set<Integer> duplicatedIndex = new HashSet<Integer>();\n for (int i = 0; i < aggregationRows.size(); i++) {\n this.calculator.start();\n List<Integer> positions = getRowsPositionIn...
"public boolean hasIndividuals(OWLClass OWLConcept) {\n boolean hasIndividuals = false;\n NamedClass concept = null;\n NamedClass selectedConcept = null;\n Iterator<NamedClass> it = reasoner.getNamedClasses().iterator();\n while (it.hasNext()) {\n concept = it.next();\n if (concept.toManche...
"public void testCentralDifferenceHessianApproximationGivenGradient() {\n AbstractFunction function = new RosenbrockFunction();\n DerivativesApproximation derivativesApproximation = new DerivativesApproximation(function, DerivativesApproximationMethod.CENTRAL_DIFFERENCE);\n RealVector point = new ArrayRealVect...
"public void create(int stepNum) throws Exception {\n ServiceConfiguration configuration = Topology.lookup(Euare.class);\n switch(stepNum) {\n case 0:\n String instanceProfileName = getDefaultPhysicalResourceId();\n CreateInstanceProfileType createInstanceProfileType = new CreateInsta...
"void renderHorizontalAxisByType(ComputationContext context, double dXEnd, double dZEnd, double dZ, double dStaggeredLabelOffset) throws ChartException {\n final int iDirection = sc.getDirection() == IConstants.BACKWARD ? -1 : 1;\n IAxisTypeComputation computation = createAxisTypeComputation(context);\n comput...
"public void run() {\n try {\n if (writer.handleWrite())\n throw new IllegalStateException(\"String_Node_Str\");\n writer.shutdown();\n ChannelWriter lastChannel = newWriter;\n while (lastChannel.getWriteChannel() instanceof ChannelWriter) {\n lastChannel = (ChannelW...
"private void fireClockTick(final Hertz tick) {\n try {\n Component.State systemState;\n try {\n systemState = this.configuration.lookupState();\n } catch (NoSuchElementException ex1) {\n this.stop();\n return;\n }\n boolean initialized = systemStat...
"protected void changeOwnershipOfDirectory(final String dir, final String user) throws GenieException {\n final CommandLine commandLine = new CommandLine(\"String_Node_Str\").addArgument(\"String_Node_Str\").addArgument(\"String_Node_Str\").addArgument(user).addArgument(dir);\n try {\n this.executor.execut...
"public QBDialog createRoomChat(String roomName, List<Integer> friendIdsList) throws SmackException, XMPPException, QBResponseException {\n ArrayList<Integer> occupantIdsList = ChatUtils.getOccupantIdsWithUserList(friendIdsList);\n QBDialog dialog = roomChatManager.createDialog(roomName, QBDialogType.GROUP, occup...
"public boolean apply(Game game, Ability source) {\n Card card = game.getCard(source.getSourceId());\n if (card != null) {\n for (Ability ability : card.getAbilities()) {\n if (ability instanceof KickerAbility) {\n if (((KickerAbility) ability).isKicked(game)) {\n ...
"public synchronized List<Description> getCurrentlyBestDescriptions(int nrOfDescriptions, boolean filterNonMinimalDescriptions) {\n List<Description> currentlyBest = getCurrentlyBestDescriptions();\n List<Description> returnList = new LinkedList<Description>();\n int count = 0;\n for (Description ed : curre...
"public boolean beforeDroppingMaterial() {\n if (request != null) {\n if (request.isActive() && request.getPos().equals(super.getPos())) {\n request.deliveryFulfilled();\n return false;\n } else {\n request.deliveryAborted();\n request = null;\n }\n ...
"public Object getElementAt(int v) {\n String value = \"String_Node_Str\" + (_asc ? v : _size - v - 1);\n return value;\n}\n"
"public int compare(JsonElement o1, JsonElement o2) {\n String term1 = o1.getAsJsonObject().get(\"String_Node_Str\").getAsString().replace(\"String_Node_Str\", \"String_Node_Str\");\n String term2 = o2.getAsJsonObject().get(\"String_Node_Str\").getAsString().replace(\"String_Node_Str\", \"String_Node_Str\");\n ...
"public static void doJobObjectsCleanup(Job job, ModelService model, IndexService index) {\n if (RodaCoreFactory.getNodeType() == NodeType.MASTER) {\n try {\n index.commit(IndexedAIP.class);\n Filter filter = new Filter();\n filter.add(new SimpleFilterParameter(RodaConstants.I...
"private void processAddressedButNonexistentGammas(String tableName) throws OseeCoreException {\n List<Object[]> nonexistentGammas = new LinkedList<Object[]>();\n IOseeStatement chStmt = getDatabaseService().getStatement(connection);\n try {\n String sql = String.format(NONEXISTENT_GAMMAS, tableName);\n...
"protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_issue_detail);\n if (savedInstanceState == null) {\n IssueDetailFragment mIssueDetailFragment = HSFragmentManager.getIssueDetailFragment();\n HSFragmentManager.putFragmen...
"private void sampleZAndBurn(int iterationNumber) {\n for (int p = 0; p < numberOfDomains; p++) {\n for (int j = 0; j < numberOfFunctions; j++) {\n double[] z_probabilities = new double[numberOfDomains];\n for (int p_inner = 0; p_inner < numberOfDomains; p_inner++) if (p_inner != p)\n ...
"public static void addUnitCategory(String categoryName, String baseUnitName) {\n Integer index = (Integer) _indexTable.get(categoryName);\n if (index != null) {\n return;\n } else {\n String[] oldNames = _baseNames;\n int length = oldNames.length;\n _baseNames = new String[length +...
"public Method getConstructor(int parameterCount) {\n for (java.lang.reflect.Constructor<?> constructor : existing.getConstructors()) {\n Class<?>[] parameterTypes = constructor.getParameterTypes();\n if (parameterTypes.length == parameterCount) {\n ArrayList<Parameter> parameters = convertP...
"protected final void fireSentMessage(Message msg, BitSet dest) {\n List<MessageHandler> handlers = msgListeners.get(MessageType.SENT);\n for (MessageHandler listener : handlers) {\n listener.onMessageSent(msg, dest);\n }\n}\n"
"public static AFPChain createAFPChain(Atom[] ca1, Atom[] ca2, ResidueNumber[] aligned1, ResidueNumber[] aligned2) throws StructureException {\n int alnLen = aligned1.length;\n if (alnLen != aligned2.length) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n AFPChain a = new AFPChain(...
"private void persistEventsToMongo(List<StratioStreamingMessage> collected_events) {\n long time = System.currentTimeMillis();\n Map<String, BulkWriteOperation> elementsToInsert = new HashMap<String, BulkWriteOperation>();\n for (StratioStreamingMessage event : collected_events) {\n BasicDBObject object...
"public void run() {\n while (!this.isInterrupted()) {\n synchronized (this.pendingReadEventSubscribeRequests) {\n while (!this.pendingReadEventSubscribeRequests.isEmpty()) {\n final SelectionKey key = this.pendingReadEventSubscribeRequests.poll();\n final IncomingConn...
"public void update(Comment comment, File file) throws IOException {\n InputStream in = null;\n OutputStream out = null;\n File tempFile = null;\n try {\n state = new State();\n in = new BufferedInputStream(new FileInputStream(file));\n read(in);\n state.vc = comment;\n te...
"private ClientDriverRequestResponsePair getMatchingRequestPair(HttpServletRequest request) {\n int index = 0;\n ClientDriverExpectation matchedExpectation = null;\n for (index = 0; index < expectations.size(); index++) {\n ClientDriverExpectation thisExpectation = expectations.get(index);\n Clie...
"private double logYGivenComponent(MultiLabel y, int k) {\n double sum = 0.0;\n for (int l = 0; l < numLabels; l++) {\n if (y.matchClass(l)) {\n sum += logClassProbs[k][l][1];\n } else {\n sum += 1 - logClassProbs[k][l];\n }\n }\n return sum;\n}\n"
"public void testMissingCssBase() {\n FormattingErrorReporter errorReporter = new FormattingErrorReporter();\n compileTemplate(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", errorReporter);\n assertThat(errorReporter.getErrorMessages()).hasSize(1);\...
"protected InterceptorStatusToken beforeInvocation(Object object) {\n InterceptorStatusToken result = null;\n try {\n RMMethodSecurityInterceptor.CAPABILITIES.remove();\n result = super.beforeInvocation(object);\n } catch (AccessDeniedException exception) {\n String failureReport = getFail...
"public void setTypeDeclaration(TypeDeclaration typeDeclaration) {\n if (typeDeclaration != this.typeDeclaration) {\n this.typeDeclaration = typeDeclaration;\n this.typeMethodNames = null;\n }\n}\n"
"protected DimensionsComponent createDimensionsComponent(Entity entity, MainItemVO vo) {\n DimensionsComponent component = new DimensionsComponent();\n ProjectInfoVO projectInfoVO = rm.getProjectVO();\n component.boundBox = new Rectangle(-10f / projectInfoVO.pixelToWorld, -10f / projectInfoVO.pixelToWorld, 20f...
"public EbicsCertificate createCertificate(X509Certificate certificate, EbicsBank bank, String type) throws CertificateEncodingException, IOException {\n EbicsCertificate cert = getEbicsCertificate(bank, type);\n if (cert == null) {\n log.debug(\"String_Node_Str\", bank.getName(), type);\n cert = ne...
"public void testPersistErrors() throws ServiceException {\n List<CommonErrorData> errorsToStore = createTestCommonErrorDataList(1);\n String serverName = \"String_Node_Str\";\n String srvcAdminName = \"String_Node_Str\";\n String opName = \"String_Node_Str\";\n boolean serverSide = true;\n String con...
"public void dispose() {\n if (this.library != null) {\n this.library.close();\n this.library = null;\n }\n if (this.childrenList != null) {\n for (Iterator iterator = this.childrenList.iterator(); iterator.hasNext(); ) {\n ResourceEntry entry = (ResourceEntry) iterator.next();\...
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.reader_activity_comment_list);\n Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\n if (toolbar != null) {\n setSupportActionBar(toolbar);\n toolbar.setNavigationOnClickLis...
"private static void buildVertexShaderMain(StringBuilder mb, GLSLInfo info) {\n appendln(mb, \"String_Node_Str\");\n appendln(mb, \"String_Node_Str\");\n appendln(mb);\n appendln(mb, \"String_Node_Str\");\n if (info.hasVertexNormals() && info.getShading() != Shading.NONE) {\n appendln(mb, \"String...
"private void setParallelization(INode node) {\n if (node.isActivate()) {\n if (node.getOutgoingConnections().size() > 0) {\n for (IConnection con : node.getOutgoingConnections()) {\n EConnectionType lineStyle = con.getLineStyle();\n if (lineStyle.hasConnectionCategory...
"protected void playAudio() {\n playMedia(\"String_Node_Str\");\n}\n"
"protected double decideTaxForReservePool() {\n double currentFoodReserve;\n if (getDataModel().getReservedFoodHistory().isEmpty()) {\n currentFoodReserve = 0;\n } else {\n currentFoodReserve = getDataModel().getCurrentReservedFood();\n }\n double tax = 0;\n double goalRatio = currentFoo...
"public static IndexedAIP solrDocumentToIndexedAIP(SolrDocument doc) {\n final String id = objectToString(doc.get(RodaConstants.INDEX_UUID), null);\n AIPState state = null;\n if (doc.containsKey(RodaConstants.STATE)) {\n state = AIPState.valueOf(objectToString(doc.get(RodaConstants.STATE), AIPState.getD...
"public Yytoken yylex() throws java.io.IOException, ParseException {\n int zzInput;\n int zzAction;\n int zzCurrentPosL;\n int zzMarkedPosL;\n int zzEndReadL = zzEndRead;\n char[] zzBufferL = zzBuffer;\n char[] zzCMapL = ZZ_CMAP;\n int[] zzTransL = ZZ_TRANS;\n int[] zzRowMapL = ZZ_ROWMAP;\n ...
"public void updateAdjacencies() {\n int OFFSET_FUZZ = 20;\n int DISTANCE_FUZZ = 30;\n Cube cube = this.getCube();\n for (Cube otherCube : Emulator.getCubes()) {\n if (otherCube != cube) {\n CubePanel panel = this;\n CubePanel otherPanel = otherCube.getPanel();\n if (...
"public static void generateStudentsDataForCourse(String courseName) {\n long numOfStudent = getDeviatedNumberOfStudentInCourse();\n Set<Integer> studentIndexs = new HashSet<Integer>();\n while (studentIndexs.size() < numOfStudent) {\n studentIndexs.add(random.nextInt(NUM_OF_STUDENTS));\n }\n Arra...
"public boolean addService(BluetoothGattService service) {\n if (DBG)\n Log.d(TAG, \"String_Node_Str\" + service.getUuid());\n if (mService == null || mServerIf == 0)\n return false;\n mServices.add(service);\n try {\n mService.beginServiceDeclaration(mServerIf, service.getType(), servi...
"public void setCustomDocument(Document customDocument) {\n try {\n XWikiDocument document = (XWikiDocument) FieldUtils.readField(customDocument, \"String_Node_Str\", true);\n getWrapped().setCustomDocument(document);\n } catch (IllegalAccessException e) {\n }\n}\n"
"private BlueprintBase load(final BlueprintId id) {\n File blueprintFile = new File(blueprintFolder, String.format(Locale.ENGLISH, \"String_Node_Str\" + fileExt, id.toString()));\n if (blueprintFile.exists()) {\n try {\n FileInputStream f = new FileInputStream(blueprintFile);\n byte[]...
"public String getFact(String factKey) {\n String result = consumer.getFact(factKey);\n if (result == null) {\n throw new MissingFactException(consumer.getUuid(), factKey);\n }\n return result;\n}\n"
"public void handleViewException(RuntimeException exception, final AGLView glEventListener) {\n Logger.log(new Status(IStatus.ERROR, this.toString(), \"String_Node_Str\" + exception.getMessage(), exception));\n GeneralManager.get().getViewManager().unregisterGLCanvas(glEventListener.getParentGLCanvas());\n Pla...
"public void computeTile(Band targetBand, Tile targetTile, ProgressMonitor pm) throws OperatorException {\n final Rectangle targetTileRectangle = targetTile.getRectangle();\n final int x0 = targetTileRectangle.x;\n final int y0 = targetTileRectangle.y;\n final int w = targetTileRectangle.width;\n final i...
"private void readSheets() throws IOException {\n comboSheet.removeAll();\n try {\n try {\n if (stream != null)\n stream.close();\n } catch (Exception e) {\n }\n stream = new FileInputStream(comboLocation.getText());\n workbook = WorkbookFactory.create(...
"public void clean() {\n Iterator<LinkedList<CreeperExplosion>> iter = map.values().iterator();\n while (iter.hasNext()) {\n LinkedList<CreeperExplosion> list = iter.next();\n Iterator<CreeperExplosion> it = list.iterator();\n while (it.hasNext()) {\n CreeperExplosion e = it.next()...
"public boolean resubmitTask(String path, Task task, ResubmitDirective directive) {\n if (task.status != IN_PROGRESS) {\n return false;\n }\n int version;\n if (directive != FORCE) {\n final long time = EnvironmentEdgeManager.currentTime() - task.last_update;\n final boolean alive = det...
"private synchronized Connection doConnect(String driverClass, String url, String jndiNameUrl, Properties connectionProperties, Collection<String> driverClassPath) throws SQLException, OdaException {\n assert (url != null);\n IConnectionFactory factory = getDriverConnectionFactory(driverClass);\n if (factory !...
"public void onBound(IOpenPgpService service) {\n getSignKeyId(new Intent());\n}\n"
"public void orbitInterpolation(List<S1Metadata.OrbitStatePosVelox> vpList, double zeroDopplerTimeFirstLineSeconds, double zeroDopplerTimeLastLineSeconds, double samplingf, double iSafetyBufferAz) throws MathException {\n this.iSafetyBufferAz = iSafetyBufferAz;\n double deltaT = 1 / samplingf;\n double deltaTi...
"void removeMap(String name) {\n MVMap<?, ?> map = maps.remove(name);\n mapsChanged.remove(map.getId());\n}\n"
"public void run() {\n List<Long> currentQueries;\n try {\n currentQueries = blurConnection.queryStatusIdList(tableName);\n } catch (Exception e) {\n log.error(\"String_Node_Str\" + tableName + \"String_Node_Str\", e);\n return;\n }\n for (Long queryUUID : currentQueries) {\n ...
"public Block getBlockFor(BlockUri blockUri) {\n if (block == null && getURI().equals(blockUri.getFamilyUri())) {\n try {\n Side side = Side.valueOf(blockUri.getIdentifier().toString().toUpperCase(Locale.ENGLISH));\n return blocks.get(side);\n } catch (IllegalArgumentException e) ...
"protected double tTest(double m1, double m2, double v1, double v2, double n1, double n2) throws MathException {\n double t = Math.abs(t(m1, m2, v1, v2, n1, n2));\n double degreesOfFreedom = 0;\n degreesOfFreedom = df(v1, v2, n1, n2);\n distribution.setDegreesOfFreedom(degreesOfFreedom);\n return 2.0 * d...
"public static void ZipfianTests(int N, int repeat, String path, int distribution) {\n DecimalFormat df = new DecimalFormat(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n ZipfianDistribution zpf = new ZipfianDistribution();\n uniform = new Unif...
"public byte[] binary(final InputStream content) throws DeserializerException {\n ByteArrayOutputStream result = new ByteArrayOutputStream();\n byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];\n int count;\n try {\n while ((count = content.read(buffer)) > -1) {\n result.write(buffer, 0, coun...
"public void testNewContextGeneratedWithResolverReturned() {\n final SDOHelperContext foo = new SDOHelperContext(\"String_Node_Str\");\n SDOHelperContext.setHelperContextResolver((id, classLoader) -> foo);\n SDOHelperContext hc = (SDOHelperContext) SDOHelperContext.getHelperContext(\"String_Node_Str\");\n a...
"public final Status append(AvroFlumeEvent event) {\n MetricsHelper helper = new MetricsHelper(this.getClass(), this.metrics, this.collector.getMetricsQualifier(), \"String_Node_Str\");\n LOG.trace(\"String_Node_Str\" + event);\n if (!collector.getAuthenticator().authenticateRequest(event)) {\n LOG.debu...
"private void export() {\n TreeItem treeItem;\n ContainerInfo cinfo = new ContainerInfo();\n if (itemSelected instanceof TreeItem) {\n treeItem = (TreeItem) itemSelected;\n } else {\n treeItem = getTreeItemByTableItem((TableItem) itemSelected);\n }\n parseContainer(treeItem, cinfo);\n ...
"private void updateUI() {\n if (mVisitsData == null) {\n setupNoResultsUI(false);\n return;\n }\n if (mVisitsData instanceof VolleyError) {\n setupNoResultsUI(false);\n return;\n }\n final VisitModel[] dataToShowOnGraph = getDataToShowOnGraph((VisitsModel) mVisitsData);\n ...
"public void throwJSException(JSException exception) throws JSException {\n if (exceptionHandler == null) {\n throw exception;\n } else {\n IJSExceptionHandler temp = exceptionHandler;\n exceptionHandler = null;\n temp.handle(exception);\n exceptionHandler = temp;\n }\n}\n"
"public void endElement(XPathFragment pathFragment, NamespaceResolver namespaceResolver) {\n if (isStartElementOpen) {\n openAndCloseStartElement();\n isStartElementOpen = false;\n }\n String namespaceURI = pathFragment.getNamespaceURI();\n String prefix = pathFragment.getPrefix();\n if (nu...
"public boolean isReady(StringBuilder message) {\n message.setLength(0);\n if (this.inputVariables.isEmpty()) {\n message.append(\"String_Node_Str\");\n }\n for (int i = 0; i < this.inputVariables.size(); ++i) {\n InputVariable inputVariable = this.inputVariables.get(i);\n if (inputVari...
"public boolean replaceEvent(GameEvent event, Game game) {\n boolean caught = false;\n HashMap<UUID, HashSet<UUID>> consumed = new HashMap<UUID, HashSet<UUID>>();\n do {\n HashMap<ReplacementEffect, HashSet<Ability>> rEffects = getApplicableReplacementEffects(event, game);\n for (Iterator<Replace...
"public Object call() throws Exception {\n final TopicService service = getService();\n final ClientEngine clientEngine = getClientEngine();\n final ClientEndpoint endpoint = getEndpoint();\n MessageListener listener = new MessageListener() {\n public void onMessage(Message message) {\n if...
"private void extractIndexTerm() throws SAXException {\n final int topicNum = topicList.size();\n final int ditamapNum = ditamapList.size();\n FileInputStream inputStream = null;\n XMLReader xmlReader = null;\n final IndexTermReader handler = new IndexTermReader(indexTermCollection);\n handler.setLogg...
"void linkHeldItemLocationForLocalPlayer(EntityRef character, EntityRef newItem, EntityRef oldItem) {\n if (character.equals(localPlayer.getCharacterEntity()) && !newItem.equals(oldItem)) {\n EntityRef camera = localPlayer.getCameraEntity();\n FirstPersonHeldItemMountPointComponent mountPointComponent ...
"public void removeChangeListener() {\n Object children = ChildrenGetter.getAsRealType(getComponent());\n EventTarget component = getComponent();\n if (component instanceof Node) {\n Node node = (Node) component;\n node.visibleProperty().removeListener(VisibleChangeHandler.INSTACE);\n node...
"public String getUniverse() {\n if (getServerRoot() != null)\n return getServerRoot().getUser().getUniverse();\n return null;\n}\n"
"public void fire() throws IllegalActionException {\n super.fire();\n String line = null;\n _exec();\n if ((input.numberOfSources() > 0) && input.hasToken(0)) {\n if ((line = ((StringToken) input.get(0)).stringValue()) != null) {\n if (_debugging) {\n _debug(\"String_Node_St...
"private void loadAllProjects() throws IOException {\n ResourceStore store = getStore();\n List<String> paths = store.collectResourceRecursively(ResourceStore.PROJECT_RESOURCE_ROOT, \"String_Node_Str\");\n logger.debug(\"String_Node_Str\" + store.getReadableResourcePath(ResourceStore.PROJECT_RESOURCE_ROOT));\n...
"public void postWindowOpen() {\n this.getWindowConfigurer().getWindow().getShell().setMaximized(true);\n super.postWindowOpen();\n ChangePerspectiveAction.getAction().switchTitle();\n ITDQRepositoryService tdqRepositoryService = (ITDQRepositoryService) org.talend.core.GlobalServiceRegister.getDefault().get...
"public void buildMovements() throws SlickException {\n MovementAnimationFactory animationFactory = new MovementAnimationFactory();\n Left left = new Left(animationFactory);\n Down down = new Down(animationFactory);\n Up up = new Up(animationFactory);\n Right right = new Right(animationFactory);\n def...
"protected void onFinishInflate() {\n super.onFinishInflate();\n if (sShowScrim) {\n mScrim = new ScrimView(mContext);\n addView(mScrim);\n }\n LayoutTransition transitions = getLayoutTransition();\n}\n"