content
stringlengths
40
137k
"public void setDefaultTemplatePreference() {\n String defaultRootDir = UIUtil.getFragmentDirectory();\n File templateFolder = new File(defaultRootDir, \"String_Node_Str\");\n PreferenceFactory.getInstance().getPreferences(this).setDefault(TEMPLATE_PREFERENCE, templateFolder.getAbsolutePath());\n}\n"
"private static void addGroups(String userName, String[] groupNames) throws ApplicationException {\n if (userName == null) {\n throw new ApplicationException(ResourceUtil.getString(\"String_Node_Str\"));\n }\n if (groupNames == null || groupNames.length < 1) {\n throw new ApplicationException(ResourceUtil.getString(\"String_Node_Str\"));\n }\n User user = Document.findUser(userName);\n if (user == null) {\n user = Document.addUser(userName);\n }\n for (String groupName : groupNames) {\n Group group = Document.findGroup(groupName);\n if (group == null) {\n throw new ApplicationException(ResourceUtil.getFormattedString(\"String_Node_Str\", groupName));\n }\n user.addGroup(group);\n }\n}\n"
"private void refreshRange() {\n if (range == null) {\n range = new Range(min, max);\n } else {\n range.trimBounds(min, max);\n }\n if ((Float) min > upperBound || (Float) max < upperBound || lowerBound.equals(upperBound)) {\n upperBound = (Float) max;\n }\n range = new Range(lowerBound, upperBound);\n}\n"
"public static int add(ItemStack item, Inventory inventory) {\n if (item.getAmount() < 1) {\n return 0;\n }\n int amountLeft = item.getAmount();\n int maxStackSize = item.getMaxStackSize();\n for (int currentSlot = 0; currentSlot < inventory.getSize() && amountLeft > 0; currentSlot++) {\n ItemStack currentItem = inventory.getItem(currentSlot);\n ItemStack duplicate = item.clone();\n if (MaterialUtil.isEmpty(currentItem)) {\n duplicate.setAmount(Math.min(amountLeft, maxStackSize));\n duplicate.addEnchantments(item.getEnchantments());\n amountLeft -= duplicate.getAmount();\n inventory.setItem(currentSlot, duplicate);\n } else if (currentItem.getAmount() < maxStackSize && MaterialUtil.equals(currentItem, item)) {\n int currentAmount = currentItem.getAmount();\n int neededToAdd = Math.min(maxStackSize - currentAmount, amountLeft);\n duplicate.setAmount(currentAmount + neededToAdd);\n duplicate.addEnchantments(item.getEnchantments());\n amountLeft -= duplicate.getAmount();\n inventory.setItem(currentSlot, duplicate);\n }\n }\n return amountLeft;\n}\n"
"protected void initialize() {\n ftpUsernameText.setText(getConnection().getUsername());\n ftpPasswordText.setText(getConnection().getPassword());\n ftpPortText.setText(getConnection().getPort());\n ftpHostText.setText(getConnection().getHost());\n encodeCombo.setText(getConnection().getEcoding());\n if (CUSTOM.equals(encodeCombo.getText())) {\n customText.setVisible(true);\n } else {\n customText.setVisible(false);\n }\n if (getConnection().getCustomEncode() == null) {\n customText.setText(\"String_Node_Str\");\n } else {\n customText.setText(getConnection().getCustomEncode());\n }\n connModelCombo.setText(getConnection().getMode());\n if (getConnection().isSFTP()) {\n ftpsSuppBut.setVisible(false);\n methodCombo.setVisible(true);\n connModelCombo.setVisible(false);\n sftpSuppBut.setSelection(getConnection().isSFTP());\n methodCombo.setText(getConnection().getMethod());\n if (getConnection().getMethod().equals(\"String_Node_Str\")) {\n privatekeyText.setVisible(true);\n passphraseText.setVisible(true);\n privatekeyText.setText(getConnection().getPrivatekey() != null ? getConnection().getPrivatekey() : \"String_Node_Str\");\n passphraseText.setText(getConnection().getPassphrase() != null ? getConnection().getPassphrase() : \"String_Node_Str\");\n }\n }\n if (getConnection().isFTPS()) {\n keyFileText.setVisible(true);\n sftpSuppBut.setVisible(false);\n keyPasswordText.setVisible(true);\n connModelCombo.setVisible(false);\n ftpsSuppBut.setSelection(getConnection().isFTPS());\n keyFileText.setText(getConnection().getKeystoreFile());\n keyPasswordText.setText(getConnection().getKeystorePassword());\n }\n if (getConnection().isUsesocks()) {\n useSocksBut.setSelection(getConnection().isUsesocks());\n proxyHostText.setVisible(true);\n proxyPortText.setVisible(true);\n proxyUsernameText.setVisible(true);\n proxyPasswordText.setVisible(true);\n proxyHostText.setText(getConnection().getProxyhost());\n proxyPortText.setText(getConnection().getProxyport());\n proxyUsernameText.setText(getConnection().getProxyuser());\n proxyPasswordText.setText(getConnection().getProxypassword());\n }\n}\n"
"public void run() {\n while (!stop) {\n try {\n message = read();\n if (message.getPayloadType() == CastChannel.CastMessage.PayloadType.STRING) {\n LOG.debug(\"String_Node_Str\", message.getPayloadUtf8());\n final String jsonMSG = message.getPayloadUtf8().replaceFirst(\"String_Node_Str\", \"String_Node_Str\");\n Response parsed = jsonMapper.readValue(jsonMSG, Response.class);\n if (parsed.requestId != null) {\n ResultProcessor rp = requests.remove(parsed.requestId);\n if (rp != null) {\n rp.put(parsed);\n } else {\n LOG.warn(\"String_Node_Str\", parsed.requestId, jsonMSG);\n }\n } else if (parsed instanceof Response.Ping) {\n write(\"String_Node_Str\", Message.pong(), DEFAULT_RECEIVER_ID);\n }\n } else {\n LOG.warn(\"String_Node_Str\", message.getPayloadType());\n }\n } catch (InvalidProtocolBufferException ipbe) {\n LOG.debug(\"String_Node_Str\", ipbe.getLocalizedMessage());\n } catch (IOException ioex) {\n LOG.warn(\"String_Node_Str\", ioex.getLocalizedMessage());\n try {\n close();\n } catch (IOException e) {\n LOG.warn(\"String_Node_Str\", ioex.getLocalizedMessage());\n }\n }\n }\n}\n"
"public void onClientTick(ClientTickEvent e) {\n if (e.phase != Phase.START)\n return;\n if ((keyOpenCompendium.isPressed() || Keyboard.getEventKeyState() && Keyboard.getEventKey() == keyOpenCompendium.getKeyCode()) && (mc.inGameHasFocus || mc.currentScreen instanceof GuiContainer)) {\n if (canOpenCompendium()) {\n KnowledgeObject<? extends IObjectHolder<?>> obj = null;\n if (mc.inGameHasFocus) {\n } else {\n GuiContainer container = (GuiContainer) mc.currentScreen;\n List<Slot> slots = container.inventorySlots.inventorySlots;\n ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);\n int mouseX = Mouse.getX() * res.getScaledWidth() / mc.displayWidth, mouseY = res.getScaledHeight() - Mouse.getY() * res.getScaledHeight() / mc.displayHeight - 1;\n mouseX -= (container.width - container.xSize) / 2;\n mouseY -= (container.height - container.ySize) / 2;\n for (Slot slot : slots) {\n if (slot.getHasStack() && slot.func_111238_b() && mouseX >= slot.xDisplayPosition - 1 && mouseX <= slot.xDisplayPosition + 16 && mouseY >= slot.yDisplayPosition - 1 && mouseY <= slot.yDisplayPosition + 16) {\n obj = KnowledgeObject.fromObject(slot.getStack());\n break;\n }\n }\n if (obj == null)\n return;\n }\n openCompendium(obj);\n if (!mc.thePlayer.getStatFileWriter().hasAchievementUnlocked(AchievementManager.ENDER_COMPENDIUM)) {\n PacketPipeline.sendToServer(new S03SimpleEvent(EventType.OPEN_COMPENDIUM));\n }\n }\n }\n}\n"
"private static void applyFilter(Bitmap source, Bitmap result, FilterType type) {\n GPUImage gpuImage = new GPUImage(context);\n gpuImage.setImage(source);\n gpuImage.setFilter(type.getFilter());\n try {\n Bitmap filtered = gpuImage.getBitmapWithFilterApplied();\n int[] pixels = new int[filtered.getHeight() * filtered.getWidth()];\n filtered.getPixels(pixels, 0, filtered.getWidth(), 0, 0, filtered.getWidth(), filtered.getHeight());\n result.setPixels(pixels, 0, filtered.getWidth(), 0, 0, filtered.getWidth(), filtered.getHeight());\n } catch (NullPointerException e) {\n Logger.log(\"String_Node_Str\" + type.toString());\n return;\n }\n}\n"
"public boolean needsTaskCommit(TaskAttemptContext context) throws IOException {\n int numReduceTasks = context.getNumReduceTasks();\n TaskAttemptID taskAttemptID = context.getTaskAttemptID();\n return taskAttemptID.isMap() && numReduceTasks != 0 ? false : true;\n}\n"
"public Object intercept(Object receiver, Method method, Object[] parameters, MethodProxy methodProxy) throws Throwable {\n if (methodHandlingEnabled && stackDepth.get() == 0 && !method.getDeclaringClass().equals(Object.class)) {\n scenarioMethodHandler.handleMethod(receiver, method, parameters);\n }\n if (method.isAnnotationPresent(NotImplementedYet.class) || receiver.getClass().isAnnotationPresent(NotImplementedYet.class)) {\n if (!method.getReturnType().isAssignableFrom(receiver.getClass())) {\n log.warn(\"String_Node_Str\" + method.getName() + \"String_Node_Str\" + method.getDeclaringClass().getSimpleName() + \"String_Node_Str\" + \"String_Node_Str\");\n return null;\n }\n return receiver;\n }\n try {\n stackDepth.incrementAndGet();\n return methodProxy.invokeSuper(receiver, parameters);\n } catch (Throwable t) {\n scenarioMethodHandler.handleThrowable(t);\n throw t;\n } finally {\n stackDepth.decrementAndGet();\n }\n}\n"
"private Object handleChild(Object child, int maxDepth) throws Exception {\n if (child instanceof OTID && (maxDepth == -1 || maxDepth > 0)) {\n CopyEntry itemCopyEntry = getCopyEntry((OTID) child);\n if (itemCopyEntry == null) {\n OTDataObject itemObj = otDb.getOTDataObject(root, (OTID) child);\n OTDataObject itemCopy = otDb.createDataObject();\n int copyMaxDepth = -1;\n if (maxDepth != -1) {\n copyMaxDepth = maxDepth - 1;\n }\n CopyEntry itemCopyEntry = new CopyEntry(itemObj, copyMaxDepth, itemCopy);\n toBeCopied.add(itemCopyEntry);\n child = itemCopy.getGlobalId();\n }\n }\n return child;\n}\n"
"private void globalScalingAction(ActionEvent event) {\n JCheckBoxMenuItem item = (JCheckBoxMenuItem) event.getSource();\n if (heatTrellis.plateViewers.isEmpty()) {\n heatMapModel.setGlobalScaling(item.isSelected());\n return;\n Object[] options = { \"String_Node_Str\", \"String_Node_Str\" };\n int optionIndex = JOptionPane.showOptionDialog(getTopLevelAncestor(), \"String_Node_Str\" + \"String_Node_Str\", \"String_Node_Str\", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[1]);\n if (optionIndex == 0) {\n item.setSelected(heatMapModel.isGlobalScaling());\n } else {\n heatMapModel.setGlobalScaling(item.isSelected());\n heatTrellis.closePlateViewers();\n }\n}\n"
"public boolean isRequired() {\n return true;\n}\n"
"private static MultipleAlignment seedFromReference(List<AFPChain> afpList, List<Atom[]> atomArrays, int ref) throws StructureAlignmentException, StructureException {\n int size = atomArrays.size();\n int length = 0;\n if (ref == 0)\n length = afpList.get(1).getCa1Length();\n else\n length = afpList.get(0).getCa2Length();\n List<List<Integer>> equivalencies = new ArrayList<List<Integer>>();\n for (int i = 0; i < length; i++) {\n equivalencies.add(new ArrayList<Integer>());\n for (int j = 0; j < size; j++) {\n if (j == ref)\n equivalencies.get(i).add(i);\n else\n equivalencies.get(i).add(null);\n }\n }\n for (int j = 0; j < size; j++) {\n if (j == ref)\n continue;\n for (int bk = 0; bk < afpList.get(j).getBlockNum(); bk++) {\n for (int i = 0; i < afpList.get(j).getOptLen()[bk]; i++) {\n int res1 = 0;\n int res2 = 0;\n if (j > ref) {\n res1 = afpList.get(j).getOptAln()[bk][0][i];\n res2 = afpList.get(j).getOptAln()[bk][1][i];\n } else if (j < ref) {\n res1 = afpList.get(j).getOptAln()[bk][1][i];\n res2 = afpList.get(j).getOptAln()[bk][0][i];\n }\n equivalencies.get(res1).set(j, res2);\n }\n }\n }\n MultipleAlignment seed = new MultipleAlignmentImpl(ensemble);\n BlockSet blockSet = new BlockSetImpl(seed);\n new BlockImpl(blockSet);\n for (int i = 0; i < length; i++) {\n boolean gap = false;\n boolean cp = false;\n for (int j = 0; j < size; j++) {\n if (equivalencies.get(i).get(j) == null) {\n gap = true;\n break;\n }\n if (blockSet.getBlocks().get(blockSet.getBlockNum() - 1).length() > 0) {\n if (equivalencies.get(i).get(j) < blockSet.getBlocks().get(blockSet.getBlockNum() - 1).getAlignRes().get(j).get(blockSet.getBlocks().get(blockSet.getBlockNum() - 1).length() - 1)) {\n cp = true;\n }\n }\n }\n if (gap)\n continue;\n if (cp)\n new BlockImpl(blockSet);\n for (int j = 0; j < size; j++) {\n if (blockSet.getBlocks().get(blockSet.getBlockNum() - 1).getAlignRes().size() == 0)\n for (int k = 0; k < size; k++) blockSet.getBlocks().get(blockSet.getBlockNum() - 1).getAlignRes().add(new ArrayList<Integer>());\n blockSet.getBlocks().get(blockSet.getBlockNum() - 1).getAlignRes().get(j).add(equivalencies.get(i).get(j));\n }\n }\n seed.updateCache(PoseMethod.REFERENCE);\n return seed;\n}\n"
"private void checkPage() {\n String projectName = projectText.getText();\n setErrorMessage(null);\n try {\n if (!myDirectory.exists()) {\n setErrorMessage(NLS.bind(UIText.GitCreateGeneralProjectPage_DirNotExistMessage, myDirectory.getPath()));\n return;\n }\n if (!myDirectory.isDirectory()) {\n setErrorMessage(NLS.bind(UIText.GitCreateGeneralProjectPage_FileNotDirMessage, myDirectory.getPath()));\n return;\n }\n if (myDirectory.list(new FilenameFilter() {\n public boolean accept(File dir, String name) {\n if (name.equals(\"String_Node_Str\"))\n return true;\n return false;\n }\n }).length > 0) {\n setErrorMessage(NLS.bind(UIText.GitCreateGeneralProjectPage_FileExistsInDirMessage, \"String_Node_Str\", myDirectory.getPath()));\n return;\n }\n if (projectName.length() == 0) {\n setErrorMessage(UIText.GitCreateGeneralProjectPage_EnterProjectNameMessage);\n return;\n }\n IStatus result = ResourcesPlugin.getWorkspace().validateName(projectName, IResource.PROJECT);\n if (!result.isOK()) {\n setErrorMessage(result.getMessage());\n return;\n }\n if (isProjectInWorkspace(projectName)) {\n setErrorMessage(NLS.bind(UIText.GitCreateGeneralProjectPage_PorjectAlreadyExistsMessage, projectName));\n return;\n }\n if (!defaultLocation) {\n IProject newProject = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);\n IStatus locationResult = ResourcesPlugin.getWorkspace().validateProjectLocation(newProject, new Path(myDirectory.getPath()));\n if (!locationResult.isOK()) {\n setErrorMessage(locationResult.getMessage());\n return;\n }\n }\n } finally {\n setPageComplete(getErrorMessage() == null);\n }\n}\n"
"public void onConfigurationChanged(Configuration newConfig) {\n super.onConfigurationChanged(newConfig);\n getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);\n getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);\n int orientation = newConfig.orientation;\n if (orientation == Configuration.ORIENTATION_PORTRAIT) {\n getWindow().setFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN, WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);\n showToolbar();\n adoptSwipeListenerToLandscape(false);\n } else {\n getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);\n setGradientTitleBackground();\n if (!paused && !end && !isProgressViewVisible())\n hideToolbar();\n else\n showToolbar();\n }\n this.invalidateOptionsMenu();\n}\n"
"public void put(final String key, final String val) {\n value.get().put(key, fromNullable(val).or(\"String_Node_Str\"));\n}\n"
"private void doFiltering(boolean filtering, boolean restoring) {\n RepositoryNodeFilterHelper.filter(this.getActionSite(), filtering, isPerspectiveFiltering, restoring);\n}\n"
"public Collection<PsiElement> getItems(CSharpTypeDeclaration typeDeclaration) {\n Collection<PsiElement> allMembers = OverrideUtil.getAllMembers(typeDeclaration, typeDeclaration.getResolveScope(), DotNetGenericExtractor.EMPTY, false, true);\n boolean isInterface = typeDeclaration.isInterface();\n List<PsiElement> elements = new ArrayList<>();\n for (PsiElement element : allMembers) {\n if (isInterface) {\n if (element instanceof DotNetModifierListOwner) {\n if (!((DotNetModifierListOwner) element).hasModifier(CSharpModifier.INTERFACE_ABSTRACT)) {\n continue;\n }\n if (((DotNetModifierListOwner) element).hasModifier(CSharpModifier.STATIC)) {\n continue;\n }\n if (!CSharpVisibilityUtil.isVisible((DotNetModifierListOwner) element, typeDeclaration)) {\n continue;\n }\n }\n } else {\n if (element instanceof DotNetModifierListOwner) {\n if (((DotNetModifierListOwner) element).hasModifier(DotNetModifier.ABSTRACT)) {\n continue;\n }\n if (((DotNetModifierListOwner) element).hasModifier(DotNetModifier.STATIC)) {\n continue;\n }\n if (!CSharpVisibilityUtil.isVisible((DotNetModifierListOwner) element, typeDeclaration)) {\n continue;\n }\n }\n }\n if (element instanceof CSharpMethodDeclaration) {\n elements.add(element);\n }\n }\n return elements;\n}\n"
"private void interceptMessageAndCheckIntegrityIfNecessary(I id, M2 message) {\n if (debugConfig.shouldCheckMessageIntegrity() && !debugConfig.isMessageCorrect(vertexId, id, message) && numMessageViolationsLogged < NUM_VIOLATIONS_TO_LOG) {\n msgIntegrityViolationWrapper.addMsgWrapper(vertexId, id, message);\n hasViolatedMsgValueConstraint = true;\n numMessageViolationsLogged++;\n }\n}\n"
"protected void setAttribute(final short tag, final Object value, final boolean isUnsignedArray) {\n if (value == null) {\n if (this.mAttributes != null) {\n this.mAttributes = this.mAttributes.remove(tag);\n }\n } else {\n final SAMBinaryTagAndValue tmp;\n if (!isUnsignedArray) {\n tmp = new SAMBinaryTagAndValue(tag, value);\n } else {\n if (!value.getClass().isArray() || value instanceof float[]) {\n throw new SAMException(\"String_Node_Str\" + value.getClass() + \"String_Node_Str\" + SAMTagUtil.getSingleton().makeStringTag(tag));\n }\n tmp = new SAMBinaryTagAndUnsignedArrayValue(tag, value);\n }\n if (this.mAttributes == null) {\n this.mAttributes = tmp;\n } else {\n this.mAttributes = this.mAttributes.insert(tmp);\n }\n } else {\n throw new SAMException(\"String_Node_Str\" + value.getClass() + \"String_Node_Str\" + SAMTagUtil.getSingleton().makeStringTag(tag));\n }\n}\n"
"private void initComponentProperties() {\n IComponentIdentifier compId = getNode().getCompIdentifier();\n if (compId != null) {\n Map<String, String> componentProperties = compId.getComponentPropertiesMap();\n if (componentProperties != null) {\n for (String key : componentProperties.keySet()) {\n PropertyDescriptor propDes = new PropertyDescriptor(new ComponentPropertiesController(key, compId), key);\n propDes.setCategory(P_ELEMENT_DISPLAY_PROPERTY_INFORMATION);\n addPropertyDescriptor(propDes);\n }\n }\n }\n}\n"
"public boolean handle(TemplatePlanContext context, AbstractNodeTemplate nodeTemplate, List<String> selectionStrategies) {\n String inputFieldName = nodeTemplate.getId() + \"String_Node_Str\";\n context.addStringValueToPlanRequest(inputFieldName);\n String nodeInstanceVarName = this.findInstanceVar(context, nodeTemplate.getId(), true);\n try {\n Node assignFromInputToNodeInstanceIdVar = new BPELProcessFragments().generateAssignFromInputMessageToStringVariableAsNode(inputFieldName, nodeInstanceVarName);\n assignFromInputToNodeInstanceIdVar = context.importNode(assignFromInputToNodeInstanceIdVar);\n context.getPrePhaseElement().appendChild(assignFromInputToNodeInstanceIdVar);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ParserConfigurationException e) {\n e.printStackTrace();\n } catch (SAXException e) {\n e.printStackTrace();\n }\n try {\n new NodeInstanceInitializer(new BPELPlanHandler()).addPropertyVariableUpdateBasedOnNodeInstanceID(context, nodeTemplate);\n } catch (ParserConfigurationException e) {\n e.printStackTrace();\n }\n return true;\n}\n"
"public static FormRecord updateAndWriteRecord(Context context, CommCarePlatform platform, FormRecord oldRecord, String newStatus, SqlStorage<FormRecord> storage) throws InvalidStructureException, IOException, XmlPullParserException, UnfullfilledRequirementsException {\n Pair<FormRecord, String> recordUpdates = reparseRecord(context, oldRecord, newStatus);\n FormRecord updated = recordUpdates.first;\n String caseId = recordUpdates.second;\n if (caseId != null && FormRecord.STATUS_UNINDEXED.equals(oldRecord.getStatus())) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n storage.write(updated);\n return updated;\n}\n"
"public boolean onInterceptTouchEvent(MotionEvent ev) {\n final int action = MotionEventCompat.getActionMasked(ev);\n if (!mCanSlide || !mIsSlidingEnabled || (mIsUnableToDrag && action != MotionEvent.ACTION_DOWN)) {\n mDragHelper.cancel();\n return super.onInterceptTouchEvent(ev);\n }\n if (action == MotionEvent.ACTION_CANCEL || action == MotionEvent.ACTION_UP) {\n mDragHelper.cancel();\n return false;\n }\n final float x = ev.getX();\n final float y = ev.getY();\n boolean interceptTap = false;\n switch(action) {\n case MotionEvent.ACTION_DOWN:\n {\n mIsUnableToDrag = false;\n mInitialMotionX = x;\n mInitialMotionY = y;\n if (isDragViewUnder((int) x, (int) y) && !mIsUsingDragViewTouchEvents) {\n interceptTap = true;\n }\n break;\n }\n case MotionEvent.ACTION_MOVE:\n {\n final float adx = Math.abs(x - mInitialMotionX);\n final float ady = Math.abs(y - mInitialMotionY);\n final int dragSlop = mDragHelper.getTouchSlop();\n if (mIsUsingDragViewTouchEvents) {\n if (adx > mScrollTouchSlop && ady < mScrollTouchSlop) {\n return super.onInterceptTouchEvent(ev);\n } else if (ady > mScrollTouchSlop) {\n interceptTap = isDragViewUnder((int) x, (int) y);\n }\n }\n if ((ady > dragSlop && adx > ady) || !isDragViewUnder((int) x, (int) y)) {\n mDragHelper.cancel();\n mIsUnableToDrag = true;\n return false;\n }\n break;\n }\n }\n final boolean interceptForDrag = mDragHelper.shouldInterceptTouchEvent(ev);\n return interceptForDrag || interceptTap;\n}\n"
"private boolean isRightAligned(int week) {\n return week <= 1;\n}\n"
"public void remove() {\n super.remove();\n for (int i = affectedBlocks.size() - 1; i > -1; i--) {\n final TempBlock tblock = affectedBlocks.get(i);\n tblock.revertBlock();\n if (TEMP_LAVA_BLOCKS.values().contains(tblock)) {\n affectedBlocks.remove(tblock);\n TEMP_LAVA_BLOCKS.remove(TEMP_LAVA_BLOCKS_BY_TEMPBLOCK.get(tblock));\n TEMP_LAVA_BLOCKS_BY_TEMPBLOCK.remove(tblock);\n }\n if (TEMP_LAND_BLOCKS.values().contains(tblock)) {\n affectedBlocks.remove(tblock);\n TEMP_LAND_BLOCKS.remove(TEMP_LAND_BLOCKS_BY_TEMPBLOCK.get(tblock));\n TEMP_LAND_BLOCKS_BY_TEMPBLOCK.remove(tblock);\n }\n }\n for (BukkitRunnable task : tasks) {\n task.cancel();\n }\n}\n"
"public Function2D build(Instances instances) {\n List<Attribute> attributes = instances.getAttributes();\n int size1 = 0;\n Attribute f1 = attributes.get(attIndex1);\n if (f1.getType() == Attribute.Type.BINNED) {\n size1 = ((BinnedAttribute) f1).getNumBins();\n } else if (f1.getType() == Attribute.Type.NOMINAL) {\n size1 = ((NominalAttribute) f1).getCardinality();\n }\n int size2 = 0;\n Attribute f2 = attributes.get(attIndex2);\n if (f2.getType() == Attribute.Type.BINNED) {\n size2 = ((BinnedAttribute) f2).getNumBins();\n } else if (f1.getType() == Attribute.Type.NOMINAL) {\n size2 = ((NominalAttribute) f2).getCardinality();\n }\n if (size1 == 1 || size2 == 1) {\n return new Function2D(f1.getIndex(), f2.getIndex(), new double[] { Double.POSITIVE_INFINITY }, new double[] { Double.POSITIVE_INFINITY }, new double[1][1]);\n }\n Histogram2D hist2d = new Histogram2D(size1, size2);\n for (Instance instance : instances) {\n int idx1 = (int) instance.getValue(f1);\n int idx2 = (int) instance.getValue(f2);\n hist2d.resp[idx1][idx2] += instance.getTarget() * instance.getWeight();\n hist2d.count[idx1][idx2] += instance.getWeight();\n }\n Pair<CHistogram, CHistogram> cHist = hist2d.computeCHistogram();\n Table table = new Table(size1, size2);\n computeTable(hist2d, cHist.v1, cHist.v2, table);\n double bestRSS = Double.POSITIVE_INFINITY;\n double[] predInt1 = new double[4];\n int bestV1 = -1;\n int[] bestV2s = new int[2];\n int[] v2s = new int[2];\n for (int v1 = 0; v1 < size1 - 1; v1++) {\n findCuts(table, v1, v2s);\n getPredictor(table, v1, v2s, predInt1);\n double rss = getRSS(table, v1, v2s, predInt1);\n if (rss < bestRSS) {\n bestRSS = rss;\n bestV1 = v1;\n bestV2s[0] = v2s[0];\n bestV2s[1] = v2s[1];\n }\n }\n boolean cutOnAttr2 = false;\n double[] predInt2 = new double[4];\n int[] bestV1s = new int[2];\n int bestV2 = -1;\n int[] v1s = new int[2];\n for (int v2 = 0; v2 < size2 - 1; v2++) {\n findCuts(table, v1s, v2);\n getPredictor(table, v1s, v2, predInt2);\n double rss = getRSS(table, v1s, v2, predInt2);\n if (rss < bestRSS) {\n bestRSS = rss;\n bestV2 = v2;\n bestV1s[0] = v1s[0];\n bestV1s[1] = v1s[1];\n cutOnAttr2 = true;\n }\n }\n if (cutOnAttr2) {\n getPredictor(table, bestV1s, bestV2, predInt2);\n if (lineSearch) {\n lineSearch(instances, f2.getIndex(), f1.getIndex(), bestV2, bestV1s[0], bestV1s[1], predInt2);\n }\n return getFunction2D(f1.getIndex(), f2.getIndex(), bestV1s, bestV2, predInt2);\n } else {\n getPredictor(table, bestV1, bestV2s, predInt1);\n if (lineSearch) {\n lineSearch(instances, f1.getIndex(), f2.getIndex(), bestV1, bestV2s[0], bestV2s[1], predInt1);\n }\n return getFunction2D(f1.getIndex(), f2.getIndex(), bestV1, bestV2s, predInt1);\n }\n}\n"
"public int compare(Object o1, Object o2) {\n if (o1.getClass().isInstance(o2))\n return 0;\n Class[] classes = new Class[] { FieldDeclaration.class, TypeDeclaration.class, MethodDeclaration.class, Initializer.class };\n for (int i = 0; i < classes.length; i++) if (classes[i].isInstance(o1))\n for (int j = i + 1; j < classes.length; j++) if (classes[j].isInstance(o2))\n return -1;\n return 1;\n}\n"
"public void attackAI(AgentGoalTarget target) {\n for (int i = 0; i < 3; i++) {\n if (x > target.getX())\n xSpeed = -1;\n if (x < target.getX())\n xSpeed = 1;\n if (y > target.getY())\n ySpeed = -1;\n if (y < target.getY())\n ySpeed = 1;\n if (x == target.getX() && y == target.getY())\n AI.currentTarget = null;\n move();\n xSpeed = 0;\n ySpeed = 0;\n }\n}\n"
"final public String getParameterValue(String name, NamedObj container) throws IllegalActionException {\n if (name.contains(\"String_Node_Str\")) {\n name = processCode(name);\n }\n StringTokenizer tokenizer = new StringTokenizer(name, \"String_Node_Str\");\n String attributeName = tokenizer.nextToken().trim();\n String offset = null;\n String castType = null;\n if (tokenizer.hasMoreTokens()) {\n offset = tokenizer.nextToken().trim();\n if (tokenizer.hasMoreTokens()) {\n throw new IllegalActionException(getComponent(), name + \"String_Node_Str\" + \"String_Node_Str\");\n }\n }\n StringTokenizer tokenizer2 = new StringTokenizer(attributeName, \"String_Node_Str\", false);\n if (tokenizer2.countTokens() != 1 && tokenizer2.countTokens() != 2) {\n throw new IllegalActionException(getComponent(), \"String_Node_Str\" + attributeName);\n }\n if (tokenizer2.countTokens() == 2) {\n castType = tokenizer2.nextToken().trim();\n attributeName = tokenizer2.nextToken().trim();\n }\n Attribute attribute = ModelScope.getScopedVariable(null, container, attributeName);\n if (attribute == null) {\n attribute = container.getAttribute(attributeName);\n if (attribute == null) {\n throw new IllegalActionException(container, \"String_Node_Str\" + name);\n }\n }\n if (offset == null) {\n if (attribute instanceof Variable) {\n Variable variable = (Variable) attribute;\n ParseTreeCodeGenerator parseTreeCodeGenerator = getParseTreeCodeGenerator();\n if (variable.isStringMode()) {\n return generateTypeConvertMethod(\"String_Node_Str\" + parseTreeCodeGenerator.escapeForTargetLanguage(variable.getExpression()) + \"String_Node_Str\", castType, \"String_Node_Str\");\n }\n PtParser parser = new PtParser();\n ASTPtRootNode parseTree = null;\n try {\n parseTree = parser.generateParseTree(variable.getExpression());\n } catch (Throwable throwable) {\n throw new IllegalActionException(variable, throwable, \"String_Node_Str\" + name + \"String_Node_Str\" + container + \"String_Node_Str\");\n }\n try {\n parseTreeCodeGenerator.evaluateParseTree(parseTree, new VariableScope(variable));\n } catch (Exception ex) {\n StringBuffer results = new StringBuffer();\n Iterator<?> allScopedVariableNames = ModelScope.getAllScopedVariableNames(variable, container).iterator();\n while (allScopedVariableNames.hasNext()) {\n results.append(allScopedVariableNames.next().toString() + \"String_Node_Str\");\n }\n throw new IllegalActionException(getComponent(), ex, \"String_Node_Str\" + variable.getFullName() + \"String_Node_Str\" + results.toString());\n }\n String fireCode = processCode(parseTreeCodeGenerator.generateFireCode());\n return _generateTypeConvertMethod(fireCode, castType, codeGenType(variable.getType()));\n } else {\n return ((Settable) attribute).getExpression();\n }\n } else {\n if (attribute instanceof Parameter) {\n Token token = ((Parameter) attribute).getToken();\n if (token instanceof ArrayToken) {\n Token element = ((ArrayToken) token).getElement(Integer.valueOf(offset).intValue());\n ParseTreeCodeGenerator parseTreeCodeGenerator = getParseTreeCodeGenerator();\n PtParser parser = new PtParser();\n ASTPtRootNode parseTree = null;\n try {\n parseTree = parser.generateParseTree(element.toString());\n } catch (Throwable throwable) {\n throw new IllegalActionException(attribute, throwable, \"String_Node_Str\" + name + \"String_Node_Str\" + container + \"String_Node_Str\");\n }\n parseTreeCodeGenerator.evaluateParseTree(parseTree, new VariableScope((Parameter) attribute));\n String elementCode = processCode(parseTreeCodeGenerator.generateFireCode());\n return _generateTypeConvertMethod(elementCode, castType, codeGenType(element.getType()));\n }\n throw new IllegalActionException(getComponent(), attributeName + \"String_Node_Str\");\n }\n throw new IllegalActionException(getComponent(), attributeName + \"String_Node_Str\");\n }\n}\n"
"private void processEditMetadataOne(Context context, HttpServletRequest request, HttpServletResponse response, SubmissionInfo subInfo) throws ServletException, IOException, SQLException, AuthorizeException {\n String buttonPressed = UIUtil.getSubmitButton(request, \"String_Node_Str\");\n if (buttonPressed.equals(\"String_Node_Str\")) {\n doCancellation(request, response, subInfo, EDIT_METADATA_1, EDIT_METADATA_1);\n return;\n }\n Item item = subInfo.submission.getItem();\n readNames(request, item, \"String_Node_Str\", \"String_Node_Str\", true);\n readText(request, item, \"String_Node_Str\", null, false, \"String_Node_Str\");\n if (subInfo.submission.hasMultipleTitles()) {\n readText(request, item, \"String_Node_Str\", \"String_Node_Str\", true, \"String_Node_Str\");\n }\n readSeriesNumbers(request, item, \"String_Node_Str\", \"String_Node_Str\", true);\n item.clearDC(\"String_Node_Str\", null, Item.ANY);\n String[] types = request.getParameterValues(\"String_Node_Str\");\n if (types != null) {\n for (int i = 0; i < types.length; i++) {\n item.addDC(\"String_Node_Str\", null, \"String_Node_Str\", types[i]);\n }\n }\n readText(request, item, \"String_Node_Str\", \"String_Node_Str\", false, null);\n subInfo.submission.getItem().clearDC(\"String_Node_Str\", Item.ANY, Item.ANY);\n List quals = getRepeatedParameter(request, \"String_Node_Str\");\n List vals = getRepeatedParameter(request, \"String_Node_Str\");\n for (int i = 0; i < vals.size(); i++) {\n String thisQual = (String) quals.get(i);\n String thisVal = (String) vals.get(i);\n if (!buttonPressed.equals(\"String_Node_Str\" + i) && !thisVal.equals(\"String_Node_Str\")) {\n item.addDC(\"String_Node_Str\", thisQual, null, thisVal);\n }\n }\n if (subInfo.submission.isPublishedBefore()) {\n readDate(request, item, \"String_Node_Str\", \"String_Node_Str\");\n readText(request, item, \"String_Node_Str\", \"String_Node_Str\", false, \"String_Node_Str\");\n readText(request, item, \"String_Node_Str\", null, false, \"String_Node_Str\");\n }\n int nextStep = -1;\n if (buttonPressed.equals(\"String_Node_Str\")) {\n subInfo.moreBoxesFor = \"String_Node_Str\";\n subInfo.jumpToField = \"String_Node_Str\";\n nextStep = EDIT_METADATA_1;\n } else if (subInfo.submission.hasMultipleTitles() && buttonPressed.equals(\"String_Node_Str\")) {\n subInfo.moreBoxesFor = \"String_Node_Str\";\n subInfo.jumpToField = \"String_Node_Str\";\n nextStep = EDIT_METADATA_1;\n } else if (buttonPressed.equals(\"String_Node_Str\")) {\n subInfo.moreBoxesFor = \"String_Node_Str\";\n subInfo.jumpToField = \"String_Node_Str\";\n nextStep = EDIT_METADATA_1;\n } else if (buttonPressed.equals(\"String_Node_Str\")) {\n subInfo.moreBoxesFor = \"String_Node_Str\";\n subInfo.jumpToField = \"String_Node_Str\";\n nextStep = EDIT_METADATA_1;\n } else if (buttonPressed.equals(\"String_Node_Str\")) {\n nextStep = INITIAL_QUESTIONS;\n } else if (buttonPressed.equals(\"String_Node_Str\")) {\n userHasReached(subInfo, EDIT_METADATA_2);\n nextStep = EDIT_METADATA_2;\n } else if (buttonPressed.indexOf(\"String_Node_Str\") > -1) {\n nextStep = EDIT_METADATA_1;\n }\n subInfo.submission.update();\n if (nextStep != -1) {\n doStep(context, request, response, subInfo, nextStep);\n } else {\n doStepJump(context, request, response, subInfo);\n }\n context.complete();\n}\n"
"private int hash(Object o) {\n return ((useIdentity ? System.identityHashCode(o) : o.hashCode()) & 0x7FFFFFFF) % initialHash.length;\n}\n"
"public String getTimeBegin(int stNum) {\n if (profileData != null && profileList.containsKey((Integer) stNum)) {\n return df.toDateTimeStringISO(profileList.get(stNum).getTime());\n } else {\n return ERROR_NULL_DATE;\n }\n}\n"
"public void writeOne(Address address, T op) throws IOException {\n byte[] addressAsBytes = address.toKey(idService);\n byte[] rowKey = ArrayUtils.addAll(uniqueCubeName, addressAsBytes);\n if (DebugHack.isEnabled()) {\n DebugHack.log(\"String_Node_Str\" + new String(tableName) + \"String_Node_Str\" + new String(cf) + \"String_Node_Str\" + Hex.encodeHexString(rowKey));\n }\n Optional<T> preexistingValInDb = get(address);\n T valToWrite;\n if (preexistingValInDb.isPresent()) {\n valToWrite = (T) (preexistingValInDb.get().add(op));\n } else {\n valToWrite = op;\n }\n Put put = new Put(rowKey);\n put.add(cf, QUALIFIER, serializedOp);\n WithHTable.put(pool, tableName, put);\n}\n"
"public void showSuggestionList(MVVObject sug) {\n try {\n mvvList = sug.getResultList();\n final MVVSuggestion sugestion = (MVVSuggestion) mvvList.get(0);\n final MVVDelegate delegate = this;\n new Thread(new Runnable() {\n public void run() {\n (new MVVJsoupParser(delegate)).execute(sugestion.getName());\n }\n }).run();\n mvvList = null;\n } catch (Exception e) {\n Utils.log(e);\n Utils.showToast(applicationContext, applicationContext.getString(R.string.something_is_wrong));\n }\n}\n"
"public ForgottenPasswordKeyDaoInterface getForgottenPasswordKeyDao() {\n if (forgottenPasswordKeyDao == null) {\n forgottenPasswordKeyDao = new SqlForgottenPasswordKeyDao(new SimpleDeleteBehavior<ForgottenPasswordKeyEntity>());\n }\n return forgottenPasswordKeyDao;\n}\n"
"public void run() {\n Thread.currentThread().setUncaughtExceptionHandler((UncaughtExceptionHandler) this);\n try {\n ListenerRegistry.getInstance().fireEvent(new Hertz());\n } catch (EventFailedException e) {\n } catch (Exception t) {\n LOG.error(t);\n Logs.extreme().error(t, t);\n }\n}\n"
"public UIWidget deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {\n JsonObject jsonObject = json.getAsJsonObject();\n String type = jsonObject.get(\"String_Node_Str\").getAsString();\n ClassMetadata<? extends UIWidget, ?> elementMetadata = nuiManager.getWidgetMetadataLibrary().resolve(type, ModuleContext.getContext());\n if (elementMetadata == null) {\n logger.error(\"String_Node_Str\", type);\n return null;\n }\n String id = null;\n if (jsonObject.has(\"String_Node_Str\")) {\n id = jsonObject.get(\"String_Node_Str\").getAsString();\n }\n UIWidget element = elementMetadata.newInstance();\n if (id != null) {\n FieldMetadata fieldMetadata = elementMetadata.getField(\"String_Node_Str\");\n if (fieldMetadata == null) {\n logger.warn(\"String_Node_Str\", elementMetadata.getUri());\n } else {\n fieldMetadata.setValue(element, id);\n }\n }\n for (FieldMetadata<? extends UIWidget, ?> field : elementMetadata.getFields()) {\n if (jsonObject.has(field.getSerializationName())) {\n if (field.getName().equals(CONTENTS_FIELD) && UILayout.class.isAssignableFrom(elementMetadata.getType())) {\n continue;\n }\n try {\n if (List.class.isAssignableFrom(field.getType())) {\n Type contentType = ReflectionUtil.getTypeParameter(field.getField().getGenericType(), 0);\n if (contentType != null) {\n List result = Lists.newArrayList();\n JsonArray list = jsonObject.getAsJsonArray(field.getSerializationName());\n for (JsonElement item : list) {\n result.add(context.deserialize(item, contentType));\n }\n field.setValue(element, result);\n }\n } else {\n field.setValue(element, context.deserialize(jsonObject.get(field.getSerializationName()), field.getType()));\n }\n } catch (Throwable e) {\n logger.error(\"String_Node_Str\", field.getName(), type, e);\n }\n }\n }\n if (UILayout.class.isAssignableFrom(elementMetadata.getType())) {\n UILayout layout = (UILayout) element;\n Class<? extends LayoutHint> layoutHintType = (Class<? extends LayoutHint>) ReflectionUtil.getTypeParameter(elementMetadata.getType().getGenericSuperclass(), 0);\n if (jsonObject.has(CONTENTS_FIELD)) {\n for (JsonElement child : jsonObject.getAsJsonArray(CONTENTS_FIELD)) {\n UIWidget childElement = context.deserialize(child, UIWidget.class);\n if (childElement != null) {\n LayoutHint hint = null;\n if (child.isJsonObject()) {\n JsonObject childObject = child.getAsJsonObject();\n if (layoutHintType != null && !layoutHintType.isInterface() && !Modifier.isAbstract(layoutHintType.getModifiers()) && childObject.has(LAYOUT_INFO_FIELD)) {\n hint = context.deserialize(childObject.get(LAYOUT_INFO_FIELD), layoutHintType);\n }\n }\n layout.addWidget(childElement, hint);\n }\n }\n }\n }\n return element;\n}\n"
"public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) {\n ArrayList proposals = new ArrayList();\n ArrayList proposers = new ArrayList();\n if (viewer.getDocument() instanceof ICFEFileDocument) {\n proposers = ((ICFEFileDocument) viewer.getDocument()).getContentAssistManager().getRootAssistors();\n }\n DefaultAssistState state = AssistUtils.initialiseDefaultAssistState(viewer, offset);\n Iterator proposerIter = proposers.iterator();\n while (proposerIter.hasNext()) {\n Object currProc = proposerIter.next();\n Assert.isNotNull(currProc, \"String_Node_Str\");\n IContextInformation[] tempProps = null;\n if (currProc instanceof IContentAssistProcessor) {\n IContentAssistProcessor currProcessor = (IContentAssistProcessor) currProc;\n tempProps = currProcessor.computeContextInformation(viewer, offset);\n }\n if (tempProps != null && tempProps.length > 0) {\n proposals.addAll(arrayToCollection(tempProps));\n } else {\n }\n }\n return (IContextInformation[]) proposals.toArray(new IContextInformation[proposals.size()]);\n}\n"
"public EndPoint getEndPointForTalkingTo(Node node) {\n if (node.getLocal())\n return myListenEp.toMsg();\n return getPublicEndPoint();\n}\n"
"public void testCp() throws IOException, StructureException {\n Structure structure = cache.getStructure(\"String_Node_Str\");\n String first = (\"String_Node_Str\");\n String second = (\"String_Node_Str\");\n int y = 0;\n for (int i = 0; i < second.length(); i++) if (second.charAt(i) == '-' || Character.isLowerCase(second.charAt(i)))\n y++;\n System.out.println(\"String_Node_Str\" + y);\n AFPChain afpChain = FastaAFPChainConverter.cpFastaToAfpChain(first, second, structure, -393);\n String xml = AFPChainXMLConverter.toXML(afpChain);\n System.out.println(xml);\n}\n"
"public SoundSource setLooping(boolean looping) {\n alSourcei(this.getSourceId(), AL_LOOPING, looping ? AL_TRUE : AL_FALSE);\n OpenALException.checkState(\"String_Node_Str\");\n return this;\n}\n"
"private void writeTableRow(int algorithmIndex, String problem) throws IOException {\n fileWriter_.write(\"String_Node_Str\" + experiment_.getAlgorithmNameList()[algorithmIndex] + \"String_Node_Str\");\n for (int i = 0; i < experiment_.getAlgorithmNameList().length; i++) {\n if (i != algorithmIndex) {\n double setCoverageValueAB = calculateSetCoverage(problem, experiment_.getAlgorithmNameList()[algorithmIndex], experiment_.getAlgorithmNameList()[i]);\n double setCoverageValueBA = calculateSetCoverage(problem, experiment_.getAlgorithmNameList()[i], experiment_.getAlgorithmNameList()[algorithmIndex]);\n String setCoverageAB = String.format(Locale.ENGLISH, \"String_Node_Str\", setCoverageValueAB);\n fileWriter_.write(\"String_Node_Str\" + setCoverageAB);\n } else\n fileWriter_.write(\"String_Node_Str\" + \"String_Node_Str\");\n }\n fileWriter_.write(\"String_Node_Str\");\n}\n"
"public IProgressMonitor poweron(String instanceId) throws IOException {\n String instanceUrl = getInstanceUrl(instanceId);\n HttpPut put = new HttpPut(MessageFormat.format(\"String_Node_Str\", instanceUrl));\n try {\n execute(put);\n return new ProgressMonitor(instanceUrl, Collections.singleton(InstanceOperation.POWERON), instance.getString(\"String_Node_Str\"));\n } finally {\n put.reset();\n }\n}\n"
"private static void assertDesignPrivileges(User user, UserDatabase database) {\n if (!database.isAllowedDesign(user)) {\n throw new UnauthorizedAccessException(\"String_Node_Str\" + database.getId() + \"String_Node_Str\");\n }\n}\n"
"public void setUp() throws Exception {\n super.setUp();\n bot = new SWTBot();\n keyboard = new Keyboard();\n bot.shell(\"String_Node_Str\").activate();\n bot.tabItem(\"String_Node_Str\").activate();\n bot.checkBox(\"String_Node_Str\").select();\n bot.checkBox(\"String_Node_Str\").select();\n bot.checkBox(\"String_Node_Str\").deselect();\n bot.checkBox(\"String_Node_Str\").select();\n styledText = bot.styledTextInGroup(\"String_Node_Str\");\n styledText.setText(\"String_Node_Str\");\n bot.button(\"String_Node_Str\").click();\n listeners = bot.textInGroup(\"String_Node_Str\");\n}\n"
"public ImageStore discoverImageStore(AddImageStoreCmd cmd) throws IllegalArgumentException, DiscoveryException, InvalidParameterValueException {\n String providerName = cmd.getProviderName();\n DataStoreProvider storeProvider = _dataStoreProviderMgr.getDataStoreProvider(providerName);\n if (storeProvider == null) {\n storeProvider = _dataStoreProviderMgr.getDefaultImageDataStoreProvider();\n if (storeProvider == null) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + providerName);\n }\n }\n Long dcId = cmd.getZoneId();\n String url = cmd.getUrl();\n Map details = cmd.getDetails();\n ScopeType scopeType = ScopeType.ZONE;\n if (dcId == null) {\n scopeType = ScopeType.REGION;\n }\n if (!((ImageStoreProvider) storeProvider).isScopeSupported(scopeType)) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + providerName + \"String_Node_Str\" + scopeType);\n }\n List<ImageStoreVO> imageStores = _imageStoreDao.listImageStores();\n for (ImageStoreVO store : imageStores) {\n if (!store.getProviderName().equalsIgnoreCase(providerName)) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + store.getProviderName() + \"String_Node_Str\");\n }\n }\n if (dcId != null) {\n DataCenterVO zone = _dcDao.findById(dcId);\n if (zone == null) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + dcId);\n }\n Account account = UserContext.current().getCaller();\n if (Grouping.AllocationState.Disabled == zone.getAllocationState() && !_accountMgr.isRootAdmin(account.getType())) {\n PermissionDeniedException ex = new PermissionDeniedException(\"String_Node_Str\");\n ex.addProxyObject(zone, dcId, \"String_Node_Str\");\n throw ex;\n }\n }\n Map<String, Object> params = new HashMap<String, Object>();\n params.put(\"String_Node_Str\", dcId);\n params.put(\"String_Node_Str\", cmd.getUrl());\n params.put(\"String_Node_Str\", cmd.getUrl());\n params.put(\"String_Node_Str\", details);\n params.put(\"String_Node_Str\", scopeType);\n params.put(\"String_Node_Str\", storeProvider.getName());\n params.put(\"String_Node_Str\", DataStoreRole.Image);\n DataStoreLifeCycle lifeCycle = storeProvider.getDataStoreLifeCycle();\n DataStore store = null;\n try {\n store = lifeCycle.initialize(params);\n } catch (Exception e) {\n s_logger.debug(\"String_Node_Str\", e);\n throw new CloudRuntimeException(\"String_Node_Str\", e);\n }\n if (((ImageStoreProvider) storeProvider).needDownloadSysTemplate()) {\n this._imageSrv.downloadBootstrapSysTemplate(store);\n } else {\n this._imageSrv.addSystemVMTemplatesToSecondary(store);\n }\n this.associateCrosszoneTemplatesToZone(dcId);\n return (ImageStore) _dataStoreMgr.getDataStore(store.getId(), DataStoreRole.Image);\n}\n"
"protected ISynchAsynchConnection createConnection(ID remoteSpace, Object data) throws ConnectionCreateException {\n trace(\"String_Node_Str\" + remoteSpace + \"String_Node_Str\" + data);\n final ISynchAsynchConnection conn = new HttpClient(receiver);\n return conn;\n}\n"
"private void unlockFailedInt(long offset, int lowId) throws IllegalMonitorStateException {\n long currentValue = readInt(offset);\n long holderId = currentValue & INT_LOCK_MASK;\n if (holderId == lowId) {\n currentValue -= 1 << 24;\n writeOrderedInt(offset, (int) currentValue);\n } else if (currentValue == 0) {\n LOGGER.severe(\"String_Node_Str\" + shortThreadId());\n } else {\n throw new IllegalMonitorStateException(\"String_Node_Str\" + holderId + \"String_Node_Str\" + (currentValue >>> 24) + \"String_Node_Str\");\n }\n}\n"
"public static void loadClasses() {\n try {\n ActivationFunctions.initFunctionSet();\n setupSaveDirectory();\n fitnessFunctions = new ArrayList<String>();\n aggregationOverrides = new ArrayList<Statistic>();\n boolean loadFrom = !Parameters.parameters.stringParameter(\"String_Node_Str\").equals(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\");\n EvolutionaryHistory.initGenotypeIds();\n weightPerturber = (RandomGenerator) ClassCreation.createObject(\"String_Node_Str\");\n setupCrossover();\n setupRLGlue();\n setupFunctionOptimization();\n System.out.println(\"String_Node_Str\");\n if (taskHasSubnetworks()) {\n modesToTrack = Parameters.parameters.integerParameter(\"String_Node_Str\");\n } else {\n int multitaskModes = CommonConstants.multitaskModes;\n if (!CommonConstants.hierarchicalMultitask && multitaskModes > 1) {\n modesToTrack = multitaskModes;\n }\n }\n task = (Task) ClassCreation.createObject(\"String_Node_Str\");\n boolean coevolution = false;\n if (Parameters.parameters.booleanParameter(\"String_Node_Str\") && Parameters.parameters.stringParameter(\"String_Node_Str\").equals(\"String_Node_Str\") && Parameters.parameters.integerParameter(\"String_Node_Str\") == 0) {\n System.out.println(\"String_Node_Str\");\n Parameters.parameters.setDouble(\"String_Node_Str\", 0.999);\n }\n if (task instanceof MsPacManTask) {\n setupGenotypePoolsForMsPacman();\n System.out.println(\"String_Node_Str\");\n pacmanInputOutputMediator = (MsPacManControllerInputOutputMediator) ClassCreation.createObject(\"String_Node_Str\");\n if (MMNEAT.pacmanInputOutputMediator instanceof VariableDirectionBlockLoadedInputOutputMediator) {\n directionalSafetyFunction = (VariableDirectionBlock) ClassCreation.createObject(\"String_Node_Str\");\n ensembleArbitrator = (MsPacManEnsembleArbitrator) ClassCreation.createObject(\"String_Node_Str\");\n }\n String preferenceNet = Parameters.parameters.stringParameter(\"String_Node_Str\");\n String multitaskNet = Parameters.parameters.stringParameter(\"String_Node_Str\");\n if (multitaskNet != null && !multitaskNet.isEmpty()) {\n MMNEAT.sharedMultitaskNetwork = (TWEANNGenotype) Easy.load(multitaskNet);\n if (CommonConstants.showNetworks) {\n DrawingPanel panel = new DrawingPanel(TWEANN.NETWORK_VIEW_DIM, TWEANN.NETWORK_VIEW_DIM, \"String_Node_Str\");\n MMNEAT.sharedMultitaskNetwork.getPhenotype().draw(panel);\n }\n setNNInputParameters(pacmanInputOutputMediator.numIn(), MMNEAT.sharedMultitaskNetwork.numModes);\n } else if (preferenceNet != null && !preferenceNet.isEmpty()) {\n MMNEAT.sharedPreferenceNetwork = (TWEANNGenotype) Easy.load(preferenceNet);\n if (CommonConstants.showNetworks) {\n DrawingPanel panel = new DrawingPanel(TWEANN.NETWORK_VIEW_DIM, TWEANN.NETWORK_VIEW_DIM, \"String_Node_Str\");\n MMNEAT.sharedPreferenceNetwork.getPhenotype().draw(panel);\n }\n setNNInputParameters(pacmanInputOutputMediator.numIn(), MMNEAT.sharedPreferenceNetwork.numOut);\n } else if (Parameters.parameters.booleanParameter(\"String_Node_Str\")) {\n System.out.println(\"String_Node_Str\");\n ghostsInputOutputMediator = new GhostsCheckEachDirectionMediator();\n setNNInputParameters(ghostsInputOutputMediator.numIn(), ghostsInputOutputMediator.numOut());\n } else {\n setNNInputParameters(pacmanInputOutputMediator.numIn(), pacmanInputOutputMediator.numOut());\n }\n setupMsPacmanParameters();\n if (CommonConstants.multitaskModes > 1) {\n pacmanMultitaskScheme = (MsPacManModeSelector) ClassCreation.createObject(\"String_Node_Str\");\n }\n } else if (task instanceof CooperativeMsPacManTask) {\n System.out.println(\"String_Node_Str\");\n coevolution = true;\n EvolutionaryHistory.initInnovationHistory();\n setupMsPacmanParameters();\n if (task instanceof CooperativeGhostMonitorNetworksMsPacManTask) {\n setupCooperativeCoevolutionGhostMonitorsForMsPacman();\n } else if (task instanceof CooperativeSubtaskSelectorMsPacManTask) {\n setupCooperativeCoevolutionSelectorForMsPacman();\n } else if (task instanceof CooperativeSubtaskCombinerMsPacManTask) {\n setupCooperativeCoevolutionCombinerForMsPacman();\n } else if (task instanceof CooperativeNonHierarchicalMultiNetMsPacManTask) {\n setupCooperativeCoevolutionNonHierarchicalForMsPacman();\n } else if (task instanceof CooperativeCheckEachMultitaskSelectorMsPacManTask) {\n setupCooperativeCoevolutionCheckEachMultitaskPreferenceNetForMsPacman();\n }\n } else if (task instanceof Breve2DTask) {\n System.out.println(\"String_Node_Str\");\n Breve2DDynamics dynamics = (Breve2DDynamics) ClassCreation.createObject(\"String_Node_Str\");\n setNNInputParameters(dynamics.numInputSensors(), NNBreve2DMonster.NUM_OUTPUTS);\n } else if (task instanceof TorusPredPreyTask) {\n System.out.println(\"String_Node_Str\");\n NetworkTask t = (NetworkTask) task;\n setNNInputParameters(t.sensorLabels().length, t.outputLabels().length);\n } else if (task instanceof UT2004Task) {\n System.out.println(\"String_Node_Str\");\n UT2004Task utTask = (UT2004Task) task;\n setNNInputParameters(utTask.sensorModel.numberOfSensors(), utTask.outputModel.numberOfOutputs());\n } else if (task instanceof MatchDataTask) {\n System.out.println(\"String_Node_Str\");\n MatchDataTask t = (MatchDataTask) task;\n setNNInputParameters(t.numInputs(), t.numOutputs());\n } else {\n setNNInputParameters(5, 3);\n }\n setupMetaHeuristics();\n if (!loadFrom) {\n System.out.println(\"String_Node_Str\");\n ea = (GenerationalEA) ClassCreation.createObject(\"String_Node_Str\");\n }\n System.out.println(\"String_Node_Str\");\n String seedGenotype = Parameters.parameters.stringParameter(\"String_Node_Str\");\n if (task instanceof MsPacManTask && Parameters.parameters.booleanParameter(\"String_Node_Str\") && CommonConstants.multitaskModes == 2) {\n System.out.println(\"String_Node_Str\");\n String ghostDir = Parameters.parameters.stringParameter(\"String_Node_Str\");\n String pillDir = Parameters.parameters.stringParameter(\"String_Node_Str\");\n String lastSavedDirectory = Parameters.parameters.stringParameter(\"String_Node_Str\");\n if (lastSavedDirectory.isEmpty()) {\n if (!ghostDir.isEmpty() && !pillDir.isEmpty()) {\n setupMultitaskSeedPopulationForMsPacman(ghostDir, pillDir);\n } else {\n setupSingleMultitaskSeedForMsPacman();\n }\n }\n System.out.println(\"String_Node_Str\");\n MsPacManControllerInputOutputMediator ghostMediator = (MsPacManControllerInputOutputMediator) ClassCreation.createObject(\"String_Node_Str\");\n MsPacManControllerInputOutputMediator pillMediator = (MsPacManControllerInputOutputMediator) ClassCreation.createObject(\"String_Node_Str\");\n pacmanInputOutputMediator = new MultipleInputOutputMediator(new MsPacManControllerInputOutputMediator[] { ghostMediator, pillMediator });\n setNNInputParameters(pacmanInputOutputMediator.numIn(), pacmanInputOutputMediator.numOut());\n } else if (seedGenotype.isEmpty()) {\n genotype = (Genotype) ClassCreation.createObject(\"String_Node_Str\");\n } else {\n System.out.println(\"String_Node_Str\" + seedGenotype);\n genotype = ((Genotype) Easy.load(seedGenotype)).copy();\n seedExample = true;\n }\n setupTWEANNGenotypeDataTracking(coevolution);\n System.out.println(\"String_Node_Str\");\n experiment = (Experiment) ClassCreation.createObject(\"String_Node_Str\");\n experiment.init();\n if (!loadFrom && Parameters.parameters.booleanParameter(\"String_Node_Str\")) {\n if (!coevolution) {\n performanceLog = new PerformanceLog(\"String_Node_Str\");\n }\n EvolutionaryHistory.initLineageAndMutationLogs();\n }\n } catch (Exception ex) {\n System.out.println(\"String_Node_Str\" + ex);\n ex.printStackTrace();\n }\n}\n"
"public ResourceTO create(final HttpServletResponse response, final ResourceTO resourceTO) throws SyncopeClientCompositeErrorException, NotFoundException {\n LOG.debug(\"String_Node_Str\", resourceTO);\n SyncopeClientCompositeErrorException scce = new SyncopeClientCompositeErrorException(HttpStatus.BAD_REQUEST);\n if (resourceTO == null) {\n LOG.error(\"String_Node_Str\");\n throw new NotFoundException(\"String_Node_Str\");\n }\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"String_Node_Str\");\n }\n if (resourceDAO.find(resourceTO.getName()) != null) {\n SyncopeClientException ex = new SyncopeClientException(SyncopeClientExceptionType.DuplicateUniqueValue);\n ex.addElement(resourceTO.getName());\n scce.addException(ex);\n throw scce;\n }\n TargetResource resource = binder.getResource(resourceTO);\n if (resource == null) {\n LOG.error(\"String_Node_Str\");\n SyncopeClientException ex = new SyncopeClientException(SyncopeClientExceptionType.Unknown);\n scce.addException(ex);\n throw scce;\n }\n try {\n resource = resourceDAO.save(resource);\n } catch (InvalidEntityException e) {\n SyncopeClientException ex = new SyncopeClientException(SyncopeClientExceptionType.InvalidSchemaMapping);\n scce.addException(ex);\n throw scce;\n }\n response.setStatus(HttpServletResponse.SC_CREATED);\n return binder.getResourceTO(resource);\n}\n"
"public static boolean hasDeathTpPlus() {\n return deathTpPlusPlugin != null && deathTpPlusPlugin.isEnabled();\n}\n"
"private void genElement(String defPath, HierarchicalTableGenerator gen, List<Row> rows, ElementDefinition element, List<ElementDefinition> all, List<StructureDefinition> profiles, boolean showMissing, String profileBaseFileName, Boolean extensions, boolean snapshot, String corePath) throws IOException {\n StructureDefinition profile = profiles == null ? null : profiles.get(profiles.size() - 1);\n String s = tail(element.getPath());\n List<ElementDefinition> children = getChildren(all, element);\n boolean isExtension = (s.equals(\"String_Node_Str\") || s.equals(\"String_Node_Str\"));\n if (!snapshot && extensions != null && extensions != isExtension)\n return;\n if (!onlyInformationIsMapping(all, element)) {\n Row row = gen.new Row();\n row.setAnchor(element.getPath());\n row.setColor(getRowColor(element));\n boolean hasDef = element != null;\n boolean ext = false;\n if (s.equals(\"String_Node_Str\") || s.equals(\"String_Node_Str\")) {\n if (element.hasType() && element.getType().get(0).hasProfile() && extensionIsComplex(element.getType().get(0).getProfile().get(0).getValue()))\n row.setIcon(\"String_Node_Str\", HierarchicalTableGenerator.TEXT_ICON_EXTENSION_COMPLEX);\n else\n row.setIcon(\"String_Node_Str\", HierarchicalTableGenerator.TEXT_ICON_EXTENSION_SIMPLE);\n ext = true;\n } else if (!hasDef || element.getType().size() == 0)\n row.setIcon(\"String_Node_Str\", HierarchicalTableGenerator.TEXT_ICON_ELEMENT);\n else if (hasDef && element.getType().size() > 1) {\n if (allTypesAre(element.getType(), \"String_Node_Str\"))\n row.setIcon(\"String_Node_Str\", HierarchicalTableGenerator.TEXT_ICON_REFERENCE);\n else\n row.setIcon(\"String_Node_Str\", HierarchicalTableGenerator.TEXT_ICON_CHOICE);\n } else if (hasDef && element.getType().get(0).getCode() != null && element.getType().get(0).getCode().startsWith(\"String_Node_Str\"))\n row.setIcon(\"String_Node_Str\", HierarchicalTableGenerator.TEXT_ICON_REUSE);\n else if (hasDef && isPrimitive(element.getType().get(0).getCode()))\n row.setIcon(\"String_Node_Str\", HierarchicalTableGenerator.TEXT_ICON_PRIMITIVE);\n else if (hasDef && isReference(element.getType().get(0).getCode()))\n row.setIcon(\"String_Node_Str\", HierarchicalTableGenerator.TEXT_ICON_REFERENCE);\n else if (hasDef && isDataType(element.getType().get(0).getCode()))\n row.setIcon(\"String_Node_Str\", HierarchicalTableGenerator.TEXT_ICON_DATATYPE);\n else\n row.setIcon(\"String_Node_Str\", HierarchicalTableGenerator.TEXT_ICON_RESOURCE);\n String ref = defPath == null ? null : defPath + makePathLink(element);\n UnusedTracker used = new UnusedTracker();\n used.used = true;\n Cell left = gen.new Cell(null, ref, s, !hasDef ? null : element.getDefinition(), null);\n row.getCells().add(left);\n Cell gc = gen.new Cell();\n row.getCells().add(gc);\n if (element != null && element.getIsModifier())\n checkForNoChange(element.getIsModifierElement(), gc.addImage(corePath + \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", null, null));\n if (element != null && element.getMustSupport())\n checkForNoChange(element.getMustSupportElement(), gc.addImage(corePath + \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n if (element != null && element.getIsSummary())\n checkForNoChange(element.getIsSummaryElement(), gc.addImage(corePath + \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n if (element != null && (!element.getConstraint().isEmpty() || !element.getCondition().isEmpty()))\n gc.addImage(corePath + \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n ExtensionContext extDefn = null;\n if (ext) {\n if (element != null && element.getType().size() == 1 && element.getType().get(0).hasProfile()) {\n extDefn = locateExtension(StructureDefinition.class, element.getType().get(0).getProfile().get(0).getValue());\n if (extDefn == null) {\n genCardinality(gen, element, row, hasDef, used, null);\n row.getCells().add(gen.new Cell(null, null, \"String_Node_Str\" + element.getType().get(0).getProfile(), null, null));\n generateDescription(gen, row, element, null, used.used, profile.getUrl(), element.getType().get(0).getProfile().get(0).getValue(), profile, corePath);\n } else {\n String name = urltail(element.getType().get(0).getProfile().get(0).getValue());\n left.getPieces().get(0).setText(name);\n left.getPieces().get(0).setHint(\"String_Node_Str\" + extDefn.getUrl());\n genCardinality(gen, element, row, hasDef, used, extDefn.getElement());\n ElementDefinition valueDefn = extDefn.getExtensionValueDefinition();\n if (valueDefn != null && !\"String_Node_Str\".equals(valueDefn.getMax()))\n genTypes(gen, row, valueDefn, profileBaseFileName, profile, corePath);\n else\n row.getCells().add(gen.new Cell(null, null, \"String_Node_Str\", null, null));\n generateDescription(gen, row, element, extDefn.getElement(), used.used, null, extDefn.getUrl(), profile, corePath);\n }\n } else {\n genCardinality(gen, element, row, hasDef, used, null);\n if (\"String_Node_Str\".equals(element.getMax()))\n row.getCells().add(gen.new Cell());\n else\n genTypes(gen, row, element, profileBaseFileName, profile, corePath);\n generateDescription(gen, row, element, null, used.used, null, null, profile, corePath);\n }\n } else {\n genCardinality(gen, element, row, hasDef, used, null);\n if (hasDef && !\"String_Node_Str\".equals(element.getMax()))\n genTypes(gen, row, element, profileBaseFileName, profile, corePath);\n else\n row.getCells().add(gen.new Cell());\n generateDescription(gen, row, element, null, used.used, null, null, profile, corePath);\n }\n if (element.hasSlicing()) {\n if (standardExtensionSlicing(element)) {\n used.used = element.hasType() && element.getType().get(0).hasProfile();\n showMissing = false;\n } else {\n row.setIcon(\"String_Node_Str\", HierarchicalTableGenerator.TEXT_ICON_SLICE);\n row.getCells().get(2).getPieces().clear();\n for (Cell cell : row.getCells()) for (Piece p : cell.getPieces()) {\n p.addStyle(\"String_Node_Str\");\n }\n }\n }\n if (used.used || showMissing)\n rows.add(row);\n if (!used.used && !element.hasSlicing()) {\n for (Cell cell : row.getCells()) for (Piece p : cell.getPieces()) {\n p.setStyle(\"String_Node_Str\");\n p.setReference(null);\n }\n } else {\n for (ElementDefinition child : children) if (!child.getPath().endsWith(\"String_Node_Str\"))\n genElement(defPath, gen, row.getSubRows(), child, all, profiles, showMissing, profileBaseFileName, isExtension, snapshot, corePath);\n if (!snapshot && (extensions == null || !extensions))\n for (ElementDefinition child : children) if (child.getPath().endsWith(\"String_Node_Str\"))\n genElement(defPath, gen, row.getSubRows(), child, all, profiles, showMissing, profileBaseFileName, true, false, corePath);\n }\n }\n}\n"
"public static void reset() {\n expected.reset();\n complete.reset();\n latch = new CountDownLatch(1);\n Lock lock = taskLock;\n lock.lock();\n try {\n taskLock = new ReentrantLock();\n available = taskLock.newCondition();\n } finally {\n lock.unlock();\n }\n}\n"
"public void export(ISet set, String sFileName, boolean bExportBucketInternal) {\n IVirtualArray contentVA = null;\n IVirtualArray storageVA = null;\n Collection<AGLEventListener> views = GeneralManager.get().getViewGLCanvasManager().getAllGLEventListeners();\n for (AGLEventListener view : views) {\n if (view instanceof GLParallelCoordinates && view.isRenderedRemote() && bExportBucketInternal) {\n contentVA = set.getVA(view.getContentVAID());\n storageVA = set.getVA(view.getStorageVAID());\n break;\n } else if (!view.isRenderedRemote() && (view instanceof GLParallelCoordinates || view instanceof GLHierarchicalHeatMap) && !bExportBucketInternal) {\n contentVA = set.getVA(view.getContentVAID());\n storageVA = set.getVA(view.getStorageVAID());\n break;\n }\n }\n if (contentVA == null || storageVA == null)\n throw new IllegalStateException(\"String_Node_Str\");\n try {\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(sFileName)));\n out.print(\"String_Node_Str\");\n for (Integer iStorageIndex : storageVA) {\n out.print(set.get(iStorageIndex).getLabel());\n out.print(\"String_Node_Str\");\n }\n out.println();\n for (Integer iContentIndex : contentVA) {\n IIDMappingManager iDMappingManager = GeneralManager.get().getIDMappingManager();\n Integer iRefseqMrnaInt = iDMappingManager.getID(EMappingType.EXPRESSION_INDEX_2_REFSEQ_MRNA_INT, iContentIndex);\n if (iRefseqMrnaInt == null) {\n continue;\n }\n String sRefseqMrna = iDMappingManager.getID(EMappingType.REFSEQ_MRNA_INT_2_REFSEQ_MRNA, iRefseqMrnaInt);\n out.print(sRefseqMrna + \"String_Node_Str\");\n for (Integer iStorageIndex : storageVA) {\n IStorage storage = set.get(iStorageIndex);\n out.print(storage.getFloat(EDataRepresentation.RAW, iContentIndex));\n out.print(\"String_Node_Str\");\n }\n out.println();\n }\n out.close();\n } catch (IOException e) {\n }\n}\n"
"public void startRequest(MRCRequest rq) {\n try {\n final renameRequest rqArgs = (renameRequest) rq.getRequestArgs();\n final VolumeManager vMan = master.getVolumeManager();\n final FileAccessManager faMan = master.getFileAccessManager();\n validateContext(rq);\n final Path sp = new Path(rqArgs.getSource_path());\n final VolumeInfo volume = vMan.getVolumeByName(sp.getComp(0));\n final StorageManager sMan = vMan.getStorageManager(volume.getId());\n final PathResolver sRes = new PathResolver(sMan, sp);\n faMan.checkSearchPermission(sMan, sRes, rq.getDetails().userId, rq.getDetails().superUser, rq.getDetails().groupIds);\n faMan.checkPermission(FileAccessManager.O_WRONLY, sMan, sRes.getParentDir(), sRes.getParentsParentId(), rq.getDetails().userId, rq.getDetails().superUser, rq.getDetails().groupIds);\n final Path tp = new Path(rqArgs.getTarget_path());\n if (sp.getCompCount() == 1)\n throw new UserException(ErrNo.ENOENT, \"String_Node_Str\");\n if (!sp.getComp(0).equals(tp.getComp(0)))\n throw new UserException(ErrNo.ENOENT, \"String_Node_Str\");\n sRes.checkIfFileDoesNotExist();\n faMan.checkPermission(FileAccessManager.NON_POSIX_RM_MV_IN_DIR, sMan, sRes.getFile(), sRes.getParentDirId(), rq.getDetails().userId, rq.getDetails().superUser, rq.getDetails().groupIds);\n FileMetadata source = sRes.getFile();\n FileType sourceType = source.isDirectory() ? FileType.dir : FileType.file;\n final PathResolver tRes = new PathResolver(sMan, tp);\n FileMetadata targetParentDir = tRes.getParentDir();\n if (targetParentDir == null || !targetParentDir.isDirectory())\n throw new UserException(ErrNo.ENOTDIR, \"String_Node_Str\" + tp.getComps(0, tp.getCompCount() - 2) + \"String_Node_Str\");\n FileMetadata target = tRes.getFile();\n FileType targetType = tp.getCompCount() == 1 ? FileType.dir : target == null ? FileType.nexists : target.isDirectory() ? FileType.dir : FileType.file;\n FileCredentialsSet creds = new FileCredentialsSet();\n if (sp.equals(tp)) {\n rq.setResponse(new renameResponse(creds));\n finishRequest(rq);\n return;\n }\n faMan.checkSearchPermission(sMan, tRes, rq.getDetails().userId, rq.getDetails().superUser, rq.getDetails().groupIds);\n faMan.checkPermission(FileAccessManager.O_WRONLY, sMan, tRes.getParentDir(), tRes.getParentsParentId(), rq.getDetails().userId, rq.getDetails().superUser, rq.getDetails().groupIds);\n AtomicDBUpdate update = sMan.createAtomicDBUpdate(master, rq);\n switch(sourceType) {\n case dir:\n {\n if (tp.isSubDirOf(sp))\n throw new UserException(ErrNo.EINVAL, \"String_Node_Str\" + sp + \"String_Node_Str\");\n switch(targetType) {\n case nexists:\n {\n short newLinkCount = sMan.unlink(sRes.getParentDirId(), sRes.getFileName(), update);\n source.setLinkCount(newLinkCount);\n source.setCtime((int) (TimeSync.getGlobalTime() / 1000));\n sMan.link(source, tRes.getParentDirId(), tRes.getFileName(), update);\n break;\n }\n case dir:\n {\n faMan.checkPermission(FileAccessManager.NON_POSIX_DELETE, sMan, target, tRes.getParentDirId(), rq.getDetails().userId, rq.getDetails().superUser, rq.getDetails().groupIds);\n if (sMan.getChildren(target.getId()).hasNext())\n throw new UserException(ErrNo.ENOTEMPTY, \"String_Node_Str\" + tRes + \"String_Node_Str\");\n else\n sMan.delete(tRes.getParentDirId(), tRes.getFileName(), update);\n short newLinkCount = sMan.delete(sRes.getParentDirId(), sRes.getFileName(), update);\n source.setLinkCount(newLinkCount);\n source.setCtime((int) (TimeSync.getGlobalTime() / 1000));\n sMan.link(source, tRes.getParentDirId(), tRes.getFileName(), update);\n break;\n }\n case file:\n throw new UserException(ErrNo.ENOTDIR, \"String_Node_Str\" + sRes + \"String_Node_Str\" + tRes + \"String_Node_Str\");\n }\n break;\n }\n case file:\n {\n switch(targetType) {\n case nexists:\n {\n short newLinkCount = sMan.delete(sRes.getParentDirId(), sRes.getFileName(), update);\n source.setLinkCount(newLinkCount);\n source.setCtime((int) (TimeSync.getGlobalTime() / 1000));\n sMan.link(source, tRes.getParentDirId(), tRes.getFileName(), update);\n break;\n }\n case dir:\n {\n throw new UserException(ErrNo.EISDIR, \"String_Node_Str\" + sRes + \"String_Node_Str\" + tRes + \"String_Node_Str\");\n }\n case file:\n {\n if (target.getLinkCount() == 1) {\n Capability cap = new Capability(volume.getId() + \"String_Node_Str\" + target.getId(), FileAccessManager.NON_POSIX_DELETE, Integer.MAX_VALUE, ((InetSocketAddress) rq.getRPCRequest().getClientIdentity()).getAddress().getHostAddress(), target.getEpoch(), master.getConfig().getCapabilitySecret());\n creds.add(new FileCredentials(Converter.xLocListToXLocSet(target.getXLocList()), cap.getXCap()));\n }\n sMan.delete(tRes.getParentDirId(), tRes.getFileName(), update);\n short newLinkCount = sMan.delete(sRes.getParentDirId(), sRes.getFileName(), update);\n source.setLinkCount(newLinkCount);\n source.setCtime((int) (TimeSync.getGlobalTime() / 1000));\n sMan.link(source, tRes.getParentDirId(), tRes.getFileName(), update);\n break;\n }\n }\n }\n }\n MRCHelper.updateFileTimes(sRes.getParentsParentId(), sRes.getParentDir(), false, true, true, sMan, update);\n MRCHelper.updateFileTimes(tRes.getParentsParentId(), tRes.getParentDir(), false, true, true, sMan, update);\n rq.setResponse(new renameResponse(creds));\n update.execute();\n } catch (UserException exc) {\n Logging.logMessage(Logging.LEVEL_TRACE, this, exc);\n finishRequest(rq, new ErrorRecord(ErrorClass.USER_EXCEPTION, exc.getErrno(), exc.getMessage(), exc));\n } catch (Throwable exc) {\n finishRequest(rq, new ErrorRecord(ErrorClass.INTERNAL_SERVER_ERROR, \"String_Node_Str\", exc));\n }\n}\n"
"public void run() {\n Project project = new ObjcProject(path);\n project.readProject();\n com.away1994.tsp.feature.plantuml.classes.ClassesDiagram diagram = project.getClassesDiagram();\n try {\n String out = output != null ? output : \"String_Node_Str\" + file.getName() + \"String_Node_Str\";\n Output.writeToFile(out, diagram.getPUTextDescription());\n } catch (IOException e) {\n e.printStackTrace();\n }\n}\n"
"public void writeToPacket(DatagramPacket packet) {\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n DataOutputStream dos = new DataOutputStream(bos);\n try {\n writeData(dos);\n packet.setData(bos.toByteArray());\n packet.setLength(bos.size());\n } catch (IOException e) {\n e.printStackTrace();\n }\n}\n"
"public static int getLatestVersion() {\n return VERSION_4_2_3;\n}\n"
"public Computation<VerificationResult> cloneComputation() {\n ValidityRegionsComputation computation = new ValidityRegionsComputation(odeSystem, precisionConfiguration, originalSimulationSpace, initialSpace, property, iterationLimit);\n computation.currentIteration = this.currentIteration;\n computation.spawned = this.spawned;\n return computation;\n}\n"
"public void handleEvent(Event event) {\n fbException = false;\n if (event.type == CustomPreviewTable.MOUSE_RIGHT_CLICK_TYPE) {\n if (getDataServiceProvider().getBoundDataSet() != null || getDataServiceProvider().getReportDataSet() != null) {\n if (event.widget instanceof Button) {\n Button header = (Button) event.widget;\n if (header.getMenu() == null) {\n header.setMenu(createMenuManager(event.data).createContextMenu(tablePreview));\n }\n header.getMenu().setVisible(true);\n }\n }\n } else if (event.type == SWT.Selection) {\n if (event.widget instanceof MenuItem) {\n MenuItem item = (MenuItem) event.widget;\n IAction action = (IAction) item.getData();\n action.setChecked(!action.isChecked());\n action.run();\n } else if (event.widget == btnFilters) {\n if (invokeEditFilter() == Window.OK) {\n refreshTablePreview();\n fireEvent(btnFilters, EVENT_PREVIEW);\n }\n } else if (event.widget == btnParameters) {\n if (invokeEditParameter() == Window.OK) {\n refreshTablePreview();\n fireEvent(btnParameters, EVENT_UPDATE);\n }\n } else if (event.widget == btnBinding) {\n if (invokeDataBinding() == Window.OK) {\n refreshTablePreview();\n fireEvent(btnBinding, EVENT_UPDATE);\n }\n }\n try {\n if (event.widget == btnInherit) {\n ColorPalette.getInstance().restore();\n if (!btnInherit.getSelection()) {\n return;\n }\n getDataServiceProvider().setReportItemReference(null);\n getDataServiceProvider().setDataSet(null);\n switchDataSet(null);\n cmbDataItems.select(0);\n cmbDataItems.setEnabled(false);\n setEnabledForButtons();\n updateDragDataSource();\n } else if (event.widget == btnUseData) {\n if (!btnUseData.getSelection()) {\n return;\n }\n getDataServiceProvider().setReportItemReference(null);\n selectDataSet();\n cmbDataItems.setEnabled(true);\n setEnabledForButtons();\n updateDragDataSource();\n } else if (event.widget == cmbDataItems) {\n ColorPalette.getInstance().restore();\n int selectedIndex = cmbDataItems.getSelectionIndex();\n Integer selectState = (Integer) selectDataTypes.get(selectedIndex);\n switch(selectState.intValue()) {\n case SELECT_NONE:\n btnInherit.setSelection(true);\n btnUseData.setSelection(false);\n btnInherit.notifyListeners(SWT.Selection, new Event());\n break;\n case SELECT_NEXT:\n selectedIndex++;\n selectState = (Integer) selectDataTypes.get(selectedIndex);\n cmbDataItems.select(selectedIndex);\n break;\n }\n switch(selectState.intValue()) {\n case SELECT_DATA_SET:\n if (getDataServiceProvider().getBoundDataSet() != null && getDataServiceProvider().getBoundDataSet().equals(cmbDataItems.getText())) {\n return;\n }\n getDataServiceProvider().setDataSet(cmbDataItems.getText());\n switchDataSet(cmbDataItems.getText());\n setEnabledForButtons();\n updateDragDataSource();\n break;\n case SELECT_DATA_CUBE:\n getDataServiceProvider().setDataCube(cmbDataItems.getText());\n updateDragDataSource();\n setEnabledForButtons();\n break;\n case SELECT_REPORT_ITEM:\n if (cmbDataItems.getText().equals(getDataServiceProvider().getReportItemReference())) {\n return;\n }\n getDataServiceProvider().setReportItemReference(cmbDataItems.getText());\n setEnabledForButtons();\n updateDragDataSource();\n break;\n }\n } else if (event.widget == btnNewData) {\n int result = invokeNewDataSet();\n if (result == Window.CANCEL) {\n return;\n }\n String currentDataSet = cmbDataItems.getText();\n cmbDataItems.removeAll();\n cmbDataItems.setItems(createDataComboItems());\n cmbDataItems.setText(currentDataSet);\n }\n } catch (ChartException e1) {\n fbException = true;\n ChartWizard.showException(e1.getLocalizedMessage());\n }\n }\n if (!fbException) {\n WizardBase.removeException();\n }\n}\n"
"public List<Object[]> executeQuery(DataManager connection, List<ModelElement> analysedElements, String where) throws SQLException {\n getDataFromTable().clear();\n try {\n beginQuery();\n } catch (Exception e1) {\n log.error(e1.getMessage(), e1);\n return getDataFromTable();\n }\n DelimitedFileConnection delimitedFileconnection = (DelimitedFileConnection) connection;\n String path = JavaSqlFactory.getURL(delimitedFileconnection);\n IPath iPath = new Path(path);\n try {\n File file = iPath.toFile();\n if (!file.exists()) {\n return new ArrayList<Object[]>();\n }\n if (Escape.CSV.equals(delimitedFileconnection.getEscapeType())) {\n useCsvReader(file, delimitedFileconnection, analysedElements);\n } else {\n useFileInputDelimited(analysedElements, delimitedFileconnection);\n }\n endQuery();\n } catch (IOException e) {\n log.error(e.getMessage(), e);\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n }\n return getDataFromTable();\n}\n"
"public void fillPackage(CarriagePackage Package) throws CarriageMotionException {\n Directions SupportDirection = null;\n for (Directions Direction : Directions.values()) {\n if (!SideClosed[Direction.ordinal()]) {\n SupportDirection = Direction;\n break;\n }\n }\n if (SupportDirection == null) {\n return;\n }\n BlockRecordSet ValidColumns = new BlockRecordSet();\n int ValidColumnCheckFactorX = (SupportDirection.deltaX == 0) ? (1) : (0);\n int ValidColumnCheckFactorY = (SupportDirection.deltaY == 0) ? (1) : (0);\n int ValidColumnCheckFactorZ = (SupportDirection.deltaZ == 0) ? (1) : (0);\n BlockRecordSet BlocksChecked = new BlockRecordSet();\n BlockRecordSet CarriagesToCheck = new BlockRecordSet();\n BlockRecordSet BlocksToCheck = new BlockRecordSet();\n BlocksChecked.add(Package.AnchorRecord);\n Package.AddBlock(Package.AnchorRecord);\n CarriagesToCheck.add(Package.AnchorRecord);\n int BlocksCarried = 0;\n boolean terminatedByReversal = false;\n while (CarriagesToCheck.size() > 0) {\n BlockRecord CarriageRecord = CarriagesToCheck.pollFirst();\n if (((TileEntitySupportCarriage) CarriageRecord.entity).SideClosed[SupportDirection.ordinal()]) {\n throw (new CarriageMotionException(\"String_Node_Str\"));\n }\n ValidColumns.add(new BlockRecord(CarriageRecord.X * ValidColumnCheckFactorX, CarriageRecord.Y * ValidColumnCheckFactorY, CarriageRecord.Z * ValidColumnCheckFactorZ));\n if (Package.MotionDirection == SupportDirection.opposite()) {\n Package.AddPotentialObstruction(CarriageRecord.NextInDirection(Package.MotionDirection));\n }\n for (Directions TargetDirection : Directions.values()) {\n if (TargetDirection == SupportDirection.opposite()) {\n continue;\n }\n BlockRecord TargetRecord = CarriageRecord.NextInDirection(TargetDirection);\n if (!BlocksChecked.add(TargetRecord)) {\n continue;\n }\n if (worldObj.isAirBlock(TargetRecord.X, TargetRecord.Y, TargetRecord.Z)) {\n continue;\n }\n TargetRecord.Identify(worldObj);\n if (TargetDirection == SupportDirection && !terminatedByReversal) {\n Package.AddBlock(TargetRecord);\n BlocksToCheck.add(TargetRecord);\n BlocksCarried++;\n if (BlocksCarried > RiMConfiguration.Carriage.MaxSupportBurden) {\n FailBecauseOverburdened();\n }\n if (TargetRecord.entity != null && TargetRecord.entity instanceof TileEntitySupportCarriage) {\n if (((TileEntityCarriage) TargetRecord.entity).treatSideAsClosed(SupportDirection.oppositeOrdinal)) {\n terminatedByReversal = true;\n }\n }\n continue;\n }\n if (Package.MatchesCarriageType(TargetRecord)) {\n Package.AddBlock(TargetRecord);\n CarriagesToCheck.add(TargetRecord);\n continue;\n }\n if (TargetDirection == Package.MotionDirection) {\n Package.AddPotentialObstruction(TargetRecord);\n }\n }\n }\n terminatedByReversal = false;\n while (BlocksToCheck.size() > 0) {\n BlockRecord BlockRecord = BlocksToCheck.pollFirst();\n for (Directions TargetDirection : Directions.values()) {\n BlockRecord TargetRecord = BlockRecord.NextInDirection(TargetDirection);\n {\n BlockRecord TargetRecordCheck = new BlockRecord(TargetRecord.X * ValidColumnCheckFactorX, TargetRecord.Y * ValidColumnCheckFactorY, TargetRecord.Z * ValidColumnCheckFactorZ);\n if (!ValidColumns.contains(TargetRecordCheck)) {\n if (TargetDirection == Package.MotionDirection) {\n Package.AddPotentialObstruction(TargetRecord);\n }\n continue;\n }\n }\n if (!BlocksChecked.add(TargetRecord)) {\n continue;\n }\n if (worldObj.isAirBlock(TargetRecord.X, TargetRecord.Y, TargetRecord.Z)) {\n continue;\n }\n TargetRecord.Identify(worldObj);\n if (SupportDirection == TargetDirection && terminatedByReversal)\n continue;\n if (TargetRecord.entity != null && TargetRecord.entity instanceof TileEntitySupportCarriage) {\n if (!((TileEntityCarriage) TargetRecord.entity).treatSideAsClosed(SupportDirection.oppositeOrdinal)) {\n terminatedByReversal = true;\n }\n }\n Package.AddBlock(TargetRecord);\n BlocksToCheck.add(TargetRecord);\n BlocksCarried++;\n if (BlocksCarried > RiMConfiguration.Carriage.MaxSupportBurden) {\n FailBecauseOverburdened();\n }\n }\n }\n}\n"
"protected void updateMessagesList() {\n final int oldMessagesCount = messagesAdapter.getAllItems().size();\n (new BaseAsyncTask<Void, Void, Boolean>() {\n public Boolean performInBackground(Void... params) throws Exception {\n combinationMessagesList = createCombinationMessagesList();\n processCombinationMessages();\n return true;\n }\n public void onResult(Boolean aBoolean) {\n messagesAdapter.setList(combinationMessagesList);\n checkForScrolling(oldMessagesCount);\n }\n public void onException(Exception e) {\n ErrorUtils.showError(GroupDialogActivity.this, e);\n }\n }).execute();\n}\n"
"public void activateBehavior(BehaviorState behaviorState) {\n if (Level > 0) {\n Behavior = behaviorState;\n MPet.sendMessageToOwner(MyPetUtil.setColors(MyPetLanguage.getString(\"String_Node_Str\")).replace(\"String_Node_Str\", MPet.Name).replace(\"String_Node_Str\", Behavior.name()));\n if (Behavior == BehaviorState.Friendly) {\n MPet.getPet().setTarget(null);\n }\n } else {\n MPet.sendMessageToOwner(MyPetUtil.setColors(MyPetLanguage.getString(\"String_Node_Str\")).replace(\"String_Node_Str\", MPet.Name).replace(\"String_Node_Str\", this.Name));\n }\n}\n"
"public final void stopParsing() {\n try {\n context.stop();\n } finally {\n try {\n context.stop();\n } finally {\n output.appender.reset();\n input.stop();\n }\n }\n}\n"
"void addFilter(ApplicationFilterConfig filterConfig) {\n boolean add = true;\n String filterName = filterConfig.getFilterName();\n for (int i = 0; i < n; i++) {\n ApplicationFilterConfig afc = filters[i];\n if (afc != null && filterName.equals(afc.getFilterName())) {\n add = false;\n break;\n }\n }\n if (add) {\n if (n == filters.length) {\n ApplicationFilterConfig[] newFilters = new ApplicationFilterConfig[n + INCREMENT];\n System.arraycopy(filters, 0, newFilters, 0, n);\n filters = newFilters;\n }\n filters[n++] = filterConfig;\n }\n filters[n++] = filterConfig;\n}\n"
"public void createFieldEditors(Composite composite) {\n pcalParamEditor = new StringFieldEditor(IPreferenceConstants.PCAL_CAL_PARAMS, \"String_Node_Str\", composite);\n addEditor(pcalParamEditor);\n}\n"
"public CarvableVariation getVariation(ItemStack stack) {\n return carverHelper.getVariation(blockMeta + (stack.getItemDamage() / 8));\n}\n"
"private void deliverNewIntents(ActivityClientRecord r, List<ReferrerIntent> intents) {\n final int N = intents.size();\n for (int i = 0; i < N; i++) {\n ReferrerIntent intent = intents.get(i);\n intent.setExtrasClassLoader(r.activity.getClassLoader());\n intent.prepareToEnterProcess();\n r.activity.mFragments.noteStateNotSaved();\n mInstrumentation.callActivityOnNewIntent(r.activity, intent);\n }\n}\n"
"private void maybeAddFunction(Function fn, JSModule module) {\n String name = fn.getName();\n FunctionState fs = getOrCreateFunctionState(name);\n if (fs.hasExistingFunctionDefinition()) {\n fs.setInline(false);\n return;\n }\n Node fnNode = fn.getFunctionNode();\n if (enforceMaxSizeAfterInlining && !isAlwaysInlinable(fnNode) && maxSizeAfterInlining <= NodeUtil.countAstSizeUpToLimit(fnNode, maxSizeAfterInlining)) {\n fs.setInline(false);\n return;\n }\n if (fs.canInline()) {\n fs.setFn(fn);\n if (FunctionInjector.isDirectCallNodeReplacementPossible(fn.getFunctionNode())) {\n fs.inlineDirectly(true);\n }\n if (!isCandidateFunction(fn)) {\n fs.setInline(false);\n }\n if (fs.canInline()) {\n fs.setModule(module);\n Set<String> namesToAlias = FunctionArgumentInjector.findModifiedParameters(fnNode);\n if (!namesToAlias.isEmpty()) {\n fs.inlineDirectly(false);\n fs.setNamesToAlias(namesToAlias);\n }\n Node block = NodeUtil.getFunctionBody(fnNode);\n if (NodeUtil.referencesThis(block)) {\n fs.setReferencesThis(true);\n }\n if (NodeUtil.containsFunction(block)) {\n fs.setHasInnerFunctions(true);\n if (!assumeMinimumCapture && hasLocalNames(fnNode)) {\n fs.setInline(false);\n }\n }\n }\n if (fs.canInline() && !fs.canInlineDirectly() && !blockFunctionInliningEnabled) {\n fs.setInline(false);\n }\n }\n}\n"
"public static boolean containsEnchantments(Item book) {\n if (book == null || book.getType() != ItemType.EnchantedBook) {\n return false;\n }\n return verifyTags(book, \"String_Node_Str\", LIST, false);\n}\n"
"public void init() {\n beforeRMActionExecutionDelegate = getPolicyComponent().registerClassPolicy(BeforeRMActionExecution.class);\n onRMActionExecutionDelegate = getPolicyComponent().registerClassPolicy(OnRMActionExecution.class);\n}\n"
"public void setFocus() {\n if (viewState == VIEW_EXPANDED) {\n if (expandedStyle.focus()) {\n repaint();\n } else {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n}\n"
"public void attachSnackbarToActivity() {\n Snackbar snackbar = Snackbar.make(getActivity().findViewById(R.id.patientDashboardContentFrame), getString(R.string.snackbar_no_internet_connection), Snackbar.LENGTH_INDEFINITE);\n View view = snackbar.getView();\n TextView tv = (TextView) view.findViewById(android.support.design.R.id.snackbar_text);\n tv.setTextColor(Color.WHITE);\n snackbar.show();\n}\n"
"public static Set<Pokemon> getMiddleEvolutions(RomHandler baseRom) {\n List<Pokemon> allPokes = baseRom.getPokemon();\n Set<Pokemon> middleEvolutions = new TreeSet<Pokemon>();\n for (Pokemon pkmn : allPokes) {\n if (pkmn != null) {\n if (pkmn.evolutionsTo.size() == 1 && pkmn.evolutionsFrom.size() > 0) {\n Evolution onlyEvo = pkmn.evolutionsTo.get(0);\n if (onlyEvo.carryStats) {\n middleEvolutions.add(pkmn);\n }\n }\n }\n }\n return middleEvolutions;\n}\n"
"public T readRecord(final T target) throws IOException, InterruptedException {\n T record = null;\n if (this.executingThread == null) {\n this.executingThread = Thread.currentThread();\n }\n if (this.executingThread.isInterrupted()) {\n throw new InterruptedException();\n }\n while (true) {\n if (this.channelToReadFrom == -1) {\n this.availableChannelRetVal = waitForAnyChannelToBecomeAvailable();\n this.channelToReadFrom = this.availableChannelRetVal;\n }\n try {\n record = this.getInputChannel(this.channelToReadFrom).readRecord(target);\n } catch (EOFException e) {\n if (this.isClosed()) {\n return null;\n }\n }\n if (record == null && this.channelToReadFrom == this.availableChannelRetVal) {\n this.channelToReadFrom = -1;\n continue;\n }\n if (++this.channelToReadFrom == numberOfInputChannels) {\n this.channelToReadFrom = 0;\n }\n if (record != null) {\n break;\n } else {\n if (this.channelToReadFrom == this.availableChannelRetVal) {\n this.channelToReadFrom = -1;\n }\n }\n }\n this.streamListener.recordReceived(record);\n return record;\n}\n"
"public void run() {\n runing = true;\n LOGGER.info(\"String_Node_Str\");\n Map<String, FactoryBeanInvokeInfo> failedBeans;\n FailOverInterceptor interceptor = proxyFactoryBean.getFailOverInterceptor();\n while (proxyFactoryBean.hasFactoryBeanFailed() && !close) {\n failedBeans = proxyFactoryBean.getFailedFactoryBeans();\n if (failedBeans == null || failedBeans.isEmpty()) {\n return;\n }\n FactoryBeanInvokeInfo invokeInfo;\n for (Map.Entry<String, FactoryBeanInvokeInfo> entry : failedBeans.entrySet()) {\n invokeInfo = entry.getValue();\n boolean available;\n try {\n available = interceptor.isRecover(invokeInfo.getBean(), invokeInfo.getInvocation(), invokeInfo.getBeanKey());\n } catch (Exception e) {\n if (LOGGER.isLoggable(Level.FINE)) {\n LOGGER.log(Level.FINE, e.getMessage());\n }\n available = false;\n }\n if (available) {\n proxyFactoryBean.recoverFactoryBean(entry.getKey());\n LOGGER.info(invokeInfo.getBeanKey() + \"String_Node_Str\");\n } else {\n LOGGER.warn(invokeInfo.getBeanKey() + \"String_Node_Str\");\n }\n }\n try {\n Thread.sleep(getRecoverInterval());\n } catch (Exception e) {\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(e);\n }\n }\n }\n runing = false;\n LOGGER.info(\"String_Node_Str\");\n}\n"
"public static String encodeCell(String cell) {\n String result;\n result = cell.replace(\"String_Node_Str\", \"String_Node_Str\");\n return result;\n}\n"
"private void extractClone() {\n CompilationUnit sourceCompilationUnit = null;\n ICompilationUnit sourceICompilationUnit = null;\n TypeDeclaration sourceTypeDeclaration = null;\n ASTRewrite sourceRewriter = null;\n AST ast = null;\n Document document = null;\n IFile file = null;\n ITypeBinding commonSuperTypeOfSourceTypeDeclarations = null;\n if (sourceTypeDeclarations.get(0).resolveBinding().isEqualTo(sourceTypeDeclarations.get(1).resolveBinding())) {\n sourceCompilationUnit = sourceCompilationUnits.get(0);\n sourceICompilationUnit = (ICompilationUnit) sourceCompilationUnit.getJavaElement();\n sourceTypeDeclaration = sourceTypeDeclarations.get(0);\n sourceRewriter = ASTRewrite.create(sourceTypeDeclaration.getAST());\n ast = sourceTypeDeclaration.getAST();\n } else {\n ITypeBinding typeBinding1 = sourceTypeDeclarations.get(0).resolveBinding();\n ITypeBinding typeBinding2 = sourceTypeDeclarations.get(1).resolveBinding();\n commonSuperTypeOfSourceTypeDeclarations = ASTNodeMatcher.commonSuperType(typeBinding1, typeBinding2);\n if (commonSuperTypeOfSourceTypeDeclarations != null) {\n boolean superclassInheritedOnlyByRefactoringSubclasses = false;\n if (!commonSuperTypeOfSourceTypeDeclarations.getQualifiedName().equals(\"String_Node_Str\")) {\n CompilationUnitCache cache = CompilationUnitCache.getInstance();\n Set<IType> subTypes = cache.getSubTypes((IType) commonSuperTypeOfSourceTypeDeclarations.getJavaElement());\n if (subTypes.size() == 2 && subTypes.contains((IType) typeBinding1.getJavaElement()) && subTypes.contains((IType) typeBinding2.getJavaElement()))\n superclassInheritedOnlyByRefactoringSubclasses = true;\n }\n boolean superclassIsOneOfTheSourceTypeDeclarations = false;\n if (typeBinding1.isEqualTo(commonSuperTypeOfSourceTypeDeclarations) || typeBinding2.isEqualTo(commonSuperTypeOfSourceTypeDeclarations))\n superclassIsOneOfTheSourceTypeDeclarations = true;\n if (((mapper.getAccessedLocalFieldsG1().isEmpty() && mapper.getAccessedLocalFieldsG2().isEmpty() && mapper.getAccessedLocalMethodsG1().isEmpty() && mapper.getAccessedLocalMethodsG2().isEmpty()) || superclassInheritedOnlyByRefactoringSubclasses || superclassIsOneOfTheSourceTypeDeclarations) && ASTReader.getSystemObject().getClassObject(commonSuperTypeOfSourceTypeDeclarations.getQualifiedName()) != null) {\n IJavaElement javaElement = commonSuperTypeOfSourceTypeDeclarations.getJavaElement();\n javaElementsToOpenInEditor.add(javaElement);\n ICompilationUnit iCompilationUnit = (ICompilationUnit) javaElement.getParent();\n ASTParser parser = ASTParser.newParser(AST.JLS4);\n parser.setKind(ASTParser.K_COMPILATION_UNIT);\n parser.setSource(iCompilationUnit);\n parser.setResolveBindings(true);\n CompilationUnit compilationUnit = (CompilationUnit) parser.createAST(null);\n List<AbstractTypeDeclaration> typeDeclarations = compilationUnit.types();\n for (AbstractTypeDeclaration abstractTypeDeclaration : typeDeclarations) {\n if (abstractTypeDeclaration instanceof TypeDeclaration) {\n TypeDeclaration typeDeclaration = (TypeDeclaration) abstractTypeDeclaration;\n if (typeDeclaration.resolveBinding().isEqualTo(commonSuperTypeOfSourceTypeDeclarations)) {\n sourceCompilationUnit = compilationUnit;\n sourceICompilationUnit = iCompilationUnit;\n sourceTypeDeclaration = typeDeclaration;\n sourceRewriter = ASTRewrite.create(sourceTypeDeclaration.getAST());\n ast = sourceTypeDeclaration.getAST();\n break;\n }\n }\n }\n MultiTextEdit multiTextEdit = new MultiTextEdit();\n CompilationUnitChange compilationUnitChange = new CompilationUnitChange(\"String_Node_Str\", iCompilationUnit);\n compilationUnitChange.setEdit(multiTextEdit);\n compilationUnitChanges.put(iCompilationUnit, compilationUnitChange);\n } else {\n this.intermediateClassName = \"String_Node_Str\" + commonSuperTypeOfSourceTypeDeclarations.getName();\n CompilationUnit compilationUnit = sourceCompilationUnits.get(0);\n ICompilationUnit iCompilationUnit = (ICompilationUnit) compilationUnit.getJavaElement();\n IContainer container = (IContainer) iCompilationUnit.getResource().getParent();\n if (container instanceof IProject) {\n IProject contextProject = (IProject) container;\n file = contextProject.getFile(intermediateClassName + \"String_Node_Str\");\n } else if (container instanceof IFolder) {\n IFolder contextFolder = (IFolder) container;\n file = contextFolder.getFile(intermediateClassName + \"String_Node_Str\");\n }\n boolean intermediateAlreadyExists = false;\n ICompilationUnit intermediateICompilationUnit = JavaCore.createCompilationUnitFrom(file);\n javaElementsToOpenInEditor.add(intermediateICompilationUnit);\n ASTParser intermediateParser = ASTParser.newParser(AST.JLS4);\n intermediateParser.setKind(ASTParser.K_COMPILATION_UNIT);\n if (file.exists()) {\n intermediateAlreadyExists = true;\n intermediateParser.setSource(intermediateICompilationUnit);\n intermediateParser.setResolveBindings(true);\n } else {\n document = new Document();\n intermediateParser.setSource(document.get().toCharArray());\n }\n CompilationUnit intermediateCompilationUnit = (CompilationUnit) intermediateParser.createAST(null);\n AST intermediateAST = intermediateCompilationUnit.getAST();\n ASTRewrite intermediateRewriter = ASTRewrite.create(intermediateAST);\n ListRewrite intermediateTypesRewrite = intermediateRewriter.getListRewrite(intermediateCompilationUnit, CompilationUnit.TYPES_PROPERTY);\n TypeDeclaration intermediateTypeDeclaration = null;\n if (intermediateAlreadyExists) {\n List<AbstractTypeDeclaration> abstractTypeDeclarations = intermediateCompilationUnit.types();\n for (AbstractTypeDeclaration abstractTypeDeclaration : abstractTypeDeclarations) {\n if (abstractTypeDeclaration instanceof TypeDeclaration) {\n TypeDeclaration typeDeclaration = (TypeDeclaration) abstractTypeDeclaration;\n if (typeDeclaration.getName().getIdentifier().equals(intermediateClassName)) {\n intermediateTypeDeclaration = typeDeclaration;\n int intermediateModifiers = intermediateTypeDeclaration.getModifiers();\n if ((intermediateModifiers & Modifier.ABSTRACT) == 0) {\n ListRewrite intermediateModifiersRewrite = intermediateRewriter.getListRewrite(intermediateTypeDeclaration, TypeDeclaration.MODIFIERS2_PROPERTY);\n intermediateModifiersRewrite.insertLast(intermediateAST.newModifier(Modifier.ModifierKeyword.ABSTRACT_KEYWORD), null);\n }\n break;\n }\n }\n }\n MultiTextEdit intermediateMultiTextEdit = new MultiTextEdit();\n CompilationUnitChange intermediateCompilationUnitChange = new CompilationUnitChange(\"String_Node_Str\", intermediateICompilationUnit);\n intermediateCompilationUnitChange.setEdit(intermediateMultiTextEdit);\n compilationUnitChanges.put(intermediateICompilationUnit, intermediateCompilationUnitChange);\n } else {\n if (compilationUnit.getPackage() != null) {\n intermediateRewriter.set(intermediateCompilationUnit, CompilationUnit.PACKAGE_PROPERTY, compilationUnit.getPackage(), null);\n }\n intermediateTypeDeclaration = intermediateAST.newTypeDeclaration();\n SimpleName intermediateName = intermediateAST.newSimpleName(intermediateClassName);\n intermediateRewriter.set(intermediateTypeDeclaration, TypeDeclaration.NAME_PROPERTY, intermediateName, null);\n ListRewrite intermediateModifiersRewrite = intermediateRewriter.getListRewrite(intermediateTypeDeclaration, TypeDeclaration.MODIFIERS2_PROPERTY);\n intermediateModifiersRewrite.insertLast(intermediateAST.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD), null);\n intermediateModifiersRewrite.insertLast(intermediateAST.newModifier(Modifier.ModifierKeyword.ABSTRACT_KEYWORD), null);\n intermediateRewriter.set(intermediateTypeDeclaration, TypeDeclaration.SUPERCLASS_TYPE_PROPERTY, intermediateAST.newSimpleType(intermediateAST.newSimpleName(commonSuperTypeOfSourceTypeDeclarations.getName())), null);\n intermediateTypesRewrite.insertLast(intermediateTypeDeclaration, null);\n }\n sourceCompilationUnit = intermediateCompilationUnit;\n sourceICompilationUnit = intermediateICompilationUnit;\n sourceTypeDeclaration = intermediateTypeDeclaration;\n sourceRewriter = intermediateRewriter;\n ast = intermediateAST;\n }\n }\n }\n MethodDeclaration sourceMethodDeclaration = sourceMethodDeclarations.get(0);\n Set<ITypeBinding> requiredImportTypeBindings = new LinkedHashSet<ITypeBinding>();\n ListRewrite bodyDeclarationsRewrite = sourceRewriter.getListRewrite(sourceTypeDeclaration, TypeDeclaration.BODY_DECLARATIONS_PROPERTY);\n if (commonSuperTypeOfSourceTypeDeclarations != null) {\n Set<ITypeBinding> typeBindings = new LinkedHashSet<ITypeBinding>();\n typeBindings.add(commonSuperTypeOfSourceTypeDeclarations);\n getSimpleTypeBindings(typeBindings, requiredImportTypeBindings);\n }\n if (!sourceTypeDeclarations.get(0).resolveBinding().isEqualTo(sourceTypeDeclarations.get(1).resolveBinding())) {\n Set<VariableDeclaration> accessedLocalFieldsG1 = mapper.getAccessedLocalFieldsG1();\n Set<VariableDeclaration> accessedLocalFieldsG2 = mapper.getAccessedLocalFieldsG2();\n for (VariableDeclaration localFieldG1 : accessedLocalFieldsG1) {\n FieldDeclaration originalFieldDeclarationG1 = (FieldDeclaration) localFieldG1.getParent();\n for (VariableDeclaration localFieldG2 : accessedLocalFieldsG2) {\n FieldDeclaration originalFieldDeclarationG2 = (FieldDeclaration) localFieldG2.getParent();\n if (localFieldG1.getName().getIdentifier().equals(localFieldG2.getName().getIdentifier())) {\n if (originalFieldDeclarationG1.getType().resolveBinding().isEqualTo(originalFieldDeclarationG2.getType().resolveBinding())) {\n Set<ITypeBinding> typeBindings = new LinkedHashSet<ITypeBinding>();\n typeBindings.add(localFieldG1.resolveBinding().getType());\n getSimpleTypeBindings(typeBindings, requiredImportTypeBindings);\n fieldDeclarationsToBePulledUp.get(0).add(localFieldG1);\n fieldDeclarationsToBePulledUp.get(1).add(localFieldG2);\n VariableDeclarationFragment fragment = ast.newVariableDeclarationFragment();\n sourceRewriter.set(fragment, VariableDeclarationFragment.NAME_PROPERTY, ast.newSimpleName(localFieldG1.getName().getIdentifier()), null);\n if (localFieldG1.getInitializer() != null && localFieldG2.getInitializer() != null) {\n Expression initializer1 = localFieldG1.getInitializer();\n Expression initializer2 = localFieldG2.getInitializer();\n if (initializer1.subtreeMatch(new ASTMatcher(), initializer2)) {\n sourceRewriter.set(fragment, VariableDeclarationFragment.INITIALIZER_PROPERTY, ASTNode.copySubtree(ast, initializer1), null);\n }\n }\n FieldDeclaration newFieldDeclaration = ast.newFieldDeclaration(fragment);\n sourceRewriter.set(newFieldDeclaration, FieldDeclaration.TYPE_PROPERTY, originalFieldDeclarationG1.getType(), null);\n if (originalFieldDeclarationG1.getJavadoc() != null) {\n sourceRewriter.set(newFieldDeclaration, FieldDeclaration.JAVADOC_PROPERTY, originalFieldDeclarationG1.getJavadoc(), null);\n }\n ListRewrite newFieldDeclarationModifiersRewrite = sourceRewriter.getListRewrite(newFieldDeclaration, FieldDeclaration.MODIFIERS2_PROPERTY);\n newFieldDeclarationModifiersRewrite.insertLast(ast.newModifier(Modifier.ModifierKeyword.PROTECTED_KEYWORD), null);\n List<IExtendedModifier> originalModifiers = originalFieldDeclarationG1.modifiers();\n for (IExtendedModifier extendedModifier : originalModifiers) {\n if (extendedModifier.isModifier()) {\n Modifier modifier = (Modifier) extendedModifier;\n if (modifier.isFinal()) {\n newFieldDeclarationModifiersRewrite.insertLast(ast.newModifier(Modifier.ModifierKeyword.FINAL_KEYWORD), null);\n } else if (modifier.isStatic()) {\n newFieldDeclarationModifiersRewrite.insertLast(ast.newModifier(Modifier.ModifierKeyword.STATIC_KEYWORD), null);\n } else if (modifier.isTransient()) {\n newFieldDeclarationModifiersRewrite.insertLast(ast.newModifier(Modifier.ModifierKeyword.TRANSIENT_KEYWORD), null);\n } else if (modifier.isVolatile()) {\n newFieldDeclarationModifiersRewrite.insertLast(ast.newModifier(Modifier.ModifierKeyword.VOLATILE_KEYWORD), null);\n }\n }\n }\n bodyDeclarationsRewrite.insertLast(newFieldDeclaration, null);\n break;\n }\n }\n }\n }\n Set<MethodInvocationObject> accessedLocalMethodsG1 = mapper.getAccessedLocalMethodsG1();\n Set<MethodInvocationObject> accessedLocalMethodsG2 = mapper.getAccessedLocalMethodsG2();\n for (MethodInvocationObject localMethodG1 : accessedLocalMethodsG1) {\n for (MethodInvocationObject localMethodG2 : accessedLocalMethodsG2) {\n if (localMethodG1.getMethodName().equals(localMethodG2.getMethodName()) && localMethodG1.getReturnType().equals(localMethodG2.getReturnType()) && localMethodG1.getParameterTypeList().equals(localMethodG2.getParameterTypeList())) {\n MethodDeclaration[] methodDeclarationsG1 = sourceTypeDeclarations.get(0).getMethods();\n IMethodBinding localMethodBindingG1 = localMethodG1.getMethodInvocation().resolveMethodBinding();\n MethodDeclaration methodDeclaration1 = null;\n for (MethodDeclaration methodDeclarationG1 : methodDeclarationsG1) {\n if (methodDeclarationG1.resolveBinding().isEqualTo(localMethodBindingG1)) {\n methodDeclaration1 = methodDeclarationG1;\n break;\n }\n }\n MethodDeclaration[] methodDeclarationsG2 = sourceTypeDeclarations.get(1).getMethods();\n IMethodBinding localMethodBindingG2 = localMethodG2.getMethodInvocation().resolveMethodBinding();\n MethodDeclaration methodDeclaration2 = null;\n for (MethodDeclaration methodDeclarationG2 : methodDeclarationsG2) {\n if (methodDeclarationG2.resolveBinding().isEqualTo(localMethodBindingG2)) {\n methodDeclaration2 = methodDeclarationG2;\n break;\n }\n }\n boolean exactClones = methodDeclaration1.subtreeMatch(new ASTMatcher(), methodDeclaration2);\n if (exactClones) {\n bodyDeclarationsRewrite.insertLast(methodDeclaration1, null);\n methodDeclarationsToBePulledUp.get(0).add(methodDeclaration1);\n methodDeclarationsToBePulledUp.get(1).add(methodDeclaration2);\n } else {\n MethodDeclaration newMethodDeclaration = ast.newMethodDeclaration();\n sourceRewriter.set(newMethodDeclaration, MethodDeclaration.NAME_PROPERTY, ast.newSimpleName(methodDeclaration1.getName().getIdentifier()), null);\n sourceRewriter.set(newMethodDeclaration, MethodDeclaration.RETURN_TYPE2_PROPERTY, methodDeclaration1.getReturnType2(), null);\n ListRewrite modifiersRewrite = sourceRewriter.getListRewrite(newMethodDeclaration, MethodDeclaration.MODIFIERS2_PROPERTY);\n List<IExtendedModifier> originalModifiers = methodDeclaration1.modifiers();\n for (IExtendedModifier extendedModifier : originalModifiers) {\n if (extendedModifier.isModifier()) {\n Modifier modifier = (Modifier) extendedModifier;\n if (modifier.isProtected()) {\n modifiersRewrite.insertLast(ast.newModifier(Modifier.ModifierKeyword.PROTECTED_KEYWORD), null);\n } else if (modifier.isPublic()) {\n modifiersRewrite.insertLast(ast.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD), null);\n }\n }\n }\n modifiersRewrite.insertLast(ast.newModifier(Modifier.ModifierKeyword.ABSTRACT_KEYWORD), null);\n ListRewrite parametersRewrite = sourceRewriter.getListRewrite(newMethodDeclaration, MethodDeclaration.PARAMETERS_PROPERTY);\n List<SingleVariableDeclaration> parameters = methodDeclaration1.parameters();\n for (SingleVariableDeclaration parameter : parameters) {\n parametersRewrite.insertLast(parameter, null);\n }\n ListRewrite thrownExceptionsRewrite = sourceRewriter.getListRewrite(newMethodDeclaration, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY);\n List<Name> thrownExceptions = methodDeclaration1.thrownExceptions();\n for (Name thrownException : thrownExceptions) {\n thrownExceptionsRewrite.insertLast(thrownException, null);\n }\n bodyDeclarationsRewrite.insertLast(newMethodDeclaration, null);\n }\n break;\n }\n }\n }\n }\n MethodDeclaration newMethodDeclaration = ast.newMethodDeclaration();\n sourceRewriter.set(newMethodDeclaration, MethodDeclaration.NAME_PROPERTY, ast.newSimpleName(extractedMethodName), null);\n List<VariableDeclaration> returnedVariables1 = this.returnedVariables.get(0);\n List<VariableDeclaration> returnedVariables2 = this.returnedVariables.get(1);\n ITypeBinding returnTypeBinding = null;\n if (returnedVariables1.size() == 1 && returnedVariables2.size() == 1) {\n Type returnType1 = extractType(returnedVariables1.get(0));\n Type returnType2 = extractType(returnedVariables2.get(0));\n if (returnType1.resolveBinding().isEqualTo(returnType2.resolveBinding()))\n returnTypeBinding = returnType1.resolveBinding();\n else\n returnTypeBinding = ASTNodeMatcher.commonSuperType(returnType1.resolveBinding(), returnType2.resolveBinding());\n } else {\n returnTypeBinding = findReturnTypeBinding();\n }\n if (returnTypeBinding != null) {\n Set<ITypeBinding> typeBindings = new LinkedHashSet<ITypeBinding>();\n typeBindings.add(returnTypeBinding);\n getSimpleTypeBindings(typeBindings, requiredImportTypeBindings);\n Type returnType = generateTypeFromTypeBinding(returnTypeBinding, ast, sourceRewriter);\n sourceRewriter.set(newMethodDeclaration, MethodDeclaration.RETURN_TYPE2_PROPERTY, returnType, null);\n } else {\n sourceRewriter.set(newMethodDeclaration, MethodDeclaration.RETURN_TYPE2_PROPERTY, ast.newPrimitiveType(PrimitiveType.VOID), null);\n }\n ListRewrite modifierRewrite = sourceRewriter.getListRewrite(newMethodDeclaration, MethodDeclaration.MODIFIERS2_PROPERTY);\n if (sourceTypeDeclarations.get(0).resolveBinding().isEqualTo(sourceTypeDeclaration.resolveBinding()) && sourceTypeDeclarations.get(1).resolveBinding().isEqualTo(sourceTypeDeclaration.resolveBinding())) {\n Modifier accessModifier = newMethodDeclaration.getAST().newModifier(Modifier.ModifierKeyword.PRIVATE_KEYWORD);\n modifierRewrite.insertLast(accessModifier, null);\n } else {\n Modifier accessModifier = newMethodDeclaration.getAST().newModifier(Modifier.ModifierKeyword.PROTECTED_KEYWORD);\n modifierRewrite.insertLast(accessModifier, null);\n }\n if ((sourceMethodDeclarations.get(0).getModifiers() & Modifier.STATIC) != 0 && (sourceMethodDeclarations.get(1).getModifiers() & Modifier.STATIC) != 0) {\n Modifier staticModifier = newMethodDeclaration.getAST().newModifier(Modifier.ModifierKeyword.STATIC_KEYWORD);\n modifierRewrite.insertLast(staticModifier, null);\n }\n ListRewrite thrownExceptionRewrite = sourceRewriter.getListRewrite(newMethodDeclaration, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY);\n List<Name> thrownExceptions1 = sourceMethodDeclarations.get(0).thrownExceptions();\n List<Name> thrownExceptions2 = sourceMethodDeclarations.get(1).thrownExceptions();\n for (Name thrownException1 : thrownExceptions1) {\n for (Name thrownException2 : thrownExceptions2) {\n if (thrownException1.resolveTypeBinding().isEqualTo(thrownException2.resolveTypeBinding())) {\n thrownExceptionRewrite.insertLast(thrownException1, null);\n break;\n }\n }\n }\n ListRewrite parameterRewrite = sourceRewriter.getListRewrite(newMethodDeclaration, MethodDeclaration.PARAMETERS_PROPERTY);\n Map<VariableBindingKeyPair, ArrayList<VariableDeclaration>> commonPassedParameters = mapper.getCommonPassedParameters();\n for (VariableBindingKeyPair parameterName : commonPassedParameters.keySet()) {\n ArrayList<VariableDeclaration> variableDeclarations = commonPassedParameters.get(parameterName);\n VariableDeclaration variableDeclaration1 = variableDeclarations.get(0);\n VariableDeclaration variableDeclaration2 = variableDeclarations.get(1);\n if (parameterIsUsedByNodesWithoutDifferences(variableDeclaration1, variableDeclaration2)) {\n if (!variableDeclaration1.resolveBinding().isField() && !variableDeclaration2.resolveBinding().isField()) {\n ITypeBinding typeBinding1 = extractType(variableDeclaration1).resolveBinding();\n ITypeBinding typeBinding2 = extractType(variableDeclaration2).resolveBinding();\n ITypeBinding typeBinding = null;\n if (!typeBinding1.isEqualTo(typeBinding2)) {\n ITypeBinding commonSuperTypeBinding = ASTNodeMatcher.commonSuperType(typeBinding1, typeBinding2);\n if (commonSuperTypeBinding != null) {\n typeBinding = commonSuperTypeBinding;\n }\n } else {\n typeBinding = typeBinding1;\n }\n Type variableType = generateTypeFromTypeBinding(typeBinding, ast, sourceRewriter);\n Set<ITypeBinding> typeBindings = new LinkedHashSet<ITypeBinding>();\n typeBindings.add(typeBinding);\n getSimpleTypeBindings(typeBindings, requiredImportTypeBindings);\n SingleVariableDeclaration parameter = ast.newSingleVariableDeclaration();\n sourceRewriter.set(parameter, SingleVariableDeclaration.NAME_PROPERTY, variableDeclaration1.getName(), null);\n sourceRewriter.set(parameter, SingleVariableDeclaration.TYPE_PROPERTY, variableType, null);\n parameterRewrite.insertLast(parameter, null);\n originalPassedParameters.put(parameterName, variableDeclarations);\n }\n }\n }\n Block newMethodBody = newMethodDeclaration.getAST().newBlock();\n ListRewrite methodBodyRewrite = sourceRewriter.getListRewrite(newMethodBody, Block.STATEMENTS_PROPERTY);\n for (PDGNodeMapping pdgNodeMapping : sortedNodeMappings) {\n PDGNode pdgNode1 = pdgNodeMapping.getNodeG1();\n Statement statement1 = pdgNode1.getASTStatement();\n TypeVisitor typeVisitor1 = new TypeVisitor();\n statement1.accept(typeVisitor1);\n getSimpleTypeBindings(typeVisitor1.getTypeBindings(), requiredImportTypeBindings);\n PDGNode pdgNode2 = pdgNodeMapping.getNodeG2();\n Statement statement2 = pdgNode2.getASTStatement();\n TypeVisitor typeVisitor2 = new TypeVisitor();\n statement2.accept(typeVisitor2);\n getSimpleTypeBindings(typeVisitor2.getTypeBindings(), requiredImportTypeBindings);\n }\n CloneStructureNode root = mapper.getCloneStructureRoot();\n for (CloneStructureNode child : root.getChildren()) {\n if (child.getMapping() instanceof PDGNodeMapping) {\n Statement statement = processCloneStructureNode(child, ast, sourceRewriter);\n methodBodyRewrite.insertLast(statement, null);\n }\n }\n if (returnedVariables1.size() == 1 && returnedVariables2.size() == 1 && findReturnTypeBinding() == null) {\n ReturnStatement returnStatement = ast.newReturnStatement();\n sourceRewriter.set(returnStatement, ReturnStatement.EXPRESSION_PROPERTY, returnedVariables1.get(0).getName(), null);\n methodBodyRewrite.insertLast(returnStatement, null);\n }\n int i = 0;\n for (ASTNodeDifference difference : parameterizedDifferenceMap.values()) {\n AbstractExpression expression1 = difference.getExpression1();\n AbstractExpression expression2 = difference.getExpression2();\n boolean isReturnedVariable = false;\n if (expression1 != null) {\n isReturnedVariable = isReturnedVariable(expression1.getExpression(), this.returnedVariables.get(0));\n } else if (expression2 != null) {\n isReturnedVariable = isReturnedVariable(expression2.getExpression(), this.returnedVariables.get(1));\n }\n if (!isReturnedVariable) {\n ITypeBinding typeBinding = null;\n if (difference.containsDifferenceType(DifferenceType.SUBCLASS_TYPE_MISMATCH) || differenceContainsSubDifferenceWithSubclassTypeMismatch(difference)) {\n ITypeBinding typeBinding1 = expression1 != null ? expression1.getExpression().resolveTypeBinding() : expression2.getExpression().resolveTypeBinding();\n ITypeBinding typeBinding2 = expression2 != null ? expression2.getExpression().resolveTypeBinding() : expression1.getExpression().resolveTypeBinding();\n if (!typeBinding1.isEqualTo(typeBinding2)) {\n ITypeBinding commonSuperTypeBinding = ASTNodeMatcher.commonSuperType(typeBinding1, typeBinding2);\n if (commonSuperTypeBinding != null) {\n typeBinding = commonSuperTypeBinding;\n }\n } else {\n typeBinding = typeBinding1;\n }\n } else {\n typeBinding = expression1 != null ? expression1.getExpression().resolveTypeBinding() : expression2.getExpression().resolveTypeBinding();\n }\n Type type = generateTypeFromTypeBinding(typeBinding, ast, sourceRewriter);\n Set<ITypeBinding> typeBindings = new LinkedHashSet<ITypeBinding>();\n typeBindings.add(typeBinding);\n getSimpleTypeBindings(typeBindings, requiredImportTypeBindings);\n SingleVariableDeclaration parameter = ast.newSingleVariableDeclaration();\n sourceRewriter.set(parameter, SingleVariableDeclaration.NAME_PROPERTY, ast.newSimpleName(\"String_Node_Str\" + i), null);\n i++;\n sourceRewriter.set(parameter, SingleVariableDeclaration.TYPE_PROPERTY, type, null);\n parameterRewrite.insertLast(parameter, null);\n }\n }\n sourceRewriter.set(newMethodDeclaration, MethodDeclaration.BODY_PROPERTY, newMethodBody, null);\n bodyDeclarationsRewrite.insertLast(newMethodDeclaration, null);\n try {\n CompilationUnitChange change = compilationUnitChanges.get(sourceICompilationUnit);\n if (change != null) {\n ImportRewrite importRewrite = ImportRewrite.create(sourceCompilationUnit, true);\n for (ITypeBinding typeBinding : requiredImportTypeBindings) {\n if (!typeBinding.isNested())\n importRewrite.addImport(typeBinding);\n }\n TextEdit importEdit = importRewrite.rewriteImports(null);\n if (importRewrite.getCreatedImports().length > 0) {\n change.getEdit().addChild(importEdit);\n change.addTextEditGroup(new TextEditGroup(\"String_Node_Str\", new TextEdit[] { importEdit }));\n }\n TextEdit sourceEdit = sourceRewriter.rewriteAST();\n change.getEdit().addChild(sourceEdit);\n change.addTextEditGroup(new TextEditGroup(\"String_Node_Str\", new TextEdit[] { sourceEdit }));\n }\n if (document != null) {\n for (ITypeBinding typeBinding : requiredImportTypeBindings) {\n addImportDeclaration(typeBinding, sourceCompilationUnit, sourceRewriter);\n }\n TextEdit intermediateEdit = sourceRewriter.rewriteAST(document, null);\n intermediateEdit.apply(document);\n CreateCompilationUnitChange createCompilationUnitChange = new CreateCompilationUnitChange(sourceICompilationUnit, document.get(), file.getCharset());\n createCompilationUnitChanges.put(sourceICompilationUnit, createCompilationUnitChange);\n }\n } catch (JavaModelException e) {\n e.printStackTrace();\n } catch (MalformedTreeException e) {\n e.printStackTrace();\n } catch (BadLocationException e) {\n e.printStackTrace();\n } catch (CoreException e) {\n e.printStackTrace();\n }\n}\n"
"public void perform(GraphRewrite event, EvaluationContext context) {\n VarStack varStack = org.jboss.windup.config.runner.VarStack.instance(event);\n XmlMetaFacetModel xmlFacetModel = Iteration.getCurrentPayload(varStack, XmlMetaFacetModel.class, \"String_Node_Str\");\n typeSearchResults.add(xmlFacetModel);\n}\n"
"private void removeNotificationChildren() {\n ArrayList<ExpandableNotificationRow> toRemove = new ArrayList<>();\n for (int i = 0; i < mStackScroller.getChildCount(); i++) {\n View view = mStackScroller.getChildAt(i);\n if (!(view instanceof ExpandableNotificationRow)) {\n continue;\n }\n ExpandableNotificationRow parent = (ExpandableNotificationRow) view;\n List<ExpandableNotificationRow> children = parent.getNotificationChildren();\n List<ExpandableNotificationRow> orderedChildren = mTmpChildOrderMap.get(parent);\n if (children != null) {\n toRemove.clear();\n for (ExpandableNotificationRow childRow : children) {\n if ((orderedChildren == null || !orderedChildren.contains(childRow)) && !childRow.keepInParent()) {\n toRemove.add(childRow);\n }\n }\n for (ExpandableNotificationRow remove : toRemove) {\n parent.removeChildNotification(remove);\n if (mNotificationData.get(remove.getStatusBarNotification().getKey()) == null) {\n mStackScroller.notifyGroupChildRemoved(remove);\n }\n }\n }\n }\n}\n"
"public UploadStatus processRequest(Context context, RequestParams params) {\n final String requestId = params.getString(\"String_Node_Str\", null);\n final String uri = params.getString(\"String_Node_Str\", null);\n final String optionsAsString = params.getString(\"String_Node_Str\", null);\n final int maxErrorRetries = params.getInt(\"String_Node_Str\", MediaManager.get().getGlobalUploadPolicy().getMaxErrorRetries());\n final int errorCount = params.getInt(\"String_Node_Str\", 0);\n Logger.i(TAG, String.format(\"String_Node_Str\", requestId));\n if (errorCount > maxErrorRetries) {\n Logger.d(TAG, String.format(\"String_Node_Str\", requestId, errorCount, maxErrorRetries));\n return FAILURE;\n }\n callbackDispatcher.dispatchStart(requestId);\n callbackDispatcher.wakeListenerServiceWithRequestStart(context, requestId);\n UploadStatus requestResultStatus;\n final Context appContext = context.getApplicationContext();\n Map resultData = null;\n boolean optionsLoadedSuccessfully = false;\n Map<String, Object> options = null;\n try {\n options = UploadRequest.decodeOptions(optionsAsString);\n optionsLoadedSuccessfully = true;\n } catch (Exception e) {\n Logger.e(TAG, String.format(\"String_Node_Str\", requestId), e);\n }\n ErrorInfo error = null;\n if (optionsLoadedSuccessfully) {\n if (StringUtils.isNotBlank(uri)) {\n Payload payload = PayloadFactory.fromUri(uri);\n if (payload != null) {\n try {\n runningJobs.incrementAndGet();\n resultData = doProcess(requestId, appContext, options, params, payload);\n requestResultStatus = SUCCESS;\n } catch (FileNotFoundException e) {\n Logger.e(TAG, String.format(\"String_Node_Str\", requestId), e);\n requestResultStatus = FAILURE;\n error = new ErrorInfo(ErrorInfo.FILE_DOES_NOT_EXIST, e.getMessage());\n } catch (LocalUriNotFoundException e) {\n Logger.e(TAG, String.format(\"String_Node_Str\", requestId), e);\n requestResultStatus = FAILURE;\n error = new ErrorInfo(ErrorInfo.URI_DOES_NOT_EXIST, e.getMessage());\n } catch (ResourceNotFoundException e) {\n Logger.e(TAG, String.format(\"String_Node_Str\", requestId), e);\n error = new ErrorInfo(ErrorInfo.RESOURCE_DOES_NOT_EXIST, e.getMessage());\n requestResultStatus = FAILURE;\n } catch (EmptyByteArrayException e) {\n Logger.e(TAG, String.format(\"String_Node_Str\", requestId), e);\n requestResultStatus = FAILURE;\n error = new ErrorInfo(ErrorInfo.BYTE_ARRAY_PAYLOAD_EMPTY, e.getMessage());\n } catch (InterruptedIOException e) {\n Logger.e(TAG, String.format(\"String_Node_Str\", requestId), e);\n error = new ErrorInfo(ErrorInfo.REQUEST_CANCELLED, \"String_Node_Str\");\n requestResultStatus = FAILURE;\n } catch (ErrorRetrievingSignatureException e) {\n Logger.e(TAG, String.format(\"String_Node_Str\", requestId), e);\n requestResultStatus = FAILURE;\n error = new ErrorInfo(ErrorInfo.SIGNATURE_FAILURE, e.getMessage());\n } catch (IOException e) {\n Logger.e(TAG, String.format(\"String_Node_Str\", requestId), e);\n error = new ErrorInfo(ErrorInfo.NETWORK_ERROR, e.getMessage());\n requestResultStatus = RESCHEDULE;\n }\n } else {\n Logger.d(TAG, String.format(\"String_Node_Str\", requestId));\n error = new ErrorInfo(ErrorInfo.PAYLOAD_LOAD_FAILURE, \"String_Node_Str\");\n requestResultStatus = FAILURE;\n }\n } else {\n requestResultStatus = FAILURE;\n error = new ErrorInfo(ErrorInfo.PAYLOAD_EMPTY, \"String_Node_Str\");\n Logger.d(TAG, String.format(\"String_Node_Str\", requestId));\n }\n } else {\n requestResultStatus = FAILURE;\n error = new ErrorInfo(ErrorInfo.OPTIONS_FAILURE, \"String_Node_Str\");\n Logger.d(TAG, String.format(\"String_Node_Str\", requestId));\n }\n if (requestResultStatus.isFinal()) {\n if (requestResultStatus == SUCCESS) {\n callbackDispatcher.dispatchSuccess(context, requestId, resultData);\n } else {\n callbackDispatcher.dispatchError(context, requestId, error);\n }\n callbackDispatcher.wakeListenerServiceWithRequestFinished(context, requestId, requestResultStatus);\n } else {\n callbackDispatcher.dispatchReschedule(context, requestId, error);\n }\n Logger.i(TAG, String.format(\"String_Node_Str\", requestId, requestResultStatus));\n return requestResultStatus;\n}\n"
"public static void checkJavaProjectLib(Collection<String> jarsNeeded) {\n File libDir = getJavaProjectLibFolder();\n if ((libDir != null) && (libDir.isDirectory())) {\n Set<String> jarsNeedRetrieve = new HashSet<String>(jarsNeeded);\n for (File externalLib : libDir.listFiles(FilesUtils.getAcceptJARFilesFilter())) {\n jarsNeedRetrieve.remove(externalLib.getName());\n }\n if (!jarsNeedRetrieve.isEmpty()) {\n ILibraryManagerService repositoryBundleService = CorePlugin.getDefault().getRepositoryBundleService();\n repositoryBundleService.retrieve(jarsNeedRetrieve, libDir.getAbsolutePath(), false);\n }\n }\n}\n"
"public void uploadFiles(String id, String data) {\n SlaveBrowser browser = capturedBrowsers.getBrowser(id);\n Collection<FileData> filesData = gson.fromJson(data, new TypeToken<Collection<FileData>>() {\n }.getType());\n LinkedHashSet<FileInfo> filesUploaded = new LinkedHashSet<FileInfo>();\n for (FileData f : filesData) {\n String path = f.getFile();\n String fileData = f.getData();\n files.put(path, fileData);\n files.put(resolvePath(path), fileData);\n filesUploaded.add(new FileInfo(f.getFile(), f.getTimestamp(), false));\n }\n browser.addFiles(filesUploaded);\n}\n"
"private void startCase(IContent content) {\n Span span = (Span) design2ExcelSpan.get(content.getGenerateBy());\n engine.addContainerStyle(content.getComputedStyle(), span, lb.getListSize(span.getCol()) - 1);\n}\n"
"public void adjustCosts(Ability ability, Game game) {\n if (this.isTransformed()) {\n card.getSecondCardFace().adjustCosts(ability, game);\n } else {\n card.adjustCosts(ability, game);\n }\n}\n"
"public void testEqualsObject() {\n IAtsWorkDefinition obj = new WorkDefinition(\"String_Node_Str\");\n Assert.assertTrue(obj.equals(obj));\n IAtsWorkDefinition obj2 = new WorkDefinition(\"String_Node_Str\");\n Assert.assertTrue(obj.equals(obj2));\n Assert.assertFalse(obj.equals(null));\n Assert.assertFalse(obj.equals(\"String_Node_Str\"));\n WorkDefinition obj3 = new WorkDefinition(\"String_Node_Str\");\n obj3.setId(null);\n Assert.assertFalse(obj.equals(obj3));\n Assert.assertFalse(obj3.equals(obj));\n WorkDefinition obj4 = new WorkDefinition(\"String_Node_Str\");\n obj4.setName(null);\n Assert.assertFalse(obj3.equals(obj4));\n}\n"
"public void shutdown() {\n synchronized (lifecycleLock) {\n fireLifecycleEvent(SHUTTING_DOWN);\n FactoryImpl.shutdown(factory);\n fireLifecycleEvent(SHUTDOWN);\n }\n}\n"
"private void _simpleSearch() throws DBConnectionException, DBExecutionException {\n SearchResultsFrame searchResultsFrame = new SearchResultsFrame(_containerModel, _sourceFrame, _configuration);\n SearchResultBuffer searchResultBuffer = new SearchResultBuffer();\n searchResultBuffer.addObserver(searchResultsFrame);\n SearchCriteria searchCriteria = new SearchCriteria();\n ArrayList<Attribute> attributesList = new ArrayList<Attribute>();\n Component[] componentArray1 = _attListPanel.getComponents();\n for (int i = 0; i < componentArray1.length; i++) {\n if (componentArray1[i] instanceof JPanel) {\n Component[] componentArray2 = ((JPanel) componentArray1[i]).getComponents();\n for (int j = 0; j < componentArray2.length; j++) {\n if (componentArray2[j] instanceof ModelAttributePanel) {\n try {\n StringParameter attributeToAdd = new StringParameter(null, ((ModelAttributePanel) componentArray2[j]).getAttributeName());\n attributeToAdd.setExpression(((ModelAttributePanel) componentArray2[j]).getValue());\n attributesList.add(attributeToAdd);\n } catch (Exception e) {\n }\n }\n }\n }\n }\n try {\n StringParameter attributeToAdd = new StringParameter(_containerModel, \"String_Node_Str\");\n attributeToAdd.setExpression(_modelName.getText());\n attributesList.add(attributeToAdd);\n } catch (Exception e) {\n }\n searchCriteria.setAttributes(attributesList);\n searchResultsFrame.pack();\n searchResultsFrame.setVisible(true);\n SearchManager searchManager = new SearchManager();\n try {\n searchManager.search(searchCriteria, searchResultBuffer);\n } catch (DBConnectionException e1) {\n searchResultsFrame.setVisible(false);\n searchResultsFrame.dispose();\n MessageHandler.error(\"String_Node_Str\", e1);\n } catch (DBExecutionException e2) {\n searchResultsFrame.setVisible(false);\n searchResultsFrame.dispose();\n MessageHandler.error(\"String_Node_Str\", e2);\n }\n setVisible(false);\n}\n"
"public void encode(IoSession session, Object message, ProtocolEncoderOutput out) throws Exception {\n String value = message.toString();\n ByteBuffer buf = ByteBuffer.allocate(value.length()).setAutoExpand(true);\n buf.putString(value, ENCODER);\n buf.flip();\n out.write(buf);\n}\n"
"private void write(ExecutableElement m) throws IOException {\n StringBuffer buf = new StringBuffer();\n for (VariableElement p : m.getParameters()) {\n if (buf.length() > 0)\n buf.append(',');\n buf.append(p.getSimpleName());\n }\n TypeElement t = (TypeElement) m.getEnclosingElement();\n FileObject f = createResource(t.getQualifiedName().toString().replace('.', '/') + \"String_Node_Str\" + m.getSimpleName() + \"String_Node_Str\");\n notice(\"String_Node_Str\" + f, m);\n OutputStream os = f.openOutputStream();\n try {\n IOUtils.write(buf, os, \"String_Node_Str\");\n } finally {\n os.close();\n }\n}\n"
"private void writeCherryPickCommit(final Merger m, final CodeReviewCommit n) throws IOException {\n final StringBuilder msgbuf = new StringBuilder();\n msgbuf.append(n.getFullMessage());\n if (msgbuf.length() == 0) {\n msgbuf.append(\"String_Node_Str\");\n }\n if (msgbuf.charAt(msgbuf.length() - 1) != '\\n') {\n msgbuf.append('\\n');\n }\n if (!endsWithKey(msgbuf.toString())) {\n msgbuf.append('\\n');\n }\n if (server.getCanonicalURL() != null) {\n msgbuf.append(\"String_Node_Str\");\n msgbuf.append(server.getCanonicalURL());\n msgbuf.append(n.patchsetId.getParentKey().get());\n msgbuf.append('\\n');\n }\n ChangeApproval submitAudit = null;\n try {\n final List<ChangeApproval> approvalList = schema.changeApprovals().byChange(n.patchsetId.getParentKey()).toList();\n Collections.sort(approvalList, new Comparator<ChangeApproval>() {\n public int compare(final ChangeApproval a, final ChangeApproval b) {\n return a.getGranted().compareTo(b.getGranted());\n }\n });\n for (final ChangeApproval a : approvalList) {\n if (a.getValue() <= 0) {\n continue;\n }\n if (ApprovalCategory.SUBMIT.equals(a.getCategoryId())) {\n if (submitAudit == null || a.getGranted().compareTo(submitAudit.getGranted()) > 0) {\n submitAudit = a;\n }\n continue;\n }\n final Account acc = Common.getAccountCache().get(a.getAccountId());\n if (acc == null) {\n continue;\n }\n final StringBuilder identbuf = new StringBuilder();\n if (acc.getFullName() != null && acc.getFullName().length() > 0) {\n identbuf.append(' ');\n identbuf.append(acc.getFullName());\n }\n if (acc.getPreferredEmail() != null && acc.getPreferredEmail().length() > 0) {\n identbuf.append(' ');\n identbuf.append('<');\n identbuf.append(acc.getPreferredEmail());\n identbuf.append('>');\n }\n if (identbuf.length() == 0) {\n continue;\n }\n final String tag;\n if (CRVW.equals(a.getCategoryId())) {\n tag = \"String_Node_Str\";\n } else if (VRIF.equals(a.getCategoryId())) {\n tag = \"String_Node_Str\";\n } else {\n final ApprovalType at = Common.getGerritConfig().getApprovalType(a.getCategoryId());\n if (at == null) {\n continue;\n }\n tag = at.getCategory().getName().replace(' ', '-');\n }\n msgbuf.append(tag);\n msgbuf.append(':');\n msgbuf.append(identbuf);\n msgbuf.append('\\n');\n }\n } catch (OrmException e) {\n log.error(\"String_Node_Str\" + n.patchsetId, e);\n }\n Account submitterAcct = null;\n if (submitAudit != null) {\n submitterAcct = Common.getAccountCache().get(submitAudit.getAccountId());\n }\n final Commit mergeCommit = new Commit(db);\n mergeCommit.setTreeId(m.getResultTreeId());\n mergeCommit.setParentIds(new ObjectId[] { mergeTip });\n mergeCommit.setAuthor(n.getAuthorIdent());\n if (submitterAcct != null) {\n String name = submitterAcct.getFullName();\n if (name == null || name.length() == 0) {\n name = \"String_Node_Str\";\n }\n String email = submitterAcct.getPreferredEmail();\n if (email == null || email.length() == 0) {\n email = \"String_Node_Str\" + submitterAcct.getId().get() + \"String_Node_Str\";\n }\n mergeCommit.setCommitter(new PersonIdent(name, email, submitAudit.getGranted(), myIdent.getTimeZone()));\n } else {\n mergeCommit.setCommitter(myIdent);\n }\n mergeCommit.setMessage(msgbuf.toString());\n final ObjectId id = m.getObjectWriter().writeCommit(mergeCommit);\n mergeTip = (CodeReviewCommit) rw.parseCommit(id);\n n.statusCode = CommitMergeStatus.CLEAN_PICK;\n status.put(n.patchsetId.getParentKey(), n.statusCode);\n newCommits.put(n.patchsetId.getParentKey(), mergeTip);\n}\n"
"public String getHomeActivityPackageName() {\n if (mPm == null)\n return null;\n if (RecentsDebugFlags.Static.EnableSystemServicesProxy)\n return null;\n ArrayList<ResolveInfo> homeActivities = new ArrayList<>();\n ComponentName defaultHomeActivity = mPm.getHomeActivities(homeActivities);\n if (defaultHomeActivity != null) {\n return defaultHomeActivity.getPackageName();\n } else if (homeActivities.size() == 1) {\n ResolveInfo info = homeActivities.get(0);\n if (info.activityInfo != null) {\n return info.activityInfo.packageName;\n }\n }\n return null;\n}\n"
"private void initialize(final ARXResult result, final DataRegistry registry, final DataManager manager, final Data outputGeneralized, final Data outputMicroaggregated, final ARXNode node, final DataDefinition definition, final ARXConfiguration config) {\n registry.updateOutput(node, this);\n this.setRegistry(registry);\n this.dataGeneralized = outputGeneralized;\n this.dataAggregated = outputMicroaggregated;\n this.dataInput = manager.getDataInput();\n this.setHeader(manager.getHeader());\n this.columnToData = new Data[header.length];\n this.columnToIndex = new int[header.length];\n for (Data data : new Data[] { dataStatic, dataGeneralized, dataAggregated }) {\n for (int i = 0; i < data.getHeader().length; i++) {\n int column = data.getColumns()[i];\n this.columnToIndex[column] = i;\n this.columnToData[column] = data;\n }\n }\n this.columnToSuppressionStatus = getColumnToSuppressionStatus(config, definition);\n this.result = result;\n this.definition = definition;\n this.anonymous = node.getAnonymity() == Anonymity.ANONYMOUS;\n this.node = node;\n this.getRegistry().createOutputSubset(node, config);\n}\n"
"public void resourceChanged(IResourceChangeEvent event) {\n if (!ProxyRepositoryFactory.getInstance().isFullLogonFinished())\n return;\n IResourceDelta delta = event.getDelta();\n try {\n if (delta != null) {\n delta.accept(visitor);\n }\n } catch (CoreException e) {\n log.error(e.getMessage(), e);\n }\n}\n"
"public IValue withType(IType type, ITypeContext typeContext, MarkerList markers, IContext context) {\n if (type == Types.INT) {\n return this;\n }\n if (type.isSuperTypeOf(Types.INT)) {\n return new BoxedValue(this, Types.INT.boxMethod);\n }\n if (type.getTheClass().getAnnotation(INT_CONVERTIBLE) != null) {\n return new LiteralExpression(this).withType(type, typeContext, markers, context);\n }\n return null;\n}\n"
"public String getValidRowsStatement() {\n IndicatorDefinition indicatorDefinition = this.indicator.getIndicatorDefinition();\n if (indicatorDefinition instanceof UDIndicatorDefinition) {\n EList<TdExpression> list = ((UDIndicatorDefinition) indicatorDefinition).getViewValidRowsExpression();\n return getQueryAfterReplaced(indicatorDefinition, list);\n }\n String regexPatternString = dbmsLanguage.getRegexPatternString(this.indicator);\n String regexCmp = dbmsLanguage.regularFunctionBodyWithReturnValue(columnName, regexPatternString);\n return getRowsStatement(regexCmp);\n}\n"
"private Distance computeDistances() {\n Distance distance = new Distance(maxStateId + 1);\n for (Integer s : finalStates) {\n distance.setDistance(s, 0);\n }\n boolean changed;\n do {\n changed = false;\n for (Integer s : getStates()) {\n for (SAFAInputMove<P, S> tr : getInputMovesFrom(s)) {\n changed = distance.setDistance(s, 1 + formulaDistance.apply(tr.to)) || changed;\n }\n }\n }\n return distance;\n}\n"