content
stringlengths
40
137k
"public void testGetItem() {\n try {\n handler.getItem(2003, ItemData.CONSUME_ON_FULL);\n } catch (RequestException ex) {\n System.out.println(\"String_Node_Str\");\n ex.printStackTrace();\n }\n}\n"
"protected static PartRevisionKey getPartRevisionKey(Map<String, Object> source) {\n return new PartRevisionKey(extractValue(source, WORKSPACE_ID_KEY), extractValue(source, PART_NUMBER_KEY), extractValue(source, VERSION_KEY));\n}\n"
"public void insert(K key, V value) {\n if (value == null)\n treeList.tree.put(key, nullValue);\n else\n treeList.tree.put(key, value);\n}\n"
"public boolean delete(Profile profile) throws PersistenceException {\n LOGGER.debug(\"String_Node_Str\" + profile);\n if (profile == null)\n throw new IllegalArgumentException(\"String_Node_Str\");\n ResultSet rs;\n String sqlString;\n PreparedStatement stmt = null;\n try {\n stmt = thi...
"protected List<PermissionGroup> getWorldParents(String worldName) {\n List<PermissionGroup> groups = new LinkedList<>();\n for (String groupName : getData().getParents(worldName)) {\n if (groupName == null || groupName.trim().isEmpty() || (this instanceof PermissionGroup && groupName.equalsIgnoreCase(this...
"protected TreeContext generate(Reader source) throws IOException {\n XMLInputFactory fact = XMLInputFactory.newInstance();\n TreeContext context = new TreeContext();\n try {\n ArrayDeque<ITree> trees = new ArrayDeque<>();\n XMLEventReader r = fact.createXMLEventReader(source);\n while (r....
"public boolean equals(Object obj) {\n if (this == obj) {\n return true;\n if (obj == null)\n return false;\n if (getClass() != obj.getClass())\n return false;\n RangeConstraint other = (RangeConstraint) obj;\n if (after == null) {\n if (other.after != null)\n retur...
"public boolean performFinish() {\n closeOpenEditors();\n if (zipBtn.getSelection()) {\n zipfile = zip.getText().getText();\n try {\n ZipToFile.unZipFile(getZipFilePath(), importFolder);\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n }\n }\n if ...
"public void mouseUp(MouseEvent e) {\n txtClassifyOutput.setText(\"String_Node_Str\");\n FileDialog fd = new FileDialog(shell, SWT.SAVE);\n fd.open();\n String oFile = fd.getFileName();\n String dir = fd.getFilterPath();\n txtClassifyOutput.setText(dir + System.getProperty(\"String_Node_Str\") + oFile...
"public void onStart() {\n super.onStart();\n mDrawerListView.setOnItemClickListener(this);\n int position = -1;\n if (mDrawerListItems.size() > 0) {\n if (!mDrawerListItems.get(0).isGroupTitle()) {\n mDrawerListView.setItemChecked(0, true);\n position = 0;\n } else {\n ...
"public Set<Description> refine(Description description, int maxLength, List<Description> knownRefinements, Description currDomain) {\n if (!(currDomain instanceof Thing) && !topARefinementsLength.containsKey(currDomain))\n topARefinementsLength.put((NamedClass) currDomain, 0);\n Set<Description> refinemen...
"public void gotSource(String streamId, Node source) {\n synchronized (this) {\n if (!wantSources.contains(streamId))\n return;\n }\n if (source.getId().equals(mina.getMyNodeId().toString()))\n return;\n ControlConnection cc = mina.getCCM().getCCWithId(source.getId());\n if (cc !...
"public void testLocateWithAction() throws Exception {\n useMethod(\"String_Node_Str\");\n assertEquals(\"String_Node_Str\", locate(event(\"String_Node_Str\", \"String_Node_Str\")).getNavigationCase().to());\n assertEquals(\"String_Node_Str\", locate(event(\"String_Node_Str\", \"String_Node_Str\")).getNavigati...
"protected void addDependencies(Model model) {\n Set<ModuleNeeded> runningModules = getDependenciesModules();\n if (runningModules != null) {\n List<Dependency> existedDependencies = model.getDependencies();\n if (existedDependencies == null) {\n existedDependencies = new ArrayList<Depend...
"private boolean dropVarsEntryIsValid(TableItem tableItemTarget) {\n Table table = tableItemTarget.getParent();\n TableItem[] tableItems = table.getItems();\n for (TableItem tableItem : tableItems) {\n if (tableItemTarget == tableItem) {\n break;\n }\n if (tableItemSource == tab...
"private void processInsn(int opcode) {\n switch(opcode) {\n case DUP:\n {\n this.ensureStack(this.stackIndex + 2);\n this.stack[this.stackIndex + 1] = this.stack[this.stackIndex];\n this.stackIndex++;\n return;\n }\n cas...
"protected String getRuleName(AbstractElement element) {\n if (nameMappings == null) {\n nameMappings = new HashMap<AbstractElement, String>() {\n private static final long serialVersionUID = 1L;\n {\n put(grammarAccess.getKClassModelAccess().getAlternatives_1_1(), \"Strin...
"public void actionPerformed(ActionEvent e) {\n if (e.getID() == 0) {\n try {\n subConfig.setProperty(FolderWatchConstants.CONFIG_KEY_ENABLED, toggleAction.isSelected());\n subConfig.save();\n } catch (Exception ex) {\n JDLogger.exception(ex);\n }\n startW...
"public IMessage onMessage(PacketGetTransmitters message, MessageContext ctx) {\n FMLCommonHandler.instance().getWorldThread(ctx.netHandler).addScheduledTask(() -> handle(message, ctx));\n return null;\n}\n"
"public String postUpload(String uuid, String filename) {\n UploadEntity uploadEntity = uploadEntityStateMap.get(uuid);\n int installTimeoutPerGig = 180 * 60 * 1000;\n String resourcePath = uploadEntity.getInstallPathPrefix();\n String finalResourcePath = uploadEntity.getTmpltPath();\n UploadEntity.Resou...
"public PositiveBooleanExpression MkOr(PositiveBooleanExpression phi, PositiveBooleanExpression psi) {\n if (phi instanceof PositiveTrue || psi instanceof PositiveTrue) {\n return True();\n } else if (phi instanceof PositiveFalse) {\n return psi;\n } else if (psi instanceof PositiveFalse) {\n ...
"public Result resetPassword() throws Exception {\n PasswordReset passwordReset = PasswordReset.fromJson(requestToJSON(request()));\n authenticationService.resetPassword(passwordReset);\n return okResult(\"String_Node_Str\");\n}\n"
"public void execute(Event<UIEditUserProfileForm> event) throws Exception {\n UIEditUserProfileForm editUserProfile = event.getSource();\n String objectId = event.getRequestContext().getRequestParameter(OBJECTID);\n editUserProfile.removeChildById(objectId);\n editUserProfile.experiens.remove(objectId);\n ...
"public void preOrderTraversal(FnO1ToVoid<NaryTree> function) {\n function.call(this);\n if (children != null) {\n for (NaryTree child : children) {\n child.preOrderTraversal(function);\n }\n }\n}\n"
"public void executionStateChanged(final JobID jobID, final ExecutionVertexID id, final ExecutionState newExecutionState, final String optionalDescription) {\n if (newExecutionState == ExecutionState.CANCELING) {\n return;\n }\n if (newExecutionState == ExecutionState.FINISHED || newExecutionState == Ex...
"private static void runSearch(SearchCommand searchCommand) {\n LOGGER.info(\"String_Node_Str\");\n String indexDirectory = searchCommand.getIndexDir(commandLine);\n String queryLine = searchCommand.getQuery(commandLine);\n List<String> cliFields = searchCommand.getFields(commandLine);\n System.out.print...
"public org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterBindingComponent convertOperationDefinitionParameterBindingComponent(org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterBindingComponent src) throws FHIRException {\n if (src == null || src.isEmpty())\n retu...
"public void onSharedPreferenceChanged(SharedPreferences sp, String key) {\n Log.d(TAG, \"String_Node_Str\");\n mFirstAppVersionInstalled = sp.getInt(mContext.getString(R.string.settings_key_first_app_version_installed), 0);\n mFirstTimeAppInstalled = sp.getLong(mContext.getString(R.string.settings_key_first_t...
"public ConnectionStatus testConnection(IMetadataConnection metadataConnection) {\n classLoader = HBaseClassLoaderFactory.getClassLoader(metadataConnection);\n ConnectionStatus connectionStatus = new ConnectionStatus();\n connectionStatus.setResult(false);\n ClassLoader oldClassLoaderLoader = Thread.current...
"public void onItemTooltip(ItemTooltipEvent event) {\n if (event.getEntityPlayer() != null && event.getEntityPlayer().worldObj != null && event.getItemStack() != null) {\n final KeyBinding keyBindSneak = Minecraft.getMinecraft().gameSettings.keyBindSneak;\n final boolean isShifting = GameSettings.isKey...
"protected XMLDescriptor findReferenceDescriptor(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, Attributes atts, DatabaseMapping mapping, UnmarshalKeepAsElementPolicy policy) {\n XMLDescriptor referenceDescriptor = super.findReferenceDescriptor(xPathFragment, unmarshalRecord, atts, mapping, policy);\n...
"protected Object doMainTask(TaskMonitor monitor, ObjectRepository repository) {\n Object result = null;\n String arffFile, outputFile;\n FileStream fStream;\n for (int i = 0; i < this.numStreamsOption.getValue(); i++) {\n this.task = (Task) ((MOAObject) taskBase).copy();\n result = this.task....
"public static Block getWaterSourceBlock(Player player, double range, ClickType clickType, boolean allowWater, boolean allowIce, boolean allowPlant, boolean allowSnow, boolean allowWaterBottles) {\n Block sourceBlock = null;\n if (allowWaterBottles) {\n sourceBlock = WaterAbility.getWaterSourceBlock(player...
"public String toValueString() {\n StringBuilder result = new StringBuilder();\n for (final Map.Entry<String, String> entry : applied.entrySet()) {\n if (result.length() > 0) {\n result.append(',').append(' ');\n }\n result.append(name);\n if (applied.get(name) != null) {\n ...
"public Object pop() throws IOException {\n if (popBuffer == null) {\n initPop();\n }\n if (popBufferSize == 0) {\n return null;\n }\n ValueIndex reObj = popBuffer[0];\n Object reValue = reObj.value;\n Object readValue = readNext(reObj.index);\n if (readValue == null) {\n po...
"private ApplicationHttpRequest wrapRequest(State state) {\n ServletRequest previous = null;\n ServletRequest current = state.outerRequest;\n while (current != null) {\n if (\"String_Node_Str\".equals(current.getClass().getName())) {\n break;\n }\n if (!(current instanceof Servl...
"protected static void convertMappingToXMLChoiceMapping(ClassDescriptor jaxbDescriptor, DatabaseMapping jpaMapping, ClassLoader cl) {\n if ((jpaMapping != null) && (jaxbDescriptor != null)) {\n DatabaseMapping jaxbMapping = jaxbDescriptor.getMappingForAttributeName(jpaMapping.getAttributeName());\n if ...
"private static StrippedGeometry stripGeometry(final MultiDimensionalNumericData query, final NumericDimensionField<?>[] dimensionDefinitions) {\n final Set<ByteArrayId> geometryFieldIds = new HashSet<ByteArrayId>();\n final List<NumericData> numericDataPerDimension = new ArrayList<NumericData>();\n final List...
"public T next() {\n T result = iterator.next();\n atStart = false;\n return result;\n}\n"
"private void enableSlidingUpPanel(Drone drone) {\n if (mSlidingPanel == null) {\n return;\n }\n final boolean isEnabled = flightActions != null && flightActions.isSlidingUpPanelEnabled(drone);\n if (isEnabled) {\n mSlidingPanel.setSlidingEnabled(true);\n } else {\n if (!mSlidingPane...
"public void onResume() {\n super.onResume();\n if (mCalc.toString().equals(\"String_Node_Str\") && mCalc.getPrevExpressions().size() == 0)\n mDisplay.setText(R.string.app_name);\n else\n updateScreenWithInstaScrollOption(true, true);\n}\n"
"private void loadSkipMers(String file) throws Exception {\n BufferedReader bf = Utils.getFile(file, \"String_Node_Str\");\n String line = null;\n while ((line = bf.readLine()) != null) {\n String[] split = line.trim().split(\"String_Node_Str\");\n String mer = split[0].trim();\n int count...
"public SUserChanged convertToSObject(UserChanged input) {\n if (input == null) {\n return null;\n }\n SVersion result = new SVersion();\n result.setOid(input.getOid());\n result.setDate(input.getDate());\n result.setAccessMethod(SAccessMethod.values()[input.getAccessMethod().ordinal()]);\n ...
"private Statement createSyntheticAfterImports() {\n ASTNode target = null;\n Statement synthetic = ReturnStatement.RETURN_NULL_OR_VOID;\n ASTNode target = null;\n if (output.getImports() != null && !output.getImports().isEmpty()) {\n target = output.getImports().get(output.getImports().size() - 1);\...
"public void onPlayerUseItemEvent(PlayerInteractEvent event) {\n if (event.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) {\n if (event.world.getBlock(event.x, event.y, event.z) == Blocks.farmland) {\n if (event.entityPlayer.getCurrentEquippedItem() != null && event.entityPlayer.getCurrent...
"private void readHeader(DataInputStream stream) throws IOException {\n int headerLength = readInt(stream, bigEndian);\n if ((headerLength != DARPA_TG_HEADER.length() + 1) && (headerLength != DARPA_QG_HEADER.length() + 1) && (headerLength != DARPA_NG_HEADER.length() - 1)) {\n headerLength = Utilities.swapI...
"public SequenceDescriptor getSequenceDescriptor(SchemaDescriptor sd, String sequenceName) throws StandardException {\n DataValueDescriptor schemaIDOrderable;\n DataValueDescriptor sequenceNameOrderable;\n TabInfoImpl ti = getNonCoreTI(SYSSEQUENCES_CATALOG_NUM);\n sequenceNameOrderable = new SQLVarchar(sequ...
"public static VmSchema getVmSchema(ClusterCreate spec, String nodeGroup, List<DiskSpec> diskSet, String templateVmId, String templateVmSnapId) {\n NodeGroupCreate groupSpec = spec.getNodeGroup(nodeGroup);\n VmSchema schema = new VmSchema();\n ResourceSchema resourceSchema = new ResourceSchema();\n resource...
"public boolean canInsertItem(int slot, ItemStack stack, int side) {\n int[] accessibleSlots = getAccessibleSlotsFromSide(side);\n boolean isAccessibleSlot = false;\n for (int i = 0; i < accessibleSlots.length; i++) {\n if (accessibleSlots[i] == slot)\n isAccessibleSlot = true;\n }\n re...
"private void reportWeavingMessage(ShadowMunger munger) {\n Advice advice = (Advice) munger;\n AdviceKind aKind = advice.getKind();\n if (aKind == null || advice.getConcreteAspect() == null) {\n return;\n }\n if (!(aKind.equals(AdviceKind.Before) || aKind.equals(AdviceKind.After) || aKind.equals(A...
"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 ...
"double normalize(double x, int p){\n\tif (p == 1){\n\t\tdouble v = Math.max(x, min);\n\t\tx = (v - min) / (max - min);\n\t\treturn x;\n\t} else if (p == 2) {\n\t\tdouble v = Math.max(x, min);\n\t\tx = Math.pow((v - min), 2) / Math.pow((max - min), 2);\n\t\treturn x;\n\t}\n}\n"
"public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay) {\n CodeSystem cs = fetchCodeSystem(theContext, theCodeSystem);\n if (cs != null) {\n CodeValidationResult retVal = testIfConceptIsInList(theCode, cs.getConcept());\n if (retVal...
"private void doCommandAnalyse() throws IOException {\n if (featureDir == null)\n throw new RuntimeException(\"String_Node_Str\");\n if (maxentModelFilePath == null)\n throw new RuntimeException(\"String_Node_Str\");\n if (outfilePath == null)\n throw new RuntimeException(\"String_Node_Str...
"private String createDigestResponse(byte[] challenge) throws SaslException {\n char[] response;\n StringBuffer digestResponse = new StringBuffer(512);\n int realmSize;\n m_dc = new DigestChallenge(challenge);\n m_digestURI = m_protocol + \"String_Node_Str\" + m_serverName;\n if ((m_dc.getQop() & Dige...
"boolean isValid(RangerPolicy policy, Action action, boolean isAdmin, List<ValidationFailureDetails> failures) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(String.format(\"String_Node_Str\", policy, action, isAdmin, failures));\n }\n if (!(action == Action.CREATE || action == Action.UPDATE)) {\n t...
"public static float[] getCoeffs(float[] sourceCoords, int sourceOffset, float[] destCoords, int destOffset, int numCoords, float preScaleX, float preScaleY, float postScaleX, float postScaleY, int degree) {\n int i, j, k;\n int equations = numCoords / 2;\n int unknowns = (degree + 1) * (degree + 2) / 2;\n ...
"private ScopDomain getScopDomain(String scopId) {\n if (scopInstallation == null) {\n scopInstallation = ScopFactory.getSCOP();\n }\n return scopInstallation.getDomainByScopID(scopId);\n}\n"
"private static long parseLong0(CharSequence sequence, final int p, int lim) throws NumericException {\n if (lim == p) {\n throw NumericException.INSTANCE;\n }\n boolean negative = sequence.charAt(p) == '-';\n int i = p;\n if (negative) {\n i++;\n }\n if (i >= lim) {\n throw Nu...
"public void post() throws Exception {\n ClientDispatcher myClient = new ClientDispatcher();\n TransportImpl myTransport = new TransportImpl(null);\n myClient.init(myTransport);\n FailureDetector myFd = _tport1.getFD();\n FDUtil.ensureFD(myFd);\n ByteBuffer myBuffer = ByteBuffer.allocate(4);\n myBu...
"public static void removeStarColors(Item fireworkStar, DyeColor... colors) {\n if (fireworkStar == null || fireworkStar.getType() != ItemType.FireworkStar) {\n return;\n }\n if (colors == null || colors.length < 1) {\n return;\n }\n if (verifyTags(fireworkStar, \"String_Node_Str\", COMPOUN...
"public void write(DataOutput out) throws IOException {\n new BooleanWritable(null != context.getXUpdated()).write(out);\n if (null != context.getXUpdated()) {\n writer.set(context.getXUpdated());\n writer.write(out);\n }\n new BooleanWritable(null != context.getUInitial()).write(out);\n if...
"public void enable() {\n GridComponentPattern grid = getGrid();\n for (ViewGridColumnModuleColumnModel columnModel : columns) {\n grid.addColumn(columnModel.getName(), columnModel.getFields(), columnModel.getExpression(), columnModel.getLink(), columnModel.getWidth(), columnModel.getOrderable(), columnMod...
"public void retire(BigInteger id, Integer retire) {\n Project project = getNotNullById(id);\n Config config = configService.getConfigByTokenName(project.getTokenName());\n Boolean canRetire = project.getStatus().equals(2) && project.getRetire().equals(0) && config.getWithdrawStatus().equals(0);\n Assert.is...
"public Token getToken() throws IllegalActionException {\n Token token = super.getToken();\n if (token != _token) {\n Iterator attributes = attributeList(UnitCategory.class).iterator();\n if (attributes.hasNext()) {\n UnitCategory category = (UnitCategory) attributes.next();\n ...
"private int throwError() {\n throw new IllegalArgumentException();\n}\n"
"public boolean loadUpdates(Startup startupOutput) {\n String notes = null;\n try {\n startupOutput.setStatus(\"String_Node_Str\");\n PatchNotesDownloader notesDownloader = new PatchNotesDownloader(getPatchNotesLink());\n notesDownloader.downloadVersionNotes(programVersion);\n notes = ...
"public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((fFile == null) ? 0 : fFile.getLocation().hashCode());\n result = prime * result + ((fTrace == null) ? 0 : fTrace.getName().hashCode());\n return result;\n}\n"
"private String parseAggregate(String expr) {\n int i = expr.indexOf(\"String_Node_Str\");\n if (aggregateParts.length >= 2 && i >= 0) {\n String aggregate = expr.substring(0, i);\n if (aggregate.length() == 0) {\n aggregateFunction = null;\n aggregateField = null;\n } e...
"public void testGetOutputFileURI() throws Exception {\n PayloadFilesManager.Temp instance = new PayloadFilesManager.Temp(Logger.getAnonymousLogger());\n try {\n String originalPath = \"String_Node_Str\";\n Part testPart = PayloadImpl.Part.newInstance(\"String_Node_Str\", originalPath, null, \"Strin...
"public void chooseComparator(int column, boolean ascending) {\n Comparator selected;\n String sortedHeader = listTable.getTableFormat().getFieldName(column);\n if (comparators[column].size() > 0) {\n int comparatorIndex = columnClicks[column] % comparators[column].size();\n sortedHeader = sorted...
"public BigDecimal getSalePrice(PurchaseOrder purchaseOrder, Product product, BigDecimal price) throws AxelorException {\n TaxLine saleTaxLine = accountManagementService.getTaxLine(purchaseOrder.getOrderDate(), product, purchaseOrder.getCompany(), purchaseOrder.getSupplierPartner().getFiscalPosition(), false);\n ...
"public Token subtract(Token rightArg) throws IllegalActionException {\n int typeInfo = TypeCPO.compare(this, rightArg);\n try {\n if (typeInfo == CPO.LOWER) {\n return rightArg.subtractR(this);\n } else if (rightArg instanceof DoubleToken) {\n double result = _value - ((Double...
"public void select(Workspace workspace) {\n Lookup.getDefault().lookup(DataTablesController.class).setDataTablesEventListener(DataTableTopComponent.this);\n AttributeModel attributeModel = Lookup.getDefault().lookup(AttributeController.class).getModel();\n dataTablesModel = workspace.getLookup().lookup(DataTa...
"public Promise<QueryResponse, ResourceException> queryCollection(final Context context, final QueryRequest request, final QueryResourceHandler handler) {\n logger.debug(\"String_Node_Str\", name, request.getResourcePath());\n QueryRequest repoRequest = Requests.copyOfQueryRequest(request);\n repoRequest.setRe...
"private void populateCategoryList() {\n mCategoryLevels = CategoryNode.getSortedListOfCategoriesFromRoot(mCategories);\n for (int i = 0; i < mCategoryLevels.size(); i++) {\n mCategoryNames.put(StringUtils.unescapeHTML(mCategoryLevels.get(i).getName()), i);\n }\n CategoryArrayAdapter categoryAdapter ...
"private void recordVisibleChildren() {\n for (int i = 0; i < mHelper.getVisibleChildCount(); i++) {\n int adapterPosition = mHelper.getAdapterPositionAt(i);\n if (!mHelper.isLayoutItem(adapterPosition) && !mKnownPositions.get(adapterPosition)) {\n mKnownPositions.put(adapterPosition, true);...
"public synchronized void discard() {\n final Iterator<TransferEnvelope> it = this.queuedEnvelopes.iterator();\n while (it.hasNext()) {\n final TransferEnvelope transferEnvelope = it.next();\n transferEnvelope.getProcessingLog().setWrittenToCheckpoint();\n }\n this.queuedEnvelopes.clear();\n ...
"protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_about);\n mResources = getResources();\n StringBuilder builder = new StringBuilder();\n addStringsFromArray(builder, R.array.meta_about, LINE_BREAK + LINE_BREAK);\n addString(...
"public static TypePattern read(VersionedDataInputStream s, ISourceContext context) throws IOException {\n UnresolvedType type = UnresolvedType.read(s);\n int index = s.readShort();\n boolean isVarargs = false;\n if (s.getMajorVersion() >= AjAttribute.WeaverVersionInfo.WEAVER_VERSION_MAJOR_AJ150) {\n ...
"public void testPullRequestLifecycleManagement() throws Exception {\n Thread.sleep(3000);\n List<GHHook> hooks = gitHubRepo.getHooks();\n GHHook webhook = null;\n for (GHHook hook : hooks) {\n if (\"String_Node_Str\".equals(hook.getName()) && webhookUrl.equals(hook.getConfig().get(\"String_Node_Str\...
"public void makeActions(final IWorkbenchWindow window) {\n openFileAction = new OpenFileAction(window);\n register(openFileAction);\n newReportAction = new NewReportAction(window);\n register(newReportAction);\n newLibraryAction = new NewLibraryAction(window);\n register(newLibraryAction);\n newRe...
"protected boolean _resolveDeadlock() throws IllegalActionException {\n if (_writeBlockCount == 0 && _readBlockCount > 0) {\n return false;\n } else if (_getActiveActorsCount() == 0) {\n return false;\n } else {\n _incrementLowestWriteCapacityPort();\n return true;\n }\n}\n"
"private boolean bindCustomTabsService() {\n if (mCustomTabsClient != null)\n return true;\n String packageName = CustomTabActivityManager.getInstance().getPackageNameToUse(this);\n if (packageName == null)\n return false;\n mCustomTabsConnection = new CustomTabsServiceConnection() {\n\n ...
"private void makeFieldCache(CtMember.Cache cache) {\n List list = getClassFile3(false).getFields();\n int n = list.size();\n for (int i = 0; i < n; ++i) {\n FieldInfo finfo = (FieldInfo) list.get(i);\n CtField newField = new CtField(finfo, this);\n cache.addField(newField);\n }\n}\n"
"protected void onFailure(final RequestFailureType type, Throwable t, StatusLine status, final String readableMessage) {\n final RRError error = General.getGeneralErrorForFailure(context, type, t, status, url.toString());\n AndroidApi.UI_THREAD_HANDLER.post(new Runnable() {\n\n public void run() {\n ...
"private static void printTargets(final Project project, final Vector<String> names, final Vector<String> descriptions, final Vector<Enumeration<String>> dependencies, final String heading, final int maxlen) {\n final String lSep = System.getProperty(\"String_Node_Str\");\n String spaces = \"String_Node_Str\";\n ...
"private String addWhereToSqlStringStatement(List<String> whereExpressions, String completedSqlString) throws ParseException {\n return dbms().addWhereToSqlStringStatement(completedSqlString, whereExpressions);\n}\n"
"public void stateChanged(ChangeEvent e) {\n JSlider slider = (JSlider) e.getSource();\n if (!slider.getValueIsAdjusting()) {\n int frequencyBand = Integer.parseInt(slider.getName());\n float w = slider.getValue() / 100f;\n if (w != model.getEqualizerWeight(frequencyBand)) {\n mode...
"private void getCurrentBasicBlock(Function function) {\n currentBasicBlock = new BasicBlock(function, currentSymbolTable);\n function.pushBack(currentBasicBlock);\n}\n"
"public List<? extends PortForwardingRule> listPortForwardingRules(ListPortForwardingRulesCmd cmd) {\n Long ipId = cmd.getIpAddressId();\n Long id = cmd.getId();\n Account caller = UserContext.current().getCaller();\n List<Long> permittedAccounts = new ArrayList<Long>();\n if (ipId != null) {\n IP...
"protected void compress() {\n for (int i = 0; i < _compactors.size(); i++) {\n if (_compactors.get(i).size() >= capacity(i)) {\n if (i + 1 >= _h)\n grow();\n _compactors.get(i + 1).addAll(_compactors.get(i).compact());\n int size = 0;\n f...
"public org.hl7.fhir.dstu2.model.Conformance convertConformance(org.hl7.fhir.dstu3.model.CapabilityStatement src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2.model.Conformance tgt = new org.hl7.fhir.dstu2.model.Conformance();\n copyDomainResource(src, t...
"public void mouseClicked(MouseEvent e) {\n int x = e.getX(), y = e.getY();\n int bodyPart = getEquipPlace(x, y);\n if (bodyPart != -1 && !player.isFree(bodyPart))\n addActionRequest(\"String_Node_Str\" + player.name + \"String_Node_Str\" + bodyPart);\n if (x < 440 || x > 630 || y < 30 || y > 260)\n ...
"public void onValueChange(ValueChangeEvent<String> event) {\n String encodedToken = event.getValue();\n if (encodedToken == null || encodedToken.length() == 0) {\n return;\n }\n WaveRef waveRef;\n try {\n waveRef = GwtWaverefEncoder.decodeWaveRefFromPath(encodedToken);\n } catch (Invali...
"public void testSetRollbackOnly() {\n EntityManager em = createEntityManager();\n beginTransaction(em);\n Employee emp = null;\n Employee emp2 = null;\n try {\n emp = new Employee();\n emp.setFirstName(\"String_Node_Str\");\n emp.setLastName(\"String_Node_Str\");\n em.persist...
"static byte[] createOutputScript(Address to) {\n try {\n ByteArrayOutputStream bits = new ByteArrayOutputStream();\n writeBytes(bits, pubkey);\n bits.write(OP_CHECKSIG);\n return bits.toByteArray();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n}\n"
"private void registerTabListItemSkinlistener() {\n PacketListener tablistListener = new PacketAdapter(PacketAdapter.params(SkinsRestorer.getInstance(), PacketType.Play.Server.PLAYER_INFO).listenerPriority(ListenerPriority.HIGHEST)) {\n\n public void onPacketSending(PacketEvent event) {\n Structure...
"private boolean discriiminatorMatches(List<StringType> diff, List<StringType> base) {\n if (diff.isEmpty() || base.isEmpty())\n return true;\n if (diff.size() != base.size())\n return false;\n for (int i = 0; i < diff.size(); i++) if (!diff.get(i).getValue().equals(base.get(i).getValue()))\n ...
"protected Control createDialogArea(Composite parent) {\n Composite top = new Composite(parent, SWT.NONE);\n top.setLayout(new GridLayout());\n dateTime = new DateTime(top, SWT.CALENDAR);\n dateTime.setLayoutData(new GridData(GridData.FILL_BOTH));\n if (isDatetime) {\n Label dt = new Label(top, SW...