code_tokens listlengths 2 1.68k | docstring_tokens listlengths 1 1.68k |
|---|---|
[
"<code>public",
"void",
"testMissingPrimaryKeyLookupQuery()",
"throws",
"Exception",
"{",
"indexType2TweeterDocuments();",
"final",
"Table",
"table",
"=",
"dataContext.getDefaultSchema().getTableByName(DEFAULT_TABLE_NAME);",
"<START>",
"final",
"Column[]",
"pks",
"=",
"table.getPri... | [
"public",
"void",
"testMissingPrimaryKeyLookupQuery()",
"throws",
"Exception",
"{",
"indexType2TweeterDocuments();",
"final",
"Table",
"table",
"=",
"dataContext.getDefaultSchema().getTableByName(DEFAULT_TABLE_NAME);",
"final",
"Column[]",
"primaryKeys",
"=",
"table.getPrimaryKeys().... |
[
"<code>public",
"void",
"loadJavaRDD()",
"throws",
"Exception",
"{",
"doReturn(javaPairRDD).when(sparkContext).newAPIHadoopFile(any(),",
"any(),",
"any(),",
"any(),",
"any());",
"<START>",
"doReturn(javaRDD).when(javaPairRDD).map(any());",
"<END>",
"JavaRDD<Country>",
"retJavaRDD",
"... | [
"public",
"void",
"loadJavaRDD()",
"throws",
"Exception",
"{",
"doReturn(javaPairRDD).when(sparkContext).newAPIHadoopFile(eq(\"/avro/datastore\"),",
"eq(AvroKeyInputFormat.class),",
"eq(Country.class),",
"eq(NullWritable.class),",
"any(Configuration.class));",
"doReturn(javaRDD).when(javaPairR... |
[
"<code>protected",
"AuditMessageType",
"getParticipantObjectIdentificationForRequest(PRPAIN201306UV02",
"request,",
"AssertionType",
"assertion,",
"AuditMessageType",
"auditMsg)",
"{",
"auditMsg",
"=",
"getPatientParticipantObjectIdentificationForResponse(request,",
"auditMsg);",
"try",
... | [
"protected",
"AuditMessageType",
"getParticipantObjectIdentificationForRequest(PRPAIN201306UV02",
"request,",
"AssertionType",
"assertion,",
"AuditMessageType",
"auditMsg)",
"{",
"auditMsg",
"=",
"getPatientParticipantObjectIdentificationForResponse(request,",
"auditMsg);",
"try",
"{",
... |
[
"<code>private",
"synchronized",
"void",
"addNode(DiscoveryDruidNode",
"druidNode)",
"{",
"<START>",
"DiscoveryDruidNode",
"prev",
"=",
"nodes.put(druidNode.getDruidNode().getHostAndPortToUse(),",
"druidNode);",
"<END>",
"if",
"(prev",
"==",
"null)",
"{",
"for",
"(DruidNodeDisc... | [
"private",
"void",
"addNode(DiscoveryDruidNode",
"druidNode)",
"{",
"synchronized",
"(lock)",
"{",
"DiscoveryDruidNode",
"prev",
"=",
"nodes.putIfAbsent(druidNode.getDruidNode().getHostAndPortToUse(),",
"druidNode);",
"if",
"(prev",
"==",
"null)",
"{",
"for",
"(DruidNodeDiscove... |
[
"<code>public",
"Step",
"variantsLoadStep()",
"throws",
"Exception",
"{",
"<START>",
"return",
"stepBuilderFactory.get(LOAD_VARIANTS).<Variant,",
"Variant>chunk(10)",
"<END>",
".reader(reader)",
".writer(variantMongoWriter)",
".faultTolerant().skipLimit(50).skip(FlatFileParseException.clas... | [
"public",
"Step",
"variantsLoadStep()",
"throws",
"Exception",
"{",
"return",
"stepBuilderFactory.get(LOAD_VARIANTS)",
".<Variant,",
"Variant>chunk(jobOptions.getPipelineOptions().getInt(JobParametersNames.CONFIG_CHUNK_SIZE))",
".reader(reader)",
".writer(variantMongoWriter)",
".faultToleran... |
[
"<code><START>",
"public",
"int",
"hashCode()",
"<END>",
"{",
"int",
"result",
"=",
"name",
"!=",
"null",
"?",
"name.hashCode()",
":",
"0;",
"result",
"=",
"31",
"*",
"result",
"+",
"zScore.hashCode();",
"return",
"result;",
"}</code><technical_language>Please",
"... | [
"public",
"int",
"hashCode()",
"{",
"int",
"result",
"=",
"name.hashCode();",
"result",
"=",
"31",
"*",
"result",
"+",
"zScore.hashCode();",
"return",
"result;",
"}"
] |
[
"<code>public",
"Object",
"execute(final",
"ExecutionEvent",
"event)",
"throws",
"ExecutionException",
"{",
"final",
"TaskData",
"data",
"=",
"getTaskData(event);",
"if",
"(data",
"==",
"null)",
"return",
"null;",
"Job",
"job",
"=",
"new",
"Job(MessageFormat.format(",
... | [
"public",
"Object",
"execute(final",
"ExecutionEvent",
"event)",
"throws",
"ExecutionException",
"{",
"final",
"TaskData",
"data",
"=",
"getTaskData(event);",
"if",
"(data",
"==",
"null)",
"return",
"null;",
"Job",
"job",
"=",
"new",
"Job(MessageFormat.format(",
"Mess... |
[
"<code>public",
"boolean",
"process(Set<?",
"extends",
"TypeElement>",
"annotations,",
"RoundEnvironment",
"roundEnv)",
"{",
"try",
"{",
"for",
"(Element",
"autoMountElement",
":",
"roundEnv.getElementsAnnotatedWith(SecureAutoMount.class))",
"{",
"final",
"AutoMountContext",
"c... | [
"public",
"boolean",
"process(Set<?",
"extends",
"TypeElement>",
"annotations,",
"RoundEnvironment",
"roundEnv)",
"{",
"try",
"{",
"for",
"(Element",
"autoMountElement",
":",
"roundEnv.getElementsAnnotatedWith(SecureAutoMount.class))",
"{",
"final",
"AutoMountContext",
"context... |
[
"<code><START>",
"public",
"void",
"testFrameworkProducerDelete()",
"throws",
"Exception",
"{",
"<END>",
"setupFrameworkProducer(false);",
"Exchange",
"mockExchangeCreate",
"=",
"mock(Exchange.class);",
"Exchange",
"mockExchangeDelete",
"=",
"mock(Exchange.class);",
"Message",
"m... | [
"public",
"void",
"testFrameworkProducerDelete()",
"throws",
"Exception",
"{",
"setupFrameworkProducer(false);",
"Exchange",
"mockExchangeDelete",
"=",
"mock(Exchange.class);",
"Message",
"message",
"=",
"mock(Message.class);",
"List",
"ids",
"=",
"Collections.singletonList(\"met... |
[
"<code>protected",
"void",
"onCreate(Bundle",
"savedInstanceState)",
"{",
"Log.d(TAG,",
"\"onCreate\");",
"requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);",
"requestWindowFeature(Window.FEATURE_ACTIVITY_TRANSITIONS);",
"super.onCreate(savedInstanceState);",
"PreferencesState.getInst... | [
"protected",
"void",
"onCreate(Bundle",
"savedInstanceState)",
"{",
"Log.d(TAG,",
"\"onCreate\");",
"requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);",
"requestWindowFeature(Window.FEATURE_ACTIVITY_TRANSITIONS);",
"super.onCreate(savedInstanceState);",
"PreferencesState.getInstance()... |
[
"<code>public",
"void",
"testProcessNonJavaFilesWithoutException()",
"throws",
"Exception",
"{",
"final",
"TreeWalker",
"treeWalker",
"=",
"new",
"TreeWalker();",
"treeWalker.setTabWidth(1);",
"treeWalker.configure(new",
"DefaultConfiguration(\"default",
"config\"));",
"final",
"Fi... | [
"public",
"void",
"testProcessNonJavaFilesWithoutException()",
"throws",
"Exception",
"{",
"final",
"TreeWalker",
"treeWalker",
"=",
"new",
"TreeWalker();",
"treeWalker.setTabWidth(1);",
"treeWalker.configure(new",
"DefaultConfiguration(\"default",
"config\"));",
"final",
"File",
... |
[
"<code>protected",
"void",
"executeCommand()",
"{",
"final",
"AuthenticationProfile",
"profile",
"=",
"AuthenticationProfileRepository.getInstance()",
".getProfile(getParameters().getProfileName());",
"sourceIp",
"=",
"getParameters().getSourceIp();",
"if",
"(profile",
"==",
"null)",... | [
"protected",
"void",
"executeCommand()",
"{",
"final",
"AuthenticationProfile",
"profile",
"=",
"AuthenticationProfileRepository.getInstance()",
".getProfile(getParameters().getProfileName());",
"sourceIp",
"=",
"getParameters().getSourceIp();",
"if",
"(profile",
"==",
"null)",
"{"... |
[
"<code>private",
"void",
"closeConfirmationWindow()",
"{",
"if(getConfirmWindow()",
"==",
"null)",
"{",
"return;",
"}",
"else",
"{",
"setConfirmWindow(null);",
"<START>",
"}",
"<END>",
"}</code><technical_language>do",
"setConfirmWindow(null);",
"method</technical_language>"
] | [
"private",
"void",
"closeConfirmationWindow()",
"{",
"setConfirmWindow(null);",
"}"
] |
[
"<code>public",
"void",
"queryFile1Contributors()",
"{",
"final",
"IFileHistory",
"history",
"=",
"historyProvider.getFileHistoryFor(iFile1,",
"IFileHistoryProvider.NONE,",
"new",
"NullProgressMonitor());",
"assertNotNull(history);",
"final",
"IFileRevision[]",
"revisions",
"=",
"h... | [
"public",
"void",
"queryFile1Contributors()",
"{",
"final",
"IFileHistory",
"history",
"=",
"historyProvider.getFileHistoryFor(iFile1,",
"IFileHistoryProvider.NONE,",
"new",
"NullProgressMonitor());",
"assertNotNull(history);",
"final",
"IFileRevision[]",
"revisions",
"=",
"history... |
[
"<code>protected",
"void",
"onCreate(Bundle",
"savedInstanceState)",
"{",
"super.onCreate(savedInstanceState);",
"<START>",
"finishIfNotRoot();",
"<END>",
"if",
"(savedInstanceState",
"!=",
"null)",
"{",
"wasExternal",
"=",
"savedInstanceState.getBoolean(\"was_external\");",
"}",
... | [
"protected",
"void",
"onCreate(Bundle",
"savedInstanceState)",
"{",
"super.onCreate(savedInstanceState);",
"if",
"(finishIfNotRoot())",
"{",
"return;",
"}",
"if",
"(savedInstanceState",
"!=",
"null)",
"{",
"wasExternal",
"=",
"savedInstanceState.getBoolean(\"was_external\");",
... |
[
"<code>public",
"void",
"testCheckoutExistingBranch()",
"throws",
"Exception",
"{",
"Git",
"git",
"=",
"new",
"Git(db);",
"writeTrashFile(\"a\",",
"\"Hello",
"world",
"a\");",
"git.add().addFilepattern(\".\").call();",
"git.commit().setMessage(\"commit",
"file",
"a\").call();",
... | [
"public",
"void",
"testCheckoutExistingBranch()",
"throws",
"Exception",
"{",
"Git",
"git",
"=",
"new",
"Git(db);",
"writeTrashFile(\"a\",",
"\"Hello",
"world",
"a\");",
"git.add().addFilepattern(\".\").call();",
"git.commit().setMessage(\"commit",
"file",
"a\").call();",
"git.... |
[
"<code>private",
"String",
"formRevertMessage(RevertResult",
"revertResult)",
"{",
"StringBuilder",
"message",
"=",
"new",
"StringBuilder();",
"if",
"(revertResult.getNewHead()",
"!=",
"null)",
"{",
"message.append(constant.revertedNewHead(revertResult.getNewHead()));",
"}",
"List<... | [
"private",
"String",
"formRevertMessage(RevertResult",
"revertResult)",
"{",
"StringBuilder",
"message",
"=",
"new",
"StringBuilder();",
"if",
"(revertResult.getNewHead()",
"!=",
"null)",
"{",
"message.append(constant.revertedNewHead(revertResult.getNewHead()));",
"}",
"List<String... |
[
"<code><START>",
"public",
"static",
"void",
"init(Context",
"context,",
"String",
"appDefinedUserAgent)",
"{",
"<END>",
"String",
"appId",
"=",
"\"unknown\";",
"try",
"{",
"PackageInfo",
"pi",
"=",
"context.getPackageManager().getPackageInfo(context.getPackageName(),",
"0);"... | [
"public",
"static",
"void",
"init(Context",
"context,",
"String",
"appDefinedUserAgent)",
"{",
"String",
"appId",
"=",
"\"unknown\";",
"try",
"{",
"PackageInfo",
"pi",
"=",
"context.getPackageManager().getPackageInfo(context.getPackageName(),",
"0);",
"appId",
"=",
"pi.pack... |
[
"<code>private",
"List<StoragePool>",
"searchStoragePool()",
"{",
"Optional<Version>",
"optionalVersion",
"=",
"Config.<HashSet<Version>>",
"getValue(ConfigValues.SupportedClusterLevels).stream()",
".max(Comparator.naturalOrder());",
"List<StoragePool>",
"dataCenters",
"=",
"genericSearch(... | [
"private",
"List<StoragePool>",
"searchStoragePool()",
"{",
"List<StoragePool>",
"dataCenters",
"=",
"genericSearch(storagePoolDao,",
"true);",
"dataCenters.forEach(this::setDcSingleMacPoolId);",
"setDcCompatibilityLevelUpgradeNeeded(dataCenters);",
"return",
"dataCenters;",
"}"
] |
[
"<code>public",
"boolean",
"save(final",
"Tuple<String,",
"LogicalPlan>",
"tuple){",
"final",
"LogicalPlan",
"plan",
"=",
"tuple.getValue();",
"final",
"String",
"queryId",
"=",
"tuple.getKey();",
"<START>",
"final",
"File",
"storedPlanFile=",
"new",
"File(planFolderPath",
... | [
"public",
"boolean",
"save(final",
"Tuple<String,",
"LogicalPlan>",
"tuple)",
"throws",
"IOException",
"{",
"final",
"LogicalPlan",
"plan",
"=",
"tuple.getValue();",
"final",
"String",
"queryId",
"=",
"tuple.getKey();",
"final",
"File",
"storedPlanFile=",
"new",
"File(p... |
[
"<code>public",
"void",
"onMessage(NodeRegistrationContainerReport",
"nodeRegistrationContainerReport,",
"EventPublisher",
"publisher)",
"{",
"if",
"(chillModeManager.getInChillMode())",
"{",
"if",
"(validate())",
"{",
"<START>",
"chillModeManager.validateChillModeExitRules(publisher);",... | [
"public",
"void",
"onMessage(NodeRegistrationContainerReport",
"nodeRegistrationContainerReport,",
"EventPublisher",
"publisher)",
"{",
"if",
"(chillModeManager.getInChillMode())",
"{",
"if",
"(validate())",
"{",
"return;",
"}",
"process(nodeRegistrationContainerReport);",
"if",
"(... |
[
"<code>protected",
"int",
"doWork()",
"{",
"initializeAggregationState();",
"IOUtil.assertFileIsReadable(INPUT);",
"IOUtil.assertFilesAreReadable(INTERVALS);",
"final",
"int",
"returnValue;",
"if",
"(",
"INTERVAL_ITERATOR",
")",
"{",
"returnValue",
"=",
"processDataIntervalIteratio... | [
"protected",
"int",
"doWork()",
"{",
"initializeAggregationState();",
"IOUtil.assertFileIsReadable(INPUT);",
"IOUtil.assertFileIsReadable(VCF);",
"IOUtil.assertFileIsReadable(REFERENCE_SEQUENCE);",
"IOUtil.assertFilesAreReadable(INTERVALS);",
"final",
"int",
"returnValue",
"=",
"processDat... |
[
"<code>private",
"void",
"setExecutionEnvironment(TargetPlatformConfiguration",
"result,",
"Xpp3Dom",
"configuration)",
"{",
"String",
"value",
"=",
"getStringValue(configuration.getChild(\"executionEnvironment\"));",
"if",
"(value",
"==",
"null)",
"{",
"return;",
"}",
"<START>",... | [
"private",
"void",
"setExecutionEnvironment(TargetPlatformConfiguration",
"result,",
"Xpp3Dom",
"configuration)",
"{",
"String",
"value",
"=",
"getStringValue(configuration.getChild(\"executionEnvironment\"));",
"if",
"(value",
"==",
"null)",
"{",
"return;",
"}",
"try",
"{",
... |
[
"<code>public",
"void",
"onBindEvent(BindButtonEvent",
"event)",
"{",
"if",
"(event.getState().equals(ButtonState.DOWN)",
"&&",
"!SortOrderSystem.containsConsole())",
"{",
"if",
"(event.getId().equals(new",
"SimpleUri(\"engine:tabbingModifier\")))",
"{",
"shiftPressed",
"=",
"true;",... | [
"public",
"void",
"onBindEvent(BindButtonEvent",
"event)",
"{",
"if",
"(event.getState().equals(ButtonState.DOWN)",
"&&",
"!SortOrderSystem.containsConsole())",
"{",
"if",
"(event.getId().equals(new",
"SimpleUri(\"engine:tabbingModifier\")))",
"{",
"shiftPressed",
"=",
"true;",
"}"... |
[
"<code>protected",
"boolean",
"corsRequest()",
"{",
"if",
"(!deployment.isCors())",
"return",
"false;",
"KeycloakSecurityContext",
"securityContext",
"=",
"facade.getSecurityContext();",
"String",
"origin",
"=",
"facade.getRequest().getHeader(CorsHeaders.ORIGIN);",
"String",
"expos... | [
"protected",
"boolean",
"corsRequest()",
"{",
"if",
"(!deployment.isCors())",
"return",
"false;",
"KeycloakSecurityContext",
"securityContext",
"=",
"facade.getSecurityContext();",
"String",
"origin",
"=",
"facade.getRequest().getHeader(CorsHeaders.ORIGIN);",
"String",
"exposeHeade... |
[
"<code>public",
"void",
"beforeSend(",
"ServerSession",
"session,",
"Transaction",
"tx,",
"Message",
"message,",
"boolean",
"direct,",
"boolean",
"noAutoCreateQueue)",
"{",
"try",
"{",
"if",
"(brokerMessageInterceptor",
"==",
"null)",
"{",
"BundleContext",
"bundleContext"... | [
"public",
"void",
"beforeSend(",
"ServerSession",
"session,",
"Transaction",
"tx,",
"Message",
"message,",
"boolean",
"direct,",
"boolean",
"noAutoCreateQueue)",
"{",
"try",
"{",
"if",
"(brokerMessageInterceptor",
"==",
"null)",
"{",
"BundleContext",
"bundleContext",
"=... |
[
"<code>public",
"void",
"delete()",
"throws",
"IOException,",
"InterruptedException",
"{",
"checkPermission(DELETE);",
"FolderComputation<I>",
"computation",
"=",
"getComputation();",
"Executor",
"executor",
"=",
"Executor.of(computation);",
"if",
"(executor",
"!=",
"null)",
... | [
"public",
"void",
"delete()",
"throws",
"IOException,",
"InterruptedException",
"{",
"checkPermission(DELETE);",
"FolderComputation<I>",
"computation",
"=",
"getComputation();",
"Executor",
"executor",
"=",
"Executor.of(computation);",
"if",
"(executor",
"!=",
"null)",
"{",
... |
[
"<code>private",
"void",
"refreshLocalMessageFlags(final",
"Account",
"account,",
"final",
"Folder",
"remoteFolder,",
"final",
"LocalFolder",
"localFolder,",
"ArrayList<Message>",
"syncFlagMessages,",
"final",
"AtomicInteger",
"progress,",
"final",
"int",
"todo",
")",
"throws... | [
"private",
"void",
"refreshLocalMessageFlags(final",
"Account",
"account,",
"final",
"Folder",
"remoteFolder,",
"final",
"LocalFolder",
"localFolder,",
"ArrayList<Message>",
"syncFlagMessages,",
"final",
"AtomicInteger",
"progress,",
"final",
"int",
"todo",
")",
"throws",
"... |
[
"<code>public",
"InputStream",
"getObject(String",
"bucketName,",
"String",
"objectName,",
"long",
"offset,",
"Long",
"length)",
"throws",
"InvalidBucketNameException,",
"NoSuchAlgorithmException,",
"InsufficientDataException,",
"IOException,",
"InvalidKeyException,",
"NoResponseExce... | [
"public",
"InputStream",
"getObject(String",
"bucketName,",
"String",
"objectName,",
"long",
"offset,",
"Long",
"length)",
"throws",
"InvalidBucketNameException,",
"NoSuchAlgorithmException,",
"InsufficientDataException,",
"IOException,",
"InvalidKeyException,",
"NoResponseException,... |
[
"<code>public",
"static",
"FileUtils.FileCopyResult",
"unzip(",
"final",
"ByteSource",
"byteSource,",
"final",
"File",
"outDir,",
"boolean",
"cacheLocally",
")",
"throws",
"IOException",
"{",
"<START>",
"return",
"unzip(byteSource,",
"outDir,",
"Predicates.<Throwable>alwaysTr... | [
"public",
"static",
"FileUtils.FileCopyResult",
"unzip(",
"final",
"ByteSource",
"byteSource,",
"final",
"File",
"outDir,",
"boolean",
"cacheLocally",
")",
"throws",
"IOException",
"{",
"return",
"unzip(byteSource,",
"outDir,",
"FileUtils.IS_EXCEPTION,",
"cacheLocally);",
"... |
[
"<code>public",
"PrologEnvironment",
"newPrologEnvironment()",
"throws",
"CompileException",
"{",
"<START>",
"<END>",
"PrologEnvironment",
"env;",
"if(urlLoader",
"!=",
"null)",
"{",
"env",
"=",
"envFactory.create(urlLoader);",
"return",
"env;",
"}",
"else",
"{",
"env",
... | [
"public",
"PrologEnvironment",
"newPrologEnvironment()",
"throws",
"CompileException",
"{",
"PrologEnvironment",
"env;",
"if",
"(cLoader",
"!=",
"null)",
"{",
"return",
"envFactory.create(cLoader);",
"}",
"env",
"=",
"envFactory.create(getClass().getClassLoader());",
"String",
... |
[
"<code>public",
"void",
"scheduleTask(TaskDefinition",
"task)",
"throws",
"SchedulerException",
"{",
"<START>",
"if",
"(!Context.getSchedulerService().getTaskByName(task.getName()).getStarted())",
"{",
"<END>",
"Context.getSchedulerService().scheduleTask(task);",
"}",
"}</code><technical... | [
"public",
"void",
"scheduleTask(TaskDefinition",
"task)",
"throws",
"SchedulerException",
"{",
"Context.getSchedulerService().scheduleTask(task);",
"}"
] |
[
"<code>protected",
"ImmutableList<PubsubMessage>",
"sendBatch(final",
"List<PubsubMessage>",
"batch)",
"throws",
"InterruptedException",
"{",
"final",
"int",
"batchSize",
"=",
"batch.size();",
"final",
"List<ApiFuture<String>>",
"sendResults",
"=",
"batch.stream()",
".map(publish... | [
"protected",
"ImmutableList<PubsubMessage>",
"sendBatch(final",
"List<PubsubMessage>",
"batch)",
"throws",
"InterruptedException",
"{",
"final",
"int",
"batchSize",
"=",
"batch.size();",
"final",
"List<ApiFuture<String>>",
"sendResults",
"=",
"batch.stream()",
".map(publisher::pu... |
[
"<code>public",
"String",
"validate(String",
"parameterValue,",
"ModelValidatorContext",
"context)",
"throws",
"ValidationException",
"{",
"try",
"{",
"if",
"(!isValidJSON(parameterValue))",
"{",
"<START>",
"throw",
"new",
"ValidationException(\"Expected",
"value",
"should",
... | [
"public",
"String",
"validate(String",
"parameterValue,",
"ModelValidatorContext",
"context)",
"throws",
"ValidationException",
"{",
"try",
"{",
"final",
"JsonParser",
"parser",
"=",
"new",
"ObjectMapper().getJsonFactory().createJsonParser(parameterValue);",
"while",
"(parser.nex... |
[
"<code>public",
"void",
"getVersion()",
"throws",
"Exception",
"{",
"<START>",
"String",
"version",
"=",
"gApi.config().server().getVersion();",
"<END>",
"Truth.assertThat(version).is(Version.getVersion());",
"}</code><technical_language>inlined",
"in",
"assertThat",
"statement",
"... | [
"public",
"void",
"getVersion()",
"throws",
"Exception",
"{",
"assertThat(gApi.config().server().getVersion())",
".isEqualTo(Version.getVersion());",
"}"
] |
[
"<code>public",
"HttpRequest",
"filter(HttpRequest",
"request)",
"throws",
"HttpException",
"{",
"Credentials",
"currentCreds",
"=",
"checkNotNull(creds.get(),",
"\"credential",
"supplier",
"returned",
"null\");",
"Signer",
"signer",
"=",
"Signer.getSigner();",
"String",
"sig... | [
"public",
"HttpRequest",
"filter(HttpRequest",
"request)",
"throws",
"HttpException",
"{",
"Credentials",
"currentCreds",
"=",
"checkNotNull(creds.get(),",
"\"credential",
"supplier",
"returned",
"null\");",
"Multimap<String,",
"String>",
"decodedParams",
"=",
"queryParser().ap... |
[
"<code>public",
"void",
"beforeDocumentChange(DocumentEvent",
"event)",
"{",
"Document",
"document",
"=",
"event.getDocument();",
"SPath",
"path",
"=",
"editorManager.getEditorPool().getFile(document);",
"if",
"(path",
"==",
"null)",
"{",
"VirtualFile",
"virtualFile",
"=",
... | [
"public",
"void",
"beforeDocumentChange(DocumentEvent",
"event)",
"{",
"Document",
"document",
"=",
"event.getDocument();",
"SPath",
"path",
"=",
"editorManager.getEditorPool().getFile(document);",
"if",
"(path",
"==",
"null)",
"{",
"VirtualFile",
"virtualFile",
"=",
"FileD... |
[
"<code>private",
"void",
"initialize()",
"{",
"<START>",
"Assert.isNotNull(scope,",
"\"Task",
"scope",
"should",
"not",
"be",
"null.\");",
"END>",
"events.addAll(manager.getEvents(scope));",
"try",
"{",
"ReviewTaskProvider",
"reviewTaskProvider",
"=",
"new",
"ReviewTaskProvid... | [
"private",
"void",
"initialize()",
"{",
"events.addAll(manager.getEvents(scope));",
"}"
] |
[
"<code>public",
"void",
"registerInterposedSynchronization(Synchronization",
"sync)",
"throws",
"IllegalStateException",
"{",
"try",
"{",
"Transaction",
"tx",
"=",
"transactionManager.getTransaction();",
"JCAOrderedLastSynchronizationList",
"jcaOrderedLastSynchronization",
"=",
"inte... | [
"public",
"void",
"registerInterposedSynchronization(Synchronization",
"sync)",
"throws",
"IllegalStateException",
"{",
"try",
"{",
"Transaction",
"tx",
"=",
"transactionManager.getTransaction();",
"JCAOrderedLastSynchronizationList",
"jcaOrderedLastSynchronization",
"=",
"interposed... |
[
"<code>void",
"setUp()",
"{",
"mockApplicationContext",
"=",
"mock(ApplicationContext.class);",
"mockEventStore",
"=",
"mock(EventStore.class);",
"mockRepositoryProvider",
"=",
"mock(RepositoryProvider.class);",
"executor",
"=",
"spy(new",
"MockExecutor());",
"testSubject",
"=",
... | [
"void",
"setUp()",
"{",
"mockApplicationContext",
"=",
"mock(ApplicationContext.class);",
"mockEventStore",
"=",
"mock(EventStore.class);",
"mockRepositoryProvider",
"=",
"mock(RepositoryProvider.class);",
"executor",
"=",
"spy(new",
"MockExecutor());",
"testSubject",
"=",
"new",... |
[
"<code>public",
"void",
"run()",
"{",
"try",
"(OpenShiftClient",
"client",
"=",
"clouldClientHelper.get())",
"{",
"logger.info(\"Watching",
"ConfigMap",
"in",
"namespace",
"{}\",",
"client.getNamespace());",
"try",
"(Watch",
"watchable",
"=",
"client.configMaps().watch(new",
... | [
"public",
"void",
"run()",
"{",
"try",
"(OpenShiftClient",
"client",
"=",
"clouldClientHelper.get())",
"{",
"logger.info(\"Watching",
"ConfigMap",
"in",
"namespace:",
"[{}]\",",
"client.getNamespace());",
"try",
"(Watch",
"watchable",
"=",
"client.configMaps().watch(new",
"... |
[
"<code>private",
"static",
"Integer",
"getPlatFormOffset()",
"{",
"String",
"currentOs",
"=",
"System.getProperty(\"os.name\").toLowerCase(Locale.ROOT);",
"String",
"currentJdk",
"=",
"System.getProperty(\"java.version\").toLowerCase(Locale.ROOT);",
"for",
"(int",
"i",
"=",
"0;",
... | [
"private",
"static",
"Integer",
"getPlatFormOffset()",
"{",
"ClientLogger",
"logger",
"=",
"new",
"ClientLogger(TestBase.class);",
"String",
"currentOs",
"=",
"System.getProperty(\"os.name\").toLowerCase(Locale.ROOT);",
"logger.info(\"It",
"is",
"currently",
"running",
"on",
"o... |
[
"<code>public",
"void",
"subscribeUnsubscribe()",
"throws",
"Exception",
"{",
"final",
"Postman",
"postman",
"=",
"Mockito.mock(Postman.class);",
"final",
"DyBase",
"base",
"=",
"new",
"DyBase();",
"final",
"Alias",
"alias",
"=",
"new",
"EmAlias(this.randomAlias(base),",
... | [
"public",
"void",
"subscribeUnsubscribe()",
"throws",
"Exception",
"{",
"final",
"Postman",
"postman",
"=",
"Mockito.mock(Postman.class);",
"final",
"DyBase",
"base",
"=",
"new",
"DyBase();",
"final",
"Alias",
"alias",
"=",
"new",
"EmAlias(this.getAlias(base,",
"26,",
... |
[
"<code>private",
"void",
"testCopyQuestion()",
"throws",
"Exception",
"{",
"______TS(\"Success",
"case:",
"copy",
"questions",
"successfully\");",
"feedbackEditPage.clickCopyButton();",
"feedbackEditPage.waitForCopyTableToLoad();",
"assertFalse(\"Unable",
"to",
"submit",
"when",
"t... | [
"private",
"void",
"testCopyQuestion()",
"throws",
"Exception",
"{",
"______TS(\"Success",
"case:",
"copy",
"questions",
"successfully\");",
"feedbackEditPage.clickCopyButton();",
"feedbackEditPage.waitForCopyTableToLoad();",
"assertFalse(\"Unable",
"to",
"submit",
"when",
"there",... |
[
"<code>public",
"Ban.Builder",
"profile(org.spongepowered.api.profile.GameProfile",
"profile)",
"{",
"checkNotNull(profile,",
"\"Profile",
"cannot",
"be",
"null!\");",
"<START>",
"checkState(banType",
"==",
"BanTypes.PROFILE,",
"\"Cannot",
"set",
"a",
"GameProfile",
"if",
"the"... | [
"public",
"Ban.Builder",
"profile(org.spongepowered.api.profile.GameProfile",
"profile)",
"{",
"checkNotNull(profile,",
"\"Profile",
"cannot",
"be",
"null!\");",
"checkState(banType",
"==",
"BanTypes.PROFILE,",
"\"Cannot",
"set",
"a",
"GameProfile",
"if",
"the",
"BanType",
"i... |
[
"<code>public",
"void",
"removeListener()",
"{",
"View",
"view",
"=",
"getView();",
"if",
"(view",
"!=",
"null)",
"{",
"getDiagramEventBroker().removeNotificationListener(view,",
"this);",
"if",
"(hostSemanticElement",
"!=",
"null)",
"{",
"for",
"(EObject",
"stereotypeApp... | [
"public",
"void",
"removeListener()",
"{",
"View",
"view",
"=",
"getView();",
"if",
"(null",
"!=",
"view)",
"{",
"getDiagramEventBroker().removeNotificationListener(view,",
"this);",
"if",
"(null",
"!=",
"hostSemanticElement)",
"{",
"for",
"(EObject",
"stereotypeApplicati... |
[
"<code>protected",
"void",
"reinitAllDatabases()",
"throws",
"IOException",
"{",
"boolean",
"acquired",
"=",
"false;",
"try",
"{",
"semaphore.acquire(Integer.MAX_VALUE);",
"acquired",
"=",
"true;",
"try",
"{",
"db.close();",
"}",
"catch",
"(IOException",
"e)",
"{",
"l... | [
"protected",
"void",
"reinitAllDatabases()",
"throws",
"IOException",
"{",
"try",
"{",
"semaphore.acquire(Integer.MAX_VALUE);",
"}",
"catch",
"(InterruptedException",
"e)",
"{",
"throw",
"new",
"PersistenceException(\"Cannot",
"acquire",
"semaphore\",",
"e);",
"}",
"try",
... |
[
"<code>public",
"MatchClause",
"append(Filter",
"filter)",
"{",
"if",
"(clause",
"==",
"null)",
"{",
"clause",
"=",
"new",
"StringBuilder(\"MATCH",
"(n)\");",
"<START>",
"if",
"(filter.getRelationshipDirection().equals(Direction.INCOMING))",
"{",
"<END>",
"clause.append(\"<\"... | [
"public",
"MatchClause",
"append(Filter",
"filter)",
"{",
"if",
"(clause",
"==",
"null)",
"{",
"clause",
"=",
"new",
"StringBuilder(\"MATCH",
"(n)\");",
"if",
"(filter.getRelationshipDirection()",
"==",
"Direction.INCOMING)",
"{",
"clause.append(\"<\");",
"}",
"clause.app... |
[
"<code>public",
"static",
"AdjustableSweepBatchConfigSource",
"create(",
"MetricsManager",
"metricsManager,",
"Supplier<SweepBatchConfig>",
"rawSweepBatchConfig)",
"{",
"AdjustableSweepBatchConfigSource",
"configSource",
"=",
"new",
"AdjustableSweepBatchConfigSource(rawSweepBatchConfig);",... | [
"public",
"static",
"AdjustableSweepBatchConfigSource",
"create(",
"MetricsManager",
"metricsManager,",
"Supplier<SweepBatchConfig>",
"rawSweepBatchConfig)",
"{",
"AdjustableSweepBatchConfigSource",
"configSource",
"=",
"new",
"AdjustableSweepBatchConfigSource(rawSweepBatchConfig);",
"Ga... |
[
"<code>public",
"void",
"configure(Binder",
"binder)",
"{",
"JsonConfigProvider.bind(binder,",
"\"druid.metadata.storage.tables\",",
"MetadataStorageTablesConfig.class);",
"JsonConfigProvider.bind(binder,",
"\"druid.metadata.storage.connector\",",
"MetadataStorageConnectorConfig.class);",
"Jso... | [
"public",
"void",
"configure(Binder",
"binder)",
"{",
"JsonConfigProvider.bind(binder,",
"\"druid.metadata.storage.tables\",",
"MetadataStorageTablesConfig.class);",
"JsonConfigProvider.bind(binder,",
"\"druid.metadata.storage.connector\",",
"MetadataStorageConnectorConfig.class);",
"JsonConfi... |
[
"<code><START>",
"public",
"void",
"testMigrationTask()",
"throws",
"InterruptedException",
"{",
"<END>",
"MigrationTask",
"migrationTask",
"=",
"new",
"MigrationTask(project);",
"migrationTask.start();",
"Assert.assertTrue(migrationTask.isAlive());",
"migrationTask.join();",
"Assert... | [
"public",
"void",
"testMigrationTask()",
"throws",
"Exception",
"{",
"MigrationTask",
"migrationTask",
"=",
"new",
"MigrationTask(project);",
"Field",
"dataEditorServiceField",
"=",
"ServiceManager.class.getDeclaredField(\"dataEditorService\");",
"dataEditorServiceField.setAccessible(t... |
[
"<code>protected",
"Object",
"toNSCollection(ERXRestFormat.Delegate",
"delegate,",
"NSMutableDictionary<Object,",
"Object>",
"associatedObjects)",
"{",
"Object",
"result",
"=",
"associatedObjects.get(_associatedObject);",
"if",
"(result",
"==",
"null)",
"{",
"if",
"(delegate",
... | [
"protected",
"Object",
"toNSCollection(ERXRestFormat.Delegate",
"delegate,",
"NSMutableDictionary<Object,",
"Object>",
"associatedObjects)",
"{",
"Object",
"result",
"=",
"associatedObjects.get(_associatedObject);",
"if",
"(result",
"==",
"null)",
"{",
"if",
"(delegate",
"!=",
... |
[
"<code>public",
"User",
"addUserToProject(final",
"Project",
"project,",
"final",
"Account",
"account,",
"final",
"Role...",
"userRoles)",
"{",
"notNull(project,",
"\"project\");",
"notNull(account,",
"\"account\");",
"notEmpty(account.getUri(),",
"\"account.uri\");",
"notNull(us... | [
"public",
"User",
"addUserToProject(final",
"Project",
"project,",
"final",
"Account",
"account,",
"final",
"Role...",
"userRoles)",
"{",
"notNull(project,",
"\"project\");",
"notNull(account,",
"\"account\");",
"notEmpty(account.getUri(),",
"\"account.uri\");",
"notNull(userRole... |
[
"<code>public",
"void",
"testDeadlock()",
"throws",
"Exception",
"{",
"doTest(1000",
"*",
"30);",
"boolean",
"<START>",
"interrupted",
"=",
"<END>",
"Thread.interrupted();",
"if",
"(interrupted)",
"{",
"fail(\"Thread",
"was",
"interrupted",
"at",
"end",
"of",
"test\")... | [
"public",
"void",
"testDeadlock()",
"throws",
"Exception",
"{",
"doTest(1000",
"*",
"30);",
"if",
"(Thread.interrupted())",
"{",
"fail(\"Thread",
"was",
"interrupted",
"at",
"end",
"of",
"test\");",
"}",
"}"
] |
[
"<code>public",
"void",
"makeSortable()",
"{",
"final",
"Map<ImageResource,",
"Integer>",
"imageWeightMap",
"=",
"new",
"HashMap<ImageResource,",
"Integer>();",
"imageWeightMap.put(statusCell.upImage,",
"0);",
"imageWeightMap.put(statusCell.volumeSomeBricksDownImage,",
"1);",
"imageW... | [
"public",
"void",
"makeSortable()",
"{",
"makeSortable(new",
"Comparator<GlusterVolumeEntity>()",
"{",
"private",
"final",
"CustomStatusImageComaparator",
"imageComparator",
"=",
"new",
"CustomStatusImageComaparator();",
"@Override",
"public",
"int",
"compare(GlusterVolumeEntity",
... |
[
"<code>public",
"GoldenEgg(UUID",
"ownerId,",
"CardSetInfo",
"setInfo)",
"{",
"super(ownerId,",
"setInfo,",
"new",
"CardType[]{CardType.ARTIFACT},",
"\"{2}\");",
"this.subtype.add(SubType.FOOD);",
"this.addAbility(new",
"EntersBattlefieldTriggeredAbility(new",
"DrawCardSourceControllerEf... | [
"public",
"GoldenEgg(UUID",
"ownerId,",
"CardSetInfo",
"setInfo)",
"{",
"super(ownerId,",
"setInfo,",
"new",
"CardType[]{CardType.ARTIFACT},",
"\"{2}\");",
"this.subtype.add(SubType.FOOD);",
"this.addAbility(new",
"EntersBattlefieldTriggeredAbility(new",
"DrawCardSourceControllerEffect(1... |
[
"<code>public",
"void",
"unparse(SqlWriter",
"writer,",
"int",
"leftPrec,",
"int",
"rightPrec)",
"{",
"writer.keyword(\"CREATE\");",
"if",
"(isTemporary())",
"{",
"writer.keyword(\"TEMPORARY\");",
"}",
"<START>",
"if",
"(getReplace())",
"{",
"writer.keyword(\"OR",
"REPLACE\")... | [
"public",
"void",
"unparse(SqlWriter",
"writer,",
"int",
"leftPrec,",
"int",
"rightPrec)",
"{",
"writer.keyword(\"CREATE\");",
"if",
"(isTemporary())",
"{",
"writer.keyword(\"TEMPORARY\");",
"}",
"writer.keyword(\"VIEW\");",
"if",
"(isIfNotExists())",
"{",
"writer.keyword(\"IF"... |
[
"<code>public",
"void",
"testValidCRAMFileWithoutSeqDict()",
"throws",
"Exception",
"{",
"final",
"SamReader",
"samReader",
"=",
"SamReaderFactory.",
"makeDefault().",
"validationStringency(ValidationStringency.SILENT).",
"referenceSequence(new",
"File(TEST_DATA_DIR,",
"\"nm_tag_valida... | [
"public",
"void",
"testValidCRAMFileWithoutSeqDict()",
"throws",
"Exception",
"{",
"final",
"File",
"reference",
"=",
"new",
"File(TEST_DATA_DIR,",
"\"nm_tag_validation.fa\");",
"final",
"SamReader",
"samReader",
"=",
"SamReaderFactory",
".makeDefault()",
".validationStringency... |
[
"<code>public",
"void",
"cleanup()",
"{",
"if",
"(model",
"!=",
"null)",
"{",
"model.cleanup();",
"model",
"=",
"null;",
"}",
"<START>",
"if",
"(modelItems",
"!=",
"null)",
"{",
"for",
"(T",
"model:",
"modelItems)",
"{",
"if",
"(model",
"instanceof",
"HasClean... | [
"public",
"void",
"cleanup()",
"{",
"if",
"(model",
"!=",
"null)",
"{",
"model.cleanup();",
"model",
"=",
"null;",
"}",
"cleanupModelItems();",
"for",
"(Pair<T,",
"V>",
"item",
":",
"items)",
"{",
"T",
"value",
"=",
"item.getFirst();",
"if",
"(!isGhost(value))",... |
[
"<code>public",
"String",
"get(String",
"name)",
"{",
"<START>",
"return",
"(isSet(name))",
"?",
"myRecord.get(name)",
":",
"new",
"String();",
"<END>",
"}</code><technical_language>return",
"\"\"",
"instead",
"of",
"new",
"String()</technical_language>"
] | [
"public",
"String",
"get(String",
"name)",
"{",
"return",
"(isSet(name))",
"?",
"myRecord.get(name)",
":",
"\"\";",
"}"
] |
[
"<code>private",
"void",
"updateMutePreviewOverlayVisibility()",
"{",
"mutePreviewOverlay.setVisibility(",
"<START>",
"showMuteOverlayOnVideoCall()",
"&&",
"muteButton.isChecked()",
"&&",
"!isInGreenScreenMode",
"<END>",
"?",
"View.VISIBLE",
":",
"View.GONE);",
"}</code><technical_la... | [
"private",
"void",
"updateMutePreviewOverlayVisibility()",
"{",
"int",
"mutePreviewOverlayVisibility",
"=",
"showMuteOverlayOnVideoCall()",
"&&",
"muteButton.isChecked()",
"&&",
"!isInGreenScreenMode",
"?",
"View.VISIBLE",
":",
"View.GONE;",
"mutePreviewOverlay.setVisibility(mutePrev... |
[
"<code>public",
"void",
"resetAllResponses()",
"{",
"for",
"(FeedbackQuestionAttributes",
"question",
":",
"questionResponseBundle.keySet())",
"{",
"<START>",
"questionResponseBundle.putIfAbsent(question,",
"new",
"ArrayList<>());",
"<END>",
"}",
"}</code><technical_language>emmmm",
... | [
"public",
"void",
"resetAllResponses()",
"{",
"for",
"(FeedbackQuestionAttributes",
"question",
":",
"questionResponseBundle.keySet())",
"{",
"questionResponseBundle.put(question,",
"new",
"ArrayList<FeedbackResponseAttributes>());",
"}",
"}"
] |
[
"<code>protected",
"URLConnection",
"getExternalGraphic(AjaxRequestTarget",
"target,",
"Form<?>",
"form)",
"{",
"onlineResource.processInput();",
"if",
"(onlineResource.getModelObject()",
"!=",
"null)",
"{",
"URL",
"url",
"=",
"null;",
"try",
"{",
"String",
"baseUrl",
"=",
... | [
"protected",
"URLConnection",
"getExternalGraphic(AjaxRequestTarget",
"target,",
"Form<?>",
"form)",
"{",
"onlineResource.processInput();",
"if",
"(onlineResource.getModelObject()",
"!=",
"null)",
"{",
"URL",
"url",
"=",
"null;",
"try",
"{",
"String",
"baseUrl",
"=",
"bas... |
[
"<code>private",
"void",
"loadButtonAction(ActionEvent",
"e)",
"{",
"progressDialog",
"=",
"new",
"ProgressDialog(list.getParent());",
"if",
"(dbpath",
"==",
"SELECT_OPTION)",
"{",
"<START>",
"File",
"dir",
"=",
"selectDirectory();",
"<END>",
"if",
"(dir",
"==",
"null)"... | [
"private",
"void",
"loadButtonAction(ActionEvent",
"e)",
"{",
"loadDB();",
"}"
] |
[
"<code>public",
"Single<String>",
"getP18ForItem(String",
"entityId)",
"{",
"return",
"depictsInterface.getLabelForEntity(entityId)",
".map(response",
"->",
"{",
"String",
"name;",
"try",
"{",
"JsonObject",
"claims",
"=",
"response.getAsJsonObject(\"claims\").getAsJsonObject();",
... | [
"public",
"Single<String>",
"getP18ForItem(String",
"entityId)",
"{",
"return",
"depictsInterface.getImageForEntity(entityId)",
".map(commonsFilename",
"->",
"{",
"String",
"name;",
"try",
"{",
"JsonObject",
"claims",
"=",
"commonsFilename.getAsJsonObject(\"claims\").getAsJsonObjec... |
[
"<code>public",
"String",
"getServerState()",
"{",
"this.officeServer.refreshState();",
"<START>",
"return",
"contextualLocalizationManager.getTranslationPlain(",
"<END>",
"TRANSLATION_KEY_SERVER_STATE_PREFIX",
"+",
"this.officeServer.getState().name().toLowerCase());",
"}</code><technical_l... | [
"public",
"String",
"getServerState()",
"{",
"this.officeServer.refreshState();",
"String",
"normalizedStatusKey",
"=",
"CaseUtils.toCamelCase(this.officeServer.getState().name().toLowerCase(),",
"false,",
"'_');",
"return",
"this.contextualLocalizationManager",
".getTranslationPlain(TRANS... |
[
"<code>public",
"void",
"visitToken(DetailAST",
"token)",
"{",
"switch",
"(token.getType())",
"{",
"<START>",
"case",
"TokenTypes.INTERFACE_DEF:",
"<END>",
"checkServiceInterface(token);",
"break;",
"default:",
"break;",
"}",
"}</code><technical_language>is",
"case",
"here.",
... | [
"public",
"void",
"visitToken(DetailAST",
"token)",
"{",
"if",
"(token.getType()",
"==",
"TokenTypes.INTERFACE_DEF)",
"{",
"checkServiceInterface(token);",
"}",
"}"
] |
[
"<code>public",
"DeCoupleMBusDeviceCommandExecutor()",
"{",
"<START>",
"super(MbusChannelElementsDto.class);",
"<END>",
"}</code><technical_language>class",
"passed",
"super",
"constructor",
"MbusChannelElementsDto.",
"I",
"cleanest",
"pass",
"DecoupleMbusDto.class",
"(and",
"Decoupl... | [
"public",
"DeCoupleMBusDeviceCommandExecutor()",
"{",
"super(DeCoupleMbusDeviceDto.class);",
"}"
] |
[
"<code>public",
"ServerWebSocketInitializer(final",
"ServerInfo",
"serverInfo)",
"{",
"<START>",
"LOG.info(\"Currently",
"time",
"out",
"time",
"is",
"not",
"used",
"\"",
"+",
"serverInfo.getTimeOut());",
"<END>",
"this.serverInfo",
"=",
"serverInfo;",
"connectionServer",
"... | [
"public",
"ServerWebSocketInitializer(final",
"ServerInfo",
"serverInfo)",
"{",
"LOG.info(\"Currently",
"time",
"out",
"time",
"is",
"not",
"used:",
"\"",
"+",
"serverInfo.getTimeOut());",
"this.serverInfo",
"=",
"serverInfo;",
"connectionServer",
"=",
"createServerSocket();"... |
[
"<code>public",
"ArrayList<OncoTreeNode>",
"getOncoTree(Version",
"version)",
"throws",
"TopBraidException",
"{",
"<START>",
"ArrayList<OncoTreeNode>",
"list",
"=",
"new",
"ArrayList<OncoTreeNode>(super.query(String.format(query,",
"version.getGraphURI()),",
"new",
"ParameterizedTypeRe... | [
"public",
"ArrayList<OncoTreeNode>",
"getOncoTree(Version",
"version)",
"throws",
"TopBraidException",
"{",
"return",
"new",
"ArrayList<OncoTreeNode>(super.query(String.format(query,",
"version.getGraphURI()),",
"new",
"ParameterizedTypeReference<List<OncoTreeNode>>(){}));",
"}"
] |
[
"<code>public",
"void",
"doSample()",
"{",
"<START>",
"sendData(pm.isScreenOn()?\"on\":\"off\");",
"<END>",
"}</code><technical_language>@orhan89",
"while",
"add",
"it,",
"do",
"a",
"API",
"version",
"check",
"isInteractive()",
"if",
"available?<LINK_0></technical_language>"
] | [
"public",
"void",
"doSample()",
"{",
"boolean",
"isScreenActive;",
"if",
"(Build.VERSION.SDK_INT",
">=",
"Build.VERSION_CODES.KITKAT_WATCH)",
"{",
"isScreenActive",
"=",
"pm.isInteractive();",
"}",
"else",
"{",
"isScreenActive",
"=",
"pm.isScreenOn();",
"}",
"sendData(isScr... |
[
"<code><START>",
"public",
"Configuration",
"setDefaults(Configuration",
"defaults)",
"<END>",
"{",
"this.defaults",
"=",
"defaults;",
"return",
"this;",
"}</code><technical_language>I",
"suggest",
"check",
"defaults",
"!=",
"this",
"setting</technical_language>"
] | [
"public",
"Configuration",
"setDefaults(Configuration",
"defaults)",
"{",
"if",
"(",
"defaults",
"==",
"this",
")",
"{",
"throw",
"new",
"IllegalArgumentException(",
"\"Can't",
"set",
"self",
"as",
"defaults\"",
");",
"}",
"this.defaults",
"=",
"defaults;",
"return"... |
[
"<code>public",
"void",
"refreshMetadata(String",
"username)",
"{",
"if",
"(mNosaraClient",
"==",
"null)",
"{",
"return;",
"}",
"if",
"(!TextUtils.isEmpty(username))",
"{",
"mUserName",
"=",
"username;",
"if",
"(getAnonID()",
"!=",
"null)",
"{",
"<START>",
"mNosaraCli... | [
"public",
"void",
"refreshMetadata(String",
"username)",
"{",
"if",
"(mNosaraClient",
"==",
"null)",
"{",
"return;",
"}",
"if",
"(!TextUtils.isEmpty(username))",
"{",
"mUserName",
"=",
"username;",
"if",
"(getAnonID()",
"!=",
"null)",
"{",
"mNosaraClient.trackAliasUser(... |
[
"<code>private",
"void",
"removeHiddenInstructors(FeedbackQuestionAttributes",
"question,",
"List<FeedbackResponseAttributes>",
"responses,",
"Map<String,",
"String>",
"recipients,",
"Set<String>",
"hiddenInstructorEmails)",
"{",
"<START>",
"boolean",
"noChangeRequired",
"=",
"hidden... | [
"private",
"void",
"removeHiddenInstructors(FeedbackQuestionAttributes",
"question,",
"List<FeedbackResponseAttributes>",
"responses,",
"Map<String,",
"String>",
"recipients,",
"Set<String>",
"hiddenInstructorEmails)",
"{",
"boolean",
"isNoChangeRequired",
"=",
"hiddenInstructorEmails"... |
[
"<code>private",
"void",
"cancelUpload(int",
"localMediaId)",
"{",
"if",
"(mCurrentUpload",
"!=",
"null",
"&&",
"mCurrentUpload.getId()",
"==",
"localMediaId)",
"{",
"cancelCurrentUpload();",
"}",
"for(Iterator<MediaModel>",
"i",
"=",
"mQueue.iterator();",
"i.hasNext();)",
... | [
"private",
"void",
"cancelUpload(int",
"localMediaId)",
"{",
"if",
"(mCurrentUpload",
"!=",
"null",
"&&",
"mCurrentUpload.getId()",
"==",
"localMediaId)",
"{",
"cancelCurrentUpload();",
"}",
"for(Iterator<MediaModel>",
"i",
"=",
"mUploadQueue.iterator();",
"i.hasNext();)",
... |
[
"<code>MergingUpdater(AbstractTripleStore",
"database)",
"{",
"this.database",
"=",
"database;",
"String",
"property",
"=",
"<START>",
"System.getProperty(\"outputDumps\");",
"<END>",
"outputDumps",
"=",
"Boolean.TRUE.toString().equals(property);",
"id",
"=",
"UUID.randomUUID().toS... | [
"MergingUpdater(AbstractTripleStore",
"database)",
"{",
"this(database,",
"false);",
"}"
] |
[
"<code><START>",
"protected",
"org.spine3.server.storage.EventStorage",
"createStorage(StorageFactory",
"factory)",
"{",
"<END>",
"final",
"RecordStorage<EventId>",
"recordStorage",
"=",
"super.createStorage(factory);",
"final",
"org.spine3.server.storage.EventStorage",
"storage",
"=",... | [
"protected",
"EventRecordStorage",
"createStorage(StorageFactory",
"factory)",
"{",
"final",
"RecordStorage<EventId>",
"recordStorage",
"=",
"super.createStorage(factory);",
"final",
"EventRecordStorage",
"storage",
"=",
"factory.createEventStorage(recordStorage);",
"return",
"storag... |
[
"<code>public",
"int",
"getLength()",
"{",
"Widget",
"widget",
"=",
"getWidget();",
"int",
"childCount",
"=",
"0;",
"if",
"(widget",
"instanceof",
"Composite)",
"{",
"childCount",
"=",
"((Composite)",
"widget).getChildren().length;",
"if",
"(widget",
"instanceof",
"CT... | [
"public",
"int",
"getLength()",
"{",
"Widget",
"widget",
"=",
"getWidget();",
"int",
"childCount",
"=",
"0;",
"if",
"(widget",
"instanceof",
"Composite)",
"{",
"childCount",
"=",
"((Composite)",
"widget).getChildren().length;",
"if",
"(widget",
"instanceof",
"CTabFold... |
[
"<code>static",
"org.ovirt.engine.core.common.businessentities.VM",
"setUpEntityExpectations(",
"org.ovirt.engine.core.common.businessentities.VM",
"entity,",
"VmStatistics",
"statistics,",
"int",
"index)",
"{",
"expect(entity.getId()).andReturn(GUIDS[index]).anyTimes();",
"expect(entity.getvd... | [
"static",
"org.ovirt.engine.core.common.businessentities.VM",
"setUpEntityExpectations(",
"org.ovirt.engine.core.common.businessentities.VM",
"entity,",
"VmStatistics",
"statistics,",
"int",
"index)",
"{",
"expect(entity.getId()).andReturn(GUIDS[index]).anyTimes();",
"expect(entity.getvds_grou... |
[
"<code>public",
"List<String>",
"getDirectory()",
"throws",
"OwException",
"{",
"List<String>",
"directory",
"=",
"new",
"ArrayList<String>();",
"OwserverPacket",
"requestPacket",
"=",
"new",
"OwserverPacket(OwserverMessageType.DIR,",
"\"/\");",
"write(requestPacket);",
"Owserver... | [
"public",
"List<String>",
"getDirectory()",
"throws",
"OwException",
"{",
"List<String>",
"directory",
"=",
"new",
"ArrayList<String>();",
"OwserverPacket",
"requestPacket",
"=",
"new",
"OwserverPacket(OwserverMessageType.DIR,",
"\"/\");",
"write(requestPacket);",
"OwserverPacket... |
[
"<code>public",
"void",
"start()",
"throws",
"Exception",
"{",
"synchronized",
"(lock)",
"{",
"if",
"(childrenCache",
"!=",
"null)",
"{",
"return;",
"}",
"childrenCache",
"=",
"cacheFactory.make(curatorFramework,",
"config.getContainerPath());",
"}",
"ContainerCacheListener... | [
"public",
"void",
"start()",
"throws",
"Exception",
"{",
"synchronized",
"(lock)",
"{",
"if",
"(childrenCache",
"!=",
"null)",
"{",
"return;",
"}",
"childrenCache",
"=",
"cacheFactory.make(curatorFramework,",
"config.getContainerPath());",
"}",
"ContainerCacheListener",
"... |
[
"<code>public",
"void",
"testDoubletonFlatbush()",
"{",
"<START>",
"List<Rectangle>",
"items",
"=",
"new",
"ArrayList<>();",
"<END>",
"Rectangle",
"rect0",
"=",
"new",
"Rectangle(1,",
"1,",
"1,",
"1);",
"items.add(rect0);",
"Rectangle",
"rect1",
"=",
"new",
"Rectangle... | [
"public",
"void",
"testDoubletonFlatbush()",
"{",
"Rectangle",
"rect0",
"=",
"new",
"Rectangle(1,",
"1,",
"1,",
"1);",
"Rectangle",
"rect1",
"=",
"new",
"Rectangle(-1,",
"-2,",
"-1,",
"-1);",
"List<Rectangle>",
"items",
"=",
"ImmutableList.of(rect0,",
"rect1);",
"Fl... |
[
"<code>public",
"void",
"onDeniedPendingLockNotification()",
"{",
"synchronized",
"(ZKDistributedNonblockingLock.this)",
"{",
"<START>",
"_isLocked",
"=",
"false;",
"<END>",
"_isPreempted",
"=",
"true;",
"_isPending",
"=",
"false;",
"ZKDistributedNonblockingLock.this.notify();",
... | [
"public",
"void",
"onDeniedPendingLockNotification()",
"{",
"_lockStatus",
"=",
"LockConstants.LockStatus.PREEMPTED;",
"_countDownLatch.countDown();",
"}"
] |
[
"<code>public",
"void",
"generateExperimentalCoordinates(Vector2d",
"firstBondVector)",
"throws",
"CDKException",
"{",
"IMolecule",
"original",
"=",
"molecule;",
"IMolecule",
"shallowCopy",
"=",
"molecule.getBuilder().newInstance(IMolecule.class,molecule);",
"for",
"(IAtom",
"curAt... | [
"public",
"void",
"generateExperimentalCoordinates(Vector2d",
"firstBondVector)",
"throws",
"CDKException",
"{",
"IMolecule",
"original",
"=",
"molecule;",
"IMolecule",
"shallowCopy",
"=",
"molecule.getBuilder().newInstance(IMolecule.class,molecule);",
"Map<IAtom,Integer>",
"single_h... |
[
"<code>private",
"String",
"createBuildsStats(MemoryImprint",
"memoryImprint,",
"TaskListener",
"listener,",
"Map<String,",
"String>",
"parameters)",
"{",
"StringBuilder",
"str",
"=",
"new",
"StringBuilder(\"\");",
"final",
"String",
"rootUrl",
"=",
"hudson.getRootUrl();",
"S... | [
"private",
"String",
"createBuildsStats(MemoryImprint",
"memoryImprint,",
"TaskListener",
"listener,",
"Map<String,",
"String>",
"parameters)",
"{",
"StringBuilder",
"str",
"=",
"new",
"StringBuilder(\"\");",
"final",
"String",
"rootUrl",
"=",
"hudson.getRootUrl();",
"String"... |
[
"<code>public",
"void",
"visitNode(Tree",
"tree)",
"{",
"if",
"(tree.is(Kind.METHOD)",
"&&",
"isServletInit((MethodTree)",
"tree))",
"{",
"tree.accept(new",
"AssignmentVisitor());",
"}",
"else",
"if",
"(tree.is(Kind.VARIABLE))",
"{",
"VariableTree",
"variable",
"=",
"(Varia... | [
"public",
"void",
"visitNode(Tree",
"tree)",
"{",
"if",
"(tree.is(Kind.METHOD)",
"&&",
"isServletInit((MethodTree)",
"tree))",
"{",
"tree.accept(new",
"AssignmentVisitor());",
"}",
"else",
"if",
"(tree.is(Kind.VARIABLE))",
"{",
"VariableTree",
"variable",
"=",
"(VariableTre... |
[
"<code>public",
"void",
"shouldNotExpireChargesWhenAwaitingCaptureDelayIsLessThan48Hours()",
"{",
"<START>",
"String",
"extChargeId1",
"=",
"addCharge(CREATED,",
"\"ref\",",
"ZonedDateTime.now().minusMinutes(90),",
"RandomIdGenerator.newId());",
"<END>",
"String",
"extChargeId2",
"=",
... | [
"public",
"void",
"shouldNotExpireChargesWhenAwaitingCaptureDelayIsLessThan48Hours()",
"{",
"String",
"chargeToBeExpiredCreatedStatus",
"=",
"addCharge(CREATED,",
"\"ref\",",
"ZonedDateTime.now().minusMinutes(90),",
"RandomIdGenerator.newId());",
"String",
"chargeToBeExpiredAwaitingCaptureRe... |
[
"<code>public",
"void",
"updateSource(TaskSource",
"sourceUpdate)",
"{",
"checkLockNotHeld(\"Can",
"not",
"update",
"sources",
"while",
"holding",
"the",
"driver",
"lock\");",
"<START>",
"checkArgument(sourceOperator.isPresent()",
"&&",
"sourceOperator.get().getSourceId().equals(so... | [
"public",
"void",
"updateSource(TaskSource",
"sourceUpdate)",
"{",
"checkState(initialized.get(),",
"\"Driver",
"is",
"not",
"initialized\");",
"checkLockNotHeld(\"Can",
"not",
"update",
"sources",
"while",
"holding",
"the",
"driver",
"lock\");",
"checkArgument(",
"sourceOper... |
[
"<code>protected",
"int",
"persistHydrant(",
"FireHydrant",
"indexToPersist,",
"DataSchema",
"schema,",
"Interval",
"interval,",
"Map<String,",
"Object>",
"metadataElems",
")",
"{",
"synchronized",
"(indexToPersist)",
"{",
"if",
"(indexToPersist.hasSwapped())",
"{",
"log.info... | [
"protected",
"int",
"persistHydrant(",
"FireHydrant",
"indexToPersist,",
"DataSchema",
"schema,",
"Interval",
"interval,",
"Map<String,",
"Object>",
"metadataElems",
")",
"{",
"synchronized",
"(indexToPersist)",
"{",
"if",
"(indexToPersist.hasSwapped())",
"{",
"log.info(",
... |
[
"<code>private",
"void",
"doBuildProject(File",
"projectLocation,",
"IProgressMonitor",
"monitor)",
"throws",
"CoreException",
"{",
"if",
"(monitor.isCanceled())",
"{",
"return;",
"}",
"try",
"{",
"monitor.beginTask(Messages.MSBuild_BuildProjectTask,",
"10);",
"<START>",
"Strin... | [
"private",
"void",
"doBuildProject(File",
"projectLocation,",
"IProgressMonitor",
"monitor)",
"throws",
"CoreException",
"{",
"if",
"(monitor.isCanceled())",
"{",
"return;",
"}",
"try",
"{",
"monitor.beginTask(Messages.MSBuild_BuildProjectTask,",
"10);",
"String",
"msBuild",
... |
[
"<code>private",
"void",
"initializeServices()",
"{",
"<START>",
"logger().debug(\"Initializing",
"couchbase",
"services",
"on",
"host:",
"\"",
"+",
"enabledServices);",
"<END>",
"final",
"String",
"services",
"=",
"enabledServices.stream().map(s",
"->",
"{",
"switch",
"(... | [
"private",
"void",
"initializeServices()",
"{",
"logger().debug(\"Initializing",
"couchbase",
"services",
"on",
"host:",
"{}\",",
"enabledServices);",
"final",
"String",
"services",
"=",
"enabledServices.stream().map(s",
"->",
"{",
"switch",
"(s)",
"{",
"case",
"KV:",
"... |
[
"<code>public",
"Mono<HttpResponse>",
"process(HttpPipelineCallContext",
"context,",
"HttpPipelineNextPolicy",
"next)",
"{",
"Optional<Object>",
"customHttpHeadersObject",
"=",
"context.getData(AZURE_REQUEST_HTTP_HEADERS_KEY);",
"<START>",
"if",
"(customHttpHeadersObject.isPresent()",
"&... | [
"public",
"Mono<HttpResponse>",
"process(HttpPipelineCallContext",
"context,",
"HttpPipelineNextPolicy",
"next)",
"{",
"context.getData(AZURE_REQUEST_HTTP_HEADERS_KEY).ifPresent(headers",
"->",
"{",
"if",
"(headers",
"instanceof",
"HttpHeaders)",
"{",
"HttpHeaders",
"customHttpHeader... |
[
"<code>public",
"ExpressionAnalysis(",
"Map<NodeRef<Expression>,",
"Type>",
"expressionTypes,",
"Map<NodeRef<Expression>,",
"Type>",
"expressionCoercions,",
"Set<NodeRef<InPredicate>>",
"subqueryInPredicates,",
"Set<NodeRef<SubqueryExpression>>",
"scalarSubqueries,",
"Set<NodeRef<ExistsPredi... | [
"public",
"ExpressionAnalysis(",
"Map<NodeRef<Expression>,",
"Type>",
"expressionTypes,",
"Map<NodeRef<Expression>,",
"Type>",
"expressionCoercions,",
"Set<NodeRef<InPredicate>>",
"subqueryInPredicates,",
"Set<NodeRef<SubqueryExpression>>",
"scalarSubqueries,",
"Set<NodeRef<ExistsPredicate>>... |
[
"<code>public",
"FreeStyleProject",
"newInstance(Branch",
"branch)",
"{",
"FreeStyleProject",
"job",
"=",
"new",
"FreeStyleProject(getOwner(),",
"branch.getEncodedName());",
"setBranch(job,",
"branch);",
"try",
"{",
"<START>",
"job.setQuietPeriod(0);",
"<END>",
"}",
"catch(IOEx... | [
"public",
"FreeStyleProject",
"newInstance(Branch",
"branch)",
"{",
"FreeStyleProject",
"job",
"=",
"new",
"FreeStyleProject(getOwner(),",
"branch.getEncodedName());",
"setBranch(job,",
"branch);",
"if",
"(quietPeriodSeconds",
">=",
"0)",
"{",
"try",
"{",
"job.setQuietPeriod(... |
[
"<code>public",
"void",
"init(final",
"GlusterVolumeGeoRepCreateModel",
"model)",
"{",
"super.init(model);",
"model.getPropertyChangedEvent().addListener(new",
"IEventListener<PropertyChangedEventArgs>()",
"{",
"@Override",
"public",
"void",
"eventRaised(Event<?",
"extends",
"PropertyC... | [
"public",
"void",
"init(final",
"GlusterVolumeGeoRepCreateModel",
"model)",
"{",
"super.init(model);",
"model.getPropertyChangedEvent().addListener(new",
"IEventListener<PropertyChangedEventArgs>()",
"{",
"@Override",
"public",
"void",
"eventRaised(Event<?",
"extends",
"PropertyChanged... |
[
"<code>public",
"Scheduler",
"cleanupResponseUrlDataScheduler()",
"throws",
"SchedulerException",
"{",
"<START>",
"return",
"this.constructScheduler(ResponseDataCleanupJob.class,",
"KEY_CLEANUP_JOB_THREAD_COUNT,",
"<END>",
"KEY_CLEANUP_JOB_CRON_EXPRESSION,",
"this.getDatabaseUrl(),",
"this... | [
"public",
"Scheduler",
"cleanupResponseUrlDataScheduler()",
"throws",
"SchedulerException",
"{",
"return",
"this.constructScheduler(ResponseUrlDataCleanupJob.class,",
"KEY_CLEANUP_JOB_THREAD_COUNT,",
"KEY_CLEANUP_JOB_CRON_EXPRESSION,",
"this.getDatabaseUrl(),",
"this.databaseUsername,",
"thi... |
[
"<code>public",
"void",
"generateType(final",
"Ds3Type",
"typeEntry)",
"throws",
"IOException",
"{",
"final",
"Template",
"typeTemplate",
"=",
"config.getTemplate(\"TypeEnumConstant.tmplt\");",
"final",
"Type",
"type",
"=",
"TypeConverter.toType(typeEntry);",
"final",
"Path",
... | [
"public",
"void",
"generateType(final",
"Ds3Type",
"typeEntry)",
"throws",
"IOException",
"{",
"final",
"Template",
"typeTemplate",
"=",
"config.getTemplate(\"TypeEnumConstant.tmplt\");",
"final",
"Type",
"type",
"=",
"TypeConverter.toType(typeEntry);",
"final",
"Path",
"outp... |
[
"<code>private",
"Map<Long,",
"ISegmentAspect>",
"getAspectsFromColumnsId(List<Long>",
"desiredColumns)",
"{",
"Map<Long,",
"ISegmentAspect>",
"aspects",
"=",
"new",
"LinkedHashMap<>();",
"if",
"<START>",
"(!desiredColumns.isEmpty())",
"<END>",
"{",
"for",
"(Long",
"columnsId",... | [
"private",
"Map<Long,",
"ISegmentAspect>",
"getAspectsFromColumnsId(List<Long>",
"desiredColumns)",
"{",
"if",
"(!desiredColumns.isEmpty())",
"{",
"Map<Long,",
"ISegmentAspect>",
"aspects",
"=",
"new",
"LinkedHashMap<>();",
"for",
"(Long",
"columnsId",
":",
"desiredColumns)",
... |
[
"<code>public",
"String",
"toString()",
"{",
"<START>",
"return",
"\"KubernetesCloud",
"'\"",
"+",
"name",
"+",
"\"'",
"serverUrl",
":\"",
"+",
"serverUrl;",
"<END>",
"}</code><technical_language>more",
"of",
"a",
"personal",
"taste",
"question,",
"Guava",
"MoreObject... | [
"public",
"String",
"toString()",
"{",
"return",
"MoreObjects.toStringHelper(this).add(\"name\",",
"name).add(\"serverUrl\",",
"serverUrl).toString();",
"}"
] |
[
"<code>public",
"int",
"getOptimalTileWidth()",
"{",
"FormatTools.assertId(currentId,",
"true,",
"1);",
"RandomAccessInputStream",
"plane",
"=",
"getPlane(getSeries(),",
"0);",
"if",
"(plane",
"==",
"null)",
"return",
"super.getOptimalTileWidth();",
"try",
"{",
"TiffParser",
... | [
"public",
"int",
"getOptimalTileWidth()",
"{",
"FormatTools.assertId(currentId,",
"true,",
"1);",
"RandomAccessInputStream",
"plane",
"=",
"getPlane(getSeries(),",
"0);",
"if",
"(plane",
"==",
"null)",
"return",
"super.getOptimalTileWidth();",
"try",
"(RandomAccessInputStream",... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.