content
stringlengths
40
137k
"private void btnRightActionPerformed(java.awt.event.ActionEvent evt) {\n this.selected = true;\n if (connectedDialog != null) {\n connectedDialog.removeDialog();\n connectedDialog = null;\n }\n if (mode == FeedbackMode.SELECT && (evt.getModifiers() & ActionEvent.CTRL_MASK) == ActionEvent.CTRL...
"public void postInitialize(AbstractSession session) throws DescriptorException {\n DatabaseMapping mapping = getReferenceDescriptor().getMappingForAttributeName(this.mappedBy);\n if (mapping instanceof XMLCompositeCollectionMapping) {\n XMLCompositeCollectionMapping oppositeMapping = (XMLCompositeCollecti...
"public List<T> getColumnSets(String catalogName, String schemaPattern, String tablePattern) throws SQLException {\n if (debug)\n incrementCount(catalogName, schemaPattern);\n List<T> tables = new ArrayList<T>();\n if (tablePattern == null) {\n addMatchingColumnSets(catalogName, schemaPattern, ta...
"public boolean finalizeDeployment(Commands cmds, VirtualMachineProfile<ConsoleProxyVO> profile, DeployDestination dest, ReservationContext context) {\n NicProfile controlNic = (NicProfile) profile.getParameter(VirtualMachineProfile.Param.ControlNic);\n CheckSshCommand check = new CheckSshCommand(profile.getInsta...
"private void waitForSuccessfulPing(final URL serviceUrl) throws InterruptedException, ExecutionException, TimeoutException {\n Tasks.waitFor(HttpURLConnection.HTTP_OK, new Callable<Integer>() {\n public Integer call() throws Exception {\n HttpURLConnection conn = (HttpURLConnection) serviceUrl.ope...
"public final DataSet populate(Object oResultSetDef, DataSet ds) throws ChartException {\n if (oResultSetDef instanceof IResultSetDataSet) {\n final IResultSetDataSet rsds = (IResultSetDataSet) oResultSetDef;\n final long lRowCount = rsds.getSize();\n if (lRowCount <= 0) {\n throw new...
"public void onSuccess(PullResponse pullResponse) {\n messageDispatcher.processReceivedMessages(pullResponse.getReceivedMessagesList());\n if (pullResponse.getReceivedMessagesCount() == 0) {\n executor.schedule(new Runnable() {\n public void run() {\n Duration newBackoff = backoff...
"public JsonNode migrate(final JsonNode input) throws SwaggerMigrationException {\n Objects.requireNonNull(input);\n final JsonNode node = input.path(\"String_Node_Str\");\n if (node.isMissingNode())\n return postMigrate(input);\n if (!node.isTextual())\n throw new SwaggerMigrationException(\"...
"public void enableModuleAndDependencies(Module module) {\n for (DependencyInfo info : module.getModuleInfo().getDependencies()) {\n Module dependency = getLatestModuleVersion(info.getId());\n if (info.getMaxVersion().compareTo(dependency.getVersion()) <= 0) {\n enableModuleAndDependencies(d...
"private void createAnnotations(SourceFile sourceFile) {\n AnnotationModelEvent event = new AnnotationModelEvent(this);\n clear(event);\n List<Line> lines = sourceFile.getLines();\n List<Long> tmp = new ArrayList<>();\n for (Line line : lines) {\n if (line.getCount() != 0) {\n tmp.add(l...
"public void runCoalescedRequest(long startIndex) throws Exception {\n fTrace = setupTrace(DIRECTORY + File.separator + TEST_STREAM);\n TmfSignalManager.register(this);\n TmfTestTriggerSignal signal = new TmfTestTriggerSignal(this, startIndex, false);\n TmfSignalManager.dispatchSignal(signal);\n request1...
"public void addGeneratedProfiles(String expId, String folderPath, String inputFileName, String metaData, String grVersion, String uploader, boolean isPrivate) throws SQLException, IOException {\n Experiment e = expMethods.getExperiment(expId);\n File profileFolder = new File(folderPath);\n if (!profileFolder....
"public boolean isInSlidingKeyInput() {\n if (mMiniKeyboard != null && mMiniKeyboardPopup.isShowing()) {\n return mMiniKeyboard.isInSlidingKeyInput();\n } else {\n return mPointerQueue.isInSlidingKeyInput();\n }\n}\n"
"public boolean apply(Game game, Ability source) {\n Permanent permanent = game.getPermanentEntering(source.getSourceId());\n int zccDiff = 0;\n if (permanent == null) {\n permanent = game.getPermanentEntering(source.getSourceId());\n }\n if (permanent != null) {\n Watcher watcher = game.ge...
"public void onscroll(Object pos, Object max) {\n if (Objects.isNull(pos) || Objects.isNull(max))\n return;\n Number position = (Number) pos;\n Number maximum = (Number) max;\n double currentY = (position.doubleValue() < 0) ? 0 : position.doubleValue();\n double ratio = (currentY * 100) / maximum....
"private void clearTempFile() {\n File tmpDir = new File(session.getTempDir());\n if (!tmpDir.exists() || !tmpDir.isDirectory()) {\n return;\n }\n File[] tmpFiles = tmpDir.listFiles();\n if (tmpFiles != null) {\n for (int i = 0; i < tmpFiles.length; i++) {\n if (!tmpFiles[i].dele...
"static Object wrap(Object object) {\n try {\n if (object == null) {\n return NULL;\n }\n if (object instanceof JSONObject || object instanceof JSONArray || object instanceof Byte || object instanceof Character || object instanceof Short || object instanceof Integer || object instance...
"public void update(TournamentView tournament) {\n if (tournament == null) {\n return;\n }\n if (!firstInitDone) {\n Component c = this.getParent();\n while (c != null && !(c instanceof TournamentPane)) {\n c = c.getParent();\n }\n if (c != null) {\n ((T...
"public void selectMenuItemByIndexpath(String indexPath) {\n int[] indexItems = MenuUtilBase.splitIndexPath(indexPath);\n checkPathLength(indexItems.length);\n try {\n final IMenuItemComponent item = navigateToMenuItem(getAndCheckMenu(), indexItems);\n checkIsNull(item);\n item.selectMenuI...
"private void setCurrentWorker(SwingWorker<?, ?> worker) {\n if (worker != null) {\n view.getProgressBar().setVisible(true);\n view.getProgressBar().setIndeterminate(true);\n view.getProgressBar().setValue(0);\n worker.addPropertyChangeListener(new PropertyChangeListener() {\n ...
"public void pinchDetected(GlimpsePinchGestureEvent event) {\n GlimpseAxisLayout1D layout = getAxisLayout(event.getTargetStack());\n if (layout == null)\n return;\n Axis1D targetAxis = layout.getAxis(event.getTargetStack());\n zoom(targetAxis, layout.isHorizontal(), event.getX(), event.getY(), event....
"public void putBlock(int x, int y, Block block) {\n if (0 <= x && x < WIDTH && 0 <= y && y < HEIGHT) {\n if (block.getItem().getInteract() != null) {\n interactable.add(new BlockEntry(x, y, block));\n ArrayList<Float> a = new ArrayList<Float>();\n for (int i = 0; i < monsters...
"private void drawPoints(Renderer renderer, RenderProps props, boolean selected) {\n Shading savedShading = renderer.setPointShading(props);\n renderer.setPointColoring(props, selected);\n switch(props.getPointStyle()) {\n case POINT:\n {\n int size = props.getPointSize();\n ...
"public void startPrussianFormationRound(OperatingRound_1835 or) {\n interruptedRound = or;\n String roundName;\n if (interruptedRound == null) {\n roundName = \"String_Node_Str\" + previousRound.getId();\n } else {\n roundName = \"String_Node_Str\" + or.getId() + \"String_Node_Str\" + getCurr...
"public boolean applies(GameEvent event, Ability source, Game game) {\n if (event.getPlayerId().equals(source.getControllerId())) {\n Player player = game.getPlayer(source.getControllerId());\n if (player != null) {\n return player.chooseUse(Outcome.Benefit, \"String_Node_Str\", game);\n ...
"protected Path decompressTile(int tileIndex, int level) throws IOException {\n Path tileFile = PathUtils.get(cacheDir, PathUtils.getFileNameWithoutExtension(imageFile).toLowerCase() + \"String_Node_Str\" + String.valueOf(tileIndex) + \"String_Node_Str\" + String.valueOf(level) + \"String_Node_Str\");\n if ((!Fil...
"public void apply(ProgramIR programIR) {\n assembly = new StringBuilder();\n assembly.append(\"String_Node_Str\");\n assembly.append(\"String_Node_Str\");\n assembly.append(\"String_Node_Str\");\n indent = \"String_Node_Str\";\n programIR.getFunctionMap().values().forEach(this::visit);\n assembly....
"public void run() {\n final List<TermModel> filteredTags = new ArrayList<>();\n if (TextUtils.isEmpty(text)) {\n filteredTags.addAll(allTags);\n } else {\n for (TermModel tag : allTags) {\n if (tag.getName().toLowerCase(Locale.getDefault()).contains(text.toLowerCase(Locale.getDefault(...
"private static int calcCritHit(BattlePlayer playerAttacker, BattlePlayer playerDefender) {\n Pokemon attacker = playerAttacker.getPokemon();\n Pokemon defender = playerDefender.getPokemon();\n int critMult = 1;\n if (defender.hasAbility(Ability.BATTLE_ARMOR)) {\n return critMult;\n }\n Random ...
"public void recordAllCountsWithTimes(final String[] names, final int[] counts, final long[] times) {\n for (int index = 0; index < names.length; index++) {\n String name = names[index];\n int count = counts[index];\n long now = times[index];\n recordCountWithTime(name, count, now);\n ...
"protected String buildExportZip(ProcessItem processItem, IProgressMonitor progressMonitor) throws ProcessorException {\n Map<ExportChoice, Object> exportChoiceMap = JobScriptsManagerFactory.getDefaultExportChoiceMap();\n exportChoiceMap.put(ExportChoice.needLauncher, false);\n exportChoiceMap.put(ExportChoice...
"public final boolean updateLatestQuotes(List<Security> securities, List<Exception> errors) {\n Map<String, List<Security>> symbol2security = securities.stream().filter(s -> s.getTickerSymbol() != null).collect(Collectors.groupingBy(s -> s.getTickerSymbol().toUpperCase(Locale.ROOT)));\n String symbolString = symb...
"void chooseModelFolder() {\n final ChooseDialog dlg = new ChooseDialog(DdlImporterUiI18n.CHOOSE_MODEL_FOLDER_DIALOG_TITLE, DdlImporterUiI18n.CHOOSE_MODEL_FOLDER_DIALOG_MSG, new ChooseDialogContentProvider() {\n public final IResource[] getChildren(final IContainer container) {\n final List<IResour...
"private void initFloatingLabel() {\n addTextChangedListener(new TextWatcher() {\n\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n }\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n }\n public...
"public void onResize(ResizeEvent event) {\n resizeGrid(contactHistoryGrid, container, true);\n}\n"
"public Set<Service> get(String type, String pool) {\n Preconditions.checkNotNull(type, \"String_Node_Str\");\n Preconditions.checkNotNull(pool, \"String_Node_Str\");\n return ImmutableSet.copyOf(filter(getAll(), and(matchesType(type), matchesPool(pool))));\n}\n"
"public void before() throws Exception {\n service = new ReportService();\n service.setReportDataDao(mockReportDataDao);\n service.setReportIndexDao(mockReportIndexDao);\n List<ReportData> list = Lists.newArrayList();\n list.add(createReport(LocalDate.parse(\"String_Node_Str\"), \"String_Node_Str\", \"St...
"private void copyLive(Chunk chunk, ArrayList<Chunk> old) {\n ByteBuffer buff = fileStore.readFully(chunk.start, chunk.length);\n Chunk.fromHeader(buff, chunk.start);\n int chunkLength = chunk.length;\n markMetaChanged();\n while (buff.position() < chunkLength) {\n int start = buff.position();\n ...
"private HitEnum buildHitEnum() throws IOException {\n HitEnum e = buildHitFindingHitEnum();\n e = new OverlapMergingHitEnumWrapper(e);\n if (getOption(OPTION_RETURN_DEBUG_GRAPH, FALSE)) {\n e = new GraphvizHitEnum(e);\n }\n return e;\n}\n"
"public void LabelChanged(ComponentEvent e) {\n AttributeEvent attre = (AttributeEvent) e.getData();\n if (attre.getSource() == null || attre.getValue() == null) {\n return;\n }\n String newLabel = (String) attre.getValue();\n String oldLabel = attre.getOldValue() != null ? (String) attre.getOldVa...
"public void setAttributes(final Set<Attribute> attributes) {\n ConfigurableApplicationContext context = ApplicationContextManager.getApplicationContext();\n XStream xStream = context.getBean(XStream.class);\n try {\n xmlAttributes = URLEncoder.encode(xStream.toXML(attributes), \"String_Node_Str\");\n ...
"public void invokeAllReadThroughEnabledGetOnNonExistentEntry() throws IOException {\n RecordingCacheLoader<Integer> recordingCacheLoader = new RecordingCacheLoader<>();\n try (CacheLoaderServer<Integer, Integer> cacheLoaderServer = new CacheLoaderServer<>(10000, recordingCacheLoader)) {\n cacheLoaderServe...
"private void makeActions() {\n chatAction = new Action() {\n public void run() {\n ID targetID = inputIMTarget();\n if (targetID != null)\n openChatWindowForTarget(targetID);\n }\n };\n chatAction.setText(\"String_Node_Str\");\n chatAction.setImageDescript...
"public void mousePressed(MouseEvent e) {\n if (PlatformManager.isLeftMouseButton(e)) {\n fileTable.requestFocus();\n } else if (PlatformManager.isRightMouseButton(e)) {\n AbstractFile currentFolder = getCurrentFolder();\n new TablePopupMenu(FolderPanel.this.mainFrame, currentFolder, null, fa...
"private boolean diveIteration(NetworkInventoryHandler<T> networkInventoryHandler) {\n if (getDepth().isEmpty()) {\n currentPass++;\n myPass = currentPass;\n } else {\n if (currentPass == myPass)\n return true;\n else\n myPass = currentPass;\n }\n cDepth.pus...
"public void setPermissions(List<String> permissions, String worldName) {\n if (worldName == null) {\n worldName = \"String_Node_Str\";\n }\n try (SQLConnection conn = backend.getSQL()) {\n conn.prepAndBind(\"String_Node_Str\", this.getIdentifier(), this.type.ordinal(), worldName).execute();\n ...
"public void metaContactGroupAdded(MetaContactGroupEvent evt) {\n MetaContactGroup sourceGroup = evt.getSourceMetaContactGroup();\n this.groupAdded(sourceGroup);\n this.ensureIndexIsVisible(0);\n}\n"
"public void placeInWorld(IBuilderContext context, BlockPos pos, List<ItemStack> stacks) {\n context.world().setBlockState(pos, Blocks.CACTUS.getDefaultState(), 3);\n}\n"
"public boolean onKeyUp(int keyCode, KeyEvent event) {\n if (!canHandleEvent())\n return false;\n if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) {\n select(GridViewSpecial.ORIGINAL_SELECT, false);\n mHandler.removeCallbacks(mLongPressCallback);\n if (mListener != null)\n mList...
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n mDialogIcon = getArguments().getInt(\"String_Node_Str\");\n mDialogTitle = getArguments().getString(\"String_Node_Str\");\n mDialogText = getArguments().getString(\"String_Node_Str\");\n mImageUrl = (URL) getArgume...
"public FileVisitResult visitFile(Path file, BasicFileAttributes attr) throws IOException {\n String filename = file.getFileName().toString();\n if (isResource(filename)) {\n paths.add(new PathSourcePath(filesystem, file));\n }\n return FileVisitResult.CONTINUE;\n}\n"
"private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {\n listeners.firePropertyChange(\"String_Node_Str\", \"String_Node_Str\", null);\n}\n"
"private void selectItem(int position) {\n currentSelectedPosition = position;\n if (drawerListView != null) {\n drawerListView.setItemChecked(position, true);\n }\n if (drawerLayout != null) {\n drawerLayout.closeDrawer(fragmentContainerView);\n }\n if (navigationDrawerCallbacks != null...
"public boolean connect(Properties props) {\n String url = props.getProperty(\"String_Node_Str\");\n String driver = props.getProperty(\"String_Node_Str\");\n try {\n if (connection != null) {\n connection.close();\n }\n if (driver.equals(\"String_Node_Str\")) {\n Uti...
"public void addContact(Contacts contacts) throws ContactAlreadyExistsException {\n if (contactsDao.findContactByLastNameAndFirstName(contacts.getLastName(), contacts.getFirstName()).size() > 0)\n throw new ContactAlreadyExistsException(contacts.getLastName());\n else\n contactsDao.addContact(contac...
"public void deleteObjectPhysical(Project project, IRepositoryViewObject objToDelete, String version, boolean fromEmptyRecycleBin) throws PersistenceException {\n if (\"String_Node_Str\".equals(version)) {\n version = null;\n }\n if (objToDelete.getRepositoryObjectType() == ERepositoryObjectType.PROCESS...
"public void drawHighlighted(Canvas c, Highlight[] indices) {\n for (int i = 0; i < indices.length; i++) {\n ScatterDataSet set = mChart.getScatterData().getDataSetByIndex(indices[i].getDataSetIndex());\n if (set == null || !set.isHighlightEnabled())\n continue;\n mHighlightPaint.setC...
"private static List<Cluster> populateClusterModels(Path clusterOutputPath, Configuration conf) throws IOException {\n List<Cluster> clusterModels = new ArrayList<Cluster>();\n Cluster cluster = null;\n Path finalClustersPath = finalClustersPath(conf, clusterOutputPath);\n Iterator<?> it = new SequenceFileD...
"public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) {\n TileEntity tile = world.getTileEntity(pos);\n if (tile instanceof TileFusionCraftingCore) {\n ((TileFusionCraftingCore) tile).updateInj...
"public void testImportStatic1() {\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\");\n GroovyCompilationUnitDeclaration gcud = getCUDeclFor(\"String_Node_Str\...
"private void setupUnitTypePager() {\n FragmentManager fm = getSupportFragmentManager();\n mUnitTypeViewPager = (ViewPager) findViewById(R.id.unit_pager);\n mUnitTypeViewPager.setAdapter(new FragmentStatePagerAdapter(fm) {\n public int getCount() {\n return mCalc.getUnitTypeSize();\n }...
"private Chart getConvertedChart(Chart currentChart, String sNewSubType, Orientation newOrientation, String sNewDimension) {\n Chart helperModel = currentChart.copyInstance();\n ChartCacheManager.getInstance().cacheSeries(ChartUIUtil.getAllOrthogonalSeriesDefinitions(helperModel));\n if ((currentChart instance...
"private void processLogicalBinaryOp(BinaryExprNode node) {\n if (node.getOp() == BinaryExprNode.BinaryOps.LOGIC_AND) {\n node.getLhs().setTrueBB(new BasicBlock(currentFunc, \"String_Node_Str\"));\n node.getLhs().setFalseBB(node.getFalseBB());\n node.getLhs().accept(this);\n currentBB = n...
"public void onTouchEvent(MotionEvent event) {\n switch(event.getActionMasked()) {\n case MotionEvent.ACTION_DOWN:\n mMinTouchOffset = mMaxTouchOffset = mTextView.getOffsetForPosition(eventX, eventY);\n if (mGestureStayedInTapRegion) {\n if (mDoubleTap) {\n ...
"public void testProviderPropertiesWithSQLLine() throws IOException {\n copyFromLocal(SIMPLE_PRODUCTS_TABLE);\n initCatalog();\n SchemaCatalog schemaCatalog = getSchemaCatalog();\n catalog(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_...
"public IStatus doAction() {\n try {\n ((XSDTreeContentProvider) page.getTreeViewer().getContentProvider()).getXSDSchemaAsString();\n XSDElementDeclaration decl = xsdElem;\n if (decl == null) {\n ISelection selection = page.getTreeViewer().getSelection();\n decl = (XSDEleme...
"private void getShiftAffactedEditPart(List toSelect, List deSelect) {\n if (lastSelectedShiftPart == null || lastSelectedShiftPart == getSourceEditPart()) {\n toSelect.add(getSourceEditPart());\n return;\n }\n if (lastSelectedShiftPart instanceof TreeNodeEditPart) {\n AbstractInOutTreeEdi...
"protected void onSaveInstanceState(Bundle icicle) {\n icicle.putBoolean(DO_LAUNCH_ICICLE, mDoLaunch);\n icicle.putString(TEMP_FILE_PATH_ICICLE, mTempFile.getAbsolutePath());\n}\n"
"private void handleAuthError(AccountStore.AuthenticationErrorType error, String errorMessage) {\n if (error != AccountStore.AuthenticationErrorType.NEEDS_2FA) {\n mLoginListener.track(AnalyticsTracker.Stat.LOGIN_FAILED, error.getClass().getSimpleName(), error.toString(), errorMessage);\n if (mIsSocial...
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (debug)\n Log.d(TAG, \"String_Node_Str\" + requestCode + \"String_Node_Str\" + resultCode);\n switch(requestCode) {\n case REQUEST_CODE_ASK_PASSWORD:\n if (resultCode == RESULT_OK) {\n sal...
"protected boolean doExecute() throws Exception {\n String categorie = \"String_Node_Str\";\n String accessQuery = \"String_Node_Str\";\n TalendDefinitionFileUpdate talendDefinitionFileUpdate = new TalendDefinitionFileUpdate();\n if (-1 == talendDefinitionFileUpdate.indexOf(accessQuery)) {\n talendDe...
"public boolean existsDatabase() {\n if (Files.exists(filepath) || db == null) {\n return true;\n }\n if (db.isClosed()) {\n return true;\n }\n if (db.getCatalog().size() > 0) {\n return true;\n }\n return false;\n}\n"
"public boolean isTransient() {\n return false;\n}\n"
"public void exportAllTransactions(File file, Client client) throws IOException {\n List<? extends Transaction> transactions = Stream.concat(client.getAccounts().stream(), client.getPortfolios().stream()).flatMap(l -> l.getTransactions().stream()).sorted(new Transaction.ByDate()).collect(Collectors.toList());\n t...
"public List<ComponentETagPair<Calendar>> getHiddenComponents() throws InvalidComponentException, DavException, InvalidMacException, GeneralSecurityException, IOException {\n List<ComponentETagPair<Calendar>> exposedComponentPairs = super.getComponents();\n List<ComponentETagPair<Calendar>> recoveredComponentPair...
"public static StateXWidgetPage getCurrentAtsWorkPage(AbstractWorkflowArtifact awa) {\n for (StateXWidgetPage statePage : getStatePagesOrderedByOrdinal(awa)) {\n if (awa.getStateMgr().getCurrentStateName().equals(statePage.getName())) {\n return statePage;\n }\n }\n return null;\n}\n"
"public HostResponse newHostResponse(HostJoinVO host, EnumSet<HostDetails> details) {\n HostResponse hostResponse = new HostResponse();\n hostResponse.setId(host.getUuid());\n hostResponse.setCapabilities(host.getCapabilities());\n hostResponse.setClusterId(host.getClusterUuid());\n hostResponse.setCpuNu...
"public short readShort(int byteIndex) {\n return view.getInt16(byteIndex, littleEndian);\n}\n"
"public static void updateLessonResource(Context context, Lesson lesson, String locale) throws IOException {\n File fileIdx = new File(lesson.mResourcePath);\n InputStream is = context.getAssets().open(\"String_Node_Str\" + locale);\n OutputStream os = new java.io.FileOutputStream(fileIdx);\n IOUtils.copy(i...
"public void mustFailToParsePacketThatsTooLong() throws Exception {\n ExternalAddressNatPmpResponse origResp = new ExternalAddressNatPmpResponse(1, 0xFFFFFFFFL, TEST_ADDRESS);\n byte[] buffer = origResp.dump();\n buffer = Arrays.copyOf(buffer, buffer.length + 1);\n ExternalAddressNatPmpRequest parsedReq = n...
"public void testFailXMLStreamReaderWithNullClass() throws Exception {\n try {\n InputStream stream = ClassLoader.getSystemResourceAsStream(DOUBLE_ERROR_XML);\n XMLStreamReader xmlStreamReader = XML_INPUT_FACTORY.createXMLStreamReader(stream);\n unmarshaller.unmarshal(xmlStreamReader, (Class) nu...
"public void testAddChild() throws OseeCoreException {\n when(container1.getRelation(node1, DEFAULT_HIERARCHY, node2, INCLUDE_DELETED)).thenReturn(null);\n when(container2.getRelation(node1, DEFAULT_HIERARCHY, node2, INCLUDE_DELETED)).thenReturn(null);\n when(relationFactory.createRelation(eq(node1), eq(DEFAUL...
"public void validate(UIValidationContext validator) {\n DirectoryResource folder = targetDirectory.getValue();\n if (folder == null || (folder.exists() && (!folder.isDirectory() || !folder.listResources().isEmpty()))) {\n validator.addValidationError(targetDirectory, \"String_Node_Str\");\n }\n}\n"
"public boolean apply(Game game, Ability source) {\n Player controller = game.getPlayer(source.getControllerId());\n if (controller != null) {\n Cards revealedCards = new CardsImpl();\n for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {\n if (!Objects.equa...
"public String processCode(String code) throws IllegalActionException {\n StringBuffer result = new StringBuffer();\n int currentPos = code.indexOf(\"String_Node_Str\");\n if (currentPos < 0) {\n return code;\n }\n result.append(code.substring(0, currentPos));\n while (currentPos < code.length(...
"private void setupMasterPage(MasterPageDesign page, MasterPageHandle handle) {\n setupStyledElement(page, handle);\n page.setPageType(handle.getPageType());\n DimensionValue effectWidth = handle.getPageWidth();\n DimensionValue effectHeight = handle.getPageHeight();\n DimensionType width = null;\n Di...
"private void fixDocumentURIPrefix() throws SBOLValidationException {\n String documentURIPrefixAll = extractDocumentURIPrefix();\n if (documentURIPrefixAll != null && documentURIPrefixAll.length() >= 9) {\n setDefaultURIprefix(documentURIPrefixAll);\n }\n String documentURIPrefix = documentURIPrefix...
"private String killInstance(AdminCommandContext context) {\n String msg = initializeInstance();\n if (msg != null)\n return msg;\n String nodeName = instance.getNodeRef();\n Node node = nodes.getNode(nodeName);\n NodeUtils nodeUtils = new NodeUtils(habitat, logger);\n ArrayList<String> command...
"public void executeTask(TaskPacket iTask) {\n if (!(iTask instanceof SimpleGuiTask)) {\n return;\n }\n SimpleGuiTask guiTask = (SimpleGuiTask) iTask;\n System.out.println(\"String_Node_Str\" + guiTask.getGuiAction());\n switch(guiTask.getGuiAction()) {\n case SET_WORK_AREA:\n {\...
"private void createButtons(Composite section) {\n Button refreshButton = new Button(section, SWT.PUSH);\n GridDataFactory.fillDefaults().grab(true, false).applyTo(refreshButton);\n refreshButton.setText(\"String_Node_Str\");\n refreshButton.addSelectionListener(new SelectionAdapter() {\n\n public vo...
"public int scheduleAsyncDelayedTask(Object plugin, Runnable task) {\n return scheduleAsyncRepeatingTaskInternal(plugin, task, 0, -1);\n}\n"
"public Where<ModelClass> and(SQLCondition condition) {\n conditionGroup.and(condition);\n return this;\n}\n"
"public void setByte(final int index, final byte value) throws IOException {\n setInteger(index, (int) value);\n}\n"
"public void satisfiesInvolves_validInput() {\n TurboUser user = new TurboUser(REPO, \"String_Node_Str\", \"String_Node_Str\");\n TurboIssue issue = new TurboIssue(REPO, 1, \"String_Node_Str\", \"String_Node_Str\", LocalDateTime.now(), true);\n issue.setAssignee(user);\n IModel model = TestUtils.modelWith(i...
"public final Stroke getCachedStroke(LineAttributes lia) {\n if (lia == null)\n return null;\n Stroke s = (Stroke) _htLineStyles.get(lia);\n if (s == null) {\n BasicStroke bs = null;\n if (lia.getStyle().getValue() == LineStyle.DASHED) {\n float[] faStyle = new float[] { 6.0f, 4...
"public void setKey(Comparable key) {\n ParamChecks.nullNotPermitted(key, \"String_Node_Str\");\n Comparable old = this.key;\n try {\n this.vetoableChangeSupport.fireVetoableChange(\"String_Node_Str\", old, key);\n this.key = key;\n this.propertyChangeSupport.firePropertyChange(\"String_No...
"static void putPrimitiveValue(Object lastObject, Value value, Field field) {\n checkNotNull(field);\n try {\n field.set(checkNotNull(lastObject), getValueObject(value, field));\n } catch (Exception ex) {\n throw new RuntimeException(ex);\n }\n}\n"
"public boolean sendToServerSingleRC(List<NameValuePair> qparams, String strAPIUrl) throws paloexception {\n try {\n HttpEntity entity = sendToServer(qparams, strAPIUrl);\n CSVReader csv = new CSVReader(entity.getContent(), \"String_Node_Str\", \"String_Node_Str\", ';', '\"', '\\\\', false, 0);\n ...
"public int read(byte[] buffer, int off, int len) throws IOException {\n int attempts = 0;\n for (; ; ) {\n if (checkCancellation())\n throw new OperationCanceledException();\n try {\n return in.read(buffer, off, len);\n } catch (InterruptedIOException e) {\n ...
"public boolean replaceEvent(GameEvent event, Ability source, Game game) {\n ManaCosts attackBlockManaTax = getManaCostToPay(event, source, game);\n if (attackBlockManaTax != null) {\n return handleManaCosts(attackBlockManaTax.copy(), event, source, game);\n }\n Cost attackBlockOtherTax = getOtherCos...