id stringlengths 7 14 | text stringlengths 1 37.2k |
|---|---|
8744004_2 | @POST
@Path("/permissions")
public Response permissions(String body, @Context GraphDatabaseService db) throws IOException {
String[] splits = body.split(",");
PermissionRequest ids = new PermissionRequest(splits[0], splits[1]);
Set<String> documents = new HashSet<String>();
Set<Node> documentNodes = new... |
8750145_6 | ; |
8751650_2 | public static BpmManager newInstance() {
BpmManager bpmManager = ServiceRegistryUtil.getSingleService(BpmManager.class);
if (bpmManager == null)
throw new RuntimeException(Messages.i18n.format("WorkflowFactory.MissingBPMProvider")); //$NON-NLS-1$
return bpmManager;
} |
8752400_20 | @Override
public void setOutputBaclavaFile(String filename) throws RemoteException {
if (status != Initialized)
throw new IllegalStateException("not initializing");
if (filename != null)
outputBaclavaFile = validateFilename(filename);
else
outputBaclavaFile = null;
outputBaclava = filename;
} |
8757198_2 | public V calculate(V start, V a, V b)
{
List<LcaRequestResponse<V>> list =
new LinkedList<LcaRequestResponse<V>>();
list.add(new LcaRequestResponse<V>(a, b));
return calculate(start, list).get(0);
} |
8759133_1 | @VisibleForTesting
String[] findFilterLocations(AbstractConfiguration config) {
String[] locations = config.getStringArray("zuul.filters.locations");
if (locations == null) {
locations = new String[]{"inbound", "outbound", "endpoint"};
}
String[] filterLocations = Arrays.stream(locations)
... |
8772570_1 | @Override
public String getName()
{
return NAME;
} |
8777778_3 | void basicReject(long deliveryTag, boolean requeue) throws IOException {
Map<Long, MsgResponse> rejections = deliveryTags.subMap(deliveryTag, deliveryTag + 1);
eachChannelOnce(rejections, MsgResult.REJECT, false, requeue);
rejections.clear();
} |
8786725_102 | @Override
public void deviceLeft(NetworkDevice device) {
if (device == null || device.getNetworkDeviceName() == null || device.getNetworkDeviceType() == null) return;
// Remove what services this device has.
logger.info("Device "+device.getNetworkDeviceName()+" of type "+device.getNetworkDeviceType()+" leaving.");
... |
8791847_17 | @Override
public int size() {
return size;
} |
8794298_9 | public <T> T get(final JsonRpcClientTransport transport, final String handle, final Class<T>... classes) {
for (Class<T> clazz : classes) {
typeChecker.isValidInterface(clazz);
}
return (T) Proxy.newProxyInstance(JsonRpcInvoker.class.getClassLoader(), classes, new InvocationHandler() {
publi... |
8824082_4 | public T mapNodeProperties(final NodeRef nodeRef, final Map<QName, Serializable> properties) {
try {
T mappedObject = this.mappedClass.newInstance();
BeanWrapper bw = PropertyAccessorFactory.forBeanPropertyAccess(mappedObject);
afterBeanWrapperInitialized(bw);
for (Map.Entry<QName, PropertyDescriptor> entry ... |
8853829_0 | public double getTotal() {
double total = 0;
for (Product product : products) {
total += product.getPrice();
}
return total;
} |
8859474_6 | List<JPackage> getHierarchyPackages(List<JavaPackage> packages) {
Map<String, JPackage> pkgMap = new HashMap<>();
for (JavaPackage pkg : packages) {
addPackage(pkgMap, new JPackage(pkg, wrapper));
}
// merge packages without classes
boolean repeat;
do {
repeat = false;
for (JPackage pkg : pkgMap.values()) {... |
8903055_2 | public String getParameterName() {
return parameterName;
} |
8914350_60 | public void run() {
boolean sent = false;
boolean retried = false;
long startTS = System.currentTimeMillis();
for (int i = 0; i < config.getRetryCount(); ++i) {
ConnectionPool.SuroConnection connection = connectionPool.chooseConnection();
if (connection == null) {
continue;
... |
8920316_6 | public List<Favorite> favorites() {
List<Favorite> favorites = new ArrayList<>();
try {
Preferences forProject = preferences(false);
if (forProject != null) {
String[] s = forProject.childrenNames();
for (String ch : s) {
Preferences forFile = forProject.n... |
8967798_296 | public S getCurrent() {
S result = null;
QueryParameters params = innerGetCurrent();
try {
result = processor.toBean(params, this.type);
} catch (MjdbcException ex) {
throw new MjdbcRuntimeException(ex);
}
return result;
} |
8975145_19 | public long[] sampleNumbers(Track track, Movie movie) {
List<TimeToSampleBox.Entry> entries = track.getDecodingTimeEntries();
double trackLength = 0;
for (Track thisTrack : movie.getTracks()) {
double thisTracksLength = getDuration(thisTrack) / thisTrack.getTrackMetaData().getTimescale();
i... |
9001689_0 | @Override
public void run(boolean resume) {
for(AbstractTrivialInconsistencyFinder checker : incFinders){
//apply inverse functionality checker only if UNA is applied
if(!(checker instanceof InverseFunctionalityBasedInconsistencyFinder) || isApplyUniqueNameAssumption()){
try {
checker.run(resume);
fireN... |
9004636_25 | @Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
FellowPlayer other = (FellowPlayer) obj;
if (mId != other.mId)
return false;
if (mNickname == null)
{
if (other.mNickname != null)
return false;
} else if (!mNickname.equals(other.mNickna... |
9020655_0 | public static <T> boolean isPresent(T t){
Optional<T>optionalObj = Optional.fromNullable(t);
return optionalObj.isPresent();
} |
9025424_4 | public Entry metadata(String path, int fileLimit, String hash,
boolean list, String rev) throws DropboxException {
assertAuthenticated();
if (fileLimit <= 0) {
fileLimit = METADATA_DEFAULT_LIMIT;
}
String[] params = {
"file_limit", String.valueOf(fileLimit),
"ha... |
9028249_4 | public static void put(String path, String key, String value) {
Properties properties = getPropertiesFromPath(path);
if (null == properties) {
return;
}
properties.put(key, value);
writeProperties(path, properties);
} |
9040104_3 | public static License read(final String license) {
final String trimmedLicense = license.trim();
if (sLicenses.containsKey(trimmedLicense)) {
return sLicenses.get(trimmedLicense);
} else {
throw new IllegalStateException(String.format("no such license available: %s, did you forget to registe... |
9048042_0 | public Boolean call() {
if (!used.getAndSet(true)) {
initContext();
notYetEntered = new HashMap<JavaFileObject, JCCompilationUnit>();
compilerMain.setAPIMode(true);
// 编译器入口 com.sun.tools.javac.main.Main.compile(String[], Context, List<JavaFileObject>, Iterable<? extends Processor>)
... |
9054533_480 | public StateId createStateId(String name) {
if (createdStateIds.containsKey(name)) return createdStateIds.get(name);
if (stateIndexCounter >= activityStates[0].length) {
activityStates = new Object[nuActivities][stateIndexCounter + 1];
vehicleDependentActivityStates = new Object[nuActivities][nu... |
9064832_13 | public Iterator<DBObject> doubleUnwind() {
BasicDBObject unwindSizes = new BasicDBObject("$unwind", "$sizes");
BasicDBObject unwindColors = new BasicDBObject("$unwind", "$colors");
BasicDBObjectBuilder group = new BasicDBObjectBuilder();
group.push("$group");
group.push("_id");
group.add("size", "$sizes");
gro... |
9067712_42 | public int readSmallUint(int offset) {
byte[] buf = this.buf;
int result = (buf[offset] & 0xff) |
((buf[offset+1] & 0xff) << 8) |
((buf[offset+2] & 0xff) << 16) |
((buf[offset+3]) << 24);
if (result < 0) {
throw new ExceptionWithContext("Encountered small uint tha... |
9078409_10 | public static <T> CloseableIterator<T> limit(final CloseableIterator<T> iterator, final int limitSize) {
return wrap(Iterators.limit(iterator, limitSize), iterator);
} |
9078421_24 | public AccumuloFeatureConfig transformForClass(Class<? extends Feature> clazz) {
AccumuloFeatureConfig featureConfig = classToTransform.get(clazz);
if(featureConfig == null) {
for(Map.Entry<Class, AccumuloFeatureConfig> clazzes : classToTransform.entrySet()) {
if(clazzes.getKey().isAssignab... |
9090323_0 | public static String canonicalize(final String path) {
final int length = path.length();
int lastSlash = -1;
StringBuilder builder = null;
for (int i=0; i<length; ++i) {
char c = path.charAt(i);
if ((c == SLASH) || (i == length - 1)) {
if (i > 0) {
// neighbor... |
9120355_0 | public static String getFullName(Class c) {
if (c == null) {
throw new IllegalArgumentException("class cannot be null");
}
StringBuilder name = new StringBuilder();
name.append(c.getPackage().getName()).append(".");
Class klaus = c;
List<Class> enclosingClasses = new ArrayList<Class>();
while ((klaus = klau... |
9121658_5 | public static PrefixMapping usedPrefixes(Query query, PrefixMapping global) {
PrefixMapping local = query.getPrefixMapping();
PrefixMapping pm = global == null ? local : new PrefixMapping2(global, local);
PrefixMapping result = usedReferencePrefixes(query, pm);
return result;
} |
9143933_12 | @Override
public boolean remove(V v){
// Remove all edges related to v
Set<GraphEdge<V, E>> edges = this.connected.get(v);
if (edges == null) return false;
for(Iterator<GraphEdge<V,E>> it = edges.iterator(); it.hasNext(); ){
// Remove the edge in the list of the selected vertex
GraphEdg... |
9158616_17 | @Override
public EncounterTransaction.DrugOrder mapDrugOrder(DrugOrder openMRSDrugOrder) {
EncounterTransaction.DrugOrder drugOrder = new EncounterTransaction.DrugOrder();
drugOrder.setUuid(openMRSDrugOrder.getUuid());
if (openMRSDrugOrder.getCareSetting() != null) {
drugOrder.setCareSetting(CareSet... |
9165045_20 | @Override
public ShapePath read(Resource resource) {
checkNotNull(resource);
ShapePathImpl.ShapePathImplBuilder shapePathBuilder = ShapePathImpl.builder();
shapePathBuilder.element(resource);
shapePathBuilder.jenaPath(readPath(resource));
return shapePathBuilder.build();
} |
9178484_0 | static
public boolean validateId(String id){
return (id != null) && (id).matches(REGEX_ID);
} |
9196478_7 | @Override
public Message findByMessageId(String messageId, String messageDirection) {
Map<String,Object> fields = new HashMap<>();
fields.put("message_id",messageId);
fields.put("message_box",messageDirection);
List<Message> messages = repositoryManager.selectMessageBy(fields);
if(messages.size() > ... |
9239163_1 | @Override
public void stop(Future<Void> stopFuture) throws Exception {
classLoader = null;
parent = null;
Future<Void> future = Future.future();
future.setHandler(result -> {
// Destroy the service locator
ServiceLocatorFactory.getInstance().destroy(locator);
locator = null;
... |
9239473_13 | @Override
public Set<Class<?>> getComponents() {
Set<Class<?>> set = new HashSet<>();
ClassLoader cl = Thread.currentThread().getContextClassLoader();
Consumer<JsonArray> reader = array -> {
if (array != null && array.size() > 0) {
for (int i = 0; i < array.size(); i++) {
... |
9270640_1 | public boolean isAuthor(){
for (UserRoleType role : getRoles()) {
if (role == UserRoleType.ROLE_AUTHOR){
return true;
}
}
return false;
} |
9272141_1 | public boolean inScope() {
List<?> l = this.lists.get();
return l != null && !l.isEmpty();
} |
9272724_6 | private void rollback(MongoDatabase db, Document agg) {
CountDownLatch latch = new CountDownLatch(backupQueryForCollection.size() - 1);
Document rollbacks = new Document();
agg.append("rollback", rollbacks);
for (String s : backupQueryForCollection.keySet()) {
MongoCollection<Document> from = db... |
9283641_26 | public static StrictTransportSecurity parse(CharSequence val) {
Set<CharSequence> seqs = Strings.splitUniqueNoEmpty(';', val);
Duration maxAge = null;
EnumSet<SecurityElements> els = EnumSet.noneOf(SecurityElements.class);
for (CharSequence seq : seqs) {
seq = Strings.trim(seq);
if (seq.... |
9289335_6 | public static void main(String[] args) {
System.out.println("Executing batch");
// arg validation
if (args != null && args.length == 1 && args[0] != null) {
System.out.println("input args ok");
} else {
System.out.println("Error with input args");
throw new IllegalArgumentExcept... |
9291388_5 | public void setPinned(boolean pinned) {
setChecked(pinned);
invalidate();
} |
9294731_46 | protected Collection<SosTimeseries> getAvailableTimeseries(XmlObject result_xb,
SosTimeseries timeserie,
SOSMetadata metadata) throws XmlException, IOException {
ArrayList<SosTimeseries> timeseries = ne... |
9306260_2 | @Override
public void validate(ConfigHelper configHelper) throws RuntimeException
{
for (String propertyName : configHelper.getPropertyNames())
{
Class<?> desiredType = configHelper.getPropertyType(propertyName);
if (desiredType == null)
{
// Unreferenced property -- no typ... |
9318794_6 | @Process(actionType = FollowLogFile.class)
public void follow(final Dispatcher.Channel channel) {
if (activeLogFile == null) {
channel.nack(new IllegalStateException("Unable to follow: No active log file!"));
return;
}
navigate(new NavigateInLogFile(TAIL), channel);
activeLogFile.setFol... |
9327416_435 | public List<String> readLinks(final JsonReader reader, final EdmEntitySet entitySet) throws EntityProviderException {
List<String> links = null;
int openedObjects = 0;
try {
String nextName;
if (reader.peek() == JsonToken.BEGIN_ARRAY) {
nextName = FormatJson.RESULTS;
} else {
reader.begin... |
9327555_9 | public String downloadFaviconFromPage(String pageUrl, String directory, String fileName) {
// Try to extract the favicon URL from the page specified in the feed
String faviconUrl = null;
try {
final FaviconExtractor extractor = new FaviconExtractor(pageUrl);
new ReaderHttpClient() {
... |
9340593_0 | public Model validate(OntModel toBeValidated, String query) {
OntModel model = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM, ModelFactory.createDefaultModel());
NIFNamespaces.addRLOGPrefix(model);
model.setNsPrefix("mylog", logPrefix);
QueryExecution qe = QueryExecutionFactory.create(query, ... |
9342582_1 | @RequestMapping(value = "/profile", method = RequestMethod.GET, produces = "text/html")
public String showProfile() {
return "profile";
} |
9349244_1 | public static void stopRateDialog(final Context context){
setOptOut(context, true);
} |
9349347_3 | public static String padRight(String inputString, int size, char paddingChar) {
final String stringToPad;
if (inputString == null) {
stringToPad = "";
}
else {
stringToPad = inputString;
}
StringBuilder padded = new StringBuilder(stringToPad);
while (padded.length() < size) {
padded.append(paddingChar);... |
9349893_0 | public static String getOperatingSystem(String operatingSystemIndentifier) {
// JOptionPane.showMessageDialog(null, operatingSystemIndentifier, "Info",
// JOptionPane.ERROR_MESSAGE);
if ("linux".equalsIgnoreCase(operatingSystemIndentifier)) {
return OS_LINUX;
}
if (operatingSystemIndentifier != null && op... |
9365128_63 | @Override
public String toString() {
double valuePan = getNumber().doubleValue();
final double scaleFactor = getScaleFactor().doubleValue();
int i = getBasePower();
if (valuePan > 1.0) { // need to scale the value down
while (valuePan >= scaleFactor && i < getMaxPower()) {
valuePan = valuePan... |
9369619_41 | public ObjectMapper mapper() {
return mapper;
} |
9373411_52 | protected IdentifierData cast(Type goalType, IdentifierData oldId) throws IntermediateCodeGeneratorException {
if (oldId.getIdentifier().startsWith("#")) {
IdentifierData tmpId = icg.generateTempIdentifier(oldId.getType());
icg.addQuadruple(QuadrupleFactoryJb.generateAssignment(tmpId, oldId));
oldId = tmpId;
}
... |
9386489_21 | public String apply(String text, String logLevel) {
if (System.getProperties().containsKey(OFF_SWITCH)) {
return text;
}
boolean displayDebugInfo = showDebugInfo();
if (config == null) config = configLoader.loadConfiguration(displayDebugInfo);
String result = text;
if (displayDebugInf... |
9408774_14 | public Log defaultLogger() {
return (level, debug) ->
(level == LogLevel.ERROR ? SYS_ERR : SYS_OUT)
.print(level, debug);
} |
9431801_1 | @Override
public void executeCommand(final RunJobRequest request) {
this.request = request;
this.workflowId =
contextProvider
.getDecisionContext()
.getWorkflowContext()
.getWorkflowExecution()
.getWorkflowId();
final String masterRoleName = "dm-master-role-" + workfl... |
9434210_1 | @Override
public UriBuilder replaceQueryParam(String name, Object... values) {
checkSsp();
if (queryParams == null) {
queryParams = UriComponent.decodeQuery(query.toString(), false);
query.setLength(0);
}
name = encode(name, UriComponent.Type.QUERY_PARAM);
queryParams.remove(name);... |
9454656_0 | public String render() {
STGroupFile templateGroup = new STGroupFile(templateGroupFile);
ST template = templateGroup.getInstanceOf(templateName);
if (template == null) {
throw new IllegalStateException(
String.format(
"The template named [%s] does not exist in the template group [%s]",
templateName... |
9467906_299 | public static void notStartsWithText(String textToSearch, String substring,
String message) {
if (!StringUtils.isEmpty(textToSearch)
&& !StringUtils.isEmpty(substring)
&& textToSearch.startsWith(substring)) {
throw new IllegalArgumentException(message);
}
} |
9478484_0 | @Override public List<Issue> getIssues() {
return Arrays.asList(InjectedFieldInJobNotTransientDetector.ISSUE);
} |
9502782_0 | @Scheduled(fixedRate = 5000)
public void reportCurrentTime() {
log.info("The time is now {}", dateFormat.format(new Date()));
} |
9519880_0 | public String getHandledExceptionList() {
String webXmlPath = pathResolver.getIdentifier(
LogicalPath.getInstance(Path.SRC_MAIN_WEBAPP, ""),
WEB_MVC_CONFIG);
Validate.isTrue(fileManager.exists(webXmlPath),
WEB_MVC_CONFIG_NOT_FOUND);
MutableFile webXmlMutableFile = null;... |
9530230_2 | public Map<Integer, List<Integer>> calculateRecommendations(int reps) {
Map<Integer, List<Integer>> results = null;
for (int i = 0; i < reps; i++) {
results = lambdaRecommendations.calculateRecommendations();
}
return results;
} |
9545480_17 | public Invoker create(Object service, Invoker rootInvoker) {
List<Method> timedmethods = new ArrayList<>();
List<Method> meteredmethods = new ArrayList<>();
List<Method> exceptionmeteredmethods = new ArrayList<>();
for (Method m : service.getClass().getMethods()) {
if (m.isAnnotationPresent(T... |
9546194_0 | public String sayHello() {
return "Hello world!";
} |
9553726_84 | public static BigDecimal calculate(RateAndPeriods rateAndPeriods) {
Objects.requireNonNull(rateAndPeriods);
// (1-(1+r)^n)/1-(1+rate)
final BigDecimal ONE = CalculationContext.one();
BigDecimal div = ONE.min(ONE.add(rateAndPeriods.getRate().get()));
BigDecimal factor = ONE.subtract(ONE.add(rateAndPe... |
9577793_0 | public static Builder builder (String resource) {
return new Builder(resource);
} |
9580819_6 | @Override
public Response act(final Request req) throws IOException {
final String query = new RqHref.Smart(new RqHref.Base(req)).single(
"q", ""
);
return new RsPage(
"/xsl/inbox.xsl",
this.base,
req,
new XeAppend("bouts", this.bouts(req, query)),
new XeAppen... |
9583260_14 | @Override
public void binding(final String name, final String type) {
this.dirs.xpath(this.start).strict(1).addIf("bindings").up().xpath(
String.format(
"bindings[not(binding[name='%s' and type=%s])]",
name, XeOntology.escapeXPath(type)
)
).add("binding").add("name").set(... |
9587486_0 | public ParametricState(State state)
{
Position[] stateMemberPositionArray = state.getMemberPositions();
int memberPositionCount = stateMemberPositionArray.length;
memberPositionBoundaryOffsetArray = new int[memberPositionCount];
memberPositionEArray = new int[memberPositionCount];
memberPositio... |
9602474_1 | public String getRepositoryName() throws RepositoryException{
Session repositorySession = newSession();
try {
return repositorySession.getRepository().getDescriptor(org.modeshape.jcr.api.Repository.REPOSITORY_NAME);
} finally {
repositorySession.logout();
}
} |
9617158_0 | public static Type guessQueryType(String query) {
try {
if (query.matches("^\\d+$")) {
return Type.AUTNUM;
}
if (query.matches("^[\\d\\.:/]+$")) {
return Type.IP;
}
if (DomainName.of(query).getLevelSize() > 1) {
return Type.DOMAIN;
}
return Type.ENTITY;
} catch (Illegal... |
9619226_23 | public static List<Object> filterNamedAttributesAsList(List<?> domainObjects, String attributeName) {
List<Object> ret = new ArrayList<Object>();
for(Object object : domainObjects) {
ret.add(ReflectionUtils.callGetter(object, attributeName));
}
return ret;
} |
9634917_6 | public String getPathwayCommonsURL() {
EnrichmentMap map = emManager.getEnrichmentMap(network.getSUID());
if(map == null)
return null;
int port = Integer.parseInt(cy3props.getProperties().getProperty("rest.port"));
String pcBaseUri = propertyManager.getValue(PropertyManager.PATHWAY_COMMONS_URL);
String nodeLab... |
9650789_1 | public String getXML() {
StringBuilder retval = new StringBuilder();
retval.append( " " + XMLHandler.addTagValue( "connection", databaseMeta == null ? "" : databaseMeta.getName() ) );
retval.append( " " + XMLHandler.addTagValue( "schema", schemaName ) );
retval.append( " " + XMLHandler.addTagValue( "t... |
9657943_0 | @GET
@Produces(MediaType.APPLICATION_JSON)
public String getStats()
{
StatsManager statsManager = this.statsManager;
if (this.statsManager != null)
{
return JSONSerializer.serializeStatistics(statsManager.getStatistics()).toJSONString();
}
return new JSONObject().toJSONString();
} |
9665465_253 | @Override V getValue(int index) {
return values[index];
} |
9667687_64 | public ExecutionResult findAdminForResource( String resourceName )
{
String query = "MATCH (resource:Resource {name:{resourceName}})\n" +
"MATCH p=(resource)-[:WORKS_FOR|HAS_ACCOUNT*1..2]-(company)\n" +
" -[:CHILD_OF*0..3]->()<-[:ALLOWED_INHERIT]-()<-[:MEMBER_OF]-(admin)... |
9685461_21 | public String executePostUrl() throws IOException {
return executePostUrl("");
} |
9702026_7 | public static Path getUserIgnoreDir()
{
return getUserSubdirectory(IGNORE_DIRECTORY_NAME);
} |
9706311_22 | public Gateway select() {
return closestGateway();
} |
9708055_10 | public static List<String> parseInputStructures(String filename)
throws FileNotFoundException {
File file = new File(filename);
Scanner s = new Scanner(file);
List<String> structures = new ArrayList<String>();
while (s.hasNext()) {
String name = s.next();
if (name.startsWith("#")) {
// comment
s.nextLi... |
9713275_247 | public void markDirectoryAs(Path directory, Tag tag) {
if (!isDirectory(directory)) {
logger.warn("Directory {} not valid, aborting.", directory);
return;
}
try {
int addCount = 0;
Iterator<Path> iter = Files.newDirectoryStream(directory).iterator();
while (iter.hasNext()) {
Path current = iter.next()... |
9721255_36 | public ListenableFuture<Block> getBlock(Sha256Hash blockHash) throws IOException {
// This does not need to be locked.
log.info("Request to fetch block {}", blockHash);
GetDataMessage getdata = new GetDataMessage(params);
getdata.addBlock(blockHash);
return sendSingleGetData(getdata);
} |
9731550_14 | public int decode(InputStream iStream, boolean explicit) throws IOException {
int codeLength = 0;
if (explicit) {
codeLength += id.decodeAndCheck(iStream);
}
BerLength length = new BerLength();
codeLength += length.decode(iStream);
if (length.val < 1 || length.val > 8) {
throw new IOException("Decoded len... |
9737832_10 | public static <T> List<T> myGenerate(MySupplier<T> supplier, int count) {
List<T> result = new ArrayList<>();
for (int i = 0; i < count; i++) {
result.add(supplier.get());
}
return result;
} |
9754885_0 | public ScorePair(MatchingConfig mc) {
this.mc = mc;
vt = new VectorTable(mc);
modifiers = new ArrayList<Modifier>();
observed_vectors = new Hashtable<MatchVector, Long>();
} |
9754983_22 | public User username(String username) {
this.username = username;
return this;
} |
9755019_5 | public QualityInvestmentPlan computeInvestmentPlan(QualityAnalysis analysis, String basePackage, int investmentInMinutes) {
Multimap<Double, QualityViolation> violationsByProfit = ArrayListMultimap.create();
for (QualityViolation violation : filterViolationsByArtefactNameStartingWith(basePackage, analysis.getViolat... |
9775946_3 | public static <T> T initElements(WebDriver driver, Class<T> clazz) {
T instance = instantiatePage(driver, clazz);
return initElements(driver, instance);
} |
9779351_36 | public Token read() throws IOException, LexerException
{
int index = in_stream.getPosition();
int line = in_stream.getLine();
int col = in_stream.getCol();
int next = in_stream.peek();
if (next == -1) {
// end of stream!
throw new LexerException(in_stream.getLine(), in_stream.getCol... |
9797598_3 | public List<MultiFactorAuthenticationRequestContext> resolve(@NotNull final Authentication authentication,
@NotNull final WebApplicationService targetService) {
String authenticationMethodAttributeName = null;
final List<MultiFactorAuthenticationRequ... |
9800160_329 | @Override
public Representation createRepresentation(String cloudId, String representationName, String providerId)
throws ProviderNotExistsException, RecordNotExistsException {
Date now = new Date();
DataProvider dataProvider;
// check if data provider exists
if ((dataProvider = uis.getProvider... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.