content
stringlengths
40
137k
"public boolean drawGestureTrail(final Canvas canvas, final Paint paint, final Rect outBoundsRect, final Params params) {\n final int trailSize = mEventTimes.getLength();\n if (trailSize == 0) {\n return false;\n }\n final int[] eventTimes = mEventTimes.getPrimitiveArray();\n final int[] xCoords =...
"protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {\n ChannelBuffer buf = (ChannelBuffer) msg;\n buf.readUnsignedByte();\n buf.readUnsignedShort();\n int index = buf.readUnsignedByte() >> 3;\n if (channel != null) {\n ChannelBuffer response = Chann...
"protected void onSubmit(final AjaxRequestTarget target, final Form form) {\n final UserTO userTO = (UserTO) form.getModelObject();\n try {\n if (userTO.getId() == 0) {\n userRestClient.create(userTO);\n } else {\n setupUserMod(userTO);\n if (userMod != null) {\n ...
"private static <T> T inj(String name, Class<T> type, HttpServletRequest req) {\n NameInjector nminj = new NameInjector(name, null, type, null);\n return (T) nminj.get(null, req, null, null);\n}\n"
"public void run() {\n String mainType = DyvilCompiler.config.mainType;\n String[] args = DyvilCompiler.config.getMainArgs();\n PrintStream out = System.out;\n PrintStream err = System.err;\n System.setOut(DyvilCompiler.loggerOut);\n System.setErr(DyvilCompiler.loggerErr);\n try {\n long now...
"protected void handleRegistryUpdateRequest(ID remoteContainerID) {\n Trace.entering(Activator.PLUGIN_ID, IRemoteServiceProviderDebugOptions.METHODS_ENTERING, this.getClass(), REGISTRY_UPDATE_REQUEST);\n ID localContainerID = getLocalContainerID();\n if (remoteContainerID == null || localContainerID == null ||...
"public IAEItemStack injectItems(IAEItemStack input) {\n if (tie == null || tie.req == null || tie.req.req == null)\n return input;\n return tie.req.req.injectCratedItems(tie.req, input, mode);\n}\n"
"public Object visitList(IListContent list, Object value) {\n ExecutionContext context = (ExecutionContext) value;\n return new ListInstance(list, context, runningState);\n}\n"
"private static String processPlusCodeWithinNanp(String networkDialStr) {\n String retStr = networkDialStr;\n if (DBG)\n log(\"String_Node_Str\" + networkDialStr);\n if (networkDialStr != null & networkDialStr.charAt(0) == PLUS_SIGN_CHAR && networkDialStr.length() > 1) {\n String newStr = network...
"public void testAccessControl() throws Exception {\n final String authString1 = NullAuthProvider.createAuthString(\"String_Node_Str\", MRCClient.generateStringList(\"String_Node_Str\"));\n final String authString2 = NullAuthProvider.createAuthString(\"String_Node_Str\", MRCClient.generateStringList(\"String_Node...
"public Quota getQuota(Proc proc) {\n return jdbc.queryForObject(GET_BY_PROC, MAPPER, proc.getJobId(), proc.getNodeId());\n}\n"
"public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {\n String lang = \"String_Node_Str\";\n if (sender instanceof Player) {\n if (!MyPetPermissions.has((Player) sender, \"String_Node_Str\", false)) {\n return true;\n }\n lang = MyPetBukkit...
"public String getGroup() {\n if (jobId == null) {\n return \"String_Node_Str\";\n }\n return jobId.split(groupDelimiter)[0];\n}\n"
"public boolean next() throws IOException {\n return false;\n}\n"
"public void transform(NodeType node) {\n if (node == null) {\n return;\n }\n ElementParameterType cf = ComponentUtilities.getNodeProperty(node, \"String_Node_Str\");\n if (cf != null) {\n if (ComponentUtilities.getNodeProperty(node, \"String_Node_Str\") == null) {\n ComponentUtilit...
"public FieldVisitor visitField(int access, String name, String desc, String signature, Object value) {\n FieldVisitor fv = cv.visitField(access, name, rules.fixDesc(desc), fixSignature(signature, true), fixValue(value));\n return (fv != null) ? new FieldFixer(fv) : null;\n}\n"
"public void getTaskData(Set<String> taskIds, TaskRepository taskRepository, TaskDataCollector collector, IOperationMonitor monitor) throws OSIORestException {\n OSIORestConfiguration config;\n try {\n config = connector.getRepositoryConfiguration(taskRepository);\n } catch (CoreException e1) {\n ...
"public void testServiceInfo() {\n IServiceInfo si = null;\n try {\n si = getServiceInfo(serviceInfo);\n } catch (final IDCreateException e) {\n fail();\n } catch (SecurityException e) {\n fail();\n }\n assertTrue(serviceInfoComparator.compare(si, serviceInfo) == 0);\n}\n"
"public int size() {\n return indexedResults.isEmpty() ? 0 : indexedResults.get(0).size();\n}\n"
"public static void preInit() {\n CHAMELEON_SPAWNS = registerSpawnNormal(new PrimitiveMobsSpawnEntry(EntityChameleon.class, 0.25F) {\n public boolean isBiomeSuitable(Biome biome) {\n return BiomeDictionary.hasType(biome, BiomeDictionary.Type.PLAINS) && super.isBiomeSuitable(biome);\n }\n ...
"public void startAutoContainers(BeforeSuite event, final CubeConfiguration configuration) {\n List<String[]> autoStartSteps = AutoStartOrderUtil.getAutoStartOrder(configuration);\n startAllSteps(autoStartSteps, configuration.getConnectionMode());\n}\n"
"public void handleAfterOpen(IDataSetInstanceHandle dataSet) {\n if (reportContext == null)\n return;\n try {\n if (!this.useAfterOpenEventHandler) {\n Scriptable scope = getScriptScope(dataSet);\n ScriptStatus status = handleJS(scope, dataSet.getName(), AFTER_OPEN, dataSetHand...
"public HearthTreeNode heroAbilityUsedEvent(PlayerSide thisMinionPlayerSide, PlayerSide heroAbilityUsedSide, Minion heroAbilityTargetCharacter, HearthTreeNode boardState) {\n EffectCharacter<T> effect = this.getInspireEffect();\n FilterCharacterInterface filter = this.getInspireFilter();\n HearthTreeNode toRet...
"public static void init() {\n try {\n adapter = new SimplePluginManager<LogAdapter>(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\").get();\n } catch (Throwable e) {\n e.printStackTrace();\n }\n}\n"
"public void makeAvailable() {\n mCentral.start();\n}\n"
"public void setTypeSameAs(Typeable equal) {\n if (_debugging) {\n String name = \"String_Node_Str\";\n if (equal instanceof Nameable) {\n name = ((Nameable) equal).getFullName();\n }\n _debug(\"String_Node_Str\" + name);\n }\n Inequality ineq = new Inequality(this.getTyp...
"public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {\n dB.report(getName(), (scriptEntry.hasObject(\"String_Node_Str\") ? scriptEntry.getdObject(\"String_Node_Str\").debug() : scriptEntry.getScript().debug()) + (scriptEntry.hasObject(\"String_Node_Str\") ? scriptEntry.getdObject(\"String_...
"protected CloudFactory cloudFactory() {\n if (cloudFactory == null) {\n try {\n cloudFactory = beanFactory.getBean(CloudFactory.class);\n } catch (NoSuchBeanDefinitionException ex) {\n cloudFactory = new CloudFactory();\n ((SingletonBeanRegistry) beanFactory).registerS...
"private void generateTapFile(File file, TestSet testSet) {\n String fileName = file.getAbsolutePath();\n String tapFileName = fileName.replace(XML_EXT, TAP_EXT);\n DumperOptions options = new DumperOptions();\n options.setPrintDiagnostics(true);\n options.setCharset(charset.name());\n Producer tapPro...
"public AbstractRecord buildTemplateUpdateRow(AbstractSession session) {\n AbstractRecord databaseRow = createRecord(session);\n for (Iterator mappings = getNonPrimaryKeyMappings().iterator(); mappings.hasNext(); ) {\n DatabaseMapping mapping = (DatabaseMapping) mappings.next();\n mapping.writeUpdat...
"protected void transformResults(EvaluationResult result, ExperimentTaskResult expResult) {\n if (result instanceof SubTaskResult) {\n ExperimentTaskResult subTask = new ExperimentTaskResult(((SubTaskResult) result).getConfiguration(), new double[6], ExperimentDAO.TASK_FINISHED, 0);\n List<EvaluationRe...
"private void addStemNode(StemNode stemNode) {\n final String surfaceForm = stemNode.surfaceForm;\n if (multiStems.containsKey(surfaceForm)) {\n multiStems.put(surfaceForm, stemNode);\n } else if (singleStems.containsKey(surfaceForm)) {\n multiStems.put(surfaceForm, singleStems.get(surfaceForm));...
"public static boolean canConvert(int from, int to, int[] conversionCount) {\n if (from == to) {\n return true;\n }\n switch(from) {\n case Category.Array:\n return false;\n case Category.Dimension:\n switch(to) {\n case Category.Member:\n ...
"public void start(BundleContext context) throws Exception {\n super.start(context);\n bundleContext = context;\n plugin.getPluginPreferences().setDefault(WebViewer.MASTER_PAGE_CONTENT, true);\n plugin.getPluginPreferences().setDefault(WebViewer.PREVIEW_MAXROW, DEFAULT_MAX_ROWS);\n plugin.getPluginPrefer...
"public void testVisibility() {\n runConformTest(new String[] { \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", \"String_Node_Str\", \"String_Node_...
"private void setCapabilities() {\n if (DiscoveryManager.getInstance().getPairingLevel() == PairingLevel.ON) {\n appendCapabilites(TextInputControl.Capabilities);\n appendCapabilites(MouseControl.Capabilities);\n appendCapabilites(KeyControl.Capabilities);\n appendCapabilites(PowerControl...
"public Date[] getDates() {\n Date[] out = new Date[2];\n out[1] = new Date(0);\n out[0] = new Date(Long.MAX_VALUE);\n for (Geometry g : glayer.getGeometries()) {\n AttributesGeometry at = (AttributesGeometry) g.getUserData();\n Date temp = (Date) at.get(timeColumn);\n if (out[0].after(...
"public void select(final String[] split, final OverlayWidget root, final List<OverlayWidget> found) {\n if (split != null && split.length > 0) {\n final String expression = split[0];\n for (final Matcher matcher : MATCHERS) {\n if (matcher.applicable(expression)) {\n if (matc...
"public <E> List<E> getColumnsById(String schemaName, String tableName, String pKeyColumnName, String columnName, Object pKeyColumnValue, Class columnJavaType) {\n List results = new ArrayList();\n CQLTranslator translator = new CQLTranslator();\n String selectQuery = translator.SELECT_QUERY;\n selectQuery ...
"public void generateWrappedBuiltin(String function, FunctionType ft, List<Var> outArgs, List<Var> inArgs, TaskMode mode) throws UserException {\n Function fn = new Function(function, inArgs, outArgs, TaskMode.SYNC);\n this.program.addFunction(fn);\n List<Var> used = new ArrayList<Var>();\n used.addAll(inAr...
"public boolean apply(Game game, Ability source) {\n DelayedTriggeredAbility delayedAbility = (DelayedTriggeredAbility) ability.copy();\n delayedAbility.setSourceId(source.getSourceId());\n delayedAbility.setControllerId(source.getControllerId());\n if (this.copyTargets) {\n delayedAbility.getTargets...
"public InsertAllResponse insertAll(InsertAllRequest request) throws BigQueryException {\n final TableId tableId = request.table();\n final TableDataInsertAllRequest requestPb = new TableDataInsertAllRequest();\n requestPb.setIgnoreUnknownValues(request.ignoreUnknownValues());\n requestPb.setSkipInvalidRows...
"public void updateEntity() {\n super.updateEntity();\n if (this.prevWatts != this.getEnergyStored()) {\n this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);\n }\n if (!this.worldObj.isRemote) {\n for (int i = 0; i < UPGRADE_START_INDEX; i++) {\n if (this.getEne...
"private void compileFunctions(GlobalContext context) throws ModuleLoadException, UserException {\n for (LocatedModule loadedModule : modules.loadedModules()) {\n loadModule(context, topLevelContext, FrontendPass.COMPILE_FUNCTIONS, loadedModule);\n }\n}\n"
"public Map executeOnEntries(EntryProcessor entryProcessor, Predicate predicate) {\n Map result = new HashMap();\n try {\n NodeEngine nodeEngine = getNodeEngine();\n Map<Integer, Object> results = nodeEngine.getOperationService().invokeOnAllPartitions(SERVICE_NAME, new PartitionWideEntryWithPredicat...
"protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n this.mGauge = this.findViewById(R.id.gauge);\n this.mGauge.setAngleStart(-225);\n this.mGauge.setAngleSweep(270);\n this.mGauge.setRecognizePathTouch(true);\n this...
"private boolean checkClinitViolation(JMethodCall x, JExpression resultExpression) {\n JReferenceType targetEnclosingType = x.getTarget().getEnclosingType();\n if (!program.typeOracle.checkClinit(currentMethod.getEnclosingType(), targetEnclosingType)) {\n return false;\n }\n if (program.isStaticImpl(...
"public boolean onTouch(View v, MotionEvent event) {\n if (event.getAction() == MotionEvent.ACTION_DOWN) {\n xClickOffset = (int) event.getX();\n yClickOffset = screenHeight - (int) event.getY();\n if (xClickOffset > screenWidth - 100 * Options.scale && xClickOffset < screenWidth) {\n ...
"protected Expression asExpression(AbstractCommonQueryBuilder<?, ?, ?, ?, ?> queryBuilder) {\n if (queryBuilder instanceof BaseFinalSetOperationBuilderImpl<?, ?, ?>) {\n BaseFinalSetOperationBuilderImpl<?, ?, ?> operationBuilder = (BaseFinalSetOperationBuilderImpl<?, ?, ?>) queryBuilder;\n SetOperation...
"public String incrementPubicHair(int increment) {\n int value = getPubicHair().getValue() + increment;\n if (value < 0) {\n value = 0;\n } else if (value > BodyHair.SEVEN_WILD.getValue()) {\n value = BodyHair.SEVEN_WILD.getValue();\n }\n return setPubicHair(BodyHair.getBodyHairFromValue(va...
"static Bounds getBounds(Collection<WeightedLatLng> points) {\n Iterator<WeightedLatLng> iter = points.iterator();\n WeightedLatLng first = iter.next();\n double minX = first.getPoint().x;\n double maxX = first.getPoint().x;\n double minY = first.getPoint().y;\n double maxY = first.getPoint().y + SIGM...
"public void setGoto(final String uri) {\n if (uri != null) {\n try {\n this.forward = new URI(SecureString.valueOf(uri).text());\n } catch (com.netbout.text.StringDecryptionException ex) {\n Logger.warn(this, \"String_Node_Str\", uri, ex);\n } catch (java.net.URISyntaxExce...
"public String getCountry(Player player) {\n return translation.getCountryName(playerManager.getIP(player));\n}\n"
"protected static void addQueryBindings(List<IBinding> resultBindingList, Collection bindingCollection) throws DataException {\n Iterator bindingIterator = bindingCollection.iterator();\n while (bindingIterator.hasNext()) {\n IBinding binding = (IBinding) (bindingIterator.next());\n IBaseExpression ...
"protected String createSqlStatement(Analysis analysis) {\n this.cachedAnalysis = analysis;\n StringBuilder sql = new StringBuilder(\"String_Node_Str\");\n EList<ModelElement> analysedElements = analysis.getContext().getAnalysedElements();\n if (analysedElements.isEmpty()) {\n this.errorMessage = Mes...
"final void moveTaskToFrontLocked(TaskRecord tr, ActivityRecord reason, Bundle options) {\n if (DEBUG_SWITCH)\n Slog.v(TAG, \"String_Node_Str\" + tr);\n final int numTasks = mTaskHistory.size();\n final int index = mTaskHistory.indexOf(tr);\n if (numTasks == 0 || index < 0 || index == numTasks - 1) {...
"public void detectAndSendChanges() {\n super.detectAndSendChanges();\n for (IContainerListener listener : this.listeners) {\n if (this.progress != this.tile.getProgress()) {\n listener.sendProgressBarUpdate(this, 0, this.tile.getProgress());\n }\n }\n this.progress = this.seedAnaly...
"public JsonResource setContents(JsonStructure structure) {\n if (structure == null)\n throw new IllegalArgumentException(\"String_Node_Str\");\n try {\n if (!exists()) {\n getParent().mkdirs();\n if (!createNewFile()) {\n throw new IOException(\"String_Node_Str\...
"void playTone(int tone) {\n if (!mDTMFToneEnabled) {\n return;\n }\n AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);\n int ringerMode = audioManager.getRingerMode();\n if ((ringerMode == AudioManager.RINGER_MODE_SILENT) || (ringerMode == AudioManager.RINGER_MOD...
"private void putBlock(int x, int y, int z, int id, byte data, Direction dir) {\n if (id == -1) {\n return;\n }\n Block b = world.getBlockAt(x, y, z);\n if (b.getTypeId() == id && b.getData() == data) {\n return;\n }\n undo.putBlock(b);\n if (dir != Direction.NORTH) {\n if ((id...
"public JDatePicker createJDatePicker(T value) {\n if (value == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n DateModel<T> model = createModel(value);\n return new JDatePicker(model);\n}\n"
"private static void addVxlanGpePort(final DataBroker dataBroker, final IpAddress local, final IpAddress remote, Long vni, String vppNode, String bridgeDomainName) {\n final VxlanGpeBuilder vxlanGpeBuilder = new VxlanGpeBuilder();\n vxlanGpeBuilder.setLocal(local);\n vxlanGpeBuilder.setRemote(remote);\n vxl...
"public CommandResult execute(CommandSource source, CommandContext context) throws CommandException {\n if (source instanceof Player) {\n Player player = (Player) source;\n if (EagleFactions.AdminList.contains(player.getUniqueId())) {\n EagleFactions.AdminList.remove(player.getUniqueId());\n...
"protected ConsumerTrendReportResult execute(MultivaluedMap<String, String> queryParams) {\n List<String> consumerIds = queryParams.get(\"String_Node_Str\");\n List<String> ownerFilters = queryParams.get(\"String_Node_Str\");\n Date startDate = null;\n Date endDate = null;\n if (queryParams.containsKey(\...
"public void startScrollerTask() {\n initialPosition = getScrollY();\n CustomScrollView.this.postDelayed(scrollerTask, 100);\n}\n"
"public void mouseClicked(MouseEvent arg0) {\n Iterator<Long> iterator = dc.nodes.keySet().iterator();\n while (iterator.hasNext()) {\n Node node = dc.nodes.get(iterator.next());\n if (this.drawStyle.isVisibleNode(this, node)) {\n Point p = getMapPosition(node.lat, node.lon);\n ...
"public void deleteHold(final NodeRef hold) {\n ParameterCheck.mandatory(\"String_Node_Str\", hold);\n if (!isHold(hold)) {\n throw new AlfrescoRuntimeException(\"String_Node_Str\" + hold.toString() + \"String_Node_Str\");\n }\n List<NodeRef> held = AuthenticationUtil.runAsSystem(new RunAsWork<List<N...
"private Node parseTypeExpression(JsDocToken token) {\n if (token == JsDocToken.QMARK) {\n token = next();\n if (token == JsDocToken.COMMA || token == JsDocToken.EQUALS || token == JsDocToken.RB || token == JsDocToken.RC || token == JsDocToken.RP || token == JsDocToken.PIPE) {\n restoreLookA...
"void mouseDown(MouseEvent e) {\n if (e.widget.equals(cnvMarkers)) {\n int ix = e.x / MARKER_BLOCK_WIDTH;\n int iy = e.y / MARKER_BLOCK_HEIGHT + iStartRow;\n int clickIndex = iy * MARKER_ROW_MAX_NUMBER + ix;\n if (ix >= MARKER_ROW_MAX_NUMBER || clickIndex >= getMarkers().size()) {\n ...
"public void showError(MVVObject object) {\n Utils.log(\"String_Node_Str\" + object.getMessage());\n Utils.showToast(applicationContext, applicationContext.getString(R.string.something_is_wrong));\n}\n"
"private void resetFamily(EList list) {\n IComponentsFactory componentsFactory = ComponentsFactoryProvider.getInstance();\n Collection<IComponent> components = componentsFactory.readComponents();\n list.clear();\n for (IComponent component : components) {\n String[] families = component.getOriginalFa...
"private void findScrollView(ViewGroup viewGroup) {\n scrollChild = viewGroup;\n if (viewGroup.getChildCount() > 0) {\n int count = viewGroup.getChildCount();\n View child;\n for (int i = 0; i < count; i++) {\n child = viewGroup.getChildAt(i);\n if (child instanceof AbsL...
"public Set<String> getTables() {\n tables = tables == null ? new TreeSet<String>() : tables;\n return tables;\n}\n"
"public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n final Activity activity = (Activity) container.getContext();\n final String applicationFolder = FeedsActivity.getApplicationFolder(activity);\n BaseAdapter baseAdapter = new AdapterManageFragments(activity);\...
"private void republishPendingMessages() throws Exception {\n if (cleanSession) {\n } else {\n MQTTStoreManager store = getStore();\n List<Subscription> subscriptions = store.getSubscriptionsByClientID(clientID);\n for (Subscription sub : subscriptions) {\n QOSType qos = new QOSUti...
"private static void statsAndLogsParametersTitlePart(IProcess process) {\n ElementParameter param;\n IPreferenceStore preferenceStore = DesignerPlugin.getDefault().getPreferenceStore();\n List<IElementParameter> paramList = new ArrayList<IElementParameter>();\n String languagePrefix = LanguageManager.getCur...
"public static MemberInfo create(String owner, String memberName, String descriptor) {\n checkArgument(!Strings.isNullOrEmpty(owner), \"String_Node_Str\", owner);\n checkArgument(!Strings.isNullOrEmpty(memberName), \"String_Node_Str\", memberName);\n checkArgument(!Strings.isNullOrEmpty(descriptor), \"String_N...
"private String getSpecJson(Application app, final String bundleVersion, final String configString) throws IllegalAccessException, InstantiationException, IOException {\n File tempDir = DirUtils.createTempDir(baseUnpackDir);\n DefaultAppConfigurer configurer;\n try (PluginInstantiator pluginInstantiator = new ...
"public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n if (savedInstanceState != null) {\n mOldSitesIDs = savedInstanceState.getIntegerArrayList(KEY_OLD_SITES_IDS);\n mRequestedEmail = savedInstanceState.getString(KEY_REQUESTED_EMAIL);\n m...
"public EvaluatedAxiom<OWLDisjointClassesAxiom> computeDisjointess(OWLClass clsA, OWLClass clsB) {\n logger.debug(\"String_Node_Str\" + clsA + \"String_Node_Str\" + clsB + \"String_Node_Str\");\n if (clsA.equals(clsB)) {\n return new EvaluatedAxiom<OWLDisjointClassesAxiom>(df.getOWLDisjointClassesAxiom(cls...
"public static byte[] getTagHeader(Tag tag, byte[] data, int version) {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n try {\n SWFOutputStream sos = new SWFOutputStream(baos, version);\n int tagLength = data.length;\n int tagID = tag.getId();\n int tagIDLength = (tagID <...
"public void testSelectAll() {\n persist();\n String query2 = \"String_Node_Str\" + \"String_Node_Str\";\n Query query = em.createQuery(query2);\n query.setParameter(\"String_Node_Str\", \"String_Node_Str\");\n List<NetstatData> result = query.getResultList();\n Assert.assertNotNull(result);\n Asse...
"public void executeImpl(Action ruleAction, NodeRef actionedUponNodeRef) {\n if (!nodeService.exists(actionedUponNodeRef)) {\n return;\n }\n ContentReader reader = contentService.getReader(actionedUponNodeRef, ContentModel.PROP_CONTENT);\n if (reader == null || reader.getMimetype() == null) {\n ...
"public void run(IAction action) {\n store = getIPreferenceStore();\n Configuration config = getConfiguration(store, selection);\n PropertiesLoader props = getPropertiesLoader(store.getString(Preference.lang));\n StructuredSelection structuredSelection = null;\n try {\n if (selection instanceof St...
"public List<Event> getEvents(String body, Map<String, String> headers) {\n List<Event> events = new ArrayList<Event>(0);\n ObjectMapper mapper = new ObjectMapper();\n try {\n JsonNode jsonNode = mapper.readTree(body);\n if (jsonNode.isObject()) {\n events.add(buildSingleEvent(headers,...
"public void rewind() {\n this.byteBuffer.position(0);\n}\n"
"public static byte[] fromHexString(String sguid) {\n byte[] bytes = new byte[SZ];\n try {\n for (int i = 0; i < SZ; i++) {\n bytes[i] = (byte) Integer.parseInt(sguid.substring(i * 2, (i * 2) + 2), 16);\n }\n return bytes;\n } catch (NumberFormatException e) {\n throw new...
"public void process() {\n javaFileContents = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n HashSet<String> processedFeatures = new HashSet<String>();\n Set<String> featureSet = new HashSet<String>(meta.getFeatures());\n ...
"private static List<AndroidString> getTargetAndroidStrings(List<AndroidString> sourceAndroidStrings, List<AndroidString> translatedAndroidStrings, String fileName, boolean override) {\n VirtualFile existenceFile = LocalFileSystem.getInstance().findFileByPath(fileName);\n List<AndroidString> existenceAndroidStrin...
"public void emit(JsonArray jsonArray, AsyncResult result) {\n throw new AssertionFailedError(\"String_Node_Str\");\n}\n"
"private final boolean forceStopPackageLocked(String name, int appId, boolean callerWillRestart, boolean purgeCache, boolean doit, boolean evenPersistent, int userId) {\n int i;\n int N;\n if (userId == UserHandle.USER_ALL && name == null) {\n Slog.w(TAG, \"String_Node_Str\");\n }\n if (appId < 0 ...
"public ArrayList<Property> getPropertyPropertiesForClass(JavaClass cls, TypeInfo info, boolean onlyPublic) {\n ArrayList properties = new ArrayList();\n if (cls == null) {\n return properties;\n }\n ArrayList<JavaMethod> getMethods = new ArrayList<JavaMethod>();\n for (JavaMethod next : new Array...
"protected AbstractGroup[][] prepareGroups() {\n String valid = isValid();\n if (valid != null) {\n throw new IllegalArgumentException(valid);\n }\n Range<T> tempLower = new Range<T>(null, null, null);\n Range<T> tempUpper = new Range<T>(null, null, null);\n if (lowerRange.getRepeatBound() != n...
"private static void tStealerInterrupted() {\n debug(\"String_Node_Str\");\n final int RATE = 500;\n final int STOP_AFTER = 5 * TestFile.length() / 8;\n final int FUDGE_FACTOR = RATE * 1024;\n uploader1.setRate(RATE / 10);\n uploader2.setRate(RATE);\n uploader2.stopAfter(STOP_AFTER);\n RemoteFil...
"private boolean registerConfigMenuItemMacOSX() {\n return FileMenu.registerMenuItemMacOSX(\"String_Node_Str\", this);\n}\n"
"public List<List<FeatTemplate>> selectFeatureTemplates(List<FeatTemplate> allTpls, List<ValExtractor> valExts, AnnoSentenceCollection sents, CorpusStatisticsPrm csPrm, int numToSelect) {\n if (allTpls.size() <= numToSelect) {\n List<List<FeatTemplate>> selected = new ArrayList<List<FeatTemplate>>();\n ...
"public double fromLogProb(double logProb) {\n return fromReal(FastMath.exp(logProb));\n}\n"
"protected ChannelBuffer buffer(String... data) {\n return ChannelBuffers.copiedBuffer(concatenateStrings(data), Charset.defaultCharset());\n}\n"
"public boolean selectCatalog(String catalogName) {\n if (connection == null) {\n return false;\n }\n try {\n if (!(ConnectionUtils.isOdbcProgress(connection) || ExtractMetaDataUtils.getInstance().isHiveConnection(connection))) {\n connection.setCatalog(catalogName);\n }\n ...
"private String processVideos(String text) {\n if (text == null)\n return \"String_Node_Str\";\n int iFrameStart = text.indexOf(\"String_Node_Str\");\n if (iFrameStart == -1)\n return text;\n boolean usesSingleQuotes = text.contains(\"String_Node_Str\");\n final int overlaySz = getResources...