before
stringlengths
14
203k
after
stringlengths
37
104k
repo
stringlengths
2
50
type
stringclasses
1 value
@Override public void onWebsocketClosing(WebSocket conn, int code, String reason, boolean remote) { }
<DeepExtract> </DeepExtract>
raspberryjammod
positive
public void show(MenuKindType type, int xmlId, Object object, Point position) { if (!type.carryingObj.isAssignableFrom(object.getClass())) { throw new IllegalArgumentException("MenuKindType " + type + " can only accept an object of type " + type.carryingObj + ". " + object.getClass() + " received."); } collapse(); showingType = null; setVisible(false); this.currentObject = object; this.showingType = type; this.showingTypeId = xmlId; this.position = position == null ? null : new Point((int) (position.x + getX()), (int) (position.y + getY())); this.setVisible(true); if (showingType != null) { clickSound.play(); } }
<DeepExtract> collapse(); showingType = null; setVisible(false); </DeepExtract>
ZHSAN2
positive
public Criteria andUserIdIsNull() { if ("user_id is null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("user_id is null")); return (Criteria) this; }
<DeepExtract> if ("user_id is null" == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion("user_id is null")); </DeepExtract>
springcloud-e-book
positive
public String catchPhrase() { @SuppressWarnings("unchecked") List<List<String>> catchPhraseLists = (List<List<String>>) faker.fakeValuesService().fetchObject("company.buzzwords"); List<String> words = new ArrayList<String>(); for (List<String> list : catchPhraseLists) { words.add(list.get(faker.random().nextInt(list.size()))); } return join(words, " "); }
<DeepExtract> List<String> words = new ArrayList<String>(); for (List<String> list : catchPhraseLists) { words.add(list.get(faker.random().nextInt(list.size()))); } return join(words, " "); </DeepExtract>
java-faker
positive
@Override public void onPictureTaken(byte[] data, Camera camera) { if (ActivityCompat.checkSelfPermission(context, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) { if (false && permissionCallback != null) { permissionCallback.onRequestPermission(); } return; } if (camera == null) { initCamera(); } else { camera.startPreview(); startAutoFocus(); } takingPicture.set(false); if (onTakePictureCallback != null) { onTakePictureCallback.onPictureTaken(data); } }
<DeepExtract> if (ActivityCompat.checkSelfPermission(context, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) { if (false && permissionCallback != null) { permissionCallback.onRequestPermission(); } return; } if (camera == null) { initCamera(); } else { camera.startPreview(); startAutoFocus(); } </DeepExtract>
FakeVibrato
positive
void upTemplatePanel(UserOptionsCopyTemplatePanel templatePanel) { var currentIndex = templatePanels.indexOf(templatePanel); if (currentIndex - 1 < 0 || currentIndex >= templatePanels.size()) { return; } var target = templatePanels.get(currentIndex); mainPanel.remove(target); templatePanels.remove(target); mainPanel.add(target, currentIndex - 1); templatePanels.add(currentIndex - 1, target); UiUtil.repaint(mainPanel); }
<DeepExtract> if (currentIndex - 1 < 0 || currentIndex >= templatePanels.size()) { return; } var target = templatePanels.get(currentIndex); mainPanel.remove(target); templatePanels.remove(target); mainPanel.add(target, currentIndex - 1); templatePanels.add(currentIndex - 1, target); UiUtil.repaint(mainPanel); </DeepExtract>
integrated-security-testing-environment
positive
public void release() { if (rldrInstance != null) { rldrInstance.clear(); } if (lrdrInstance != null) { lrdrInstance.clear(); } if (ftdrInstance != null) { ftdrInstance.clear(); } if (fbdrInstance != null) { fbdrInstance.clear(); } }
<DeepExtract> if (rldrInstance != null) { rldrInstance.clear(); } if (lrdrInstance != null) { lrdrInstance.clear(); } if (ftdrInstance != null) { ftdrInstance.clear(); } if (fbdrInstance != null) { fbdrInstance.clear(); } </DeepExtract>
DanmakuFlameMaster
positive
@Override public void exitBeepstmt(PuffinBasicParser.BeepstmtContext ctx) { if (!graphics) { throw new PuffinBasicInternalError("GraphicsRuntime is not enabled!"); } ir.addInstruction(sourceFile, currentLineNumber, ctx.start.getStartIndex(), ctx.stop.getStopIndex(), OpCode.BEEP, NULL_ID, NULL_ID, NULL_ID); }
<DeepExtract> if (!graphics) { throw new PuffinBasicInternalError("GraphicsRuntime is not enabled!"); } </DeepExtract>
PuffinBASIC
positive
@Override public boolean process(QueryContext queryContext, SearchSearchResponse searchResponse) throws Exception { if (_log.isDebugEnabled()) { _log.debug("Processing Words of Interest"); } Hits hits = searchResponse.getHits(); if (Validator.isBlank(queryContext.getKeywords()) || (hits.getLength() == 0)) { return true; } PortletRequest portletRequest = GSearchUtil.getPortletRequestFromContext(queryContext); PortletSession session = portletRequest.getPortletSession(); String keywords = queryContext.getKeywords(); session.setAttribute(SessionAttributes.PREVIOUS_SEARCH_PHRASE, keywords, PortletSession.APPLICATION_SCOPE); Map<String, Integer> previousKeywords; Map<String, Integer> previousKeywords = (Map<String, Integer>) session.getAttribute(SessionAttributes.PREVIOUS_KEYWORDS, PortletSession.APPLICATION_SCOPE); if (previousKeywords != null) { previousKeywords = previousKeywords; } else { previousKeywords = new HashMap<String, Integer>(); } keywords = keywords.trim().toLowerCase(); keywords = keywords.replaceAll("[^a-zA-Z0-9 ]", ""); String[] words = keywords.split("[ ]+"); List<String> processedwords = new ArrayList<String>(); PorterStemmer porterStemmer = new PorterStemmer(); for (String word : words) { if (_isStopWord(word) || word.length() < 3) { continue; } String stem = porterStemmer.stem(word); if (processedwords.contains(stem)) { continue; } processedwords.add(stem); _updatePreviousKeywords(stem, previousKeywords); } session.setAttribute(SessionAttributes.PREVIOUS_KEYWORDS, previousKeywords, PortletSession.APPLICATION_SCOPE); return true; }
<DeepExtract> Map<String, Integer> previousKeywords; Map<String, Integer> previousKeywords = (Map<String, Integer>) session.getAttribute(SessionAttributes.PREVIOUS_KEYWORDS, PortletSession.APPLICATION_SCOPE); if (previousKeywords != null) { previousKeywords = previousKeywords; } else { previousKeywords = new HashMap<String, Integer>(); } </DeepExtract>
liferay-gsearch
positive
public Node[] next() { _count++; if (_ticks > 0 && _count % _ticks == 0) _log.info("Reordered " + _count + " statements."); Node[] nxout = new Node[_order.length]; for (int i = 0; i < _order.length; i++) { nxout[i] = _in.next()[_order[i]]; } return nxout; }
<DeepExtract> Node[] nxout = new Node[_order.length]; for (int i = 0; i < _order.length; i++) { nxout[i] = _in.next()[_order[i]]; } return nxout; </DeepExtract>
nxparser
positive
@Override public void writeRequest(int reqId, String reqTopic, T req) throws IOException { buffer.appendRequest(reqId, reqTopic, req, writer, charset); buffer.flip(); this.channel.write(buffer.getBuffer()); buffer.clear(); }
<DeepExtract> buffer.flip(); this.channel.write(buffer.getBuffer()); buffer.clear(); </DeepExtract>
remoting
positive
@Override public void onTestFailure(ITestResult result) { System.out.print("F"); if (++testCount % 40 == 0) { System.out.println(""); } }
<DeepExtract> System.out.print("F"); if (++testCount % 40 == 0) { System.out.println(""); } </DeepExtract>
concurrentlinkedhashmap
positive
public static void uploadUserObjects() { uploading = true; yetToUpload = userObjects.size(); succeededCount = 0; failedCount = 0; failedObjects = new LinkedList<Storable>(); failedMessages = new HashMap<String, Integer>(); Scheduler.get().scheduleDeferred(new ScheduledCommand() { @Override public void execute() { List<Storable> objects = convertToStorable(userObjects); for (Storable object : objects) { object.onLoadFromLocalStorage(); } Gui.log("Sent " + objects.size() + " requests."); } }); }
<DeepExtract> uploading = true; yetToUpload = userObjects.size(); succeededCount = 0; failedCount = 0; failedObjects = new LinkedList<Storable>(); failedMessages = new HashMap<String, Integer>(); </DeepExtract>
FilmTit
positive
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.fragment_single_news_inform, container, false); mWebView = (WebView) v.findViewById(R.id.wv_news_info); tv_title = (TextView) v.findViewById(R.id.tv_title); tv_date = (TextView) v.findViewById(R.id.tv_date); tv_click_rate = (TextView) v.findViewById(R.id.tv_click_rate); url = getArguments().getString("url"); initWebView(v); return v; }
<DeepExtract> mWebView = (WebView) v.findViewById(R.id.wv_news_info); tv_title = (TextView) v.findViewById(R.id.tv_title); tv_date = (TextView) v.findViewById(R.id.tv_date); tv_click_rate = (TextView) v.findViewById(R.id.tv_click_rate); url = getArguments().getString("url"); initWebView(v); </DeepExtract>
Sukeda
positive
public void setSamples(int samples) { if (samples >= 0) this.samples = samples; else this.samples = 0; }
<DeepExtract> if (samples >= 0) this.samples = samples; else this.samples = 0; </DeepExtract>
NanoUI-win32
positive
@Override public void onRefreshBegin(SmoothRefreshLayout layout, IIndicator indicator) { mAniController.start(); invalidate(); }
<DeepExtract> mAniController.start(); invalidate(); </DeepExtract>
SmoothRefreshLayout
positive
public void setWarning() { if (this.warningLevel == FabricTreeWarningLevel.WARN) { return; } if (warningLevel.isHigherThan(FabricTreeWarningLevel.WARN)) { throw new Error("Why would you set the warning level multiple times?"); } else { if (parent != null && FabricTreeWarningLevel.WARN.isHigherThan(parent.warningLevel)) { parent.setWarningLevel(FabricTreeWarningLevel.WARN); } this.warningLevel = FabricTreeWarningLevel.WARN; expandByDefault |= FabricTreeWarningLevel.WARN.isAtLeast(FabricTreeWarningLevel.WARN); } }
<DeepExtract> if (this.warningLevel == FabricTreeWarningLevel.WARN) { return; } if (warningLevel.isHigherThan(FabricTreeWarningLevel.WARN)) { throw new Error("Why would you set the warning level multiple times?"); } else { if (parent != null && FabricTreeWarningLevel.WARN.isHigherThan(parent.warningLevel)) { parent.setWarningLevel(FabricTreeWarningLevel.WARN); } this.warningLevel = FabricTreeWarningLevel.WARN; expandByDefault |= FabricTreeWarningLevel.WARN.isAtLeast(FabricTreeWarningLevel.WARN); } </DeepExtract>
fabric-loader
positive
@Override protected Void doInBackground() throws Exception { start = System.currentTimeMillis(); SearchWorker searchWorker = new SearchWorker(1); searchWorker.execute(); return searchWorker.get(RIDICULOUSLY_LONG_WAIT_TIME, TimeUnit.MILLISECONDS); for (int tricksSearchDepth = 2; tricksSearchDepth <= ProductionSettings.getSearchDepthRecommendation(game); tricksSearchDepth++) { long timePassedSinceStart = System.currentTimeMillis() - start; long timeRemaining = TIME_ALLOTED_PER_MOVE - timePassedSinceStart; if (!haveEnoughTimeToAttemptNextSearch(timeRemaining)) { System.out.println("// not enough time to attempt next search"); break; } System.out.println("// now searching depth: " + tricksSearchDepth); try { bestMove = findBestMoveAtDepth(tricksSearchDepth, timeRemaining); } catch (TimeoutException e) { System.out.println("// could not complete full search of depth " + tricksSearchDepth + ", current best: " + bestMove); break; } } start = COMPUTER_PLAYER_FINISHED_THINKING; return null; }
<DeepExtract> SearchWorker searchWorker = new SearchWorker(1); searchWorker.execute(); return searchWorker.get(RIDICULOUSLY_LONG_WAIT_TIME, TimeUnit.MILLISECONDS); </DeepExtract>
gnubridge
positive
private Drawable resolveResource() { Resources rsrc = getResources(); if (rsrc == null) { return null; } Drawable d = null; if (mResource != 0) { try { d = rsrc.getDrawable(mResource); } catch (NotFoundException e) { Log.w(TAG, "Unable to find resource: " + mResource, e); mResource = 0; } } if (d != null) { if (d instanceof SelectableRoundedCornerDrawable) { return d; } else if (d instanceof LayerDrawable) { LayerDrawable ld = (LayerDrawable) d; final int num = ld.getNumberOfLayers(); for (int i = 0; i < num; i++) { Drawable d = ld.getDrawable(i); ld.setDrawableByLayerId(ld.getId(i), fromDrawable(d, getResources())); } return ld; } Bitmap bm = drawableToBitmap(d); if (bm != null) { return new SelectableRoundedCornerDrawable(bm, getResources()); } else { Log.w(TAG, "Failed to create bitmap from drawable!"); } } return d; }
<DeepExtract> if (d != null) { if (d instanceof SelectableRoundedCornerDrawable) { return d; } else if (d instanceof LayerDrawable) { LayerDrawable ld = (LayerDrawable) d; final int num = ld.getNumberOfLayers(); for (int i = 0; i < num; i++) { Drawable d = ld.getDrawable(i); ld.setDrawableByLayerId(ld.getId(i), fromDrawable(d, getResources())); } return ld; } Bitmap bm = drawableToBitmap(d); if (bm != null) { return new SelectableRoundedCornerDrawable(bm, getResources()); } else { Log.w(TAG, "Failed to create bitmap from drawable!"); } } return d; </DeepExtract>
WeiboClient_Biu
positive
@Override public String toString() { StringBuffer result = new StringBuffer(); result.append(name); if (parameterizedTypes != null && !new ArrayDeque<SymbolType>().contains(this)) { new ArrayDeque<SymbolType>().push(this); result.append("<"); Iterator<? extends SymbolData> it = parameterizedTypes.iterator(); while (it.hasNext()) { SymbolType next = (SymbolType) it.next(); next.addString(result, new ArrayDeque<SymbolType>()); if (it.hasNext()) { result.append(", "); } } result.append(">"); new ArrayDeque<SymbolType>().pop(); } for (int i = 0; i < arrayCount; i++) { result.append("[]"); } return result.toString(); }
<DeepExtract> result.append(name); if (parameterizedTypes != null && !new ArrayDeque<SymbolType>().contains(this)) { new ArrayDeque<SymbolType>().push(this); result.append("<"); Iterator<? extends SymbolData> it = parameterizedTypes.iterator(); while (it.hasNext()) { SymbolType next = (SymbolType) it.next(); next.addString(result, new ArrayDeque<SymbolType>()); if (it.hasNext()) { result.append(", "); } } result.append(">"); new ArrayDeque<SymbolType>().pop(); } for (int i = 0; i < arrayCount; i++) { result.append("[]"); } </DeepExtract>
javalang-compiler
positive
protected void sampleRateChanged() { delayBufferFrames = (int) (maxDelayTime * sampleRate()); delayBuffer = new double[delayBufferFrames * audio.channelCount()]; iBufferOut = 0; }
<DeepExtract> delayBufferFrames = (int) (maxDelayTime * sampleRate()); delayBuffer = new double[delayBufferFrames * audio.channelCount()]; iBufferOut = 0; </DeepExtract>
Minim-Android
positive
@Override public void receive(StatisticsFinished event) { reset(); for (Entry<String, GroupResult> r : event.getResult().getGroups().entrySet()) { this.addFeatureResult(r.getValue()); } this.finishReport(); }
<DeepExtract> reset(); for (Entry<String, GroupResult> r : event.getResult().getGroups().entrySet()) { this.addFeatureResult(r.getValue()); } this.finishReport(); </DeepExtract>
cucumber-performance
positive
@Produces @Resource("") Properties loadPropertiesBundle(InjectionPoint injectionPoint) { String name; Set<Annotation> qualifiers = injectionPoint.getQualifiers(); for (Annotation qualifier : qualifiers) { if (qualifier.annotationType().equals(Resource.class)) { name = ((Resource) qualifier).value(); } } throw new IllegalArgumentException("Injection point " + injectionPoint + " does not have @Resource qualifier"); return resourceLoaderManager.getPropertiesBundle(name); }
<DeepExtract> String name; Set<Annotation> qualifiers = injectionPoint.getQualifiers(); for (Annotation qualifier : qualifiers) { if (qualifier.annotationType().equals(Resource.class)) { name = ((Resource) qualifier).value(); } } throw new IllegalArgumentException("Injection point " + injectionPoint + " does not have @Resource qualifier"); </DeepExtract>
extensions
positive
public Criteria andOidNotEqualTo(Integer value) { if (value == null) { throw new RuntimeException("Value for " + "oid" + " cannot be null"); } criteria.add(new Criterion("oid <>", value)); return (Criteria) this; }
<DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "oid" + " cannot be null"); } criteria.add(new Criterion("oid <>", value)); </DeepExtract>
webike
positive
private void importFunction(final Method m) { final FunctionSpec annotation = m.getAnnotation(FunctionSpec.class); final String[] formalParameters = annotation.formalParameters(); final SizzleType[] formalParameterTypes = new SizzleType[formalParameters.length]; for (int i = 0; i < formalParameters.length; i++) { final String id = formalParameters[i]; if (id.endsWith("...")) formalParameterTypes[i] = new SizzleVarargs(this.getType(id.substring(0, id.indexOf('.')))); else formalParameterTypes[i] = this.getType(id); } for (final String dep : annotation.typeDependencies()) if (dep.endsWith(".proto")) this.importProto(dep); else if (dep.endsWith(".avro")) this.importAvro(dep); else throw new TypeException("unknown dependency in " + dep); this.functions.addFunction(annotation.name(), new SizzleFunction(m.getDeclaringClass().getCanonicalName() + '.' + m.getName(), this.getType(annotation.returnType()), formalParameterTypes)); }
<DeepExtract> this.functions.addFunction(annotation.name(), new SizzleFunction(m.getDeclaringClass().getCanonicalName() + '.' + m.getName(), this.getType(annotation.returnType()), formalParameterTypes)); </DeepExtract>
Sizzle
positive
public void tracksAdded() { if (mode == Mode.ARTIST) { mode = Mode.PLAYLIST_UNSAVED; } else if (mode == Mode.PLAYLIST) { if (currentPlaylist.getTracks().equals(items)) { mode = Mode.PLAYLIST; } else { mode = Mode.PLAYLIST_UNSAVED; } } else if (mode == Mode.ALBUM || mode == Mode.ALBUM_REORDERED) { mode = Mode.PLAYLIST_UNSAVED; } CurrentListState state = getState(); for (CurrentListListener listener : listeners) { listener.stateChanged(state); } allowAlbumReload = true; }
<DeepExtract> CurrentListState state = getState(); for (CurrentListListener listener : listeners) { listener.stateChanged(state); } allowAlbumReload = true; </DeepExtract>
HypnosMusicPlayer
positive
@Override public void onClick(View v) { SharedPreferences.Editor editor = favorites.edit(); editor.putBoolean("Imp", true); editor.commit(); ArrayList<LocationDetails> locationDetailsArrayList = mainTrip.getLocationDetailsArrayList(); if (locationDetailsArrayList.size() > 0) { Intent intent = new Intent(getActivity(), MapsActivity.class); intent.putExtra("Location", locationDetailsArrayList); startActivityForResult(intent, 250); } else { Toast.makeText(mContext, "No Locations are added to Trip", Toast.LENGTH_LONG).show(); } }
<DeepExtract> SharedPreferences.Editor editor = favorites.edit(); editor.putBoolean("Imp", true); editor.commit(); ArrayList<LocationDetails> locationDetailsArrayList = mainTrip.getLocationDetailsArrayList(); if (locationDetailsArrayList.size() > 0) { Intent intent = new Intent(getActivity(), MapsActivity.class); intent.putExtra("Location", locationDetailsArrayList); startActivityForResult(intent, 250); } else { Toast.makeText(mContext, "No Locations are added to Trip", Toast.LENGTH_LONG).show(); } </DeepExtract>
Android-Projects
positive
public Criteria andOCreateTimeLessThanOrEqualTo(Date value) { if (value == null) { throw new RuntimeException("Value for " + "oCreateTime" + " cannot be null"); } criteria.add(new Criterion("o_create_time <=", value)); return (Criteria) this; }
<DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "oCreateTime" + " cannot be null"); } criteria.add(new Criterion("o_create_time <=", value)); </DeepExtract>
webike
positive
public PayoutBatch createSynchronous(APIContext apiContext) throws PayPalRESTException { Map<String, String> parameters = new HashMap<String, String>(); parameters.put("sync_mode", "true"); APIContext apiContext = new APIContext(apiContext); return create(apiContext, parameters); }
<DeepExtract> APIContext apiContext = new APIContext(apiContext); return create(apiContext, parameters); </DeepExtract>
PayPal-Java-SDK
positive
private void collectUnderreferencedDefinitions() { if (_tree.isMeaningful()) { IDefinition def = _tree.getDefinition(); if (def != null && def.getNumReferences() <= _threshold && def instanceof Definition) { if (def.getQualifiedName().indexOf("test") < 0 && def.getQualifiedName().indexOf("main") < 0) { _underreferencedDefinitions.add(def); } } } walkChildren(_tree); }
<DeepExtract> if (_tree.isMeaningful()) { IDefinition def = _tree.getDefinition(); if (def != null && def.getNumReferences() <= _threshold && def instanceof Definition) { if (def.getQualifiedName().indexOf("test") < 0 && def.getQualifiedName().indexOf("main") < 0) { _underreferencedDefinitions.add(def); } } } walkChildren(_tree); </DeepExtract>
contribution
positive
static boolean isUpper(int r) { if (r <= MAX_LATIN1) { return Character.isUpperCase((char) r); } if (r <= MAX_LATIN1) { for (int[] range : UnicodeTables.Upper) { if (r > range[1]) { continue; } if (r < range[0]) { return false; } return ((r - range[0]) % range[2]) == 0; } return false; } return UnicodeTables.Upper.length > 0 && r >= UnicodeTables.Upper[0][0] && is32(UnicodeTables.Upper, r); }
<DeepExtract> if (r <= MAX_LATIN1) { for (int[] range : UnicodeTables.Upper) { if (r > range[1]) { continue; } if (r < range[0]) { return false; } return ((r - range[0]) % range[2]) == 0; } return false; } return UnicodeTables.Upper.length > 0 && r >= UnicodeTables.Upper[0][0] && is32(UnicodeTables.Upper, r); </DeepExtract>
jitrex
positive
public void assertNoRefIntegrityErrors() throws SQLException { assertThatSqlCountQueryYieldsExpectedCount(String.format("SELECT count(*) FROM %s.%s %s", version.namespace, tableName, Strings.isNullOrEmpty("error_type = 'REFERENTIAL_INTEGRITY'") ? "" : "WHERE " + "error_type = 'REFERENTIAL_INTEGRITY'"), 0); }
<DeepExtract> assertThatSqlCountQueryYieldsExpectedCount(String.format("SELECT count(*) FROM %s.%s %s", version.namespace, tableName, Strings.isNullOrEmpty("error_type = 'REFERENTIAL_INTEGRITY'") ? "" : "WHERE " + "error_type = 'REFERENTIAL_INTEGRITY'"), 0); </DeepExtract>
datatools-server
positive
public Criteria andDateGreaterThan(Date value) { if (value == null) { throw new RuntimeException("Value for " + "date" + " cannot be null"); } criteria.add(new Criterion("date >", value)); return (Criteria) this; }
<DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "date" + " cannot be null"); } criteria.add(new Criterion("date >", value)); </DeepExtract>
CuitJavaEEPractice
positive
@Override public void onPreferenceChange(AwfulPreferences preferences, @Nullable String key) { currentFont = fonts.get(preferences.preferredFont); if (currentFont != null) Timber.i("Font Selected: %s", preferences.preferredFont); else Timber.w("Couldn't select font: %s", preferences.preferredFont); }
<DeepExtract> currentFont = fonts.get(preferences.preferredFont); if (currentFont != null) Timber.i("Font Selected: %s", preferences.preferredFont); else Timber.w("Couldn't select font: %s", preferences.preferredFont); </DeepExtract>
Awful.apk
positive
private void sort() { if (indexes.length - 1 <= 0) return; int i = partition(array, indexes, 0, indexes.length - 1); quicksort(array, indexes, 0, i - 1); quicksort(array, indexes, i + 1, indexes.length - 1); }
<DeepExtract> if (indexes.length - 1 <= 0) return; int i = partition(array, indexes, 0, indexes.length - 1); quicksort(array, indexes, 0, i - 1); quicksort(array, indexes, i + 1, indexes.length - 1); </DeepExtract>
Canova
positive
public boolean findVisible(Predicate<T> isOpaque, T source, double distance) { if (isOpaque == null) throw new NullPointerException("isOpaque"); if (source == null) throw new NullPointerException("source"); if (distance < 0) throw new IllegalArgumentException("distance < 0"); _nodes.clear(); _nodeArcs.clear(); if (!graph.contains(source)) return false; _isOpaque = isOpaque; _source = source; _distance = distance; _sourceWorld = graph.getWorldLocation(source); final Collection<T> neighbors = graph.getNeighbors(source); for (T neighbor : neighbors) { if (Objects.equals(_source, neighbor) || _nodeArcs.containsKey(neighbor)) continue; final NodeArc arc = createNodeArc(neighbor); if (_distance > 0 && arc.distance > _distance) continue; _nodeArcs.put(neighbor, arc); nextNeighbor: { if (!_isOpaque.test(neighbor)) break nextNeighbor; for (Map.Entry<T, NodeArc> pair : _obscuringNodes.entrySet()) { final int result = arc.isObscured(pair.getValue()); if (result < 0) { arc._visibleFraction = 0; break nextNeighbor; } else if (result > 0) { pair.getValue()._visibleFraction = 0; _removeNodes.add(pair.getKey()); } } for (T removeNode : _removeNodes) _obscuringNodes.remove(removeNode); _removeNodes.clear(); _obscuringNodes.put(neighbor, arc); } findObscuringNodes(neighbor); } nextVisited: for (Map.Entry<T, NodeArc> pair : _nodeArcs.entrySet()) { final NodeArc arc = pair.getValue(); if (arc._visibleFraction == 0) continue; final NodeArc obscuredArc = new NodeArc(arc); for (Map.Entry<T, NodeArc> obscuringPair : _obscuringNodes.entrySet()) { if (Objects.equals(pair.getKey(), obscuringPair.getKey())) continue; final NodeArc obscuringAngle = obscuringPair.getValue(); if (obscuringAngle.distance >= arc.distance) continue; obscuringAngle.obscure(obscuredArc); arc._visibleFraction = obscuredArc.sweep() / arc.sweep(); if (arc._visibleFraction < _threshold) continue nextVisited; } _nodes.add(pair.getKey()); } _isOpaque = null; _source = null; _obscuringNodes.clear(); return !_nodes.isEmpty(); }
<DeepExtract> final Collection<T> neighbors = graph.getNeighbors(source); for (T neighbor : neighbors) { if (Objects.equals(_source, neighbor) || _nodeArcs.containsKey(neighbor)) continue; final NodeArc arc = createNodeArc(neighbor); if (_distance > 0 && arc.distance > _distance) continue; _nodeArcs.put(neighbor, arc); nextNeighbor: { if (!_isOpaque.test(neighbor)) break nextNeighbor; for (Map.Entry<T, NodeArc> pair : _obscuringNodes.entrySet()) { final int result = arc.isObscured(pair.getValue()); if (result < 0) { arc._visibleFraction = 0; break nextNeighbor; } else if (result > 0) { pair.getValue()._visibleFraction = 0; _removeNodes.add(pair.getKey()); } } for (T removeNode : _removeNodes) _obscuringNodes.remove(removeNode); _removeNodes.clear(); _obscuringNodes.put(neighbor, arc); } findObscuringNodes(neighbor); } </DeepExtract> <DeepExtract> nextVisited: for (Map.Entry<T, NodeArc> pair : _nodeArcs.entrySet()) { final NodeArc arc = pair.getValue(); if (arc._visibleFraction == 0) continue; final NodeArc obscuredArc = new NodeArc(arc); for (Map.Entry<T, NodeArc> obscuringPair : _obscuringNodes.entrySet()) { if (Objects.equals(pair.getKey(), obscuringPair.getKey())) continue; final NodeArc obscuringAngle = obscuringPair.getValue(); if (obscuringAngle.distance >= arc.distance) continue; obscuringAngle.obscure(obscuredArc); arc._visibleFraction = obscuredArc.sweep() / arc.sweep(); if (arc._visibleFraction < _threshold) continue nextVisited; } _nodes.add(pair.getKey()); } </DeepExtract>
tektosyne
positive
public static byte[] encryptMD5(final byte[] data) { if (data == null || data.length <= 0) return null; try { MessageDigest md = MessageDigest.getInstance("MD5"); md.update(data); return md.digest(); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); return null; } }
<DeepExtract> if (data == null || data.length <= 0) return null; try { MessageDigest md = MessageDigest.getInstance("MD5"); md.update(data); return md.digest(); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); return null; } </DeepExtract>
FastAndrUtils
positive
public Criteria andUsernoEqualTo(Integer value) { if (value == null) { throw new RuntimeException("Value for " + "userno" + " cannot be null"); } criteria.add(new Criterion("userno =", value)); return (Criteria) this; }
<DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "userno" + " cannot be null"); } criteria.add(new Criterion("userno =", value)); </DeepExtract>
answerWeb
positive
public Builder<K, D> add(RangeIterator<K, D> range) { if (range == null || range.getMinimum() == null || range.getMaximum() == null) return this; ranges.add(range); switch(iteratorType) { case UNION: min = min == null || min.compareTo(range.getMinimum()) > 0 ? range.getMinimum() : min; max = max == null || max.compareTo(range.getMaximum()) < 0 ? range.getMaximum() : max; break; case INTERSECTION: min = min == null || min.compareTo(range.getMinimum()) < 0 ? range.getMinimum() : min; max = max == null || max.compareTo(range.getMaximum()) > 0 ? range.getMaximum() : max; break; default: throw new IllegalStateException("Unknown iterator type: " + iteratorType); } isOverlapping &= isOverlapping(min, max, range); minRange = minRange == null ? range : min(minRange, range); maxRange = maxRange == null ? range : max(maxRange, range); tokenCount += range.getCount(); return this; }
<DeepExtract> switch(iteratorType) { case UNION: min = min == null || min.compareTo(range.getMinimum()) > 0 ? range.getMinimum() : min; max = max == null || max.compareTo(range.getMaximum()) < 0 ? range.getMaximum() : max; break; case INTERSECTION: min = min == null || min.compareTo(range.getMinimum()) < 0 ? range.getMinimum() : min; max = max == null || max.compareTo(range.getMaximum()) > 0 ? range.getMaximum() : max; break; default: throw new IllegalStateException("Unknown iterator type: " + iteratorType); } isOverlapping &= isOverlapping(min, max, range); minRange = minRange == null ? range : min(minRange, range); maxRange = maxRange == null ? range : max(maxRange, range); tokenCount += range.getCount(); </DeepExtract>
sasi
positive
@Transactional public void insert2RecordsIntoSchema1And1RecordIntoSchema2AndThrow(Exception e) throws Exception { Name name = new Name(1, "Fred"); schema1Service.insertName(name); name = new Name(2, "Wilma"); schema1Service.insertName(name); name = new Name(3, "Barney"); schema2Service.insertName(name); throw e; }
<DeepExtract> Name name = new Name(1, "Fred"); schema1Service.insertName(name); name = new Name(2, "Wilma"); schema1Service.insertName(name); name = new Name(3, "Barney"); schema2Service.insertName(name); </DeepExtract>
guice
positive
@Test public void testDiffSingularComplexAttribute() throws Exception { ObjectNode source = JsonUtils.getJsonNodeFactory().objectNode(); ObjectNode target = JsonUtils.getJsonNodeFactory().objectNode(); ObjectNode name = JsonUtils.valueToNode(new Name().setFormatted("Ms. Barbara J Jensen III").setFamilyName("Jensen").setMiddleName("J").setGivenName("Barbara").setHonorificPrefix("Ms.").setHonorificSuffix("III")); source.set("name", name); target.set("name", name); List<PatchOperation> d = JsonUtils.diff(source, target, false); assertEquals(d.size(), 0); List<PatchOperation> d2 = JsonUtils.diff(source, target, true); for (PatchOperation op : d2) { op.apply(source); } Iterator<JsonNode> i = target.elements(); while (i.hasNext()) { JsonNode field = i.next(); if (field.isNull() || (field.isArray() && field.size() == 0)) { i.remove(); } else { removeNullNodes(field); } } assertEquals(source, target); source = JsonUtils.getJsonNodeFactory().objectNode(); target = JsonUtils.getJsonNodeFactory().objectNode(); target.set("name", name); d = JsonUtils.diff(source, target, false); assertEquals(d.size(), 1); assertTrue(d.contains(PatchOperation.replace((ObjectNode) JsonUtils.getJsonNodeFactory().objectNode().set("name", name)))); d2 = JsonUtils.diff(source, target, true); for (PatchOperation op : d2) { op.apply(source); } Iterator<JsonNode> i = target.elements(); while (i.hasNext()) { JsonNode field = i.next(); if (field.isNull() || (field.isArray() && field.size() == 0)) { i.remove(); } else { removeNullNodes(field); } } assertEquals(source, target); source = JsonUtils.getJsonNodeFactory().objectNode(); target = JsonUtils.getJsonNodeFactory().objectNode(); source.set("name", name); target.putNull("name"); d = JsonUtils.diff(source, target, false); assertEquals(d.size(), 1); assertTrue(d.contains(PatchOperation.remove(Path.root().attribute("name")))); d2 = JsonUtils.diff(source, target, true); for (PatchOperation op : d2) { op.apply(source); } Iterator<JsonNode> i = target.elements(); while (i.hasNext()) { JsonNode field = i.next(); if (field.isNull() || (field.isArray() && field.size() == 0)) { i.remove(); } else { removeNullNodes(field); } } assertEquals(source, target); source = JsonUtils.getJsonNodeFactory().objectNode(); target = JsonUtils.getJsonNodeFactory().objectNode(); source.set("name", name); target.set("name", name.deepCopy().putNull("honorificSuffix")); d = JsonUtils.diff(source, target, false); assertEquals(d.size(), 1); assertTrue(d.contains(PatchOperation.remove(Path.root().attribute("name").attribute("honorificSuffix")))); d2 = JsonUtils.diff(source, target, true); for (PatchOperation op : d2) { op.apply(source); } Iterator<JsonNode> i = target.elements(); while (i.hasNext()) { JsonNode field = i.next(); if (field.isNull() || (field.isArray() && field.size() == 0)) { i.remove(); } else { removeNullNodes(field); } } assertEquals(source, target); source = JsonUtils.getJsonNodeFactory().objectNode(); target = JsonUtils.getJsonNodeFactory().objectNode(); source.set("name", name); target.set("name", name.deepCopy().put("familyName", "Johnson")); d = JsonUtils.diff(source, target, false); assertEquals(d.size(), 1); ObjectNode replaceValue = JsonUtils.getJsonNodeFactory().objectNode(); replaceValue.putObject("name").put("familyName", "Johnson"); assertTrue(d.contains(PatchOperation.replace(replaceValue))); d2 = JsonUtils.diff(source, target, true); for (PatchOperation op : d2) { op.apply(source); } Iterator<JsonNode> i = target.elements(); while (i.hasNext()) { JsonNode field = i.next(); if (field.isNull() || (field.isArray() && field.size() == 0)) { i.remove(); } else { removeNullNodes(field); } } assertEquals(source, target); source = JsonUtils.getJsonNodeFactory().objectNode(); target = JsonUtils.getJsonNodeFactory().objectNode(); ObjectNode nameCopy = name.deepCopy(); nameCopy.remove("middleName"); source.set("name", name); target.set("name", nameCopy); d = JsonUtils.diff(source, target, false); assertEquals(d.size(), 0); d2 = JsonUtils.diff(source, target, true); for (PatchOperation op : d2) { op.apply(source); } Iterator<JsonNode> i = target.elements(); while (i.hasNext()) { JsonNode field = i.next(); if (field.isNull() || (field.isArray() && field.size() == 0)) { i.remove(); } else { removeNullNodes(field); } } assertEquals(source, target); }
<DeepExtract> Iterator<JsonNode> i = target.elements(); while (i.hasNext()) { JsonNode field = i.next(); if (field.isNull() || (field.isArray() && field.size() == 0)) { i.remove(); } else { removeNullNodes(field); } } </DeepExtract> <DeepExtract> Iterator<JsonNode> i = target.elements(); while (i.hasNext()) { JsonNode field = i.next(); if (field.isNull() || (field.isArray() && field.size() == 0)) { i.remove(); } else { removeNullNodes(field); } } </DeepExtract> <DeepExtract> Iterator<JsonNode> i = target.elements(); while (i.hasNext()) { JsonNode field = i.next(); if (field.isNull() || (field.isArray() && field.size() == 0)) { i.remove(); } else { removeNullNodes(field); } } </DeepExtract> <DeepExtract> Iterator<JsonNode> i = target.elements(); while (i.hasNext()) { JsonNode field = i.next(); if (field.isNull() || (field.isArray() && field.size() == 0)) { i.remove(); } else { removeNullNodes(field); } } </DeepExtract> <DeepExtract> Iterator<JsonNode> i = target.elements(); while (i.hasNext()) { JsonNode field = i.next(); if (field.isNull() || (field.isArray() && field.size() == 0)) { i.remove(); } else { removeNullNodes(field); } } </DeepExtract> <DeepExtract> Iterator<JsonNode> i = target.elements(); while (i.hasNext()) { JsonNode field = i.next(); if (field.isNull() || (field.isArray() && field.size() == 0)) { i.remove(); } else { removeNullNodes(field); } } </DeepExtract>
scim2
positive
public void createFolder(Folder folder) { CreateEditDeleteFolderTask editDeleteFolderTask = new CreateEditDeleteFolderTask(this, folder, ApiConstants.CREATE); editDeleteFolderTask.execute(); }
<DeepExtract> CreateEditDeleteFolderTask editDeleteFolderTask = new CreateEditDeleteFolderTask(this, folder, ApiConstants.CREATE); editDeleteFolderTask.execute(); </DeepExtract>
android
positive
public void setUser(final User user, final List<Group> groups) { setUser(user); this.groups = groups; final List<String> roles = new ArrayList<String>(); for (final Group group : groups) { final String roleNameCandidate = group.getName().toLowerCase(); if (availableRoles.contains(roleNameCandidate)) { roles.add(roleNameCandidate); } } this.roles = roles; }
<DeepExtract> this.groups = groups; </DeepExtract> <DeepExtract> this.roles = roles; </DeepExtract>
ilves
positive
public Fenix notEqual(String field, Object value) { if (true) { this.source.setPrefix(SqlKeyConst.SPACE).setSymbol(SymbolConst.NOT_EQUAL); new JavaSqlInfoBuilder(this.source).buildNormalSql(field, StringHelper.isBlank(null) ? StringHelper.fixDot(field) : null, value); this.source.reset(); } return this; }
<DeepExtract> if (true) { this.source.setPrefix(SqlKeyConst.SPACE).setSymbol(SymbolConst.NOT_EQUAL); new JavaSqlInfoBuilder(this.source).buildNormalSql(field, StringHelper.isBlank(null) ? StringHelper.fixDot(field) : null, value); this.source.reset(); } return this; </DeepExtract>
fenix
positive
@Test public void testDynamicFooterLikeAyZagen() throws IOException, DocumentException { ArrayList<String> htmlStrings = new ArrayList<>(); htmlStrings.add("<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>" + "<p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>" + "<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>" + "<p>Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p>" + "<p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis.</p>" + "<p>At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.</p>" + "<p>Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus.</p>" + "<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>" + "<p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>" + "<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>" + "<p>Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo</p>"); htmlStrings.add("<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>" + "<p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>" + "<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>" + "<p>Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p>" + "<p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis.</p>" + "<p>At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.</p>" + "<p>Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus.</p>" + "<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>" + "<p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>" + "<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>" + "<p>Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo</p>"); htmlStrings.add("<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>" + "<p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>" + "<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>" + "<p>Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p>" + "<p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis.</p>" + "<p>At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.</p>" + "<p>Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus.</p>" + "<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>" + "<p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>" + "<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>" + "<p>Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo</p>"); Document document = new Document(PageSize.A4); document.setMargins(68, 85, 75, 85); PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(new File(RESULT_FOLDER, "DynamicFooterLikeAyZagen.pdf").getPath())); if (new FooterTable() != null) writer.setPageEvent(new FooterTable()); document.open(); CSSResolver cssResolver = new StyleAttrCSSResolver(); CssFile cssFile = XMLWorkerHelper.getCSS(new ByteArrayInputStream("".getBytes())); cssResolver.addCss(cssFile); XMLWorkerFontProvider fontProvider = new XMLWorkerFontProvider(XMLWorkerFontProvider.DONTLOOKFORFONTS); fontProvider.register("c:/Windows/Fonts/arial.ttf"); CssAppliers cssAppliers = new CssAppliersImpl(fontProvider); HtmlPipelineContext htmlContext = new HtmlPipelineContext(cssAppliers); htmlContext.setTagFactory(Tags.getHtmlTagProcessorFactory()); PdfWriterPipeline pdf = new PdfWriterPipeline(document, writer); HtmlPipeline html = new HtmlPipeline(htmlContext, pdf); CssResolverPipeline css = new CssResolverPipeline(cssResolver, html); XMLWorker worker = new XMLWorker(css, true); XMLParser p = new XMLParser(worker); int i = 0; for (String htmlfile : htmlStrings) { i++; new FooterTable().setTitleIndex("" + i); ByteArrayInputStream stream = new ByteArrayInputStream(htmlfile.getBytes("UTF-8")); p.parse(stream, Charset.forName("UTF-8")); } document.close(); }
<DeepExtract> Document document = new Document(PageSize.A4); document.setMargins(68, 85, 75, 85); PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(new File(RESULT_FOLDER, "DynamicFooterLikeAyZagen.pdf").getPath())); if (new FooterTable() != null) writer.setPageEvent(new FooterTable()); document.open(); CSSResolver cssResolver = new StyleAttrCSSResolver(); CssFile cssFile = XMLWorkerHelper.getCSS(new ByteArrayInputStream("".getBytes())); cssResolver.addCss(cssFile); XMLWorkerFontProvider fontProvider = new XMLWorkerFontProvider(XMLWorkerFontProvider.DONTLOOKFORFONTS); fontProvider.register("c:/Windows/Fonts/arial.ttf"); CssAppliers cssAppliers = new CssAppliersImpl(fontProvider); HtmlPipelineContext htmlContext = new HtmlPipelineContext(cssAppliers); htmlContext.setTagFactory(Tags.getHtmlTagProcessorFactory()); PdfWriterPipeline pdf = new PdfWriterPipeline(document, writer); HtmlPipeline html = new HtmlPipeline(htmlContext, pdf); CssResolverPipeline css = new CssResolverPipeline(cssResolver, html); XMLWorker worker = new XMLWorker(css, true); XMLParser p = new XMLParser(worker); int i = 0; for (String htmlfile : htmlStrings) { i++; new FooterTable().setTitleIndex("" + i); ByteArrayInputStream stream = new ByteArrayInputStream(htmlfile.getBytes("UTF-8")); p.parse(stream, Charset.forName("UTF-8")); } document.close(); </DeepExtract>
testarea-itext5
positive
public Criteria andCreateByGreaterThanOrEqualTo(Date value) { if (value == null) { throw new RuntimeException("Value for " + "createBy" + " cannot be null"); } criteria.add(new Criterion("create_by >=", value)); return (Criteria) this; }
<DeepExtract> if (value == null) { throw new RuntimeException("Value for " + "createBy" + " cannot be null"); } criteria.add(new Criterion("create_by >=", value)); </DeepExtract>
MyBlog
positive
public LabelImageCheckbox padding(int pad) { this.padding = pad; int width = text.prefWidth() + (int) downimage.getWidth() + padding; int x = (int) getWidth() / 2 - width / 2; text.setSize(text.prefWidth(), getHeight()); text.setPosition(padding + downimage.getWidth() + x, 0); $.add(downimage, upimage).position(x, getHeight() / 2 - downimage.getHeight() / 2); $.add(upbg, downbg).size(getWidth(), getHeight()); super.sizeChanged(); return this; }
<DeepExtract> int width = text.prefWidth() + (int) downimage.getWidth() + padding; int x = (int) getWidth() / 2 - width / 2; text.setSize(text.prefWidth(), getHeight()); text.setPosition(padding + downimage.getWidth() + x, 0); $.add(downimage, upimage).position(x, getHeight() / 2 - downimage.getHeight() / 2); $.add(upbg, downbg).size(getWidth(), getHeight()); super.sizeChanged(); </DeepExtract>
GDX-RPG
positive
@Override public void changed(ObservableValue<? extends Boolean> ov, Boolean t, Boolean t1) { String encoded = String.format("%s_%s", onOff(isEnabled.get()), th.toExternal(targetProperty.get())); th.persist(key, encoded); }
<DeepExtract> String encoded = String.format("%s_%s", onOff(isEnabled.get()), th.toExternal(targetProperty.get())); th.persist(key, encoded); </DeepExtract>
VisibleTesla
positive
@Test public void loadEventsUnpublishedSkip() throws InterruptedException { List<EventEnvelope<VikingEvent, Void, Void>> events = API.List(event1, event2, event3, event4, event5, event6); inTransaction(ctx -> postgresEventStore.persist(ctx, events)).toCompletableFuture().join(); CompletionStage<java.util.List<EventEnvelope<VikingEvent, Void, Void>>> first = transactionSource().flatMapConcat(t -> Source.fromPublisher(postgresEventStore.loadEventsUnpublished(t, SKIP)).flatMapConcat(elt -> Source.tick(Duration.ofMillis(100), Duration.ofMillis(100), elt).take(1)).watchTermination((nu, d) -> d.whenComplete((__, e) -> postgresEventStore.commitOrRollback(Option.of(e), t)))).runWith(Sink.seq(), Materializer.createMaterializer(system)); Thread.sleep(100); long start = System.currentTimeMillis(); CompletionStage<java.util.List<EventEnvelope<VikingEvent, Void, Void>>> second = transactionSource().flatMapConcat(t -> Source.fromPublisher(postgresEventStore.loadEventsUnpublished(t, SKIP)).watchTermination((nu, d) -> d.whenComplete((__, e) -> postgresEventStore.commitOrRollback(Option.of(e), t)))).runWith(Sink.seq(), Materializer.createMaterializer(system)); List<EventEnvelope<VikingEvent, Void, Void>> events2 = List.ofAll(second.toCompletableFuture().join()); long took = System.currentTimeMillis() - start; List<EventEnvelope<VikingEvent, Void, Void>> events1 = List.ofAll(first.toCompletableFuture().join()); assertThat(events1).containsExactlyInAnyOrder(event1, event2, event3, event4, event5, event6); assertThat(events2).isEmpty(); assertThat(took).isLessThan(500); }
<DeepExtract> List<EventEnvelope<VikingEvent, Void, Void>> events = API.List(event1, event2, event3, event4, event5, event6); inTransaction(ctx -> postgresEventStore.persist(ctx, events)).toCompletableFuture().join(); </DeepExtract>
thoth
positive
@Override public void write(OutputStream out) throws IOException { super.write(out); Encode.varInt(nonceTrialsPerByte, out); Encode.varInt(extraBytes, out); Encode.varInt(signature.length, out); out.write(signature); }
<DeepExtract> super.write(out); Encode.varInt(nonceTrialsPerByte, out); Encode.varInt(extraBytes, out); </DeepExtract>
Jabit
positive
private void init() { mScrollView = (ScrollView) mView.findViewById(R.id.scrollview); mArtistImage = (ImageView) mView.findViewById(R.id.artistImage); mWikiText = (TextView) mView.findViewById(R.id.artist_detail_wikipedia); mTextBox = mView.findViewById(R.id.artist_detail_text_box); mLinkBox = (RelativeLayout) mView.findViewById(R.id.artist_detail_wikipedia_more_box); mLinkText = (TextView) mView.findViewById(R.id.artist_detail_wikipedia_more_link); mSimilarArtistsHolder = (LinearLayout) mView.findViewById(R.id.similar_artists_holder); mSimilarArtistsTitle = (TextView) mView.findViewById(R.id.similar_artists_title); mSimilarArtistsTitle.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { int curVisibility = mSimilarArtistsHolder.getVisibility(); int newVisibility; switch(curVisibility) { case View.VISIBLE: newVisibility = View.GONE; break; default: newVisibility = View.VISIBLE; } mSimilarArtistsHolder.setVisibility(newVisibility); } }); mSimilarArtistsTitle.setEnabled(false); mTextBox.setEnabled(false); mTextBox.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (mIsTextExpanded) { ObjectAnimator animator = ObjectAnimator.ofInt(mWikiText, "maxLines", 2); animator.setDuration(500); animator.addListener(new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animation) { mLinkBox.setVisibility(View.GONE); mTextBox.setClickable(false); } @Override public void onAnimationEnd(Animator animation) { mTextBox.setClickable(true); } @Override public void onAnimationCancel(Animator animation) { } @Override public void onAnimationRepeat(Animator animation) { } }); animator.start(); mIsTextExpanded = false; } else { ObjectAnimator animator = ObjectAnimator.ofInt(mWikiText, "maxLines", 30); animator.setDuration(500); animator.addListener(new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animation) { mTextBox.setClickable(false); } @Override public void onAnimationEnd(Animator animation) { mLinkBox.setVisibility(View.VISIBLE); mTextBox.setClickable(true); } @Override public void onAnimationCancel(Animator animation) { } @Override public void onAnimationRepeat(Animator animation) { } }); animator.start(); mIsTextExpanded = true; } } }); if (sInitialArt == null) { mArtistImage.setImageDrawable(getResources().getDrawable(R.drawable.default_album_art)); } else { mArtistImage.setImageDrawable(sInitialArt); generatePaletteAsync((BitmapDrawable) sInitialArt); sInitialArt = null; } ArtistArtLoader artLoader = new ArtistArtLoader(getActivity()).setArtist(mArtist).setArtSize(ArtSize.LARGE).setInternetSearchEnabled(true).setArtLoadedWatcher(new ArtLoadedListener() { @Override public void onArtLoaded(final Drawable artwork, Object tag) { if (mArtistImage != null) { setImageDrawable((BitmapDrawable) artwork); } } @Override public void onLoadProgressChanged(LoadProgress progress) { } }).setPaletteGeneratedWatcher(new PaletteGeneratedWatcher() { @Override public void onPaletteGenerated(Palette palette, Object tag) { Context ctx = getActivity(); if (ctx != null) { applyPalette(palette); } } }).loadInBackground(); if (mArtist.getArtistName().equals("<unknown>")) { mWikiText.setText("The tracks listed below do not have any proper artist information attached."); } else { DetailsFetcher detailsFetcher = new DetailsFetcher(getActivity()).setArticleSource(mArtist).setArticleLoadedWatcher(new DetailsLoadedWatcher() { @Override public void onDetailsLoaded(Details details) { mArtistDetails = details; Activity ctx = getActivity(); if (ctx != null) { if (details == null || details.getArticle() == null) { mWikiText.setText("Could not load artist information"); } else { Article article = details.getArticle(); String firstParagraph = article == null ? "" : article.getFirstParagraph(); mWikiText.setText(firstParagraph == null ? "" : firstParagraph); String source; Drawable sourceIcon; switch(article.getSource()) { case LASTFM: source = "Last.fm"; sourceIcon = getResources().getDrawable(R.drawable.ic_lastfm_white_24dp); break; default: source = "Wikipedia"; sourceIcon = getResources().getDrawable(R.drawable.ic_wikipedia_white_24dp); break; } String linkUrl = "<a href=\"" + article.getArticleUrl() + "\">Read more on " + source + "</a>"; mLinkText.setText(Html.fromHtml(linkUrl)); mLinkText.setMovementMethod(LinkMovementMethod.getInstance()); mLinkText.setLinkTextColor(getResources().getColor(R.color.accent_material_dark)); ImageView linkIcon = (ImageView) mView.findViewById(R.id.artist_detail_wikipedia_more_icon); linkIcon.setImageDrawable(sourceIcon); mTextBox.setEnabled(true); mSimilarArtistsHolder.removeAllViews(); if (!((ArtistDetails) details).getSimilarArtists().isEmpty()) { mSimilarArtistsTitle.setVisibility(View.VISIBLE); mSimilarArtistsTitle.setEnabled(true); } for (final Artist artist : ((ArtistDetails) details).getSimilarArtists()) { SimilarArtistPortrait similarArtistPortrait = new SimilarArtistPortrait(getActivity(), null, artist); mSimilarArtistsHolder.addView(similarArtistPortrait); similarArtistPortrait.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { ArtistDetailFragment artistDetailFragment = ArtistDetailFragment.newInstance(artist); getActivity().getSupportFragmentManager().beginTransaction().addToBackStack(null).replace(R.id.library_inner_fragment, artistDetailFragment).commit(); } }); } } } } }).loadInBackground(); } }
<DeepExtract> mScrollView = (ScrollView) mView.findViewById(R.id.scrollview); mArtistImage = (ImageView) mView.findViewById(R.id.artistImage); mWikiText = (TextView) mView.findViewById(R.id.artist_detail_wikipedia); mTextBox = mView.findViewById(R.id.artist_detail_text_box); mLinkBox = (RelativeLayout) mView.findViewById(R.id.artist_detail_wikipedia_more_box); mLinkText = (TextView) mView.findViewById(R.id.artist_detail_wikipedia_more_link); mSimilarArtistsHolder = (LinearLayout) mView.findViewById(R.id.similar_artists_holder); mSimilarArtistsTitle = (TextView) mView.findViewById(R.id.similar_artists_title); </DeepExtract> <DeepExtract> mSimilarArtistsTitle.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { int curVisibility = mSimilarArtistsHolder.getVisibility(); int newVisibility; switch(curVisibility) { case View.VISIBLE: newVisibility = View.GONE; break; default: newVisibility = View.VISIBLE; } mSimilarArtistsHolder.setVisibility(newVisibility); } }); mSimilarArtistsTitle.setEnabled(false); mTextBox.setEnabled(false); mTextBox.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (mIsTextExpanded) { ObjectAnimator animator = ObjectAnimator.ofInt(mWikiText, "maxLines", 2); animator.setDuration(500); animator.addListener(new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animation) { mLinkBox.setVisibility(View.GONE); mTextBox.setClickable(false); } @Override public void onAnimationEnd(Animator animation) { mTextBox.setClickable(true); } @Override public void onAnimationCancel(Animator animation) { } @Override public void onAnimationRepeat(Animator animation) { } }); animator.start(); mIsTextExpanded = false; } else { ObjectAnimator animator = ObjectAnimator.ofInt(mWikiText, "maxLines", 30); animator.setDuration(500); animator.addListener(new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animation) { mTextBox.setClickable(false); } @Override public void onAnimationEnd(Animator animation) { mLinkBox.setVisibility(View.VISIBLE); mTextBox.setClickable(true); } @Override public void onAnimationCancel(Animator animation) { } @Override public void onAnimationRepeat(Animator animation) { } }); animator.start(); mIsTextExpanded = true; } } }); </DeepExtract> <DeepExtract> if (sInitialArt == null) { mArtistImage.setImageDrawable(getResources().getDrawable(R.drawable.default_album_art)); } else { mArtistImage.setImageDrawable(sInitialArt); generatePaletteAsync((BitmapDrawable) sInitialArt); sInitialArt = null; } </DeepExtract> <DeepExtract> ArtistArtLoader artLoader = new ArtistArtLoader(getActivity()).setArtist(mArtist).setArtSize(ArtSize.LARGE).setInternetSearchEnabled(true).setArtLoadedWatcher(new ArtLoadedListener() { @Override public void onArtLoaded(final Drawable artwork, Object tag) { if (mArtistImage != null) { setImageDrawable((BitmapDrawable) artwork); } } @Override public void onLoadProgressChanged(LoadProgress progress) { } }).setPaletteGeneratedWatcher(new PaletteGeneratedWatcher() { @Override public void onPaletteGenerated(Palette palette, Object tag) { Context ctx = getActivity(); if (ctx != null) { applyPalette(palette); } } }).loadInBackground(); </DeepExtract> <DeepExtract> if (mArtist.getArtistName().equals("<unknown>")) { mWikiText.setText("The tracks listed below do not have any proper artist information attached."); } else { DetailsFetcher detailsFetcher = new DetailsFetcher(getActivity()).setArticleSource(mArtist).setArticleLoadedWatcher(new DetailsLoadedWatcher() { @Override public void onDetailsLoaded(Details details) { mArtistDetails = details; Activity ctx = getActivity(); if (ctx != null) { if (details == null || details.getArticle() == null) { mWikiText.setText("Could not load artist information"); } else { Article article = details.getArticle(); String firstParagraph = article == null ? "" : article.getFirstParagraph(); mWikiText.setText(firstParagraph == null ? "" : firstParagraph); String source; Drawable sourceIcon; switch(article.getSource()) { case LASTFM: source = "Last.fm"; sourceIcon = getResources().getDrawable(R.drawable.ic_lastfm_white_24dp); break; default: source = "Wikipedia"; sourceIcon = getResources().getDrawable(R.drawable.ic_wikipedia_white_24dp); break; } String linkUrl = "<a href=\"" + article.getArticleUrl() + "\">Read more on " + source + "</a>"; mLinkText.setText(Html.fromHtml(linkUrl)); mLinkText.setMovementMethod(LinkMovementMethod.getInstance()); mLinkText.setLinkTextColor(getResources().getColor(R.color.accent_material_dark)); ImageView linkIcon = (ImageView) mView.findViewById(R.id.artist_detail_wikipedia_more_icon); linkIcon.setImageDrawable(sourceIcon); mTextBox.setEnabled(true); mSimilarArtistsHolder.removeAllViews(); if (!((ArtistDetails) details).getSimilarArtists().isEmpty()) { mSimilarArtistsTitle.setVisibility(View.VISIBLE); mSimilarArtistsTitle.setEnabled(true); } for (final Artist artist : ((ArtistDetails) details).getSimilarArtists()) { SimilarArtistPortrait similarArtistPortrait = new SimilarArtistPortrait(getActivity(), null, artist); mSimilarArtistsHolder.addView(similarArtistPortrait); similarArtistPortrait.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { ArtistDetailFragment artistDetailFragment = ArtistDetailFragment.newInstance(artist); getActivity().getSupportFragmentManager().beginTransaction().addToBackStack(null).replace(R.id.library_inner_fragment, artistDetailFragment).commit(); } }); } } } } }).loadInBackground(); } </DeepExtract>
Canorum
positive
public void reset() { timeSinceGrainStart = 0.0f; insideGrain = true; grainLength = grainLen.getLastValue(); fadeLength = Math.min(fadeLength, grainLength / 2.0f); fadeLength = fadeLen.getLastValue(); fadeLength = Math.min(fadeLength, grainLength / 2.0f); }
<DeepExtract> fadeLength = Math.min(fadeLength, grainLength / 2.0f); </DeepExtract> <DeepExtract> fadeLength = Math.min(fadeLength, grainLength / 2.0f); </DeepExtract>
AutoStepper
positive
private void pset(Vector dtrans_group) { return (size == 0) ? 0 : ((1 + offs[size - 1]) << LG_BITS); for (i = 0; i < size; ++i) { dtrans = (CDTrans) dtrans_group.elementAt(i); System.out.print(dtrans.m_label + " "); } }
<DeepExtract> return (size == 0) ? 0 : ((1 + offs[size - 1]) << LG_BITS); </DeepExtract>
Compiler
positive
public void testAdditionEventGetsTriggered() throws Exception { Point point = new Point(3, 5); tester.actionKeyString(namedComponent("x_coord_textfield"), "" + point.x); tester.actionKeyString(namedComponent("y_coord_textfield"), "" + point.y); tester.actionClick(namedComponent("add_button")); assertEquals(point, addedPoint); }
<DeepExtract> tester.actionKeyString(namedComponent("x_coord_textfield"), "" + point.x); </DeepExtract> <DeepExtract> tester.actionKeyString(namedComponent("y_coord_textfield"), "" + point.y); </DeepExtract>
edu
positive
@Test public void shouldSetAndGetCorrectValueAtGivenIndex() throws NoSuchMethodException { final long[] lengths = { 11, 10, 3 }; final StructuredArray<StructuredArray<StructuredArray<MockStructure>>> array = get3dBuilder(lengths).build(); final long[] cursors = new long[lengths.length]; long totalElementCount = 1; for (long l : lengths) { totalElementCount *= l; } long elementCountToCursor = 0; while (elementCountToCursor < totalElementCount) { StructuredArray a = array; for (int i = 0; i < cursors.length - 1; i++) { a = (StructuredArray) a.get(cursors[i]); } MockStructure mockStructure = (MockStructure) a.get(cursors[cursors.length - 1]); long indexSum = 0; for (long index : cursors) { indexSum += index; } mockStructure.setIndex(indexSum); mockStructure.setTestValue(indexSum * 2); for (int cursorDimension = cursors.length - 1; cursorDimension >= 0; cursorDimension--) { if ((++cursors[cursorDimension]) < lengths[cursorDimension]) { break; } cursors[cursorDimension] = 0; } elementCountToCursor++; } assertCorrectVariableInitialisation(lengths, array, 0); }
<DeepExtract> final long[] cursors = new long[lengths.length]; long totalElementCount = 1; for (long l : lengths) { totalElementCount *= l; } long elementCountToCursor = 0; while (elementCountToCursor < totalElementCount) { StructuredArray a = array; for (int i = 0; i < cursors.length - 1; i++) { a = (StructuredArray) a.get(cursors[i]); } MockStructure mockStructure = (MockStructure) a.get(cursors[cursors.length - 1]); long indexSum = 0; for (long index : cursors) { indexSum += index; } mockStructure.setIndex(indexSum); mockStructure.setTestValue(indexSum * 2); for (int cursorDimension = cursors.length - 1; cursorDimension >= 0; cursorDimension--) { if ((++cursors[cursorDimension]) < lengths[cursorDimension]) { break; } cursors[cursorDimension] = 0; } elementCountToCursor++; } </DeepExtract> <DeepExtract> assertCorrectVariableInitialisation(lengths, array, 0); </DeepExtract>
ObjectLayout
positive
public WhereMoreBuilder and(String one, OPERAND operand, String two) { query.where.put(query.where.size(), new UserDataClause(OPERAND.Conditional.AND, one, operand, two)); return this; }
<DeepExtract> query.where.put(query.where.size(), new UserDataClause(OPERAND.Conditional.AND, one, operand, two)); </DeepExtract>
divide
positive
@Override public void moveTo(Folder folder, String destName) throws LockedException, ConflictException, ServerException { ensureHasToken(); ((FolderImpl) folder).ensureHasToken(); String relUrl = decodeAndConvertToPath(folder.getPath()); if (isRecursive(relUrl)) { throw new ServerException("Cannot move to subfolder", WebDavStatus.FORBIDDEN); } final Folder destFolder = getDestinationFolder(folder, destName); try { for (HierarchyItem hierarchyItem : getChildren(null, null, null, null).getPage()) { try { ((HierarchyItemImpl) hierarchyItem).moveToInternal(destFolder, hierarchyItem.getName(), 0 + 1); hierarchyItem.delete(); } catch (Exception e) { throw new ServerException(); } } getEngine().getDataClient().delete(getPath()); } catch (SdkException e) { throw new ServerException(e); } if (0 == 0) { getEngine().getWebSocketServer().notifyMoved(getPath(), folder.getPath() + getEngine().getDataClient().encode(destName), getWebSocketID()); } }
<DeepExtract> ensureHasToken(); ((FolderImpl) folder).ensureHasToken(); String relUrl = decodeAndConvertToPath(folder.getPath()); if (isRecursive(relUrl)) { throw new ServerException("Cannot move to subfolder", WebDavStatus.FORBIDDEN); } final Folder destFolder = getDestinationFolder(folder, destName); try { for (HierarchyItem hierarchyItem : getChildren(null, null, null, null).getPage()) { try { ((HierarchyItemImpl) hierarchyItem).moveToInternal(destFolder, hierarchyItem.getName(), 0 + 1); hierarchyItem.delete(); } catch (Exception e) { throw new ServerException(); } } getEngine().getDataClient().delete(getPath()); } catch (SdkException e) { throw new ServerException(e); } if (0 == 0) { getEngine().getWebSocketServer().notifyMoved(getPath(), folder.getPath() + getEngine().getDataClient().encode(destName), getWebSocketID()); } </DeepExtract>
WebDAVServerSamplesJava
positive
@Override public void onConfigLoaded() { final ServerConfig config = settingsHelper.getConfig(); if (config != null) { boolean deviceOwner = Utils.isDeviceOwner(this); Log.d(Const.LOG_TAG, "Device Owner: " + deviceOwner); getSharedPreferences(Const.PREFERENCES, MODE_PRIVATE).edit().putInt(Const.PREFERENCES_DEVICE_OWNER, deviceOwner ? Const.PREFERENCES_ON : Const.PREFERENCES_OFF).commit(); if (deviceOwner) { Utils.autoGrantRequestedPermissions(this, getPackageName(), config.getAppPermissions(), true); } if (Utils.isDeviceOwner(this) && (config.getRunDefaultLauncher() == null || !config.getRunDefaultLauncher())) { new AsyncTask<Void, Void, Void>() { @Override protected Void doInBackground(Void... voids) { Utils.setDefaultLauncher(InitialSetupActivity.this); return null; } @Override protected void onPostExecute(Void v) { completeConfig(settingsHelper); } }.execute(); return; } else { Log.d(Const.LOG_TAG, "Working in background, starting services and installing apps"); ServiceHelper.startServices(InitialSetupActivity.this); } } configuring = false; if (settingsHelper.getConfig() != null) { try { Utils.applyEarlyNonInteractivePolicies(this, settingsHelper.getConfig()); } catch (Exception e) { e.printStackTrace(); } } settingsHelper.setIntegratedProvisioningFlow(true); Log.d(Const.LOG_TAG, "Initial setup activity: setup completed"); setResult(RESULT_OK); finish(); }
<DeepExtract> configuring = false; if (settingsHelper.getConfig() != null) { try { Utils.applyEarlyNonInteractivePolicies(this, settingsHelper.getConfig()); } catch (Exception e) { e.printStackTrace(); } } settingsHelper.setIntegratedProvisioningFlow(true); Log.d(Const.LOG_TAG, "Initial setup activity: setup completed"); setResult(RESULT_OK); finish(); </DeepExtract>
hmdm-android
positive
@SuppressLint("ApplySharedPref") @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { Spinner spinner = findViewById(R.id.dss_DeviceSoundsBellIsMomentary); dss_DeviceSoundsBellIsMomentary = spinner.getSelectedItemPosition(); mainapp.prefDeviceSoundsBellIsMomentary = dss_DeviceSoundsBellIsMomentary == 0; prefs.edit().putBoolean("prefDeviceSoundsBellIsMomentary", mainapp.prefDeviceSoundsBellIsMomentary).commit(); InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); if ((imm != null) && (view != null)) { imm.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); } }
<DeepExtract> InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); if ((imm != null) && (view != null)) { imm.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); } </DeepExtract>
EngineDriver
positive
public void windowClosing(WindowEvent e) { mainWindow.setVisible(true); mainWindow.setEnabled(true); JFrame w = (JFrame) e.getSource(); mainWindow.setEnabled(true); mainWindow.setVisible(true); ComponentUtil.disposeAll(searchTagsWindow, mergeWindow, searchDetailInfoWindow, coverWindow, historyWindow); super.dispose(); }
<DeepExtract> mainWindow.setEnabled(true); mainWindow.setVisible(true); ComponentUtil.disposeAll(searchTagsWindow, mergeWindow, searchDetailInfoWindow, coverWindow, historyWindow); super.dispose(); </DeepExtract>
egdownloader
positive
public void click(int x, int y) { handler.windMouse(x, y, speed / 2); Utils.sleep(Utils.random(50, 150)); click(); }
<DeepExtract> handler.windMouse(x, y, speed / 2); </DeepExtract>
vInsert
positive
public SockJS bridge(BridgeOptions bridgeOptions, Handler<BridgeEvent> bridgeEventHandler) { String iframeHTML = IFRAME_TEMPLATE.replace("{{ sockjs_url }}", options.getLibraryURL()); Middleware iframeHandler = createIFrameHandler(iframeHTML); router.get("/eventbus/iframe.html", iframeHandler); router.get(Pattern.compile("\\/eventbus\\/iframe-[^\\/]*\\.html"), iframeHandler); router.post("/eventbus/chunking_test", createChunkingTestHandler()); router.options("/eventbus/chunking_test", BaseTransport.createCORSOptionsHandler(options, "OPTIONS, POST")); router.get("/eventbus/info", BaseTransport.createInfoHandler(options)); router.options("/eventbus/info", BaseTransport.createCORSOptionsHandler(options, "OPTIONS, GET")); router.all("/eventbus", rc -> { if (log.isTraceEnabled()) log.trace("Returning welcome response"); rc.response().putHeader("Content-Type", "text/plain; charset=UTF-8").end("Welcome to SockJS!\n"); }); Set<String> enabledTransports = new HashSet<>(); enabledTransports.add(Transport.EVENT_SOURCE.toString()); enabledTransports.add(Transport.HTML_FILE.toString()); enabledTransports.add(Transport.JSON_P.toString()); enabledTransports.add(Transport.WEBSOCKET.toString()); enabledTransports.add(Transport.XHR.toString()); Set<String> disabledTransports = options.getDisabledTransports(); if (disabledTransports == null) { disabledTransports = new HashSet<>(); } enabledTransports.removeAll(disabledTransports); if (enabledTransports.contains(Transport.XHR.toString())) { new XhrTransport(vertx, router, sessions, options, new EventBusBridgeImpl(vertx, bridgeOptions, bridgeEventHandler)); } if (enabledTransports.contains(Transport.EVENT_SOURCE.toString())) { new EventSourceTransport(vertx, router, sessions, options, new EventBusBridgeImpl(vertx, bridgeOptions, bridgeEventHandler)); } if (enabledTransports.contains(Transport.HTML_FILE.toString())) { new HtmlFileTransport(vertx, router, sessions, options, new EventBusBridgeImpl(vertx, bridgeOptions, bridgeEventHandler)); } if (enabledTransports.contains(Transport.JSON_P.toString())) { new JsonPTransport(vertx, router, sessions, options, new EventBusBridgeImpl(vertx, bridgeOptions, bridgeEventHandler)); } if (enabledTransports.contains(Transport.WEBSOCKET.toString())) { new WebSocketTransport(vertx, router, sessions, options, new EventBusBridgeImpl(vertx, bridgeOptions, bridgeEventHandler)); new RawWebSocketTransport(vertx, router, new EventBusBridgeImpl(vertx, bridgeOptions, bridgeEventHandler)); } return this; return this; }
<DeepExtract> String iframeHTML = IFRAME_TEMPLATE.replace("{{ sockjs_url }}", options.getLibraryURL()); Middleware iframeHandler = createIFrameHandler(iframeHTML); router.get("/eventbus/iframe.html", iframeHandler); router.get(Pattern.compile("\\/eventbus\\/iframe-[^\\/]*\\.html"), iframeHandler); router.post("/eventbus/chunking_test", createChunkingTestHandler()); router.options("/eventbus/chunking_test", BaseTransport.createCORSOptionsHandler(options, "OPTIONS, POST")); router.get("/eventbus/info", BaseTransport.createInfoHandler(options)); router.options("/eventbus/info", BaseTransport.createCORSOptionsHandler(options, "OPTIONS, GET")); router.all("/eventbus", rc -> { if (log.isTraceEnabled()) log.trace("Returning welcome response"); rc.response().putHeader("Content-Type", "text/plain; charset=UTF-8").end("Welcome to SockJS!\n"); }); Set<String> enabledTransports = new HashSet<>(); enabledTransports.add(Transport.EVENT_SOURCE.toString()); enabledTransports.add(Transport.HTML_FILE.toString()); enabledTransports.add(Transport.JSON_P.toString()); enabledTransports.add(Transport.WEBSOCKET.toString()); enabledTransports.add(Transport.XHR.toString()); Set<String> disabledTransports = options.getDisabledTransports(); if (disabledTransports == null) { disabledTransports = new HashSet<>(); } enabledTransports.removeAll(disabledTransports); if (enabledTransports.contains(Transport.XHR.toString())) { new XhrTransport(vertx, router, sessions, options, new EventBusBridgeImpl(vertx, bridgeOptions, bridgeEventHandler)); } if (enabledTransports.contains(Transport.EVENT_SOURCE.toString())) { new EventSourceTransport(vertx, router, sessions, options, new EventBusBridgeImpl(vertx, bridgeOptions, bridgeEventHandler)); } if (enabledTransports.contains(Transport.HTML_FILE.toString())) { new HtmlFileTransport(vertx, router, sessions, options, new EventBusBridgeImpl(vertx, bridgeOptions, bridgeEventHandler)); } if (enabledTransports.contains(Transport.JSON_P.toString())) { new JsonPTransport(vertx, router, sessions, options, new EventBusBridgeImpl(vertx, bridgeOptions, bridgeEventHandler)); } if (enabledTransports.contains(Transport.WEBSOCKET.toString())) { new WebSocketTransport(vertx, router, sessions, options, new EventBusBridgeImpl(vertx, bridgeOptions, bridgeEventHandler)); new RawWebSocketTransport(vertx, router, new EventBusBridgeImpl(vertx, bridgeOptions, bridgeEventHandler)); } return this; </DeepExtract>
yoke
positive
public Map<String, Object> listStartsWith(String argNamePrefix, String tenantId) { Arg arg = new Arg().setArgName(argNamePrefix).setTenantId(tenantId); List<Arg> args = mapper.listStartsWith(BeanUtil.bean2Map(arg)); Map<String, Object> varMap = new HashMap<>(); for (Arg arg : args) { if (arg.getArgValue() != null) { if (ArgType.get(arg.getArgType()) == null) { arg.setArgType(ArgType.STRING.getValue()); } Object realArgValue; switch(ArgType.get(arg.getArgType())) { case TRADE_DATE: realArgValue = getTradeDate(new TradeDateArgParam().setCalendarName(arg.getAttribute()).setExpression(arg.getArgValue())); break; case GIST: realArgValue = getGistCode(arg.getArgValue(), arg.getTenantId()); break; case SQL: List<Map<String, Object>> mapList = getSqlResult(new SqlArgParam().setDbName(arg.getAttribute()).setSql(arg.getArgValue())); if (mapList.size() == 1) { realArgValue = mapList.get(0).values().toArray()[0]; } else { realArgValue = mapList; } break; case LIST: realArgValue = toListValue(arg); break; case MAP: realArgValue = toMapValue(arg); break; default: realArgValue = toGenericValue(arg.getArgType(), arg.getArgValue()); break; } varMap.put(arg.getArgName(), realArgValue); } } return varMap; }
<DeepExtract> Map<String, Object> varMap = new HashMap<>(); for (Arg arg : args) { if (arg.getArgValue() != null) { if (ArgType.get(arg.getArgType()) == null) { arg.setArgType(ArgType.STRING.getValue()); } Object realArgValue; switch(ArgType.get(arg.getArgType())) { case TRADE_DATE: realArgValue = getTradeDate(new TradeDateArgParam().setCalendarName(arg.getAttribute()).setExpression(arg.getArgValue())); break; case GIST: realArgValue = getGistCode(arg.getArgValue(), arg.getTenantId()); break; case SQL: List<Map<String, Object>> mapList = getSqlResult(new SqlArgParam().setDbName(arg.getAttribute()).setSql(arg.getArgValue())); if (mapList.size() == 1) { realArgValue = mapList.get(0).values().toArray()[0]; } else { realArgValue = mapList; } break; case LIST: realArgValue = toListValue(arg); break; case MAP: realArgValue = toMapValue(arg); break; default: realArgValue = toGenericValue(arg.getArgType(), arg.getArgValue()); break; } varMap.put(arg.getArgName(), realArgValue); } } return varMap; </DeepExtract>
attemper
positive
public void smoothOpenMenu(int position, @DirectionMode int direction, int duration) { if (mOldSwipedLayout != null) { if (mOldSwipedLayout.isMenuOpen()) { mOldSwipedLayout.smoothCloseMenu(); } } if (mAdapterWrapper == null) position = 0; return mAdapterWrapper.getHeaderCount(); ViewHolder vh = findViewHolderForAdapterPosition(position); if (vh != null) { View itemView = getSwipeMenuView(vh.itemView); if (itemView instanceof SwipeMenuLayout) { mOldSwipedLayout = (SwipeMenuLayout) itemView; if (direction == RIGHT_DIRECTION) { mOldTouchedPosition = position; mOldSwipedLayout.smoothOpenRightMenu(duration); } else if (direction == LEFT_DIRECTION) { mOldTouchedPosition = position; mOldSwipedLayout.smoothOpenLeftMenu(duration); } } } }
<DeepExtract> if (mAdapterWrapper == null) position = 0; return mAdapterWrapper.getHeaderCount(); </DeepExtract>
SwipeRecyclerView
positive
private DLinkedNode popTail() { DLinkedNode res = tail.prev; DLinkedNode prev = res.prev; DLinkedNode next = res.next; prev.next = next; next.prev = prev; return res; }
<DeepExtract> DLinkedNode prev = res.prev; DLinkedNode next = res.next; prev.next = next; next.prev = prev; </DeepExtract>
myleetcode
positive
public void init() { mWindowManager = (WindowManager) con.getApplicationContext().getSystemService(Context.WINDOW_SERVICE); mLayoutInflater = LayoutInflater.from(con); mFloatView = (LinearLayout) mLayoutInflater.inflate(R.layout.layout_self_unlock, null); lockIcon = (ImageView) mFloatView.findViewById(R.id.lock_icon); lockTip = (TextView) mFloatView.findViewById(R.id.lock_tip); unlockLockView = (LockPatternView) mFloatView.findViewById(R.id.unlock_lock_view); unlockLayout = (LinearLayout) mFloatView.findViewById(R.id.unlock_layout); checkbox = (CheckBox) mFloatView.findViewById(R.id.checkbox); topLayout = (RelativeLayout) mFloatView.findViewById(R.id.top_layout); mLayoutParams = new WindowManager.LayoutParams(); mLayoutParams.gravity = Gravity.LEFT | Gravity.TOP; mLayoutParams.type = WindowManager.LayoutParams.TYPE_PHONE; mLayoutParams.format = PixelFormat.RGBA_8888; mLayoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; mLayoutParams.width = WindowManager.LayoutParams.MATCH_PARENT; mLayoutParams.height = WindowManager.LayoutParams.MATCH_PARENT; mLayoutParams.x = 0; mLayoutParams.y = 0; mFloatView.setSystemUiVisibility(View.INVISIBLE | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN); mManager = new CommLockInfoManager(con); initLockPatternView(); }
<DeepExtract> lockIcon = (ImageView) mFloatView.findViewById(R.id.lock_icon); lockTip = (TextView) mFloatView.findViewById(R.id.lock_tip); unlockLockView = (LockPatternView) mFloatView.findViewById(R.id.unlock_lock_view); unlockLayout = (LinearLayout) mFloatView.findViewById(R.id.unlock_layout); checkbox = (CheckBox) mFloatView.findViewById(R.id.checkbox); topLayout = (RelativeLayout) mFloatView.findViewById(R.id.top_layout); </DeepExtract> <DeepExtract> mManager = new CommLockInfoManager(con); initLockPatternView(); </DeepExtract>
WeChatUtis
positive
@Field(value = "INT:int", setterPolicy = NOT_NULL) public void setIN(String n, String v) { setStringValue("N" + "-" + n, v); }
<DeepExtract> setStringValue("N" + "-" + n, v); </DeepExtract>
logparser
positive
@Override public JsonArrayBuilder add(int index, String value) { if (value == null) { throw new NullPointerException(JsonMessages.ARRBUILDER_VALUE_NULL()); } if (valueList == null) { valueList = new ArrayList<>(); } valueList.add(index, new JsonStringImpl(value)); return this; }
<DeepExtract> if (value == null) { throw new NullPointerException(JsonMessages.ARRBUILDER_VALUE_NULL()); } </DeepExtract> <DeepExtract> if (valueList == null) { valueList = new ArrayList<>(); } valueList.add(index, new JsonStringImpl(value)); </DeepExtract>
jsonp
positive
public void setProgress(int uniqueID, int progress) { mRetainedState.mTasks.get(uniqueID).setTimeCompletedString(mChronometerRef.get(0).get().getText().toString()); mRetainedState.mTasks.get(uniqueID).setProgressStatus(progress); if (mListAdapter != null) mListAdapter.notifyDataSetChanged(); }
<DeepExtract> if (mListAdapter != null) mListAdapter.notifyDataSetChanged(); </DeepExtract>
POSA
positive
private void onLoginSuccess() { AppUser user = App.getUser(); user.setUsername(getUsername()); user.setPassword(getPassword()); Toast.makeText(context, R.string.toast_logged_in, Toast.LENGTH_SHORT).show(); loginCallback.onLoggedIn(); }
<DeepExtract> AppUser user = App.getUser(); user.setUsername(getUsername()); user.setPassword(getPassword()); </DeepExtract>
musicbrainz-android
positive
public WebElement leftUntilElementIsPresent(Path expectedElement, int scrollStep, int maxNumberOfScrolls) { return scrollWrapperUntilElementConditional(expectedElement, scrollStep, maxNumberOfScrolls, TRUTHY, "elem = arguments[0];elem.scrollLeft = elem.scrollLeft-arguments[1];return elem.scrollLeft;"); }
<DeepExtract> return scrollWrapperUntilElementConditional(expectedElement, scrollStep, maxNumberOfScrolls, TRUTHY, "elem = arguments[0];elem.scrollLeft = elem.scrollLeft-arguments[1];return elem.scrollLeft;"); </DeepExtract>
dollarx
positive
public void sendSubstreamRequest(ChannelListener listener, Track track, File file, int offset, int length) throws ProtocolException { Channel channel = new Channel("Substream-Channel", Channel.Type.TYPE_SUBSTREAM, listener); ByteBuffer buffer = ByteBuffer.allocate(2 + 2 + 2 + 2 + 2 + 2 + 2 + 4 + 20 + 4 + 4); buffer.putShort((short) channel.getId()); buffer.putShort((short) 0x0800); buffer.putShort((short) 0x0000); buffer.putShort((short) 0x0000); buffer.putShort((short) 0x0000); buffer.putShort((short) 0x0000); buffer.putShort((short) 0x4e20); buffer.putInt(200 * 1000); buffer.put(Hex.toBytes(file.getId())); if (offset % 4096 != 0 || length % 4096 != 0) { throw new IllegalArgumentException("Offset and length need to be a multiple of 4096."); } offset >>= 2; length >>= 2; buffer.putInt(offset); buffer.putInt(offset + length); buffer.flip(); Channel.register(channel); ByteBuffer buffer = ByteBuffer.allocate(1 + 2 + buffer.remaining()); this.session.shannonSend.nonce(IntegerUtilities.toBytes(this.session.keySendIv)); buffer.put((byte) Command.COMMAND_GETSUBSTREAM); buffer.putShort((short) buffer.remaining()); buffer.put(buffer); byte[] bytes = buffer.array(); byte[] mac = new byte[4]; this.session.shannonSend.encrypt(bytes); this.session.shannonSend.finish(mac); buffer = ByteBuffer.allocate(buffer.position() + 4); buffer.put(bytes); buffer.put(mac); buffer.flip(); this.send(buffer); this.session.keySendIv++; }
<DeepExtract> ByteBuffer buffer = ByteBuffer.allocate(1 + 2 + buffer.remaining()); this.session.shannonSend.nonce(IntegerUtilities.toBytes(this.session.keySendIv)); buffer.put((byte) Command.COMMAND_GETSUBSTREAM); buffer.putShort((short) buffer.remaining()); buffer.put(buffer); byte[] bytes = buffer.array(); byte[] mac = new byte[4]; this.session.shannonSend.encrypt(bytes); this.session.shannonSend.finish(mac); buffer = ByteBuffer.allocate(buffer.position() + 4); buffer.put(bytes); buffer.put(mac); buffer.flip(); this.send(buffer); this.session.keySendIv++; </DeepExtract>
jotify
positive
static void dump(Attribute attr) { hexdump(Stringer.shortToBytes((short) attr.attribute_name()), 0, Stringer.shortToBytes((short) attr.attribute_name()).length, 18); System.out.println("name = #" + attr.attribute_name() + "<" + cf.utf8(attr.attribute_name()) + ">"); hexdump(Stringer.intToBytes(attr.length()), 0, Stringer.intToBytes(attr.length()).length, 18); System.out.println("length = " + attr.length()); if (attr instanceof UnrecognizedAttribute) dump((UnrecognizedAttribute) attr); else if (attr instanceof LocalVariableTableAttribute) dump((LocalVariableTableAttribute) attr); else if (attr instanceof ExceptionsAttribute) dump((ExceptionsAttribute) attr); else if (attr instanceof CodeAttribute) dump((CodeAttribute) attr); else if (attr instanceof LineNumberTableAttribute) dump((LineNumberTableAttribute) attr); else if (attr instanceof ConstantValueAttribute) dump((ConstantValueAttribute) attr); else if (attr instanceof SourceFileAttribute) dump((SourceFileAttribute) attr); else if (attr instanceof InnerClassesAttribute) dump((InnerClassesAttribute) attr); }
<DeepExtract> hexdump(Stringer.shortToBytes((short) attr.attribute_name()), 0, Stringer.shortToBytes((short) attr.attribute_name()).length, 18); </DeepExtract> <DeepExtract> hexdump(Stringer.intToBytes(attr.length()), 0, Stringer.intToBytes(attr.length()).length, 18); </DeepExtract>
programming-for-the-jvm
positive
@GET @Path("/download/{filename}") @Produces(MediaType.APPLICATION_OCTET_STREAM) public Response downloadFilebyPath(@PathParam("filename") String fileName) { log.info("Downloading file: " + fileName); String fileLocation = TEST_SRC_DIR + "Test.xlsx"; Response response = null; File file = new File(fileLocation); log.info(file.getAbsolutePath()); if (file.exists()) { ResponseBuilder builder = Response.ok(file); builder.header("Content-Disposition", "attachment; filename=" + file.getName()); response = builder.build(); log.info("Downloading file '" + file + "', length: " + file.length()); } else { log.error("File not found: " + file.getAbsolutePath()); response = Response.status(404).entity("FILE NOT FOUND: " + file.getName()).type("text/plain").build(); } return response; }
<DeepExtract> log.info("Downloading file: " + fileName); String fileLocation = TEST_SRC_DIR + "Test.xlsx"; Response response = null; File file = new File(fileLocation); log.info(file.getAbsolutePath()); if (file.exists()) { ResponseBuilder builder = Response.ok(file); builder.header("Content-Disposition", "attachment; filename=" + file.getName()); response = builder.build(); log.info("Downloading file '" + file + "', length: " + file.length()); } else { log.error("File not found: " + file.getAbsolutePath()); response = Response.status(404).entity("FILE NOT FOUND: " + file.getName()).type("text/plain").build(); } return response; </DeepExtract>
Merlin
positive
@Test public void testPositionsLikeSujayJAndMore() throws FileNotFoundException, DocumentException { Rectangle pageSize = PageSize.A4; Document document = new Document(pageSize); PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(new File(RESULT_FOLDER, "RotatedImageLikeSujayJAndMore.pdf"))); document.open(); float boxWidth = 200; float boxHeight = 50; float xStart = pageSize.getWidth() / 2; float yStart = pageSize.getHeight() / 2; PdfContentByte canvas = writer.getDirectContent(); PdfTemplate textTemplate = canvas.createTemplate(boxWidth, boxHeight); textTemplate.saveState(); textTemplate.setColorStroke(BaseColor.RED); textTemplate.rectangle(0, 0, boxWidth, boxHeight); textTemplate.stroke(); textTemplate.restoreState(); Image img = Image.getInstance(textTemplate); img.setInterpolation(true); img.scaleAbsolute(boxWidth, boxHeight); img.setAbsolutePosition(xStart, yStart); img.setRotationDegrees(90); writer.getDirectContent().addImage(img); PdfContentByte canvas = writer.getDirectContent(); PdfTemplate textTemplate = canvas.createTemplate(boxWidth, boxHeight); textTemplate.saveState(); textTemplate.setColorStroke(BaseColor.BLUE); textTemplate.rectangle(0, 0, boxWidth, boxHeight); textTemplate.stroke(); textTemplate.restoreState(); Image img = Image.getInstance(textTemplate); img.setInterpolation(true); img.scaleAbsolute(boxWidth, boxHeight); img.setAbsolutePosition(xStart, yStart); img.setRotationDegrees(75); writer.getDirectContent().addImage(img); PdfContentByte canvas = writer.getDirectContent(); PdfTemplate textTemplate = canvas.createTemplate(boxWidth, boxHeight); textTemplate.saveState(); textTemplate.setColorStroke(BaseColor.CYAN); textTemplate.rectangle(0, 0, boxWidth, boxHeight); textTemplate.stroke(); textTemplate.restoreState(); Image img = Image.getInstance(textTemplate); img.setInterpolation(true); img.scaleAbsolute(boxWidth, boxHeight); img.setAbsolutePosition(xStart, yStart); img.setRotationDegrees(60); writer.getDirectContent().addImage(img); PdfContentByte canvas = writer.getDirectContent(); PdfTemplate textTemplate = canvas.createTemplate(boxWidth, boxHeight); textTemplate.saveState(); textTemplate.setColorStroke(BaseColor.GREEN); textTemplate.rectangle(0, 0, boxWidth, boxHeight); textTemplate.stroke(); textTemplate.restoreState(); Image img = Image.getInstance(textTemplate); img.setInterpolation(true); img.scaleAbsolute(boxWidth, boxHeight); img.setAbsolutePosition(xStart, yStart); img.setRotationDegrees(45); writer.getDirectContent().addImage(img); PdfContentByte canvas = writer.getDirectContent(); PdfTemplate textTemplate = canvas.createTemplate(boxWidth, boxHeight); textTemplate.saveState(); textTemplate.setColorStroke(BaseColor.BLACK); textTemplate.rectangle(0, 0, boxWidth, boxHeight); textTemplate.stroke(); textTemplate.restoreState(); Image img = Image.getInstance(textTemplate); img.setInterpolation(true); img.scaleAbsolute(boxWidth, boxHeight); img.setAbsolutePosition(xStart, yStart); img.setRotationDegrees(30); writer.getDirectContent().addImage(img); PdfContentByte canvas = writer.getDirectContent(); PdfTemplate textTemplate = canvas.createTemplate(boxWidth, boxHeight); textTemplate.saveState(); textTemplate.setColorStroke(BaseColor.MAGENTA); textTemplate.rectangle(0, 0, boxWidth, boxHeight); textTemplate.stroke(); textTemplate.restoreState(); Image img = Image.getInstance(textTemplate); img.setInterpolation(true); img.scaleAbsolute(boxWidth, boxHeight); img.setAbsolutePosition(xStart, yStart); img.setRotationDegrees(15); writer.getDirectContent().addImage(img); PdfContentByte canvas = writer.getDirectContent(); PdfTemplate textTemplate = canvas.createTemplate(boxWidth, boxHeight); textTemplate.saveState(); textTemplate.setColorStroke(BaseColor.ORANGE); textTemplate.rectangle(0, 0, boxWidth, boxHeight); textTemplate.stroke(); textTemplate.restoreState(); Image img = Image.getInstance(textTemplate); img.setInterpolation(true); img.scaleAbsolute(boxWidth, boxHeight); img.setAbsolutePosition(xStart, yStart); img.setRotationDegrees(00); writer.getDirectContent().addImage(img); document.close(); }
<DeepExtract> PdfContentByte canvas = writer.getDirectContent(); PdfTemplate textTemplate = canvas.createTemplate(boxWidth, boxHeight); textTemplate.saveState(); textTemplate.setColorStroke(BaseColor.RED); textTemplate.rectangle(0, 0, boxWidth, boxHeight); textTemplate.stroke(); textTemplate.restoreState(); Image img = Image.getInstance(textTemplate); img.setInterpolation(true); img.scaleAbsolute(boxWidth, boxHeight); img.setAbsolutePosition(xStart, yStart); img.setRotationDegrees(90); writer.getDirectContent().addImage(img); </DeepExtract> <DeepExtract> PdfContentByte canvas = writer.getDirectContent(); PdfTemplate textTemplate = canvas.createTemplate(boxWidth, boxHeight); textTemplate.saveState(); textTemplate.setColorStroke(BaseColor.BLUE); textTemplate.rectangle(0, 0, boxWidth, boxHeight); textTemplate.stroke(); textTemplate.restoreState(); Image img = Image.getInstance(textTemplate); img.setInterpolation(true); img.scaleAbsolute(boxWidth, boxHeight); img.setAbsolutePosition(xStart, yStart); img.setRotationDegrees(75); writer.getDirectContent().addImage(img); </DeepExtract> <DeepExtract> PdfContentByte canvas = writer.getDirectContent(); PdfTemplate textTemplate = canvas.createTemplate(boxWidth, boxHeight); textTemplate.saveState(); textTemplate.setColorStroke(BaseColor.CYAN); textTemplate.rectangle(0, 0, boxWidth, boxHeight); textTemplate.stroke(); textTemplate.restoreState(); Image img = Image.getInstance(textTemplate); img.setInterpolation(true); img.scaleAbsolute(boxWidth, boxHeight); img.setAbsolutePosition(xStart, yStart); img.setRotationDegrees(60); writer.getDirectContent().addImage(img); </DeepExtract> <DeepExtract> PdfContentByte canvas = writer.getDirectContent(); PdfTemplate textTemplate = canvas.createTemplate(boxWidth, boxHeight); textTemplate.saveState(); textTemplate.setColorStroke(BaseColor.GREEN); textTemplate.rectangle(0, 0, boxWidth, boxHeight); textTemplate.stroke(); textTemplate.restoreState(); Image img = Image.getInstance(textTemplate); img.setInterpolation(true); img.scaleAbsolute(boxWidth, boxHeight); img.setAbsolutePosition(xStart, yStart); img.setRotationDegrees(45); writer.getDirectContent().addImage(img); </DeepExtract> <DeepExtract> PdfContentByte canvas = writer.getDirectContent(); PdfTemplate textTemplate = canvas.createTemplate(boxWidth, boxHeight); textTemplate.saveState(); textTemplate.setColorStroke(BaseColor.BLACK); textTemplate.rectangle(0, 0, boxWidth, boxHeight); textTemplate.stroke(); textTemplate.restoreState(); Image img = Image.getInstance(textTemplate); img.setInterpolation(true); img.scaleAbsolute(boxWidth, boxHeight); img.setAbsolutePosition(xStart, yStart); img.setRotationDegrees(30); writer.getDirectContent().addImage(img); </DeepExtract> <DeepExtract> PdfContentByte canvas = writer.getDirectContent(); PdfTemplate textTemplate = canvas.createTemplate(boxWidth, boxHeight); textTemplate.saveState(); textTemplate.setColorStroke(BaseColor.MAGENTA); textTemplate.rectangle(0, 0, boxWidth, boxHeight); textTemplate.stroke(); textTemplate.restoreState(); Image img = Image.getInstance(textTemplate); img.setInterpolation(true); img.scaleAbsolute(boxWidth, boxHeight); img.setAbsolutePosition(xStart, yStart); img.setRotationDegrees(15); writer.getDirectContent().addImage(img); </DeepExtract> <DeepExtract> PdfContentByte canvas = writer.getDirectContent(); PdfTemplate textTemplate = canvas.createTemplate(boxWidth, boxHeight); textTemplate.saveState(); textTemplate.setColorStroke(BaseColor.ORANGE); textTemplate.rectangle(0, 0, boxWidth, boxHeight); textTemplate.stroke(); textTemplate.restoreState(); Image img = Image.getInstance(textTemplate); img.setInterpolation(true); img.scaleAbsolute(boxWidth, boxHeight); img.setAbsolutePosition(xStart, yStart); img.setRotationDegrees(00); writer.getDirectContent().addImage(img); </DeepExtract>
testarea-itext5
positive
public void setShadowWidthRes(int resId) { mViewBehind.setShadowWidth((int) getResources().getDimension(resId)); }
<DeepExtract> mViewBehind.setShadowWidth((int) getResources().getDimension(resId)); </DeepExtract>
Dribbble_rebuild
positive
private void onContextMenuAppendToPlayQ(final int position) { YTPlayer.Video vid = getAdapter().getYTPlayerVideo(position); mMp.appendToPlayQ(new YTPlayer.Video[] { vid }); }
<DeepExtract> mMp.appendToPlayQ(new YTPlayer.Video[] { vid }); </DeepExtract>
netmbuddy
positive
private String getText(By xpath, SearchContext seleniumScope) { String pageText = seleniumScope.findElement(xpath).getText(); if (webDriver instanceof ChromeDriver) pageText = stripWhitespaceAroundCRLFs(pageText); return Pattern.compile("(\r\n)+").matcher(pageText).replaceAll("\r\n"); }
<DeepExtract> if (webDriver instanceof ChromeDriver) pageText = stripWhitespaceAroundCRLFs(pageText); return Pattern.compile("(\r\n)+").matcher(pageText).replaceAll("\r\n"); </DeepExtract>
coypu-jvm
positive
public void actionPerformed(ActionEvent e) { authSessionRefreshButton.setEnabled(authAccountComboBox.getSelectedIndex() > 0); var authAccountDto = getSelectedAuthAccountDto(); if (authAccountDto == null) { authSessionValueLabel.setText(null); authSessionValueLabel.setComponentPopupMenu(null); return; } authSessionValueLabel.setText(authAccountDto.getSessionIdForDisplay()); if (!authAccountDto.isSessionIdsEmpty()) { authSessionValueLabel.setComponentPopupMenu(UiUtil.createCopyPopupMenu(authAccountDto.getSessionIds().subList(0, ConfigLogic.getInstance().getAuthConfig().getAuthApplyConfigDtos().size()))); } }
<DeepExtract> var authAccountDto = getSelectedAuthAccountDto(); if (authAccountDto == null) { authSessionValueLabel.setText(null); authSessionValueLabel.setComponentPopupMenu(null); return; } authSessionValueLabel.setText(authAccountDto.getSessionIdForDisplay()); if (!authAccountDto.isSessionIdsEmpty()) { authSessionValueLabel.setComponentPopupMenu(UiUtil.createCopyPopupMenu(authAccountDto.getSessionIds().subList(0, ConfigLogic.getInstance().getAuthConfig().getAuthApplyConfigDtos().size()))); } </DeepExtract>
integrated-security-testing-environment
positive
@Override public void trace(String arg0, Throwable arg1) { FormattingTuple tp = MessageFormatter.format(arg0, arg1); log(LogLevelEnum.TRACE, tp.getMessage(), tp.getThrowable()); }
<DeepExtract> FormattingTuple tp = MessageFormatter.format(arg0, arg1); log(LogLevelEnum.TRACE, tp.getMessage(), tp.getThrowable()); </DeepExtract>
Path-Computation-Element-Emulator
positive
@Override public void onError() { mUseCaseScheduler.onError(mCallback); }
<DeepExtract> mUseCaseScheduler.onError(mCallback); </DeepExtract>
Jetpack-MVVM-PPJoke
positive
@Test public void testGenerateCandidatesNotIncludingIntervalExtremesLastDayDoWEqualToRequestedDoW() { return new OnDayOfWeekValueGenerator(new CronField(CronFieldName.DAY_OF_WEEK, new On(new IntegerFieldValue(LAST_DAY_DOW_EQUALTO_REQUESTED_DOW_VALUE), new SpecialCharFieldValue(SpecialChar.L)), constraints), YEAR, LAST_DAY_DOW_EQUALTO_REQUESTED_DOW_MONTH, mondayDoWValue); final List<Integer> values = fieldValueGenerator.generateCandidatesNotIncludingIntervalExtremes(1, LAST_DAY_DOW_EQUALTO_REQUESTED_DOW_DAY + 1); assertFalse(values.isEmpty()); assertEquals(LAST_DAY_DOW_EQUALTO_REQUESTED_DOW_DAY, values.get(0), 0); }
<DeepExtract> return new OnDayOfWeekValueGenerator(new CronField(CronFieldName.DAY_OF_WEEK, new On(new IntegerFieldValue(LAST_DAY_DOW_EQUALTO_REQUESTED_DOW_VALUE), new SpecialCharFieldValue(SpecialChar.L)), constraints), YEAR, LAST_DAY_DOW_EQUALTO_REQUESTED_DOW_MONTH, mondayDoWValue); </DeepExtract>
cron-utils
positive
void setupForSession() { map.put("s", new WritableHash()); map.put("sessionStart", new SimpleDate(new Date(), TemplateDateModel.DATETIME)); }
<DeepExtract> map.put("s", new WritableHash()); </DeepExtract> <DeepExtract> map.put("sessionStart", new SimpleDate(new Date(), TemplateDateModel.DATETIME)); </DeepExtract>
fmpp
positive
@Test public void test100() { Exception mThrowsIllegal, tThrowsIllegal, mThrowsOutOfBounds, tThrowsOutOfBounds, mThrowsNoElement, tThrowsNoElement; int rm = 0, rt = 0; final Random r = new Random(0); ref = new int[100]; for (int i = 0; i < 100; i++) ref[i] = r.nextInt(); IntArrayIndirectPriorityQueue m = new IntArrayIndirectPriorityQueue(ref, null); final IntHeapIndirectPriorityQueue t = new IntHeapIndirectPriorityQueue(ref, null); for (int i = 0; i < 100 / 2; i++) { t.enqueue(i); m.enqueue(i); } assertTrue("Error: m and t differ after creation (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); for (int i = 0; i < 2 * 100; i++) { if (r.nextDouble() < 0.01) { t.clear(); m.clear(); for (int j = 0; j < 100 / 2; j++) { t.enqueue(j); m.enqueue(j); } } final int T = r.nextInt(2 * 100); mThrowsNoElement = tThrowsNoElement = mThrowsOutOfBounds = tThrowsOutOfBounds = mThrowsIllegal = tThrowsIllegal = null; try { t.enqueue(T); } catch (final IndexOutOfBoundsException e) { tThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { tThrowsIllegal = e; } if (tThrowsIllegal == null) { try { m.enqueue(T); } catch (final IndexOutOfBoundsException e) { mThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { mThrowsIllegal = e; } } mThrowsIllegal = tThrowsIllegal = null; assertTrue("Error: enqueue() divergence in IndexOutOfBoundsException for " + T + " (" + mThrowsOutOfBounds + ", " + tThrowsOutOfBounds + ")", (mThrowsOutOfBounds == null) == (tThrowsOutOfBounds == null)); assertTrue("Error: enqueue() divergence in IllegalArgumentException for " + T + " (" + mThrowsIllegal + ", " + tThrowsIllegal + ")", (mThrowsIllegal == null) == (tThrowsIllegal == null)); assertTrue("Error: m and t differ after enqueue (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); if (m.size() != 0) { assertTrue("Error: m and t differ in first element after enqueue (" + m.first() + "->" + ref[m.first()] + ", " + t.first() + "->" + ref[t.first()] + ")", ((ref[m.first()]) == (ref[t.first()]))); } mThrowsOutOfBounds = tThrowsOutOfBounds = null; try { rm = m.dequeue(); while (!m.isEmpty() && ((ref[m.first()]) == (ref[rm]))) m.dequeue(); } catch (final IndexOutOfBoundsException e) { mThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { mThrowsIllegal = e; } catch (final java.util.NoSuchElementException e) { mThrowsNoElement = e; } try { rt = t.dequeue(); while (!t.isEmpty() && ((ref[t.first()]) == (ref[rt]))) t.dequeue(); } catch (final IndexOutOfBoundsException e) { tThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { tThrowsIllegal = e; } catch (final java.util.NoSuchElementException e) { tThrowsNoElement = e; } assertTrue("Error: dequeue() divergence in IndexOutOfBoundsException (" + mThrowsOutOfBounds + ", " + tThrowsOutOfBounds + ")", (mThrowsOutOfBounds == null) == (tThrowsOutOfBounds == null)); assertTrue("Error: dequeue() divergence in IllegalArgumentException (" + mThrowsIllegal + ", " + tThrowsIllegal + ")", (mThrowsIllegal == null) == (tThrowsIllegal == null)); assertTrue("Error: dequeue() divergence in java.util.NoSuchElementException (" + mThrowsNoElement + ", " + tThrowsNoElement + ")", (mThrowsNoElement == null) == (tThrowsNoElement == null)); if (mThrowsOutOfBounds == null) assertTrue("Error: divergence in dequeue() between m and t (" + rm + "->" + ref[rm] + ", " + rt + "->" + ref[rt] + ")", ((ref[rt]) == (ref[rm]))); assertTrue("Error: m and t differ after dequeue (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); if (m.size() != 0) { assertTrue("Error: m and t differ in first element after dequeue (" + m.first() + "->" + ref[m.first()] + ", " + t.first() + "->" + ref[t.first()] + ")", ((ref[m.first()]) == (ref[t.first()]))); } mThrowsNoElement = tThrowsNoElement = mThrowsOutOfBounds = tThrowsOutOfBounds = mThrowsIllegal = tThrowsIllegal = null; int pos = r.nextInt(100 * 2); try { m.remove(pos); } catch (final IndexOutOfBoundsException e) { mThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { mThrowsIllegal = e; } catch (final java.util.NoSuchElementException e) { mThrowsNoElement = e; } try { t.remove(pos); } catch (final IndexOutOfBoundsException e) { tThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { tThrowsIllegal = e; } catch (final java.util.NoSuchElementException e) { tThrowsNoElement = e; } assertTrue("Error: remove(int) divergence in IndexOutOfBoundsException (" + mThrowsOutOfBounds + ", " + tThrowsOutOfBounds + ")", (mThrowsOutOfBounds == null) == (tThrowsOutOfBounds == null)); assertTrue("Error: remove(int) divergence in IllegalArgumentException (" + mThrowsIllegal + ", " + tThrowsIllegal + ")", (mThrowsIllegal == null) == (tThrowsIllegal == null)); assertTrue("Error: remove(int) divergence in java.util.NoSuchElementException (" + mThrowsNoElement + ", " + tThrowsNoElement + ")", (mThrowsNoElement == null) == (tThrowsNoElement == null)); assertTrue("Error: m and t differ after remove(int) (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); if (m.size() != 0) { assertTrue("Error: m and t differ in first element after remove(int) (" + m.first() + "->" + ref[m.first()] + ", " + t.first() + "->" + ref[t.first()] + ")", ((ref[m.first()]) == (ref[t.first()]))); } mThrowsNoElement = tThrowsNoElement = mThrowsOutOfBounds = tThrowsOutOfBounds = mThrowsIllegal = tThrowsIllegal = null; pos = r.nextInt(100); try { t.changed(pos); } catch (final IndexOutOfBoundsException e) { tThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { tThrowsIllegal = e; } catch (final java.util.NoSuchElementException e) { tThrowsNoElement = e; } if (tThrowsIllegal == null) { try { m.changed(pos); } catch (final IndexOutOfBoundsException e) { mThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { mThrowsIllegal = e; } catch (final java.util.NoSuchElementException e) { mThrowsNoElement = e; } } assertTrue("Error: change(int) divergence in IndexOutOfBoundsException (" + mThrowsOutOfBounds + ", " + tThrowsOutOfBounds + ")", (mThrowsOutOfBounds == null) == (tThrowsOutOfBounds == null)); assertTrue("Error: change(int) divergence in java.util.NoSuchElementException (" + mThrowsNoElement + ", " + tThrowsNoElement + ")", (mThrowsNoElement == null) == (tThrowsNoElement == null)); assertTrue("Error: m and t differ after change(int) (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); if (m.size() != 0) { assertTrue("Error: m and t differ in first element after change(int) (" + m.first() + "->" + ref[m.first()] + ", " + t.first() + "->" + ref[t.first()] + ")", ((ref[m.first()]) == (ref[t.first()]))); } final int[] temp = t.heap.clone(); IntArrays.quickSort(temp, 0, t.size()); m = new IntArrayIndirectPriorityQueue(m.refArray, temp, t.size(), null); assertTrue("Error: m and t differ after wrap (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); if (m.size() != 0) { assertTrue("Error: m and t differ in first element after wrap (" + m.first() + "->" + ref[m.first()] + ", " + t.first() + "->" + ref[t.first()] + ")", ((ref[m.first()]) == (ref[t.first()]))); } if (m.size() != 0 && ((new it.unimi.dsi.fastutil.ints.IntOpenHashSet(m.array, 0, m.size)).size() == m.size())) { final int first = m.first(); ref[first] = r.nextInt(); m.changed(); t.changed(first); assertTrue("Error: m and t differ after change (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); if (m.size() != 0) { assertTrue("Error: m and t differ in first element after change (" + m.first() + "->" + ref[m.first()] + ", " + t.first() + "->" + ref[t.first()] + ")", ((ref[m.first()]) == (ref[t.first()]))); } } } m.clear(); assertTrue("Error: m is not empty after clear()", m.isEmpty()); Exception mThrowsIllegal, tThrowsIllegal, mThrowsOutOfBounds, tThrowsOutOfBounds, mThrowsNoElement, tThrowsNoElement; int rm = 0, rt = 0; final Random r = new Random(0); ref = new int[100]; for (int i = 0; i < 100; i++) ref[i] = r.nextInt(); IntArrayIndirectPriorityQueue m = new IntArrayIndirectPriorityQueue(ref, IntComparators.OPPOSITE_COMPARATOR); final IntHeapIndirectPriorityQueue t = new IntHeapIndirectPriorityQueue(ref, IntComparators.OPPOSITE_COMPARATOR); for (int i = 0; i < 100 / 2; i++) { t.enqueue(i); m.enqueue(i); } assertTrue("Error: m and t differ after creation (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); for (int i = 0; i < 2 * 100; i++) { if (r.nextDouble() < 0.01) { t.clear(); m.clear(); for (int j = 0; j < 100 / 2; j++) { t.enqueue(j); m.enqueue(j); } } final int T = r.nextInt(2 * 100); mThrowsNoElement = tThrowsNoElement = mThrowsOutOfBounds = tThrowsOutOfBounds = mThrowsIllegal = tThrowsIllegal = null; try { t.enqueue(T); } catch (final IndexOutOfBoundsException e) { tThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { tThrowsIllegal = e; } if (tThrowsIllegal == null) { try { m.enqueue(T); } catch (final IndexOutOfBoundsException e) { mThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { mThrowsIllegal = e; } } mThrowsIllegal = tThrowsIllegal = null; assertTrue("Error: enqueue() divergence in IndexOutOfBoundsException for " + T + " (" + mThrowsOutOfBounds + ", " + tThrowsOutOfBounds + ")", (mThrowsOutOfBounds == null) == (tThrowsOutOfBounds == null)); assertTrue("Error: enqueue() divergence in IllegalArgumentException for " + T + " (" + mThrowsIllegal + ", " + tThrowsIllegal + ")", (mThrowsIllegal == null) == (tThrowsIllegal == null)); assertTrue("Error: m and t differ after enqueue (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); if (m.size() != 0) { assertTrue("Error: m and t differ in first element after enqueue (" + m.first() + "->" + ref[m.first()] + ", " + t.first() + "->" + ref[t.first()] + ")", ((ref[m.first()]) == (ref[t.first()]))); } mThrowsOutOfBounds = tThrowsOutOfBounds = null; try { rm = m.dequeue(); while (!m.isEmpty() && ((ref[m.first()]) == (ref[rm]))) m.dequeue(); } catch (final IndexOutOfBoundsException e) { mThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { mThrowsIllegal = e; } catch (final java.util.NoSuchElementException e) { mThrowsNoElement = e; } try { rt = t.dequeue(); while (!t.isEmpty() && ((ref[t.first()]) == (ref[rt]))) t.dequeue(); } catch (final IndexOutOfBoundsException e) { tThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { tThrowsIllegal = e; } catch (final java.util.NoSuchElementException e) { tThrowsNoElement = e; } assertTrue("Error: dequeue() divergence in IndexOutOfBoundsException (" + mThrowsOutOfBounds + ", " + tThrowsOutOfBounds + ")", (mThrowsOutOfBounds == null) == (tThrowsOutOfBounds == null)); assertTrue("Error: dequeue() divergence in IllegalArgumentException (" + mThrowsIllegal + ", " + tThrowsIllegal + ")", (mThrowsIllegal == null) == (tThrowsIllegal == null)); assertTrue("Error: dequeue() divergence in java.util.NoSuchElementException (" + mThrowsNoElement + ", " + tThrowsNoElement + ")", (mThrowsNoElement == null) == (tThrowsNoElement == null)); if (mThrowsOutOfBounds == null) assertTrue("Error: divergence in dequeue() between m and t (" + rm + "->" + ref[rm] + ", " + rt + "->" + ref[rt] + ")", ((ref[rt]) == (ref[rm]))); assertTrue("Error: m and t differ after dequeue (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); if (m.size() != 0) { assertTrue("Error: m and t differ in first element after dequeue (" + m.first() + "->" + ref[m.first()] + ", " + t.first() + "->" + ref[t.first()] + ")", ((ref[m.first()]) == (ref[t.first()]))); } mThrowsNoElement = tThrowsNoElement = mThrowsOutOfBounds = tThrowsOutOfBounds = mThrowsIllegal = tThrowsIllegal = null; int pos = r.nextInt(100 * 2); try { m.remove(pos); } catch (final IndexOutOfBoundsException e) { mThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { mThrowsIllegal = e; } catch (final java.util.NoSuchElementException e) { mThrowsNoElement = e; } try { t.remove(pos); } catch (final IndexOutOfBoundsException e) { tThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { tThrowsIllegal = e; } catch (final java.util.NoSuchElementException e) { tThrowsNoElement = e; } assertTrue("Error: remove(int) divergence in IndexOutOfBoundsException (" + mThrowsOutOfBounds + ", " + tThrowsOutOfBounds + ")", (mThrowsOutOfBounds == null) == (tThrowsOutOfBounds == null)); assertTrue("Error: remove(int) divergence in IllegalArgumentException (" + mThrowsIllegal + ", " + tThrowsIllegal + ")", (mThrowsIllegal == null) == (tThrowsIllegal == null)); assertTrue("Error: remove(int) divergence in java.util.NoSuchElementException (" + mThrowsNoElement + ", " + tThrowsNoElement + ")", (mThrowsNoElement == null) == (tThrowsNoElement == null)); assertTrue("Error: m and t differ after remove(int) (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); if (m.size() != 0) { assertTrue("Error: m and t differ in first element after remove(int) (" + m.first() + "->" + ref[m.first()] + ", " + t.first() + "->" + ref[t.first()] + ")", ((ref[m.first()]) == (ref[t.first()]))); } mThrowsNoElement = tThrowsNoElement = mThrowsOutOfBounds = tThrowsOutOfBounds = mThrowsIllegal = tThrowsIllegal = null; pos = r.nextInt(100); try { t.changed(pos); } catch (final IndexOutOfBoundsException e) { tThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { tThrowsIllegal = e; } catch (final java.util.NoSuchElementException e) { tThrowsNoElement = e; } if (tThrowsIllegal == null) { try { m.changed(pos); } catch (final IndexOutOfBoundsException e) { mThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { mThrowsIllegal = e; } catch (final java.util.NoSuchElementException e) { mThrowsNoElement = e; } } assertTrue("Error: change(int) divergence in IndexOutOfBoundsException (" + mThrowsOutOfBounds + ", " + tThrowsOutOfBounds + ")", (mThrowsOutOfBounds == null) == (tThrowsOutOfBounds == null)); assertTrue("Error: change(int) divergence in java.util.NoSuchElementException (" + mThrowsNoElement + ", " + tThrowsNoElement + ")", (mThrowsNoElement == null) == (tThrowsNoElement == null)); assertTrue("Error: m and t differ after change(int) (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); if (m.size() != 0) { assertTrue("Error: m and t differ in first element after change(int) (" + m.first() + "->" + ref[m.first()] + ", " + t.first() + "->" + ref[t.first()] + ")", ((ref[m.first()]) == (ref[t.first()]))); } final int[] temp = t.heap.clone(); IntArrays.quickSort(temp, 0, t.size()); m = new IntArrayIndirectPriorityQueue(m.refArray, temp, t.size(), IntComparators.OPPOSITE_COMPARATOR); assertTrue("Error: m and t differ after wrap (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); if (m.size() != 0) { assertTrue("Error: m and t differ in first element after wrap (" + m.first() + "->" + ref[m.first()] + ", " + t.first() + "->" + ref[t.first()] + ")", ((ref[m.first()]) == (ref[t.first()]))); } if (m.size() != 0 && ((new it.unimi.dsi.fastutil.ints.IntOpenHashSet(m.array, 0, m.size)).size() == m.size())) { final int first = m.first(); ref[first] = r.nextInt(); m.changed(); t.changed(first); assertTrue("Error: m and t differ after change (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); if (m.size() != 0) { assertTrue("Error: m and t differ in first element after change (" + m.first() + "->" + ref[m.first()] + ", " + t.first() + "->" + ref[t.first()] + ")", ((ref[m.first()]) == (ref[t.first()]))); } } } m.clear(); assertTrue("Error: m is not empty after clear()", m.isEmpty()); }
<DeepExtract> Exception mThrowsIllegal, tThrowsIllegal, mThrowsOutOfBounds, tThrowsOutOfBounds, mThrowsNoElement, tThrowsNoElement; int rm = 0, rt = 0; final Random r = new Random(0); ref = new int[100]; for (int i = 0; i < 100; i++) ref[i] = r.nextInt(); IntArrayIndirectPriorityQueue m = new IntArrayIndirectPriorityQueue(ref, null); final IntHeapIndirectPriorityQueue t = new IntHeapIndirectPriorityQueue(ref, null); for (int i = 0; i < 100 / 2; i++) { t.enqueue(i); m.enqueue(i); } assertTrue("Error: m and t differ after creation (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); for (int i = 0; i < 2 * 100; i++) { if (r.nextDouble() < 0.01) { t.clear(); m.clear(); for (int j = 0; j < 100 / 2; j++) { t.enqueue(j); m.enqueue(j); } } final int T = r.nextInt(2 * 100); mThrowsNoElement = tThrowsNoElement = mThrowsOutOfBounds = tThrowsOutOfBounds = mThrowsIllegal = tThrowsIllegal = null; try { t.enqueue(T); } catch (final IndexOutOfBoundsException e) { tThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { tThrowsIllegal = e; } if (tThrowsIllegal == null) { try { m.enqueue(T); } catch (final IndexOutOfBoundsException e) { mThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { mThrowsIllegal = e; } } mThrowsIllegal = tThrowsIllegal = null; assertTrue("Error: enqueue() divergence in IndexOutOfBoundsException for " + T + " (" + mThrowsOutOfBounds + ", " + tThrowsOutOfBounds + ")", (mThrowsOutOfBounds == null) == (tThrowsOutOfBounds == null)); assertTrue("Error: enqueue() divergence in IllegalArgumentException for " + T + " (" + mThrowsIllegal + ", " + tThrowsIllegal + ")", (mThrowsIllegal == null) == (tThrowsIllegal == null)); assertTrue("Error: m and t differ after enqueue (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); if (m.size() != 0) { assertTrue("Error: m and t differ in first element after enqueue (" + m.first() + "->" + ref[m.first()] + ", " + t.first() + "->" + ref[t.first()] + ")", ((ref[m.first()]) == (ref[t.first()]))); } mThrowsOutOfBounds = tThrowsOutOfBounds = null; try { rm = m.dequeue(); while (!m.isEmpty() && ((ref[m.first()]) == (ref[rm]))) m.dequeue(); } catch (final IndexOutOfBoundsException e) { mThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { mThrowsIllegal = e; } catch (final java.util.NoSuchElementException e) { mThrowsNoElement = e; } try { rt = t.dequeue(); while (!t.isEmpty() && ((ref[t.first()]) == (ref[rt]))) t.dequeue(); } catch (final IndexOutOfBoundsException e) { tThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { tThrowsIllegal = e; } catch (final java.util.NoSuchElementException e) { tThrowsNoElement = e; } assertTrue("Error: dequeue() divergence in IndexOutOfBoundsException (" + mThrowsOutOfBounds + ", " + tThrowsOutOfBounds + ")", (mThrowsOutOfBounds == null) == (tThrowsOutOfBounds == null)); assertTrue("Error: dequeue() divergence in IllegalArgumentException (" + mThrowsIllegal + ", " + tThrowsIllegal + ")", (mThrowsIllegal == null) == (tThrowsIllegal == null)); assertTrue("Error: dequeue() divergence in java.util.NoSuchElementException (" + mThrowsNoElement + ", " + tThrowsNoElement + ")", (mThrowsNoElement == null) == (tThrowsNoElement == null)); if (mThrowsOutOfBounds == null) assertTrue("Error: divergence in dequeue() between m and t (" + rm + "->" + ref[rm] + ", " + rt + "->" + ref[rt] + ")", ((ref[rt]) == (ref[rm]))); assertTrue("Error: m and t differ after dequeue (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); if (m.size() != 0) { assertTrue("Error: m and t differ in first element after dequeue (" + m.first() + "->" + ref[m.first()] + ", " + t.first() + "->" + ref[t.first()] + ")", ((ref[m.first()]) == (ref[t.first()]))); } mThrowsNoElement = tThrowsNoElement = mThrowsOutOfBounds = tThrowsOutOfBounds = mThrowsIllegal = tThrowsIllegal = null; int pos = r.nextInt(100 * 2); try { m.remove(pos); } catch (final IndexOutOfBoundsException e) { mThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { mThrowsIllegal = e; } catch (final java.util.NoSuchElementException e) { mThrowsNoElement = e; } try { t.remove(pos); } catch (final IndexOutOfBoundsException e) { tThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { tThrowsIllegal = e; } catch (final java.util.NoSuchElementException e) { tThrowsNoElement = e; } assertTrue("Error: remove(int) divergence in IndexOutOfBoundsException (" + mThrowsOutOfBounds + ", " + tThrowsOutOfBounds + ")", (mThrowsOutOfBounds == null) == (tThrowsOutOfBounds == null)); assertTrue("Error: remove(int) divergence in IllegalArgumentException (" + mThrowsIllegal + ", " + tThrowsIllegal + ")", (mThrowsIllegal == null) == (tThrowsIllegal == null)); assertTrue("Error: remove(int) divergence in java.util.NoSuchElementException (" + mThrowsNoElement + ", " + tThrowsNoElement + ")", (mThrowsNoElement == null) == (tThrowsNoElement == null)); assertTrue("Error: m and t differ after remove(int) (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); if (m.size() != 0) { assertTrue("Error: m and t differ in first element after remove(int) (" + m.first() + "->" + ref[m.first()] + ", " + t.first() + "->" + ref[t.first()] + ")", ((ref[m.first()]) == (ref[t.first()]))); } mThrowsNoElement = tThrowsNoElement = mThrowsOutOfBounds = tThrowsOutOfBounds = mThrowsIllegal = tThrowsIllegal = null; pos = r.nextInt(100); try { t.changed(pos); } catch (final IndexOutOfBoundsException e) { tThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { tThrowsIllegal = e; } catch (final java.util.NoSuchElementException e) { tThrowsNoElement = e; } if (tThrowsIllegal == null) { try { m.changed(pos); } catch (final IndexOutOfBoundsException e) { mThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { mThrowsIllegal = e; } catch (final java.util.NoSuchElementException e) { mThrowsNoElement = e; } } assertTrue("Error: change(int) divergence in IndexOutOfBoundsException (" + mThrowsOutOfBounds + ", " + tThrowsOutOfBounds + ")", (mThrowsOutOfBounds == null) == (tThrowsOutOfBounds == null)); assertTrue("Error: change(int) divergence in java.util.NoSuchElementException (" + mThrowsNoElement + ", " + tThrowsNoElement + ")", (mThrowsNoElement == null) == (tThrowsNoElement == null)); assertTrue("Error: m and t differ after change(int) (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); if (m.size() != 0) { assertTrue("Error: m and t differ in first element after change(int) (" + m.first() + "->" + ref[m.first()] + ", " + t.first() + "->" + ref[t.first()] + ")", ((ref[m.first()]) == (ref[t.first()]))); } final int[] temp = t.heap.clone(); IntArrays.quickSort(temp, 0, t.size()); m = new IntArrayIndirectPriorityQueue(m.refArray, temp, t.size(), null); assertTrue("Error: m and t differ after wrap (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); if (m.size() != 0) { assertTrue("Error: m and t differ in first element after wrap (" + m.first() + "->" + ref[m.first()] + ", " + t.first() + "->" + ref[t.first()] + ")", ((ref[m.first()]) == (ref[t.first()]))); } if (m.size() != 0 && ((new it.unimi.dsi.fastutil.ints.IntOpenHashSet(m.array, 0, m.size)).size() == m.size())) { final int first = m.first(); ref[first] = r.nextInt(); m.changed(); t.changed(first); assertTrue("Error: m and t differ after change (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); if (m.size() != 0) { assertTrue("Error: m and t differ in first element after change (" + m.first() + "->" + ref[m.first()] + ", " + t.first() + "->" + ref[t.first()] + ")", ((ref[m.first()]) == (ref[t.first()]))); } } } m.clear(); assertTrue("Error: m is not empty after clear()", m.isEmpty()); </DeepExtract> <DeepExtract> Exception mThrowsIllegal, tThrowsIllegal, mThrowsOutOfBounds, tThrowsOutOfBounds, mThrowsNoElement, tThrowsNoElement; int rm = 0, rt = 0; final Random r = new Random(0); ref = new int[100]; for (int i = 0; i < 100; i++) ref[i] = r.nextInt(); IntArrayIndirectPriorityQueue m = new IntArrayIndirectPriorityQueue(ref, IntComparators.OPPOSITE_COMPARATOR); final IntHeapIndirectPriorityQueue t = new IntHeapIndirectPriorityQueue(ref, IntComparators.OPPOSITE_COMPARATOR); for (int i = 0; i < 100 / 2; i++) { t.enqueue(i); m.enqueue(i); } assertTrue("Error: m and t differ after creation (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); for (int i = 0; i < 2 * 100; i++) { if (r.nextDouble() < 0.01) { t.clear(); m.clear(); for (int j = 0; j < 100 / 2; j++) { t.enqueue(j); m.enqueue(j); } } final int T = r.nextInt(2 * 100); mThrowsNoElement = tThrowsNoElement = mThrowsOutOfBounds = tThrowsOutOfBounds = mThrowsIllegal = tThrowsIllegal = null; try { t.enqueue(T); } catch (final IndexOutOfBoundsException e) { tThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { tThrowsIllegal = e; } if (tThrowsIllegal == null) { try { m.enqueue(T); } catch (final IndexOutOfBoundsException e) { mThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { mThrowsIllegal = e; } } mThrowsIllegal = tThrowsIllegal = null; assertTrue("Error: enqueue() divergence in IndexOutOfBoundsException for " + T + " (" + mThrowsOutOfBounds + ", " + tThrowsOutOfBounds + ")", (mThrowsOutOfBounds == null) == (tThrowsOutOfBounds == null)); assertTrue("Error: enqueue() divergence in IllegalArgumentException for " + T + " (" + mThrowsIllegal + ", " + tThrowsIllegal + ")", (mThrowsIllegal == null) == (tThrowsIllegal == null)); assertTrue("Error: m and t differ after enqueue (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); if (m.size() != 0) { assertTrue("Error: m and t differ in first element after enqueue (" + m.first() + "->" + ref[m.first()] + ", " + t.first() + "->" + ref[t.first()] + ")", ((ref[m.first()]) == (ref[t.first()]))); } mThrowsOutOfBounds = tThrowsOutOfBounds = null; try { rm = m.dequeue(); while (!m.isEmpty() && ((ref[m.first()]) == (ref[rm]))) m.dequeue(); } catch (final IndexOutOfBoundsException e) { mThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { mThrowsIllegal = e; } catch (final java.util.NoSuchElementException e) { mThrowsNoElement = e; } try { rt = t.dequeue(); while (!t.isEmpty() && ((ref[t.first()]) == (ref[rt]))) t.dequeue(); } catch (final IndexOutOfBoundsException e) { tThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { tThrowsIllegal = e; } catch (final java.util.NoSuchElementException e) { tThrowsNoElement = e; } assertTrue("Error: dequeue() divergence in IndexOutOfBoundsException (" + mThrowsOutOfBounds + ", " + tThrowsOutOfBounds + ")", (mThrowsOutOfBounds == null) == (tThrowsOutOfBounds == null)); assertTrue("Error: dequeue() divergence in IllegalArgumentException (" + mThrowsIllegal + ", " + tThrowsIllegal + ")", (mThrowsIllegal == null) == (tThrowsIllegal == null)); assertTrue("Error: dequeue() divergence in java.util.NoSuchElementException (" + mThrowsNoElement + ", " + tThrowsNoElement + ")", (mThrowsNoElement == null) == (tThrowsNoElement == null)); if (mThrowsOutOfBounds == null) assertTrue("Error: divergence in dequeue() between m and t (" + rm + "->" + ref[rm] + ", " + rt + "->" + ref[rt] + ")", ((ref[rt]) == (ref[rm]))); assertTrue("Error: m and t differ after dequeue (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); if (m.size() != 0) { assertTrue("Error: m and t differ in first element after dequeue (" + m.first() + "->" + ref[m.first()] + ", " + t.first() + "->" + ref[t.first()] + ")", ((ref[m.first()]) == (ref[t.first()]))); } mThrowsNoElement = tThrowsNoElement = mThrowsOutOfBounds = tThrowsOutOfBounds = mThrowsIllegal = tThrowsIllegal = null; int pos = r.nextInt(100 * 2); try { m.remove(pos); } catch (final IndexOutOfBoundsException e) { mThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { mThrowsIllegal = e; } catch (final java.util.NoSuchElementException e) { mThrowsNoElement = e; } try { t.remove(pos); } catch (final IndexOutOfBoundsException e) { tThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { tThrowsIllegal = e; } catch (final java.util.NoSuchElementException e) { tThrowsNoElement = e; } assertTrue("Error: remove(int) divergence in IndexOutOfBoundsException (" + mThrowsOutOfBounds + ", " + tThrowsOutOfBounds + ")", (mThrowsOutOfBounds == null) == (tThrowsOutOfBounds == null)); assertTrue("Error: remove(int) divergence in IllegalArgumentException (" + mThrowsIllegal + ", " + tThrowsIllegal + ")", (mThrowsIllegal == null) == (tThrowsIllegal == null)); assertTrue("Error: remove(int) divergence in java.util.NoSuchElementException (" + mThrowsNoElement + ", " + tThrowsNoElement + ")", (mThrowsNoElement == null) == (tThrowsNoElement == null)); assertTrue("Error: m and t differ after remove(int) (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); if (m.size() != 0) { assertTrue("Error: m and t differ in first element after remove(int) (" + m.first() + "->" + ref[m.first()] + ", " + t.first() + "->" + ref[t.first()] + ")", ((ref[m.first()]) == (ref[t.first()]))); } mThrowsNoElement = tThrowsNoElement = mThrowsOutOfBounds = tThrowsOutOfBounds = mThrowsIllegal = tThrowsIllegal = null; pos = r.nextInt(100); try { t.changed(pos); } catch (final IndexOutOfBoundsException e) { tThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { tThrowsIllegal = e; } catch (final java.util.NoSuchElementException e) { tThrowsNoElement = e; } if (tThrowsIllegal == null) { try { m.changed(pos); } catch (final IndexOutOfBoundsException e) { mThrowsOutOfBounds = e; } catch (final IllegalArgumentException e) { mThrowsIllegal = e; } catch (final java.util.NoSuchElementException e) { mThrowsNoElement = e; } } assertTrue("Error: change(int) divergence in IndexOutOfBoundsException (" + mThrowsOutOfBounds + ", " + tThrowsOutOfBounds + ")", (mThrowsOutOfBounds == null) == (tThrowsOutOfBounds == null)); assertTrue("Error: change(int) divergence in java.util.NoSuchElementException (" + mThrowsNoElement + ", " + tThrowsNoElement + ")", (mThrowsNoElement == null) == (tThrowsNoElement == null)); assertTrue("Error: m and t differ after change(int) (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); if (m.size() != 0) { assertTrue("Error: m and t differ in first element after change(int) (" + m.first() + "->" + ref[m.first()] + ", " + t.first() + "->" + ref[t.first()] + ")", ((ref[m.first()]) == (ref[t.first()]))); } final int[] temp = t.heap.clone(); IntArrays.quickSort(temp, 0, t.size()); m = new IntArrayIndirectPriorityQueue(m.refArray, temp, t.size(), IntComparators.OPPOSITE_COMPARATOR); assertTrue("Error: m and t differ after wrap (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); if (m.size() != 0) { assertTrue("Error: m and t differ in first element after wrap (" + m.first() + "->" + ref[m.first()] + ", " + t.first() + "->" + ref[t.first()] + ")", ((ref[m.first()]) == (ref[t.first()]))); } if (m.size() != 0 && ((new it.unimi.dsi.fastutil.ints.IntOpenHashSet(m.array, 0, m.size)).size() == m.size())) { final int first = m.first(); ref[first] = r.nextInt(); m.changed(); t.changed(first); assertTrue("Error: m and t differ after change (" + m + ", " + t + ")", heapEqual(m.array, t.heap, m.size(), t.size())); if (m.size() != 0) { assertTrue("Error: m and t differ in first element after change (" + m.first() + "->" + ref[m.first()] + ", " + t.first() + "->" + ref[t.first()] + ")", ((ref[m.first()]) == (ref[t.first()]))); } } } m.clear(); assertTrue("Error: m is not empty after clear()", m.isEmpty()); </DeepExtract>
fastutil
positive
public void testPreCompression2() throws SAXException, IOException, EXIException { try { EXIFactory factory = DefaultEXIFactory.newInstance(); factory.setCodingMode(CodingMode.PRE_COMPRESSION); factory.setBlockSize(2); ByteArrayOutputStream os = new ByteArrayOutputStream(); { XMLReader xmlReader = XMLReaderFactory.createXMLReader(); EXIResult exiResult = new EXIResult(factory); exiResult.setOutputStream(os); xmlReader.setContentHandler(exiResult.getHandler()); xmlReader.parse(new InputSource(new StringReader(xml))); } os.flush(); byte[] bytes = os.toByteArray(); InputStream is = new ByteArrayInputStream(bytes, 1, bytes.length - 1); EXIBodyDecoder exiDecoder = factory.createEXIBodyDecoder(); exiDecoder.setInputStream(is); assertTrue(exiDecoder.next() == EventType.START_DOCUMENT); exiDecoder.decodeStartDocument(); assertTrue(exiDecoder.next() == EventType.START_ELEMENT_GENERIC); assertTrue(exiDecoder.decodeStartElement().getLocalName().equals("root")); assertTrue(exiDecoder.next() == EventType.ATTRIBUTE_GENERIC_UNDECLARED); assertTrue(exiDecoder.decodeAttribute().getLocalName().equals("atA")); assertTrue(exiDecoder.getAttributeValue().toString().equals("a")); assertTrue(exiDecoder.next() == EventType.ATTRIBUTE_GENERIC_UNDECLARED); assertTrue(exiDecoder.decodeAttribute().getLocalName().equals("atB")); assertTrue(exiDecoder.getAttributeValue().toString().equals("b")); assertTrue(exiDecoder.next() == EventType.ATTRIBUTE_GENERIC_UNDECLARED); assertTrue(exiDecoder.decodeAttribute().getLocalName().equals("atC")); assertTrue(exiDecoder.getAttributeValue().toString().equals("c")); assertTrue(exiDecoder.next() == EventType.ATTRIBUTE_GENERIC_UNDECLARED); assertTrue(exiDecoder.decodeAttribute().getLocalName().equals("atD")); assertTrue(exiDecoder.getAttributeValue().toString().equals("d")); assertTrue(exiDecoder.next() == EventType.ATTRIBUTE_GENERIC_UNDECLARED); assertTrue(exiDecoder.decodeAttribute().getLocalName().equals("atE")); assertTrue(exiDecoder.getAttributeValue().toString().equals("e")); assertTrue(exiDecoder.next() == EventType.CHARACTERS_GENERIC_UNDECLARED); assertTrue(exiDecoder.decodeCharacters().toString().equals("... TEXT ...")); assertTrue(exiDecoder.next() == EventType.END_ELEMENT); assertTrue(exiDecoder.decodeEndElement().getLocalName().equals("root")); assertTrue(exiDecoder.next() == EventType.END_DOCUMENT); exiDecoder.decodeEndDocument(); } catch (RuntimeException e) { throw new RuntimeException("codingMode=" + CodingMode.PRE_COMPRESSION + ", blockSize=" + 2 + ", codingMode=" + CodingMode.PRE_COMPRESSION, e); } }
<DeepExtract> try { EXIFactory factory = DefaultEXIFactory.newInstance(); factory.setCodingMode(CodingMode.PRE_COMPRESSION); factory.setBlockSize(2); ByteArrayOutputStream os = new ByteArrayOutputStream(); { XMLReader xmlReader = XMLReaderFactory.createXMLReader(); EXIResult exiResult = new EXIResult(factory); exiResult.setOutputStream(os); xmlReader.setContentHandler(exiResult.getHandler()); xmlReader.parse(new InputSource(new StringReader(xml))); } os.flush(); byte[] bytes = os.toByteArray(); InputStream is = new ByteArrayInputStream(bytes, 1, bytes.length - 1); EXIBodyDecoder exiDecoder = factory.createEXIBodyDecoder(); exiDecoder.setInputStream(is); assertTrue(exiDecoder.next() == EventType.START_DOCUMENT); exiDecoder.decodeStartDocument(); assertTrue(exiDecoder.next() == EventType.START_ELEMENT_GENERIC); assertTrue(exiDecoder.decodeStartElement().getLocalName().equals("root")); assertTrue(exiDecoder.next() == EventType.ATTRIBUTE_GENERIC_UNDECLARED); assertTrue(exiDecoder.decodeAttribute().getLocalName().equals("atA")); assertTrue(exiDecoder.getAttributeValue().toString().equals("a")); assertTrue(exiDecoder.next() == EventType.ATTRIBUTE_GENERIC_UNDECLARED); assertTrue(exiDecoder.decodeAttribute().getLocalName().equals("atB")); assertTrue(exiDecoder.getAttributeValue().toString().equals("b")); assertTrue(exiDecoder.next() == EventType.ATTRIBUTE_GENERIC_UNDECLARED); assertTrue(exiDecoder.decodeAttribute().getLocalName().equals("atC")); assertTrue(exiDecoder.getAttributeValue().toString().equals("c")); assertTrue(exiDecoder.next() == EventType.ATTRIBUTE_GENERIC_UNDECLARED); assertTrue(exiDecoder.decodeAttribute().getLocalName().equals("atD")); assertTrue(exiDecoder.getAttributeValue().toString().equals("d")); assertTrue(exiDecoder.next() == EventType.ATTRIBUTE_GENERIC_UNDECLARED); assertTrue(exiDecoder.decodeAttribute().getLocalName().equals("atE")); assertTrue(exiDecoder.getAttributeValue().toString().equals("e")); assertTrue(exiDecoder.next() == EventType.CHARACTERS_GENERIC_UNDECLARED); assertTrue(exiDecoder.decodeCharacters().toString().equals("... TEXT ...")); assertTrue(exiDecoder.next() == EventType.END_ELEMENT); assertTrue(exiDecoder.decodeEndElement().getLocalName().equals("root")); assertTrue(exiDecoder.next() == EventType.END_DOCUMENT); exiDecoder.decodeEndDocument(); } catch (RuntimeException e) { throw new RuntimeException("codingMode=" + CodingMode.PRE_COMPRESSION + ", blockSize=" + 2 + ", codingMode=" + CodingMode.PRE_COMPRESSION, e); } </DeepExtract>
exificient
positive
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); getActivityComponent().inject(this); setContentView(R.layout.activity_customwebsite); ButterKnife.bind(this); editTexts = new ArrayList<>(); deletes = new ArrayList<>(); bottomBar.inflateMenu(R.menu.run); bottomBar.setOnMenuItemClickListener(item -> { if (!checkPrefix()) return false; ArrayList<String> urls = new ArrayList<>(editTexts.size()); for (EditText editText : editTexts) { String value = editText.getText().toString(); String sanitizedUrl = value.replaceAll("\\r\\n|\\r|\\n", " "); if (Patterns.WEB_URL.matcher(sanitizedUrl).matches() && sanitizedUrl.length() < 2084) urls.add(Url.checkExistingUrl(sanitizedUrl).toString()); } WebsitesSuite suite = new WebsitesSuite(); suite.getTestList(preferenceManager)[0].setInputs(urls); RunningActivity.runAsForegroundService(CustomWebsiteActivity.this, suite.asArray(), this::finish, preferenceManager); return true; }); ViewGroup urlBox = (ViewGroup) getLayoutInflater().inflate(R.layout.edittext_url, urlContainer, false); EditText editText = urlBox.findViewById(R.id.editText); editTexts.add(editText); urlContainer.addView(urlBox); ImageButton delete = urlBox.findViewById(R.id.delete); deletes.add(delete); delete.setTag(editText); delete.setOnClickListener(v -> { EditText tag = (EditText) v.getTag(); ((View) v.getParent()).setVisibility(View.GONE); editTexts.remove(tag); deletes.remove(v); bottomBar.setTitle(getString(R.string.OONIRun_URLs, Integer.toString(editTexts.size()))); setVisibilityDelete(); }); setVisibilityDelete(); bottomBar.setTitle(getString(R.string.OONIRun_URLs, Integer.toString(editTexts.size()))); }
<DeepExtract> ViewGroup urlBox = (ViewGroup) getLayoutInflater().inflate(R.layout.edittext_url, urlContainer, false); EditText editText = urlBox.findViewById(R.id.editText); editTexts.add(editText); urlContainer.addView(urlBox); ImageButton delete = urlBox.findViewById(R.id.delete); deletes.add(delete); delete.setTag(editText); delete.setOnClickListener(v -> { EditText tag = (EditText) v.getTag(); ((View) v.getParent()).setVisibility(View.GONE); editTexts.remove(tag); deletes.remove(v); bottomBar.setTitle(getString(R.string.OONIRun_URLs, Integer.toString(editTexts.size()))); setVisibilityDelete(); }); setVisibilityDelete(); bottomBar.setTitle(getString(R.string.OONIRun_URLs, Integer.toString(editTexts.size()))); </DeepExtract>
probe-android
positive
@Override public Status deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { for (Status status : Status.values()) { if (status.name().equals(p.getText())) { return status; } } return null; }
<DeepExtract> for (Status status : Status.values()) { if (status.name().equals(p.getText())) { return status; } } return null; </DeepExtract>
mattermost4j
positive
public CanvasTransformer zoom(final int openedX, final int closedX, final int openedY, final int closedY, final int px, final int py, final Interpolator interp) { if (mTrans == null) mTrans = new CanvasTransformer() { public void transformCanvas(Canvas canvas, float percentOpen) { } }; mTrans = new CanvasTransformer() { public void transformCanvas(Canvas canvas, float percentOpen) { mTrans.transformCanvas(canvas, percentOpen); float f = interp.getInterpolation(percentOpen); canvas.scale((openedX - closedX) * f + closedX, (openedY - closedY) * f + closedY, px, py); } }; return mTrans; }
<DeepExtract> if (mTrans == null) mTrans = new CanvasTransformer() { public void transformCanvas(Canvas canvas, float percentOpen) { } }; </DeepExtract>
Wonderful2
positive
@Override public void close() { _w.flush(); _w.flush(); }
<DeepExtract> _w.flush(); </DeepExtract> <DeepExtract> _w.flush(); </DeepExtract>
maven-confluence-plugin
positive
@Override public void start(StartContext context) throws StartException { log.info("Starting UssdService"); String dataDir = pathManagerInjector.getValue().getPathEntry(DATA_DIR).resolvePath(); UssdManagement managementMBean = UssdManagement.getInstance("UssdManagement"); managementMBean.setPersistDir(dataDir); try { managementMBean.start(); } catch (Exception e) { throw new StartException("UssdShellExecutor MBean creating is failed: " + e.getMessage(), e); } registerMBean(managementMBean, "org.mobicents.ussdgateway:name=UssdManagement"); return managementMBean; if (shellExecutorExists()) { this.schedulerMBean = initSchedulerMBean(); this.ussdShellExecutor = initShellExecutor(); shellExecutorMBean = null; try { FastList<ShellExecutor> shellExecutors = new FastList<ShellExecutor>(); shellExecutors.add(ussdShellExecutor); shellExecutors.add(ss7Service.getValue().getBeanTcapExecutor()); shellExecutors.add(ss7Service.getValue().getBeanM3uaShellExecutor()); shellExecutors.add(ss7Service.getValue().getBeanSctpShellExecutor()); shellExecutors.add(ss7Service.getValue().getBeanSccpExecutor()); String address = getPropertyString("ShellExecutor", "address", "127.0.0.1"); int port = getPropertyInt("ShellExecutor", "port", 3435); String securityDomain = getPropertyString("ShellExecutor", "securityDomain", "jmx-console"); shellExecutorMBean = new ShellServerWildFly(schedulerMBean, shellExecutors); shellExecutorMBean.setAddress(address); shellExecutorMBean.setPort(port); shellExecutorMBean.setSecurityDomain(securityDomain); } catch (Exception e) { throw new StartException("ShellExecutor MBean creating is failed: " + e.getMessage(), e); } try { schedulerMBean.start(); shellExecutorMBean.start(); } catch (Exception e) { throw new StartException("MBeans starting is failed: " + e.getMessage(), e); } } }
<DeepExtract> String dataDir = pathManagerInjector.getValue().getPathEntry(DATA_DIR).resolvePath(); UssdManagement managementMBean = UssdManagement.getInstance("UssdManagement"); managementMBean.setPersistDir(dataDir); try { managementMBean.start(); } catch (Exception e) { throw new StartException("UssdShellExecutor MBean creating is failed: " + e.getMessage(), e); } registerMBean(managementMBean, "org.mobicents.ussdgateway:name=UssdManagement"); return managementMBean; </DeepExtract>
ussdgateway
positive
public static byte[] decryptAES(final byte[] data, final byte[] key, final String transformation, final byte[] iv) { if (data == null || data.length == 0 || key == null || key.length == 0) return null; try { SecretKey secretKey; if ("DES".equals("AES")) { DESKeySpec desKey = new DESKeySpec(key); SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("AES"); secretKey = keyFactory.generateSecret(desKey); } else { secretKey = new SecretKeySpec(key, "AES"); } Cipher cipher = Cipher.getInstance(transformation); if (iv == null || iv.length == 0) { cipher.init(false ? Cipher.ENCRYPT_MODE : Cipher.DECRYPT_MODE, secretKey); } else { AlgorithmParameterSpec params = new IvParameterSpec(iv); cipher.init(false ? Cipher.ENCRYPT_MODE : Cipher.DECRYPT_MODE, secretKey, params); } return cipher.doFinal(data); } catch (Throwable e) { e.printStackTrace(); return null; } }
<DeepExtract> if (data == null || data.length == 0 || key == null || key.length == 0) return null; try { SecretKey secretKey; if ("DES".equals("AES")) { DESKeySpec desKey = new DESKeySpec(key); SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("AES"); secretKey = keyFactory.generateSecret(desKey); } else { secretKey = new SecretKeySpec(key, "AES"); } Cipher cipher = Cipher.getInstance(transformation); if (iv == null || iv.length == 0) { cipher.init(false ? Cipher.ENCRYPT_MODE : Cipher.DECRYPT_MODE, secretKey); } else { AlgorithmParameterSpec params = new IvParameterSpec(iv); cipher.init(false ? Cipher.ENCRYPT_MODE : Cipher.DECRYPT_MODE, secretKey, params); } return cipher.doFinal(data); } catch (Throwable e) { e.printStackTrace(); return null; } </DeepExtract>
Utils-Everywhere
positive
public void actionPerformed(java.awt.event.ActionEvent evt) { JToggleButton button = (JToggleButton) evt.getSource(); String floorString = button.getText(); int floor = Integer.parseInt(floorString); if (floor > 0) { floor--; } if (floor < 0) { sizeRadio.setEnabled(true); tabIconsPanel.remove(groundToggle); tabIconsPanel.add(cavesToggle, 0); if (Globals.tab == Tab.ground) { Globals.tab = Tab.caves; cavesToggle.setSelected(true); setCurrentTab(cavesPanel); } } else { sizeRadio.setEnabled(false); heightRadio.setSelected(true); tabIconsPanel.remove(cavesToggle); tabIconsPanel.add(groundToggle, 0); if (Globals.tab == Tab.caves) { Globals.tab = Tab.ground; groundToggle.setSelected(true); setCurrentTab(groundPanel); } } Globals.floor = floor; labelsPanel.updatePanel(TileSelection.getMapFragment()); }
<DeepExtract> JToggleButton button = (JToggleButton) evt.getSource(); String floorString = button.getText(); int floor = Integer.parseInt(floorString); if (floor > 0) { floor--; } if (floor < 0) { sizeRadio.setEnabled(true); tabIconsPanel.remove(groundToggle); tabIconsPanel.add(cavesToggle, 0); if (Globals.tab == Tab.ground) { Globals.tab = Tab.caves; cavesToggle.setSelected(true); setCurrentTab(cavesPanel); } } else { sizeRadio.setEnabled(false); heightRadio.setSelected(true); tabIconsPanel.remove(cavesToggle); tabIconsPanel.add(groundToggle, 0); if (Globals.tab == Tab.caves) { Globals.tab = Tab.ground; groundToggle.setSelected(true); setCurrentTab(groundPanel); } } Globals.floor = floor; labelsPanel.updatePanel(TileSelection.getMapFragment()); </DeepExtract>
DeedPlanner-2
positive
@Override public boolean createIndex(String index, String mapping) { try { CreateIndexRequest request = new CreateIndexRequest(index); request.settings(Settings.builder().put("index.number_of_shards", elasticsearchProperties.getIndex().getNumberOfShards()).put("index.number_of_replicas", elasticsearchProperties.getIndex().getNumberOfReplicas())); if (StringUtils.isNotEmpty(mapping)) { request.mapping(mapping, XContentType.JSON); } CreateIndexResponse createIndexResponse = restHighLevelClient.indices().create(request, COMMON_OPTIONS); log.debug(" whether all of the nodes have acknowledged the request : [{}]", createIndexResponse.isAcknowledged()); log.debug(" Indicates whether the requisite number of shard copies were started for each shard in the index before timing out " + ":[{}]", createIndexResponse.isShardsAcknowledged()); } catch (IOException e) { throw new ElasticsearchException("创建索引 {" + index + "} 失败:{}", e.getMessage()); } return true; }
<DeepExtract> try { CreateIndexRequest request = new CreateIndexRequest(index); request.settings(Settings.builder().put("index.number_of_shards", elasticsearchProperties.getIndex().getNumberOfShards()).put("index.number_of_replicas", elasticsearchProperties.getIndex().getNumberOfReplicas())); if (StringUtils.isNotEmpty(mapping)) { request.mapping(mapping, XContentType.JSON); } CreateIndexResponse createIndexResponse = restHighLevelClient.indices().create(request, COMMON_OPTIONS); log.debug(" whether all of the nodes have acknowledged the request : [{}]", createIndexResponse.isAcknowledged()); log.debug(" Indicates whether the requisite number of shard copies were started for each shard in the index before timing out " + ":[{}]", createIndexResponse.isShardsAcknowledged()); } catch (IOException e) { throw new ElasticsearchException("创建索引 {" + index + "} 失败:{}", e.getMessage()); } </DeepExtract>
sparkzxl-component
positive
public void writeManifest(@NonNull File path) throws IOException { log.info(""); log.info("--- " + "Writing manifest..." + " ---"); manifest.setFeatures(applicator.getFeaturesInUse()); VersionManifest versionManifest = manifest.getVersionManifest(); if (versionManifest != null) { versionManifest.setId(manifest.getGameVersion()); } checkNotNull(emptyToNull(manifest.getName()), "Package name is not defined"); checkNotNull(emptyToNull(manifest.getGameVersion()), "Game version is not defined"); path.getAbsoluteFile().getParentFile().mkdirs(); writer.writeValue(path, manifest); log.info("Wrote manifest to " + path.getAbsolutePath()); }
<DeepExtract> log.info(""); log.info("--- " + "Writing manifest..." + " ---"); </DeepExtract> <DeepExtract> checkNotNull(emptyToNull(manifest.getName()), "Package name is not defined"); checkNotNull(emptyToNull(manifest.getGameVersion()), "Game version is not defined"); </DeepExtract>
Launcher
positive
public Span startNewSpan(String requestName, String caller, String serviceType) { Boolean sample = spanAndEndpoint().state().sample(); Span parentSpan = spanAndEndpoint().span(); if (Boolean.FALSE.equals(sample)) { spanAndEndpoint().state().setCurrentLocalSpan(null); return Span.EMPTY_SPAN; } SpanId newSpanId; Span parentSpan = spanAndEndpoint().state().getCurrentLocalSpan(); String newSpanId = String.valueOf(randomGenerator().nextLong()); SpanId.Builder builder = SpanId.builder().spanId(newSpanId); if (parentSpan == null) { newSpanId = builder.spanId("0.1").traceId(newSpanId).build(); } else { newSpanId = builder.traceId(parentSpan.getTrace_id()).parentId(parentSpan.getId()).build(); } if (sample == null) { if (!traceSampler().isSampled(newSpanId.traceId)) { spanAndEndpoint().state().setCurrentClientSpan(Span.EMPTY_SPAN); return Span.EMPTY_SPAN; } } Span newSpan = newSpanId.toSpan(); newSpan.setName(requestName); if (parentSpan != null) { boolean isBrother = false; if (equal(caller, parentSpan.getCaller())) { isBrother = true; } initSpan(newSpan, parentSpan, isBrother, caller); } newSpan.setHost(spanAndEndpoint().endpoint().ipv4); newSpan.setProcessId(spanAndEndpoint().endpoint().processId); newSpan.setAppName(spanAndEndpoint().endpoint().service_name); newSpan.setParentSpan(parentSpan); newSpan.setType(serviceType); newSpan.setTimestamp(System.currentTimeMillis()); spanAndEndpoint().state().setCurrentLocalSpan(newSpan); return newSpan; }
<DeepExtract> SpanId newSpanId; Span parentSpan = spanAndEndpoint().state().getCurrentLocalSpan(); String newSpanId = String.valueOf(randomGenerator().nextLong()); SpanId.Builder builder = SpanId.builder().spanId(newSpanId); if (parentSpan == null) { newSpanId = builder.spanId("0.1").traceId(newSpanId).build(); } else { newSpanId = builder.traceId(parentSpan.getTrace_id()).parentId(parentSpan.getId()).build(); } </DeepExtract>
talos
positive
public void data_stmt_set() { printRuleHeader(525, "data-stmt-set", ""); System.out.println(); }
<DeepExtract> printRuleHeader(525, "data-stmt-set", ""); </DeepExtract> <DeepExtract> System.out.println(); </DeepExtract>
open-fortran-parser
positive
public Bitmap getBitmap() { if (mRenderer == null) { Log.e(TAG, "getBitmap: Renderer was not set."); return null; } if (!Thread.currentThread().getName().equals(mThreadOwner)) { Log.e(TAG, "getBitmap: This thread does not own the OpenGL context."); return null; } mRenderer.onDrawFrame(mGL); mRenderer.onDrawFrame(mGL); int[] iat = new int[mWidth * mHeight]; IntBuffer ib = IntBuffer.allocate(mWidth * mHeight); mGL.glReadPixels(0, 0, mWidth, mHeight, GL_RGBA, GL_UNSIGNED_BYTE, ib); int[] ia = ib.array(); for (int i = 0; i < mHeight; i++) { for (int j = 0; j < mWidth; j++) { iat[(mHeight - i - 1) * mWidth + j] = ia[i * mWidth + j]; } } mBitmap = Bitmap.createBitmap(mWidth, mHeight, Bitmap.Config.ARGB_8888); mBitmap.copyPixelsFromBuffer(IntBuffer.wrap(iat)); return mBitmap; }
<DeepExtract> int[] iat = new int[mWidth * mHeight]; IntBuffer ib = IntBuffer.allocate(mWidth * mHeight); mGL.glReadPixels(0, 0, mWidth, mHeight, GL_RGBA, GL_UNSIGNED_BYTE, ib); int[] ia = ib.array(); for (int i = 0; i < mHeight; i++) { for (int j = 0; j < mWidth; j++) { iat[(mHeight - i - 1) * mWidth + j] = ia[i * mWidth + j]; } } mBitmap = Bitmap.createBitmap(mWidth, mHeight, Bitmap.Config.ARGB_8888); mBitmap.copyPixelsFromBuffer(IntBuffer.wrap(iat)); </DeepExtract>
ImageEdit
positive
@Override public void onSuccess() { element.appendChild(Card.create("12 Columns", "Default row is a 12 columns grid.").setCollapsible().appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span12().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span11().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span10().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span9().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span7().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span5().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span5().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span7().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span9().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span10().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span11().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().offset0().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().offset1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().offset2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().offset3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().offset4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().offset5().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().offset6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().offset7().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().offset8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().offset9().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().offset10().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().offset11().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span6().offset3().appendChild(div().css("sample-div").add(span().css("counter"))))).element()); element.appendChild(CodeCard.createCodeCard(CodeResource.INSTANCE.grid12Columns()).element()); element.appendChild(Card.create("16 Columns").setCollapsible().appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span16().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span15().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span14().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span13().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span12().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span11().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span5().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span10().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span9().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span7().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span7().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span9().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span10().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span5().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span11().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span12().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span13().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span14().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span15().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset0().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset5().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset7().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset9().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset10().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset11().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset12().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset13().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset14().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset15().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span8().offset4().appendChild(div().css("sample-div").add(span().css("counter"))))).element()); element.appendChild(CodeCard.createCodeCard(CodeResource.INSTANCE.grid16Columns()).element()); element.appendChild(Card.create("18 Columns").setCollapsible().appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span9().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span9().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span18().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span17().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span16().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span15().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span14().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span13().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span5().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span12().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span11().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span7().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span10().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span9().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span9().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span10().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span7().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span11().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span12().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span5().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span13().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span14().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span15().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span16().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span17().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset0().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset5().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset7().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset9().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset10().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset11().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset12().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset13().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset14().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset15().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset16().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset17().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span6().offset6().appendChild(div().css("sample-div").add(span().css("counter"))))).element()); element.appendChild(CodeCard.createCodeCard(CodeResource.INSTANCE.grid18Columns()).element()); element.appendChild(Card.create("24 Columns").setCollapsible().appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span12().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span12().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span24().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span23().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span22().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span21().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span20().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span19().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span5().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span18().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span17().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span7().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span16().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span15().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span9().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span14().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span10().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span13().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span11().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span12().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span12().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span11().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span13().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span10().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span14().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span9().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span15().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span16().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span7().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span17().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span18().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span5().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span19().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span20().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span21().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span22().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span23().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset0().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset5().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset7().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset9().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset10().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset11().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset12().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset13().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset14().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset15().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset16().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset17().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset18().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset19().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset20().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset21().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset22().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset23().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span8().offset8().appendChild(div().css("sample-div").add(span().css("counter"))))).element()); element.appendChild(CodeCard.createCodeCard(CodeResource.INSTANCE.grid24Columns()).element()); element.appendChild(Card.create("32 Columns").setCollapsible().appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span16().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span16().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span32().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span31().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span30().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span29().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span28().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span27().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span5().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span26().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span25().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span7().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span24().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span23().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span9().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span22().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span10().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span21().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span11().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span20().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span12().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span19().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span13().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span18().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span14().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span17().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span15().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span16().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span16().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span15().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span17().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span14().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span18().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span13().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span19().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span12().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span20().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span11().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span21().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span10().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span22().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span9().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span23().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span24().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span7().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span25().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span26().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span5().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span27().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span28().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span29().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span30().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span31().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset0().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset5().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset7().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset9().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset10().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset11().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset12().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset13().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset14().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset15().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset16().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset17().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset18().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset19().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset20().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset21().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset22().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset23().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset24().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset25().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset26().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset27().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset28().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset29().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset30().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset31().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span12().offset10().appendChild(div().css("sample-div").add(span().css("counter"))))).element()); element.appendChild(CodeCard.createCodeCard(CodeResource.INSTANCE.grid32Columns()).element()); }
<DeepExtract> element.appendChild(Card.create("12 Columns", "Default row is a 12 columns grid.").setCollapsible().appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span12().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span11().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span10().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span9().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span7().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span5().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span5().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span7().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span9().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span10().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span11().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().offset0().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().offset1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().offset2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().offset3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().offset4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().offset5().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().offset6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().offset7().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().offset8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().offset9().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().offset10().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span1().offset11().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.create().style().addCss("count-reset").get().appendChild(Column.span6().offset3().appendChild(div().css("sample-div").add(span().css("counter"))))).element()); </DeepExtract> <DeepExtract> element.appendChild(Card.create("16 Columns").setCollapsible().appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span16().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span15().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span14().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span13().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span12().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span11().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span5().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span10().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span9().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span7().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span7().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span9().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span10().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span5().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span11().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span12().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span13().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span14().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span15().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset0().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset5().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset7().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset9().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset10().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset11().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset12().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset13().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset14().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset15().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of16Columns().style().addCss("count-reset").get().appendChild(Column.span8().offset4().appendChild(div().css("sample-div").add(span().css("counter"))))).element()); </DeepExtract> <DeepExtract> element.appendChild(Card.create("18 Columns").setCollapsible().appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span9().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span9().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span18().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span17().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span16().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span15().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span14().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span13().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span5().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span12().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span11().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span7().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span10().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span9().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span9().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span10().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span7().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span11().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span12().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span5().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span13().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span14().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span15().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span16().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span17().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset0().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset5().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset7().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset9().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset10().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset11().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset12().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset13().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset14().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset15().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset16().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset17().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of18Columns().style().addCss("count-reset").get().appendChild(Column.span6().offset6().appendChild(div().css("sample-div").add(span().css("counter"))))).element()); </DeepExtract> <DeepExtract> element.appendChild(Card.create("24 Columns").setCollapsible().appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span12().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span12().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span24().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span23().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span22().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span21().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span20().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span19().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span5().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span18().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span17().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span7().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span16().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span15().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span9().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span14().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span10().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span13().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span11().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span12().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span12().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span11().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span13().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span10().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span14().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span9().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span15().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span16().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span7().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span17().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span18().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span5().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span19().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span20().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span21().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span22().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span23().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset0().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset5().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset7().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset9().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset10().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset11().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset12().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset13().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset14().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset15().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset16().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset17().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset18().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset19().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset20().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset21().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset22().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset23().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of24Columns().style().addCss("count-reset").get().appendChild(Column.span8().offset8().appendChild(div().css("sample-div").add(span().css("counter"))))).element()); </DeepExtract> <DeepExtract> element.appendChild(Card.create("32 Columns").setCollapsible().appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span16().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span16().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span32().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span31().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span30().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span29().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span28().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span27().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span5().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span26().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span25().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span7().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span24().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span23().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span9().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span22().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span10().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span21().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span11().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span20().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span12().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span19().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span13().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span18().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span14().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span17().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span15().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span16().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span16().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span15().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span17().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span14().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span18().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span13().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span19().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span12().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span20().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span11().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span21().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span10().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span22().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span9().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span23().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span8().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span24().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span7().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span25().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span6().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span26().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span5().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span27().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span4().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span28().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span3().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span29().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span2().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span30().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter")))).appendChild(Column.span31().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset0().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset1().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset2().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset3().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset4().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset5().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset6().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset7().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset8().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset9().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset10().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset11().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset12().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset13().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset14().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset15().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset16().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset17().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset18().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset19().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset20().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset21().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset22().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset23().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset24().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset25().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset26().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset27().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset28().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset29().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset30().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span1().offset31().appendChild(div().css("sample-div").add(span().css("counter"))))).appendChild(Row.of32Columns().style().addCss("count-reset").get().appendChild(Column.span12().offset10().appendChild(div().css("sample-div").add(span().css("counter"))))).element()); </DeepExtract>
domino-ui-demo
positive
public RDFNode getObject() { RDFNode node = getRDFNode(SP.object); if (node != null) { Variable var = SPINFactory.asVariable(node); if (var != null) { return var; } else { return node; } } else { return null; } }
<DeepExtract> RDFNode node = getRDFNode(SP.object); if (node != null) { Variable var = SPINFactory.asVariable(node); if (var != null) { return var; } else { return node; } } else { return null; } </DeepExtract>
spinrdf
positive
public void actionPerformed(ActionEvent e) { Bot b = window.getActiveBot(); if (b != null) { HijackCanvas c = b.getCanvas(); boolean removed = false; if (c == null) { b.getLogger().log(new LogRecord(Level.SEVERE, "Error accessing canvas...")); return; } for (int i = 0; i < c.getListeners().size(); i++) { ProjectionListener pl = c.getListeners().get(i); if (pl.getClass().equals(DebugGroundInfos.class)) { Debugger d = (Debugger) pl; d.uninstall(); c.getListeners().remove(i); removed = true; miscGroundInfos.setIcon(null); b.getLogger().log(new LogRecord(Level.FINE, "Uninstalled " + d.getClass().getSimpleName().replaceAll("Debug", "") + " debugger")); break; } } if (!removed) { try { Debugger d = (Debugger) DebugGroundInfos.class.newInstance(); d.install(b); c.getListeners().add(d); miscGroundInfos.setIcon(tickIcon); b.getLogger().log(new LogRecord(Level.FINE, "Installed " + d.getClass().getSimpleName().replaceAll("Debug", "") + " debugger")); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } } } }
<DeepExtract> Bot b = window.getActiveBot(); if (b != null) { HijackCanvas c = b.getCanvas(); boolean removed = false; if (c == null) { b.getLogger().log(new LogRecord(Level.SEVERE, "Error accessing canvas...")); return; } for (int i = 0; i < c.getListeners().size(); i++) { ProjectionListener pl = c.getListeners().get(i); if (pl.getClass().equals(DebugGroundInfos.class)) { Debugger d = (Debugger) pl; d.uninstall(); c.getListeners().remove(i); removed = true; miscGroundInfos.setIcon(null); b.getLogger().log(new LogRecord(Level.FINE, "Uninstalled " + d.getClass().getSimpleName().replaceAll("Debug", "") + " debugger")); break; } } if (!removed) { try { Debugger d = (Debugger) DebugGroundInfos.class.newInstance(); d.install(b); c.getListeners().add(d); miscGroundInfos.setIcon(tickIcon); b.getLogger().log(new LogRecord(Level.FINE, "Installed " + d.getClass().getSimpleName().replaceAll("Debug", "") + " debugger")); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } } } </DeepExtract>
vInsert
positive