content
stringlengths
263
5.24M
pred_label
stringclasses
1 value
pred_score_pos
float64
0.6
1
**[How To Log Spring Data JPA Repository Query-Method Execution Time](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootRepoIntercept)** **Description:** This application is an example of logging execution time for a repository query-method. **Key points:** - write an AOP component...
__label__POS
0.932854
package org.approvaltests.combinations; import org.junit.jupiter.api.Test; public class CombinationTest { @Test public void testLockDown() { CombinationApprovals.verifyAllCombinations((i, s) -> String.format("[%s, %s]", i, s), new Integer[]{1, 2, 3, 4, 5}, new String[]{"a", "b", "c", "d"}); } @T...
__label__POS
0.989778
package org.approvaltests.combinations; import com.spun.util.markdown.table.MarkdownColumn; import com.spun.util.markdown.table.MarkdownTable; import org.approvaltests.Approvals; import org.approvaltests.combinations.pairwise.Case; import org.approvaltests.combinations.pairwise.InParameterOrderStrategy; import org.app...
__label__POS
0.723492
package com.apress.springrecipes.vehicle.config; import javax.sql.DataSource; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.jdbc.core.JdbcTemplate; import com.apress.springrecipes.vehicle.NamedJdbcVehicleDao; import com.apr...
__label__POS
0.805165
#++ # *------------------------------------------------------------------------------------------ # MySQL Library # # Built on the technologies developed and maintained by April-Child.com # Copyright (c)2007 Petr Krontorad, April-Child.com. # # Author: Petr Krontorad, petr@krontorad.com # # Al...
__label__POS
0.621382
**[How To Implement Keyset Pagination in Spring Boot](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootKeysetPagination)** **Description:** When we rely on an *offset* paging we have the performance penalty induced by throwing away *n* records before reached the desired *offset*. La...
__label__POS
0.772594
package com.apress.springrecipes.course; import java.util.GregorianCalendar; import org.springframework.context.ApplicationContext; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import com.apress.springrecipes.cour...
__label__POS
0.993832
package org.approvaltests.awt; import com.spun.swing.Paintable; import com.spun.swing.SwingUtils; import com.spun.util.WindowUtils; import org.lambda.actions.Action0; import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import java.awt.Graphics; public class CustomPanel implements Paintable { pu...
__label__POS
0.988372
package org.approvaltests.reporters; import org.approvaltests.Approvals; import org.approvaltests.core.Options; import org.junit.jupiter.api.Test; import java.util.List; import java.util.Set; import java.util.stream.Collectors; public class EnvironmentVariableReporterTest { @Test public void testEnvironmentVaria...
__label__POS
0.832039
package org.approvaltests.reporters; import org.approvaltests.Approvals; import org.approvaltests.core.ApprovalFailureReporter; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api...
__label__POS
0.993487
package org.approvaltests.reporters; import com.spun.util.ThreadUtils; import com.spun.util.io.FileUtils; import org.approvaltests.Approvals; import org.approvaltests.ReporterFactory; import org.approvaltests.core.ApprovalFailureReporter; import org.approvaltests.reporters.windows.TortoiseTextDiffReporter; import org....
__label__POS
0.980069
**[View Binding/Extracted Params Via Log4J 2](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootLog4j2ViewBindingParameters)** **Description:** View the prepared statement binding/extracted parameters via Log4J 2 logger setting. **Key points:** - for Maven, in `pom.xml`, exclude Spr...
__label__POS
0.627965
<?php /** * A CMB2 object instance registry for storing every CMB2 instance. * * @category WordPress_Plugin * @package CMB2 * @author CMB2 team * @license GPL-2.0+ * @link https://cmb2.io */ class CMB2_Boxes { /** * Array of all metabox objects. * * @since 2.0.0 * @var array */ protec...
__label__POS
0.747865
package com.apress.springrecipes.course; import java.util.GregorianCalendar; import org.springframework.context.ApplicationContext; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import com.apress.springrecipes.cour...
__label__POS
0.993832
**[Query Fetching](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootQueryFetching)** **Description:** This application is an example of how to write a query via `JpaRepository`, `EntityManager` and `Session`. **Key points:** - for `JpaRepository` use `@Query` or Spring Data Query ...
__label__POS
0.8477
package org.approvaltests.reporters; import com.spun.util.io.FileUtils; import org.approvaltests.Approvals; import org.approvaltests.core.Options; import org.approvaltests.namer.NamerWrapper; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; class AutoApproveWhenEmptyRep...
__label__POS
0.747145
package org.approvaltests.scrubbers; import org.approvaltests.Approvals; import org.approvaltests.core.Options; import org.approvaltests.core.Scrubber; import org.junit.jupiter.api.Test; import java.util.List; import static org.junit.jupiter.api.Assertions.assertEquals; class ScrubberTest { @Test void noGuid() ...
__label__POS
0.734225
**[How To Quickly Reproduce The N+1 Performance Issue](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootSimulateNPlus1)** **Description:** The N+1 is an issue of lazy fetching (but, eager is not exempt). This application reproduce the N+1 behavior. **Key points:** - define two enti...
__label__POS
0.673298
package com.apress.springrecipes.vehicle; public class Vehicle { private String vehicleNo; private String color; private int wheel; private int seat; public Vehicle() { } public Vehicle(String vehicleNo, String color, int wheel, int seat) { this.vehicleNo = vehicleNo; this...
__label__POS
0.681115
package org.nocrala.tools.gis.data.esri.shapefile.shape; import java.io.IOException; import java.io.InputStream; import org.nocrala.tools.gis.data.esri.shapefile.ValidationPreferences; import org.nocrala.tools.gis.data.esri.shapefile.exception.DataStreamEOFException; import org.nocrala.tools.gis.data.esri.shapefile.e...
__label__POS
0.92455
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json.Linq; using dvcsharp_core_api.Models; using dvcsharp_core_api.Data; namespace dvcsharp_core_api { [Route("api/[controller]")] public class AuthorizationsControlle...
__label__POS
0.770011
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Authorization; using dvcsharp_core_api.Models; using dvcsharp_core_api.Data; namespace dvcsharp_core_api { [Route("api/[controller]")] public class TokensCon...
__label__POS
0.969253
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using dvcsharp_core_api.Models; using dvcsharp_core_api.Data; namespace dvcsharp_core_api { [Route("api/[controller]")] public class RegistrationsController : Controller { pri...
__label__POS
0.667926
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.IO; using System.Xml; using System.Xml.Serialization; using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json.Linq; using dvcsharp_core_api.Models; using dvcsharp_core_api.Data; namespace dvcsharp_core_api { ...
__label__POS
0.978354
package org.approvaltests.webpages; import com.spun.util.ObjectUtils; import com.spun.util.io.FileUtils; import org.approvaltests.Approvals; import java.io.File; import java.net.URI; public class WebPageApproval { public static void verifyRenderedPage(URI uri) { String imageFile = convertToLegalFileName(uri,...
__label__POS
0.644788
package org.nocrala.tools.gis.data.esri.shapefile.util; public class HexaUtil { public static final byte[] stringToByteArray(final String orig) { String txt = orig.toLowerCase(); StringBuffer sb = new StringBuffer(); for (int i = 0; i < txt.length(); i++) { if (txt.charAt(i) != ' ') { sb...
__label__POS
0.994746
package org.approvaltests.webpages; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; import java.awt.Dimension; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; public class WebPageChangeDetectorGui extends JPanel { private static fin...
__label__POS
0.884617
package org.counterdisplay; import com.spun.swing.SwingUtils; import com.spun.util.Colors; import com.spun.util.WindowUtils; import com.spun.util.io.FileUtils; import com.spun.util.logger.SimpleLogger; import javax.swing.JFrame; import javax.swing.JPanel; import java.awt.Dimension; import java.awt.Font; import java.a...
__label__POS
0.87368
package org.nocrala.tools.gis.data.esri.shapefile.util; import java.io.EOFException; import java.io.IOException; import java.io.InputStream; import java.nio.ByteBuffer; import org.nocrala.tools.gis.data.esri.shapefile.exception.DataStreamEOFException; public class ISUtil { private static final byte[] BUFFER = new...
__label__POS
0.994282
package com.apress.springrecipes.course; import java.util.GregorianCalendar; import org.springframework.context.ApplicationContext; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import com.apress.springrecipes.cour...
__label__POS
0.993832
using System.ComponentModel.DataAnnotations; using System.Collections.Generic; using Microsoft.AspNetCore.Identity; namespace Users.Models { public class CreateModel { [Required] public string Name { get; set; } [Required] public string Email { get; set; } [Required] ...
__label__POS
0.98663
using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using System; using System.Threading.Tasks; namespace Users.Models { public class AppIdentit...
__label__POS
0.736196
**[How To Fetch DTO Via JDK14 Records, Constructor Expression and JPQL](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootDtoRecordConstructorExpression)** **Description:** Fetching more data than needed is prone to performance penalities. Using DTO allows us to extract only the need...
__label__POS
0.681588
using System; using App.Metrics; using App.Metrics.Formatters.Json; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extension...
__label__POS
0.859818
<a id="top"></a> # StoryBoard <!-- toc --> ## Contents * [How to verify sequences](#how-to-verify-sequences)<!-- endToc --> ## How to verify sequences StoryBoards can be very helpful to tell a story of steps that happen over time. Here is a simple example <!-- snippet: StoryBoardExample --> <a id='snippet-Stor...
__label__POS
0.997217
**[How Regular `@ElementCollection` (Without `@OrderColumn`) Works](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootElementCollectionNoOrderColumn)** **Description:** This application reveals the possible performance penalties of using `@ElementCollection`. In this case, without `@...
__label__POS
0.669084
// <copyright file="RequestDurationForApdexTesting.cs" company="App Metrics Contributors"> // Copyright (c) App Metrics Contributors. All rights reserved. // </copyright> using System; namespace MetricsReportingSandboxMvc.JustForTesting { public class RequestDurationForApdexTesting { private const in...
__label__POS
0.607581
**[How To Cache Entities And Query Results In Second Level Cache (EhCache)](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootHibernateSLCEhCacheKickoff)** **Description:** This is a SpringBoot application that enables Hibernate Second Level Cache and EhCache provider. It contains an...
__label__POS
0.815822
package org.nocrala.tools.gis.data.esri.shapefile.shape.shapes; import java.io.IOException; import java.io.InputStream; import org.nocrala.tools.gis.data.esri.shapefile.ValidationPreferences; import org.nocrala.tools.gis.data.esri.shapefile.exception.InvalidShapeFileException; import org.nocrala.tools.gis.data.esri.s...
__label__POS
0.712108
**[Avoid Entity In DTO Via Constructor Expression (no association)](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootAvoidEntityInDtoViaConstructor)** <b><a href="https://persistencelayer.wixsite.com/springboot-hibernate/post/avoid-fetching-entity-in-dto-via-constructor-expression-n...
__label__POS
0.666596
package { import flash.display.Sprite; import flash.net.URLLoader; import flash.net.URLRequest; import flash.net.URLRequestHeader; import flash.net.URLRequestMethod; public class csrf extends Sprite { public function csrf() { super(); var member1:Object = null; var myJson:String = ...
__label__POS
0.934866
<a id="top"></a> # How to Encapsulate Your Database Calls <!-- toc --> ## Contents * [The problem](#the-problem) * [The scenario](#the-scenario) * [Starting Example](#starting-example) * [The solution](#the-solution) * [Why this is better](#why-this-is-better) * [Example Test](#example-test)<!-- en...
__label__POS
0.767352
package org.nocrala.tools.gis.data.esri.shapefile.shape.shapes; import java.io.IOException; import java.io.InputStream; import org.nocrala.tools.gis.data.esri.shapefile.ValidationPreferences; import org.nocrala.tools.gis.data.esri.shapefile.exception.InvalidShapeFileException; import org.nocrala.tools.gis.data.esri.s...
__label__POS
0.663046
// <copyright file="RequestDurationForApdexTesting.cs" company="App Metrics Contributors"> // Copyright (c) App Metrics Contributors. All rights reserved. // </copyright> using System; namespace MetricsSandboxMvc.JustForTesting { public class RequestDurationForApdexTesting { private const int MaxRequ...
__label__POS
0.608614
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; namespace MetricsSandboxCore31.Controllers { [ApiController] [Route("[controller]")] public class WeatherForecastController : ControllerBase ...
__label__POS
0.841638
#import <Foundation/Foundation.h> #import <AppMetricaCore/AppMetricaCore.h> #import "AMAStartupCompletionObserving.h" NS_ASSUME_NONNULL_BEGIN @class AMAMetricaPersistentConfiguration; @class AMAReporter; @class AMAStartupParametersConfiguration; @protocol AMADateProviding; @interface AMAExternalAttributionControl...
__label__POS
0.677891
using System; using System.Collections.Generic; using System.Linq; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; namespace MetricsSandboxCoreConfigServices.Controllers { [ApiController] [Route("[controller]")] public class WeatherForecastController : ControllerBase { priv...
__label__POS
0.909536
package com.apress.springrecipes.course; import java.util.GregorianCalendar; import org.springframework.context.ApplicationContext; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import com.apress.springrecipes.cour...
__label__POS
0.996477
**[Dynamic Spring projection](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootDynamicProjection)** **Description:** This application is a sample of using dynamic Spring projections. **Key points:** - declare query-methods in a generic manner (e.g., `<T> List<T> findByGenre(Strin...
__label__POS
0.951517
**[How To Avoid `LazyInitializationException` Via `JOIN FETCH`](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootJoinFetch)** **See also:** - [LEFT JOIN FETCH](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootLeftJoinFetch) - [JOIN VS. JOIN FETCH...
__label__POS
0.659059
**[How To Efficiently Fetch Spring Projection Including `@ManyToOne` Or `@OneToOne` Associations](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootNestedVsVirtualProjection)** **Description:** This application fetches a Spring projection including the `@ManyToOne` association via di...
__label__POS
0.910227
**[Offset Pagination - Trigger `SELECT COUNT` Subquery And Return `List<projection>` That Maps Entities And The Total Number Of Records Via Projection](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootListEntityOffsetPaginationProjection)** **Description:** This application fetch...
__label__POS
0.724312
package org.approvaltests.namer; import org.approvaltests.Approvals; import org.junit.Assert; import java.io.File; public class StackTraceNamerUtils { public static void assertNamerForFramework(String className, String methodName) { final ApprovalNamer namer = new StackTraceNamer(); assertNamerForFramewo...
__label__POS
0.977603
package com.apress.prospring6.eighteen.boot; import org.hibernate.boot.model.naming.Identifier; import org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl; import org.hibernate.engine.jdbc.env.spi.JdbcEnvironment; import org.springframework.context.annotation.Bean; import org.springframework.context.ann...
__label__POS
0.720469
if #arg < 3 then print("Syntax error!") printf("\t%s FILENAME|- NUMCOL LAG1 [LAG2 [LAG3 [...]]]\n", arg[0]) os.exit(1) end filename = arg[1] col = tonumber(arg[2]) lags = {} for i=3,#arg do table.insert(lags, tonumber(arg[i])) end if filename == "-" then filename = nil end function zero_if_null(v)...
__label__POS
0.997634
var router = require('express').Router() var vulnDict = require('../config/vulns') var authHandler = require('../core/authHandler') module.exports = function (passport) { router.get('/', authHandler.isAuthenticated, function (req, res) { res.redirect('/learn') }) router.get('/login', authHandler.isNotAuthenticat...
__label__POS
0.989324
var router = require('express').Router() var appHandler = require('../core/appHandler') var authHandler = require('../core/authHandler') module.exports = function () { router.get('/', authHandler.isAuthenticated, function (req, res) { res.redirect('/learn') }) router.get('/usersearch', authHandler...
__label__POS
0.996402
package org.approvaltests; import nu.xom.Builder; import nu.xom.Document; import nu.xom.Serializer; import org.approvaltests.core.Options; import java.io.ByteArrayOutputStream; import java.io.StringReader; public class XmlXomApprovals { public static void verifyXml(String xml) { verifyXml(xml, new Options())...
__label__POS
0.971271
if #arg < 5 then print("Syntax error!") printf("\t%s FILENAME VAL_MEAN_COL VAL_VAR_COL TEST_MEAN_COL TEST_VAR_COL [W_REPS [EXP_REPS [EXP1_SIZE [EXP2_SIZE ...] ] ] ]\n", arg[0]) printf("\nThis script computes the generalization ability given a set of experiments\n") printf("using different hyperparameters.\n\n")...
__label__POS
0.643914
package org.approvaltests; import com.google.gson.GsonBuilder; import com.spun.util.JsonUtils; import org.approvaltests.core.Options; import org.lambda.functions.Function1; /** * Requires (GSON)[https://mvnrepository.com/artifact/com.google.code.gson/gson] */ public class JsonApprovals { public static void verify...
__label__POS
0.909202
opt = cmdOpt{ program_name = string.basename(arg[0]), argument_description = "", main_description = "April lexicon handler", { index_name="text", description="Text file where extract the lexicon (It could be a Lua table with pairs {text,prob} )", short="t", argument="yes", }, { index_nam...
__label__POS
0.786235
var db = require('../models') var bCrypt = require('bcrypt') const exec = require('child_process').exec; var mathjs = require('mathjs') var libxmljs = require("libxmljs"); var serialize = require("node-serialize") const Op = db.Sequelize.Op module.exports.userSearch = function (req, res) { var query = "SELECT name,id...
__label__POS
0.745181
package org.approvaltests; import org.lambda.functions.Function0; public class StoryBoard { enum Types { None, Description, Frame } private StringBuffer stringBuffer = new StringBuffer(); int index = 0; private Types last = Types.None; public static <T>...
__label__POS
0.729057
package com.apress.prospring6.eighteen.boot.controllers; import com.apress.prospring6.eighteen.boot.entities.Singer; import com.apress.prospring6.eighteen.boot.services.SingerService; import jakarta.validation.Valid; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpStatus; i...
__label__POS
0.675897
var db = require('../models') var bCrypt = require('bcrypt') var md5 = require('md5') module.exports.isAuthenticated = function (req, res, next) { if (req.isAuthenticated()) { req.flash('authenticated', true) return next(); } res.redirect('/login'); } module.exports.isNotAuthenticated = function (req, res, nex...
__label__POS
0.66303
package org.approvaltests; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.spun.util.ObjectUtils; import org.approvaltests.core.Options; import org.lambda.functions.Function1; import java.util.function.Function; public class JsonJacksonApprova...
__label__POS
0.912616
-- PAPER: "Minimum Bayes Risk Decoding for BLEU", Nicola Ehling and -- Richard Zens and Hermann Ney, in ACL 2007 -- REVISAR TAMBIEN: "Task-Specific Minimum Bayes-Risk Decoding using -- Learned Edit Distance", Izhak Shafran and William Byrne opt = cmdOpt{ program_name = string.basename(arg[0]), argument_descriptio...
__label__POS
0.741184
package com.apress.springrecipes.vehicle.config; import javax.sql.DataSource; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.jdbc.core.JdbcTemplate; import com.apress.springrecipes.vehicle.NamedJdbcVehicleDao; import com.apr...
__label__POS
0.805165
scores = arg[1] objfunc = arg[2] num_rep = tonumber(arg[3] or 0) baseline = arg[4] maxnbest = arg[5] confidence = tonumber(arg[6] or 0.95) if maxnbest then maxnbest = tonumber(maxnbest) end results = {} sizes = {} nscores = 0 score_func = nil if objfunc == "WER" then -- the scores order is: Acc Sub Ins Del s...
__label__POS
0.6141
if #arg < 3 or #arg > 6 then print("Syntax:") printf ("\t%s nbestfile lm vocab [use_bcc=yes use_ecc=yes cache_extra_set=nil]\n", string.basename(arg[0])) os.exit(128) end local nbestfile = arg[1] local lm_file = arg[2] local voc_filename = arg[3] --local trie_size = t...
__label__POS
0.979478
opt = cmdOpt{ program_name = string.basename(arg[0]), argument_description = "", main_description = "NBest feature extractor", { index_name="nbest", description="Nbest lists.", short="n", argument="yes", }, { index_name="feats", description="Output features.", short="F", argu...
__label__POS
0.85002
package org.approvaltests.namer; import org.approvaltests.core.Options; import java.io.File; public class MasterDirectoryNamer implements ApprovalNamer { private final ApprovalNamer namer; private final String approvedFile; public MasterDirectoryNamer(File comparingFile, Options options) { this.na...
__label__POS
0.875495
package org.approvaltests.namer; import com.spun.util.FormattedException; import com.spun.util.ObjectUtils; import com.spun.util.ThreadUtils; import com.spun.util.io.StackElementSelector; import com.spun.util.tests.TestUtils; import org.approvaltests.integrations.junit5.JUnitUtils; import org.lambda.query.Queryable; ...
__label__POS
0.685198
package org.approvaltests.namer; import com.spun.util.ObjectUtils; import com.spun.util.StringUtils; import com.spun.util.tests.StackTraceReflectionResult; import com.spun.util.tests.TestUtils; import org.approvaltests.writers.Writer; import java.io.File; public class StackTraceNamer implements ApprovalNamer { pri...
__label__POS
0.66193
if #arg < 3 or #arg > 6 then print("Syntax:") printf ("\t%s nbestfile lm vocab [use_bcc=yes use_ecc=yes cache_extra_set=nil]\n", string.basename(arg[0])) os.exit(128) end nbestfile = arg[1] lm_file = arg[2] voc_filename = arg[3] --trie_size = tonumber(arg[4] or 24) us...
__label__POS
0.813263
package org.approvaltests.namer; import com.spun.util.StringUtils; import com.spun.util.SystemUtils; import org.approvaltests.core.ApprovalTestPackageSettings; import org.lambda.functions.Function0; import org.packagesettings.PackageLevelSettings; public class NamerFactory { private static final ThreadLocal<String>...
__label__POS
0.999551
weightsfilename = arg[1] nbestfilename = arg[2] features = arg[3] out_reranked = arg[4] or "reranked.nbest.out.gz" out_feats = arg[5] or nil local featsf = nil if out_feats then featsf = io.open(out_feats, "w") end local g = io.open(out_reranked, "w") -- leemos los pesos weights = string.tokenize(io...
__label__POS
0.774949
package org.approvaltests.namer; import com.spun.util.SystemUtils; import org.approvaltests.core.Options; public class NamerFactoryForOptions { public static final NamerFactoryForOptions INSTANCE = new NamerFactoryForOptions(); private NamerFactoryForOptions() { } public Options asOsSpecificTest() { r...
__label__POS
0.960902
package org.approvaltests.writers; import com.spun.util.NumberUtils; import com.spun.util.ObjectUtils; import org.approvaltests.core.ApprovalWriter; import org.approvaltests.core.Options; import org.approvaltests.namer.NamedEnvironment; import javax.imageio.ImageIO; import java.awt.image.BufferedImage; import java.io...
__label__POS
0.800199
package org.approvaltests.writers; import com.spun.util.io.FileUtils; import org.approvaltests.core.ApprovalWriter; import org.approvaltests.core.Options; import java.io.File; public class ApprovalTextWriter implements ApprovalWriter { private final String text; private final String fileExtensionWithoutDot; /*...
__label__POS
0.955632
package com.bookstore.service; import com.bookstore.entity.Author; import com.bookstore.repository.AuthorRepository; import java.util.Arrays; import java.util.List; import org.springframework.stereotype.Service; @Service public class BookstoreService { private final AuthorRepository authorRepository; public...
__label__POS
0.963895
package org.approvaltests.writers; import org.approvaltests.core.ApprovalWriter; import javax.swing.JFrame; import java.awt.Component; import java.awt.Graphics; import java.awt.image.BufferedImage; import java.io.File; public class ComponentApprovalWriter implements ApprovalWriter { private ImageApprovalWriter ima...
__label__POS
0.893773
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <!-- template designed by Marco Von Ballmoos --> <title></title> <link rel="stylesheet" hr...
__label__POS
0.979035
package org.approvaltests.writers; import com.spun.swing.Paintable; import org.approvaltests.core.ApprovalWriter; import java.awt.Dimension; import java.awt.Graphics; import java.awt.image.BufferedImage; import java.io.File; public class PaintableApprovalWriter implements ApprovalWriter { private ImageApprovalWrit...
__label__POS
0.769982
package org.approvaltests.writers; import com.spun.util.io.FileUtils; import org.approvaltests.core.ApprovalWriter; import java.io.File; import java.io.InputStream; import java.nio.channels.Channels; import java.nio.channels.ReadableByteChannel; public class ApprovalBinaryFileWriter implements ApprovalWriter { pri...
__label__POS
0.877421
package org.approvaltests.writers; import com.spun.util.database.ResultSetWriter; import com.spun.util.io.FileUtils; import com.spun.util.velocity.ContextAware; import com.spun.util.velocity.ContextAware.ContextAwareMap; import com.spun.util.velocity.VelocityParser; import org.approvaltests.core.ApprovalWriter; impor...
__label__POS
0.773042
package com.bookstore.generator.id; import java.io.Serializable; import java.util.Properties; import org.hibernate.HibernateException; import org.hibernate.type.Type; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.id.enhanced.SequenceStyleGenerator; import org.hibernate.internal...
__label__POS
0.992373
package com.bookstore; import com.bookstore.projection.AuthorNameAge; import java.util.List; import com.bookstore.service.BookstoreService; import org.springframework.boot.ApplicationRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import ...
__label__POS
0.923325
package org.approvaltests.legacycode; import java.util.Iterator; public class IndexPermutations implements Iterable<Integer[]>, Iterator<Integer[]> { private final Integer[] sizes; private Integer[] index; private boolean finished = false; public IndexPermutations(Integer[] sizes) { this.s...
__label__POS
0.932333
package com.apress.springrecipes.court.config; import org.springframework.context.MessageSource; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.support.ResourceBundleMessageSource; import org.springframework.web.servle...
__label__POS
0.619345
using System; using System.Collections.Generic; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; namespace Commands ...
__label__POS
0.938737
package com.bookstore.projection; import java.util.Objects; public class AuthorNameAge { private String name; private int age; public AuthorNameAge(String name, int age) { this.name = name; this.age = age; } public String getName() { return name; } public vo...
__label__POS
0.994237
package org.approvaltests.legacycode; import com.spun.util.MethodExecutionPath.Parameters; import org.approvaltests.Approvals; import org.approvaltests.core.Options; import java.lang.reflect.Method; import java.util.Arrays; public class LegacyApprovals { public static void LockDown(Object call, String method, Obje...
__label__POS
0.850641
package org.approvaltests.strings; import org.lambda.functions.Function1; import java.util.ArrayList; import java.util.Arrays; public class Printable<T> { private T value; private final Function1<T, String> toString; public Printable(T value, Function1<T, String> toString) { this...
__label__POS
0.994607
package org.approvaltests.awt; import com.spun.swing.Paintable; import com.spun.util.Tuple; import org.approvaltests.core.ApprovalWriter; import org.approvaltests.writers.PaintableApprovalWriter; import org.lambda.functions.Function1; import java.awt.image.BufferedImage; import java.io.File; import java.time.Duration...
__label__POS
0.806096
package org.approvaltests.inline; import com.spun.util.ArrayUtils; import com.spun.util.StringUtils; import com.spun.util.io.FileUtils; import org.approvaltests.core.ApprovalFailureReporter; import org.approvaltests.core.ApprovalReporterWithCleanUp; import org.approvaltests.namer.StackTraceNamer; import org.lambda.fun...
__label__POS
0.805625
<%@ page contentType="text/html; charset=UTF-8" %> <%@ taglib prefix="s" uri="/struts-tags" %> <nav class="navbar navbar-inverse navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expa...
__label__POS
0.614817
package com.bookstore.config; import net.ttddyy.dsproxy.listener.logging.SLF4JLogLevel; import net.ttddyy.dsproxy.support.ProxyDataSourceBuilder; import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; import org.springframework.aop.framework.ProxyFactory; import org.spri...
__label__POS
0.799955
package org.approvaltests.inline; import com.spun.util.ArrayUtils; import java.util.regex.Matcher; import java.util.regex.Pattern; public class CodeParts { public String before; public String method; public String after; public String tab; public static CodeParts splitCode(String text, String methodName) ...
__label__POS
0.728904
<%@ taglib prefix="s" uri="/struts-tags" %> <div class='list-group'> <a href='<s:url action="a1_injection"/>' class='list-group-item'> <i class='fa fa-angle-double-right'></i> A1: Injection </a> <a href='<s:url action="a2_broken_auth"/>' class='list-group-item'> <i class='fa fa-angle-double-...
__label__POS
0.777017