auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void logTaskInfos(List<SqlTask> sqlTasks) { ArrayList<List<String>> taskLogInfoList = new ArrayList<List<String>>(); taskLogInfoList.add(Arrays.asList( "Task ID", "Query ID", "State", "Created Ts", "User Memory", "System Memory", "Input Bytes", "Output Bytes", "Input Row Count", "Output Row Count")); for (SqlTask task : sqlTasks) { <START> TaskInfo taskInfo = task.getTaskInfo(); <END> SqlTaskIoStats taskIOStats = task.getIoStats(); TaskStatus taskStatus = taskInfo.getTaskStatus(); TaskStats taskStats = taskInfo.getStats(); taskLogInfoList.add(Arrays.asList( task.getTaskId().toString(), task.getQueryContext().getQueryId().toString(), taskStatus.getState().toString(), taskStats.getCreateTime().toString(), taskStats.getUserMemoryReservation().toString(), taskStats.getSystemMemoryReservation().toString(), Long.toString(taskIOStats.getInputDataSize().getTotalCount()), Long.toString(taskIOStats.getOutputDataSize().getTotalCount()), Long.toString(taskIOStats.getInputPositions().getTotalCount()), Long.toString(taskIOStats.getOutputPositions().getTotalCount()))); } for (String row : StringTableUtils.getTableStrings(taskLogInfoList)) { log.info(row); } }</code><technical_language>group query log them? pretty critical start query is memory (since queries) search for tasks a query. a text search for query-id. need repeating query-id. like: <queryid> <task info> <task info> <queryid> <task info></technical_language>

Target:
private void logTaskInfos(List<SqlTask> sqlTasks) { ArrayList<List<String>> taskLogInfoList = new ArrayList<>(); taskLogInfoList.add(Arrays.asList( "Task ID", "State", "Created Ts", "User Memory", "System Memory", "Input Bytes", "Output Bytes", "Input Row Count", "Output Row Count")); for (SqlTask task : sqlTasks) { TaskInfo taskInfo = task.getTaskInfo(); SqlTaskIoStats taskIOStats = task.getIoStats(); TaskStatus taskStatus = taskInfo.getTaskStatus(); TaskStats taskStats = taskInfo.getStats(); taskLogInfoList.add(Arrays.asList( task.getTaskId().toString(), taskStatus.getState().toString(), taskStats.getCreateTime().toString(), taskStats.getUserMemoryReservation().toString(), taskStats.getSystemMemoryReservation().toString(), Long.toString(taskIOStats.getInputDataSize().getTotalCount()), Long.toString(taskIOStats.getOutputDataSize().getTotalCount()), Long.toString(taskIOStats.getInputPositions().getTotalCount()), Long.toString(taskIOStats.getOutputPositions().getTotalCount()))); } logInfoTable(taskLogInfoList); }
Source:
<code>private void setZeroAchievements() { AlertDialog.Builder builder=new AlertDialog.Builder(this) <START> .setMessage(getString(R.string.achiev_activity_set_zero_achiev)) <END> .setPositiveButton(getString(R.string.ok), (dialog, which) -> { }); AlertDialog dialog = builder.create(); dialog.show(); imagesUploadedProgressbar.setVisibility(View.INVISIBLE); imageRevertsProgressbar.setVisibility(View.INVISIBLE); imagesUsedByWikiProgressBar.setVisibility(View.INVISIBLE); imageView.setVisibility(View.INVISIBLE); imageByWikiText.setText(R.string.no_image); imageRevertedText.setText(R.string.no_image_reverted); imageUploadedText.setText(R.string.no_image_uploaded); imageView.setVisibility(View.INVISIBLE); }</code><technical_language>I suggest spelling full word achievements, if means a longer variable name</technical_language>

Target:
private void setZeroAchievements() { AlertDialog.Builder builder=new AlertDialog.Builder(this) .setMessage(getString(R.string.no_achievements_yet)) .setPositiveButton(getString(R.string.ok), (dialog, which) -> { }); AlertDialog dialog = builder.create(); dialog.show(); imagesUploadedProgressbar.setVisibility(View.INVISIBLE); imageRevertsProgressbar.setVisibility(View.INVISIBLE); imagesUsedByWikiProgressBar.setVisibility(View.INVISIBLE); imageView.setVisibility(View.INVISIBLE); imageByWikiText.setText(R.string.no_image); imageRevertedText.setText(R.string.no_image_reverted); imageUploadedText.setText(R.string.no_image_uploaded); imageView.setVisibility(View.INVISIBLE); }
Source:
<code>String generateOutputFileName(@NonNull Entity entity, List<String> queries) { val fname = entity.getFileName(); val extensionPos = fname.toLowerCase().indexOf(".bam"); val left = StringUtils.left(fname, extensionPos); val extension = StringUtils.right(fname, fname.length() - extensionPos); <START> StringBuilder bob = new StringBuilder(); <END> boolean firstValue = true; for (val q : queries) { if (!firstValue) { bob.append("__"); } bob.append(encodeQuery(q)); firstValue = false; } String fullName = String.format("%s.%s%s", left, bob.toString(), extension); return addOutputPath(handleMaxFilenameLength(fullName)); }</code><technical_language>Bob builder? Heh, cute, a bit more descriptive variable names :)</technical_language>

Target:
String generateOutputFileName(@NonNull Entity entity, List<String> queries) { val bob = new StringBuilder(); boolean firstValue = true; for (val q : queries) { if (!firstValue) { bob.append("__"); } bob.append(encodeQuery(q)); firstValue = false; } val fullName = handleMaxFilenameLength(injectFileNameModifier(entity, bob.toString()), getExtension(getSourceType(entity))); return addOutputPath(fullName); }
Source:
<code>public FixtureConfiguration<T> registerAggregateFactory(AggregateFactory<T> aggregateFactory) { MultiParameterResolverFactory parameterResolverFactory = MultiParameterResolverFactory.ordered( new SimpleResourceParameterResolverFactory(resources), ClasspathParameterResolverFactory.forClass(aggregateType) ); return registerRepository(new EventSourcingRepository<>( aggregateFactory, eventStore, parameterResolverFactory, <START> NoSnapshotTriggerDefinition.INSTANCE, getRepositoryProvider() <END> )); }</code><technical_language>Ah missed this one, thanks for that</technical_language>

Target:
public FixtureConfiguration<T> registerAggregateFactory(AggregateFactory<T> aggregateFactory) { MultiParameterResolverFactory parameterResolverFactory = MultiParameterResolverFactory.ordered( new SimpleResourceParameterResolverFactory(resources), ClasspathParameterResolverFactory.forClass(aggregateType) ); return registerRepository(new EventSourcingRepository<>(aggregateFactory, eventStore, parameterResolverFactory, handlerDefinition, NoSnapshotTriggerDefinition.INSTANCE, getRepositoryProvider())); }
Source:
<code>public Builder addMemberForValue(String memberName, Object value) { checkArgument(memberName != null, "memberName == null"); <START> checkArgument(value != null, "only constant non-null values are permitted (%s)", memberName); <END> if (value instanceof Class<?>) { return addMember(memberName, "$T.class", value); } if (value instanceof Enum) { return addMember(memberName, "$T.$L", value.getClass(), ((Enum<?>) value).name()); } if (value instanceof String) { return addMember(memberName, "$S", value); } if (value instanceof Float) { return addMember(memberName, "$Lf", value); } if (value instanceof Character) { return addMember(memberName, "'$L'", characterLiteralWithoutSingleQuotes((char) value)); } return addMember(memberName, "$L", value); }</code><technical_language>checkNonNull</technical_language>

Target:
Builder addMemberForValue(String memberName, Object value) { checkNotNull(memberName, "memberName == null"); checkNotNull(value, "value == null, constant non-null value expected for %s", memberName); if (value instanceof Class<?>) { return addMember(memberName, "$T.class", value); } if (value instanceof Enum) { return addMember(memberName, "$T.$L", value.getClass(), ((Enum<?>) value).name()); } if (value instanceof String) { return addMember(memberName, "$S", value); } if (value instanceof Float) { return addMember(memberName, "$Lf", value); } if (value instanceof Character) { return addMember(memberName, "'$L'", characterLiteralWithoutSingleQuotes((char) value)); } return addMember(memberName, "$L", value); }
Source:
<code>public MarshallableEntry loadEntry(Object key) throws PersistenceException { if (!isCacheReady()) return null; ClusteredGetCommand clusteredGetCommand = commandsFactory.buildClusteredGetCommand(key, keyPartitioner.getSegment(key), EnumUtil.bitSetOf(Flag.SKIP_OWNERSHIP_CHECK)); Collection<Response> responses; try { clusteredGetCommand.setTopologyId(rpcManager.getTopologyId()); CompletionStage<Map<Address, Response>> getAll = rpcManager.invokeCommandOnAll(clusteredGetCommand, MapResponseCollector.ignoreLeavers(), rpcManager.getSyncRpcOptions()); <START> responses = CompletionStages.join(getAll).values(); <END> } catch (Exception e) { PERSISTENCE.errorDoingRemoteCall(e); throw new PersistenceException(e); } if (responses.isEmpty()) return null; Response response; if (responses.size() > 1) { Set<Response> setResponses = new HashSet<>(responses); if (setResponses.size() > 1) throw new PersistenceException(String.format( "Responses contains more than 1 element and these elements are not equal, so can't decide which one to use: %s", setResponses)); response = setResponses.iterator().next(); } else { response = responses.iterator().next(); } if (response.isSuccessful() && response instanceof SuccessfulResponse) { InternalCacheValue value = (InternalCacheValue) ((SuccessfulResponse) response).getResponseValue(); return value == null ? null : ctx.getMarshallableEntryFactory().create(key, value.getValue()); } PERSISTENCE.unknownResponsesFromRemoteCache(responses); throw new PersistenceException("Unknown responses"); }</code><technical_language>rpcManager.blocking() instead</technical_language>

Target:
public MarshallableEntry loadEntry(Object key) throws PersistenceException { if (!isCacheReady()) return null; ClusteredGetCommand clusteredGetCommand = commandsFactory.buildClusteredGetCommand(key, keyPartitioner.getSegment(key), EnumUtil.bitSetOf(Flag.SKIP_OWNERSHIP_CHECK)); Collection<Response> responses; try { clusteredGetCommand.setTopologyId(rpcManager.getTopologyId()); CompletionStage<Map<Address, Response>> getAll = rpcManager.invokeCommandOnAll(clusteredGetCommand, MapResponseCollector.ignoreLeavers(), rpcManager.getSyncRpcOptions()); responses = rpcManager.blocking(getAll).values(); } catch (Exception e) { PERSISTENCE.errorDoingRemoteCall(e); throw new PersistenceException(e); } if (responses.isEmpty()) return null; Response response; if (responses.size() > 1) { Set<Response> setResponses = new HashSet<>(responses); if (setResponses.size() > 1) throw new PersistenceException(String.format( "Responses contains more than 1 element and these elements are not equal, so can't decide which one to use: %s", setResponses)); response = setResponses.iterator().next(); } else { response = responses.iterator().next(); } if (response.isSuccessful() && response instanceof SuccessfulResponse) { InternalCacheValue value = (InternalCacheValue) ((SuccessfulResponse) response).getResponseValue(); return value == null ? null : ctx.getMarshallableEntryFactory().create(key, value.getValue()); } PERSISTENCE.unknownResponsesFromRemoteCache(responses); throw new PersistenceException("Unknown responses"); }
Source:
<code>public void handle(final HttpServletRequest request, final HttpServletResponse response, final HandlerContext context) { String requestUri = request.getRequestURI(); if (this.enabled && isSecured(requestUri, request.getMethod())) { if (authenticationManager == null) { throw new AuthenticationException("Failed to authenticate request."); } int found = 0, failed = 0; for (CredentialsExtractor<HttpServletRequest> extractor : extractors) { Optional<Credentials> extracted = extractor.retrieveCredentials(request); if (extracted.isPresent()) { found++; Credentials credentials = extracted.get(); try { Authentication authentication = authenticationManager.authenticate(credentials); request.setAttribute(Authentication.class.getName(), authentication); context.execute(request, response); return; } catch (AuthenticationException e) { failed++; logger.info("Failed to authenticate using credentials {}", credentials, e); } <START> } <END> } throw new AuthenticationException("Could not authenticate request. Found " + found + " credentials in request out of which " + failed + " were invalid"); } }</code><technical_language>write credentials log files - possibly debug. remove exception prevent log cluttered stacktraces</technical_language>

Target:
public void handle(final HttpServletRequest request, final HttpServletResponse response, final HandlerContext context) throws Exception { String requestUri = request.getRequestURI(); if (this.enabled && isSecured(requestUri, request.getMethod())) { if (authenticationManager == null) { throw new AuthenticationException("Failed to authenticate request."); } int found = 0, failed = 0; for (CredentialsExtractor<HttpServletRequest> extractor : extractors) { Optional<Credentials> extracted = extractor.retrieveCredentials(request); if (extracted.isPresent()) { found++; Credentials credentials = extracted.get(); try { Authentication authentication = authenticationManager.authenticate(credentials); request.setAttribute(Authentication.class.getName(), authentication); context.execute(request, response); return; } catch (AuthenticationException e) { failed++; if (logger.isDebugEnabled()) { logger.debug("Failed to authenticate using credentials {}", credentials, e); } else { logger.info("Failed to authenticate using credentials {}", credentials); } } } } throw new AuthenticationException("Could not authenticate request. Found " + found + " credentials in request out of which " + failed + " were invalid"); } }
Source:
<code>public void testAdHocQueryForStackOverFlowCondition() throws IOException, Exception { System.out.println("Starting testLongAdHocQuery"); VoltDB.Configuration config = setUpSPDB(); ServerThread localServer = new ServerThread(config); localServer.start(); localServer.waitForInitialization(); m_client = ClientFactory.createClient(); m_client.createConnection("localhost", config.m_port); try { for (int len = 2000; len < 100000; len += 1000) { String sql = getQueryForLongQueryTable(len); m_client.callProcedure("@AdHoc", sql); } fail("Query was expected to generate stack overflow error"); } catch (Exception exception) { final String expectedMsg = "Encountered stack overflow error. " + "Try reducing the number of predicate expressions in the query."; assertTrue("Expected text \"" + expectedMsg + "\" did not appear in exception " + "\"" + exception.getMessage() + "\"", exception.getMessage().contains(expectedMsg)); } finally { if (m_client != null) { m_client.close(); } m_client = null; <START> localServer.shutdown(); <END> localServer.join(); } }</code><technical_language>here, consistent localServer m_client</technical_language>

Target:
public void testAdHocQueryForStackOverFlowCondition() throws Exception { System.out.println("Starting testLongAdHocQuery"); VoltDB.Configuration config = setUpSPDB(); ServerThread localServer = new ServerThread(config); localServer.start(); localServer.waitForInitialization(); m_client = ClientFactory.createClient(); m_client.createConnection("localhost", config.m_port); try { for (int len = 2000; len < 100000; len += 1000) { String sql = getQueryForLongQueryTable(len); m_client.callProcedure("@AdHoc", sql); } fail("Query was expected to generate stack overflow error"); } catch (Exception exception) { final String expectedMsg = "Encountered stack overflow error. " + "Try reducing the number of predicate expressions in the query."; assertTrue("Expected text \"" + expectedMsg + "\" did not appear in exception " + "\"" + exception.getMessage() + "\"", exception.getMessage().contains(expectedMsg)); } finally { if (m_client != null) { m_client.close(); m_client = null; } localServer.shutdown(); localServer.join(); } }
Source:
<code>public void canValidatePomWithXpath() throws Exception { final MavenEnvironment env = new MavenEnvironmentMocker() .withAsserts( Collections.singletonList( "/pom:project/pom:dependencies/pom:dependency[pom:artifactId='commons-io']/pom:version[.='1.2.5']/text()" ) ).mock(); final String pom = IOUtils.toString( <START> this.getClass().getResourceAsStream("PomXpathValidator/pom.xml"), <END> Charset.defaultCharset() ); FileUtils.write( new File( String.format( "%s%spom.xml", env.basedir(), File.separator ) ), pom, Charset.defaultCharset() ); new PomXpathValidator().validate(env); }</code><technical_language>@korthout cactoos InputStreamOf</technical_language>

Target:
public void canValidatePomWithXpath() throws Exception { final MavenEnvironment env = new MavenEnvironmentMocker() .withAsserts( Collections.singletonList( "/pom:project/pom:dependencies/pom:dependency[pom:artifactId='commons-io']/pom:version[.='1.2.5']/text()" ) ).mock(); final String pom = new TextOf( new ResourceOf("com/qulice/maven/PomXpathValidator/pom.xml") ).asString(); FileUtils.write( new File( String.format( "%s%spom.xml", env.basedir(), File.separator ) ), pom, StandardCharsets.UTF_8 ); new PomXpathValidator().validate(env); }
Source:
<code>public Change perform(IProgressMonitor pm) throws CoreException { IFile modifiedResource = getModifiedResource(); assert modifiedResource.exists() : "Resource " + modifiedResource + " doesn't exists yet"; assert modifiedResource != null; IQ7NamedElement newElement = (IQ7NamedElement) RcpttCore .create(modifiedResource); if (newElement == null) { throw new RuntimeException("Failed to load RCPTT element " + modifiedResource); } IQ7NamedElement workingCopy = newElement.getWorkingCopy(pm); workingCopy.setID(EcoreUtil.generateUUID()); WriteAccessChecker writeAccessChecker = new WriteAccessChecker(); if (writeAccessChecker.makeResourceWritable(workingCopy)) { <START> workingCopy.commitWorkingCopy(false, pm); <END> } return null; }</code><technical_language>Modifications done initial stage of refactoring. This sttage is gather infromation, changes done operation run</technical_language>

Target:
public Change perform(IProgressMonitor pm) throws CoreException { IFile modifiedResource = getModifiedResource(); assert modifiedResource.exists() : "Resource " + modifiedResource + " doesn't exists yet"; assert modifiedResource != null; IQ7NamedElement newElement = (IQ7NamedElement) RcpttCore .create(modifiedResource); if (newElement == null) { throw new RuntimeException("Failed to load RCPTT element " + modifiedResource); } IQ7NamedElement workingCopy = newElement.getWorkingCopy(pm); workingCopy.setID(EcoreUtil.generateUUID()); workingCopy.commitWorkingCopy(false, pm); return null; }
Source:
<code>SurveyReference resolveSurvey(SurveyReference surveyRef) { GuidCreatedOnVersionHolder surveyKeys = new GuidCreatedOnVersionHolderImpl(surveyRef); try { Survey survey = surveyService.getSurvey(surveyKeys); <START> return new SurveyReference(survey.getIdentifier(), survey.getGuid(), new DateTime(survey.getCreatedOn())); <END> } catch(EntityNotFoundException e) { return surveyRef; } }</code><technical_language>optimizations: 1. create a flag in SurveyService load SurveyElements? Otherwise, end loading a bunch of survey elements throw away. 2. getSurvey() requires guid createdOn exist, this method is get identifier. add a check skip loading survey if identifier is present? 3. Lastly, a SurveyReference a createdOn is a perfectly valid SurveyReference, this crash this code IllegalArgumentExcecption. do handle cases</technical_language>

Target:
SurveyReference resolveSurvey(SurveyReference surveyRef) { if (surveyRef.getIdentifier() != null) { return surveyRef; } try { GuidCreatedOnVersionHolder surveyKeys = new GuidCreatedOnVersionHolderImpl(surveyRef); Survey survey = surveyService.getSurvey(surveyKeys, false); return new SurveyReference(survey.getIdentifier(), survey.getGuid(), new DateTime(survey.getCreatedOn())); } catch(EntityNotFoundException e) { return surveyRef; } }
Source:
<code>public <START> double @NonNull getXAxis() <END> { return fXValues; }</code><technical_language>@NonNull double[]</technical_language>

Target:
public double[] getXAxis() { return fXValues; }
Source:
<code>public void setAcceptableValues(Collection<Date> values) { <START> } <END></code><technical_language>supposed emtpy</technical_language>

Target:
public void setAcceptableValues(Collection<Date> values) { List<Date> allowedDates = (List<Date>) values; Collections.sort(allowedDates); setDateRange(allowedDates.get(0), allowedDates.get(allowedDates.size() - 1)); }
Source:
<code>public MethodResultCode execute(final ClientConnection conn, final Void v) throws IOException { LOGGER.info("ACTIVATING"); final MethodRequestParameter method = new MethodRequestParameter(CLASS_ID, OBIS_CODE, 1); final List<MethodResult> methodResultCode = conn.action(method); <START> return methodResultCode.get(0).resultCode(); <END> }</code><technical_language>if empty list is returned? is impossible situation, IOException in a case</technical_language>

Target:
public MethodResultCode execute(final ClientConnection conn, final Void v) throws IOException { LOGGER.info("ACTIVATING"); final MethodRequestParameter method = new MethodRequestParameter(CLASS_ID, OBIS_CODE, 1); final List<MethodResult> methodResultCode = conn.action(method); if (methodResultCode == null || methodResultCode.isEmpty() || methodResultCode.get(0) == null) { throw new IOException("action method for ClientConnection should return a list with one MethodResult"); } return methodResultCode.get(0).resultCode(); }
Source:
<code><START> boolean nullSavingStrategyExplicitlySet(Element methodElement, Class<?> javaClass) { <END> Optional<AnnotationMirror> annotationMirrorForJavaClass = getAnnotationMirrorForJavaClass(methodElement, javaClass); if (annotationMirrorForJavaClass.isPresent()) { for (ExecutableElement executableElement : annotationMirrorForJavaClass.get().getElementValues().keySet()) { if (executableElement.getSimpleName().contentEquals("nullSavingStrategy")) { return true; } } } return false; }</code><technical_language>If remove default NullSavingStrategy.DO_NOT_SET annotations null instead this more effective do is null check</technical_language>

Target:
private boolean nullSavingStrategyExplicitlySet(Element methodElement, Class<?> javaClass) { Optional<AnnotationMirror> annotationMirrorForJavaClass = getAnnotationMirrorForJavaClass(methodElement, javaClass); if (annotationMirrorForJavaClass.isPresent()) { for (ExecutableElement executableElement : annotationMirrorForJavaClass.get().getElementValues().keySet()) { if (executableElement.getSimpleName().contentEquals("nullSavingStrategy")) { return true; } } } return false; }
Source:
<code><START> public Iterable<DynamicTest> verifySquares() { <END> return Arrays.asList( testSquareAt(0, 0), testSquareAt(1, 2), testSquareAt(0, 1) ); }</code><technical_language>This new parameterized support in m4</technical_language>

Target:
Iterable<DynamicTest> verifySquares() { return Arrays.asList( testSquareAt(0, 0), testSquareAt(1, 2), testSquareAt(0, 1) ); }
Source:
<code>public Map<String, String> getDeploymentConfiguration() { org.wso2.carbon.kernel.utils.Utils.checkSecurity(); File configFile = ConfigurationUtils.getConfigurationFileLocation(filename).toFile(); <START> try (FileInputStream fileInputStream = new FileInputStream(configFile)) { <END> String yamlFileString = getDeploymentContent(fileInputStream); String jsonString = ConfigResolverUtils.convertYAMLToJSON(yamlFileString); return getDeploymentConfigMap(jsonString); } catch (IOException e) { String errorMessage = "Failed populate Deployment Configuration from " + configFile.getName(); logger.error(errorMessage, e); throw new RuntimeException(errorMessage, e); } }</code><technical_language>Instead of File, InputStream APIs, NIO Path, Files APIs. java byte[] contentBytes = Files.readAllBytes(ConfigurationUtils.getConfigurationFileLocation(filename)); String content = new String(contentBytes, StandardCharsets.UTF_8));</technical_language>

Target:
public Map<String, String> getDeploymentConfiguration() throws CarbonConfigurationException { org.wso2.carbon.kernel.utils.Utils.checkSecurity(); if (filename == null) { throw new CarbonConfigurationException("Error while reading the configuration file, filename is null"); } try { byte[] contentBytes = Files.readAllBytes(ConfigurationUtils.getConfigurationFileLocation(filename)); String yamlFileString = new String(contentBytes, StandardCharsets.UTF_8); return ConfigurationUtils.getDeploymentConfigMap(yamlFileString); } catch (IOException e) { String errorMessage = "Failed populate deployment configuration from " + filename; logger.error(errorMessage, e); throw new CarbonConfigurationException(errorMessage, e); } }
Source:
<code>public Map<String, String> buildEnvFromProperties(InterpreterLaunchContext context) throws IOException { Map<String, String> envs = super.buildEnvFromProperties(context); String flinkHome = context.getProperties().getProperty("FLINK_HOME", envs.get("FLINK_HOME")); if (StringUtils.isBlank(flinkHome)) { throw new IOException("FLINK_HOME is not specified"); } File flinkHomeFile = new File(flinkHome); if (!flinkHomeFile.exists()) { throw new IOException(String.format("FLINK_HOME '%s' doesn't exist", flinkHome)); } <START> if (flinkHomeFile.isFile()) { throw new IOException(String.format("FLINK_HOME '%s' is a file, but should be directory", flinkHome)); <END> } envs.put("FLINK_CONF_DIR", flinkHome + "/conf"); envs.put("FLINK_LIB_DIR", flinkHome + "/lib"); envs.put("FLINK_PLUGINS_DIR", flinkHome + "/plugins"); return envs; }</code><technical_language>Instead, I check for ! flinkHomeFile.isDirectory, Linux/Mac, isFile return false for devices, like, /dev/ttywf: user=> (.isFile (file "/dev/ttywf")) false user=> (.isDirectory (file "/dev/ttywf")) false</technical_language>

Target:
public Map<String, String> buildEnvFromProperties(InterpreterLaunchContext context) throws IOException { Map<String, String> envs = super.buildEnvFromProperties(context); String flinkHome = context.getProperties().getProperty("FLINK_HOME", envs.get("FLINK_HOME")); if (StringUtils.isBlank(flinkHome)) { throw new IOException("FLINK_HOME is not specified"); } File flinkHomeFile = new File(flinkHome); if (!flinkHomeFile.exists()) { throw new IOException(String.format("FLINK_HOME '%s' doesn't exist", flinkHome)); } if (!flinkHomeFile.isDirectory()) { throw new IOException(String.format("FLINK_HOME '%s' is a file, but should be directory", flinkHome)); } envs.put("FLINK_CONF_DIR", flinkHome + "/conf"); envs.put("FLINK_LIB_DIR", flinkHome + "/lib"); envs.put("FLINK_PLUGINS_DIR", flinkHome + "/plugins"); return envs; }
Source:
<code>public ColumnIndex readColumnIndex(ColumnChunkMetaData column) throws IOException { IndexReference ref = column.getColumnIndexReference(); if (ref == null) { return null; } f.seek(ref.getOffset()); <START> column.decryptIfNeededed(); <END> BlockCipher.Decryptor columnIndexDecryptor = null; byte[] columnIndexAAD = null; if (null != fileDecryptor && !fileDecryptor.plaintextFile()) { InternalColumnDecryptionSetup columnDecryptionSetup = fileDecryptor.getColumnSetup(column.getPath()); if (columnDecryptionSetup.isEncrypted()) { columnIndexDecryptor = columnDecryptionSetup.getMetaDataDecryptor(); columnIndexAAD = AesCipher.createModuleAAD(fileDecryptor.getFileAAD(), ModuleType.ColumnIndex, column.getRowGroupOrdinal(), columnDecryptionSetup.getOrdinal(), (short)-1); } } return ParquetMetadataConverter.fromParquetColumnIndex(column.getPrimitiveType(), Util.readColumnIndex(f, columnIndexDecryptor, columnIndexAAD)); }</code><technical_language>understanding this method is is invoked ColumnChunkMetaData object retrieving a encrypted. do need call here</technical_language>

Target:
public ColumnIndex readColumnIndex(ColumnChunkMetaData column) throws IOException { IndexReference ref = column.getColumnIndexReference(); if (ref == null) { return null; } f.seek(ref.getOffset()); BlockCipher.Decryptor columnIndexDecryptor = null; byte[] columnIndexAAD = null; if (null != fileDecryptor && !fileDecryptor.plaintextFile()) { InternalColumnDecryptionSetup columnDecryptionSetup = fileDecryptor.getColumnSetup(column.getPath()); if (columnDecryptionSetup.isEncrypted()) { columnIndexDecryptor = columnDecryptionSetup.getMetaDataDecryptor(); columnIndexAAD = AesCipher.createModuleAAD(fileDecryptor.getFileAAD(), ModuleType.ColumnIndex, column.getRowGroupOrdinal(), columnDecryptionSetup.getOrdinal(), -1); } } return ParquetMetadataConverter.fromParquetColumnIndex(column.getPrimitiveType(), Util.readColumnIndex(f, columnIndexDecryptor, columnIndexAAD)); }
Source:
<code>public void testDetypedMetricType() throws Exception { DetypedPathDeserializer.setCurrentCanonicalOrigin(CanonicalPath.fromString("/t;t")); MetricType mt = new MetricType(CanonicalPath.fromString("/t;t/mt;c"), MetricUnit.BYTES, GAUGE, new HashMap<String, Object>() {{ put("a", "b"); }}, 0L); <START> testDetyped(mt, "{\"path\":\"/t;t/mt;c\",\"properties\":{\"a\":\"b\"},\"unit\":\"BYTES\"}"); <END> testDetyped(mt, "{\"path\":\"/t;t/c\",\"properties\":{\"a\":\"b\"},\"unit\":\"BYTES\"}"); testDetyped(mt, "{\"path\":\"/c\",\"properties\":{\"a\":\"b\"},\"unit\":\"BYTES\"}"); }</code><technical_language>interval manifest in json, too</technical_language>

Target:
public void testDetypedMetricType() throws Exception { DetypedPathDeserializer.setCurrentCanonicalOrigin(CanonicalPath.fromString("/t;t")); MetricType mt = new MetricType(CanonicalPath.fromString("/t;t/mt;c"), MetricUnit.BYTES, GAUGE, new HashMap<String, Object>() {{ put("a", "b"); }}, 0L); testDetyped(mt, "{\"path\":\"/t;t/mt;c\",\"properties\":{\"a\":\"b\"},\"unit\":\"BYTES\", " + "\"collectionInterval\":\"0\"}"); testDetyped(mt, "{\"path\":\"/t;t/c\",\"properties\":{\"a\":\"b\"},\"unit\":\"BYTES\", " + "\"collectionInterval\":\"0\"}"); testDetyped(mt, "{\"path\":\"/c\",\"properties\":{\"a\":\"b\"},\"unit\":\"BYTES\"," + " \"collectionInterval\":\"0\"}"); }
Source:
<code>public CorfuReplicationDiscoveryService(@Nonnull ServerContext serverContext, @Nonnull CorfuReplicationClusterManagerAdapter clusterManagerAdapter, <START> @Nonnull CompletableFuture<CorfuInterClusterReplicationServerNode> serverCallback) throws Exception { <END> this.clusterManagerAdapter = clusterManagerAdapter; this.logReplicationNodeId = serverContext.getNodeId(); this.serverContext = serverContext; this.localEndpoint = serverContext.getLocalEndpoint(); this.serverCallback = serverCallback; this.isLeader = new AtomicBoolean(); }</code><technical_language>this constructor throw exception? is simply setting some variables</technical_language>

Target:
public CorfuReplicationDiscoveryService(@Nonnull ServerContext serverContext, @Nonnull CorfuReplicationClusterManagerAdapter clusterManagerAdapter, @Nonnull CompletableFuture<CorfuInterClusterReplicationServerNode> serverCallback) { this.clusterManagerAdapter = clusterManagerAdapter; this.logReplicationNodeId = serverContext.getNodeId(); this.serverContext = serverContext; this.localEndpoint = serverContext.getLocalEndpoint(); this.serverCallback = serverCallback; this.isLeader = new AtomicBoolean(); this.lockConfig = LockConfig.newInstance(serverContext.getLogReplicationConfig()); this.lockListener = new LogReplicationLockListener(this); }
Source:
<code>private double gauss(double x, double mean, double variance) { <START> return Math.exp((-1. * (x - mean) * (x - mean)) / (2. * variance)) / Math.sqrt(2. * Math.PI * variance); <END> }</code><technical_language>Math.pow(x - mean, 2)</technical_language>

Target:
private double gauss(double x, double mean, double variance) { return Math.exp(-1. * Math.pow(x - mean, 2) / (2. * variance)) / Math.sqrt(2. * Math.PI * variance); }
Source:
<code>private void createJarArchive(File archiveFile, List<String> toBeJared, File tempDir) throws IOException{ long now = System.currentTimeMillis(); byte buffer[] = new byte[10240]; File tmpjar = File.createTempFile(".rulec_", ".jar", archiveFile.getParentFile()); FileOutputStream stream = new FileOutputStream(tmpjar); JarOutputStream out = new JarOutputStream(stream, new Manifest()); try { for (String path : toBeJared) { JarEntry jarAdd = new JarEntry(path); File f = new File(tempDir, path); jarAdd.setTime(now); out.putNextEntry(jarAdd); if (f.isFile()) { FileInputStream in = new FileInputStream(f); try { while (true) { int nRead = in.read(buffer, 0, buffer.length); if (nRead <= 0) { break; } out.write(buffer, 0, nRead); } } finally { in.close(); } } out.closeEntry(); } if (!tmpjar.renameTo(archiveFile)) { throw new IOException("Cannot replace archiveFile"); } } finally { <START> out.close(); <END> tmpjar.delete(); } }</code><technical_language>need close JarOutputStream rename it. Windows rename open file. JarOutputStream write critical ZIP directory end of stream close() is called. rename is a bit early still. :-)</technical_language>

Target:
private void createJarArchive(File archiveFile, List<String> toBeJared, File tempDir) throws IOException{ long now = System.currentTimeMillis(); byte buffer[] = new byte[10240]; File tmpjar = File.createTempFile(".rulec_", ".jar", archiveFile.getParentFile()); FileOutputStream stream = new FileOutputStream(tmpjar); JarOutputStream out = new JarOutputStream(stream, new Manifest()); try { for (String path : toBeJared) { JarEntry jarAdd = new JarEntry(path); File f = new File(tempDir, path); jarAdd.setTime(now); out.putNextEntry(jarAdd); if (f.isFile()) { FileInputStream in = new FileInputStream(f); try { while (true) { int nRead = in.read(buffer, 0, buffer.length); if (nRead <= 0) { break; } out.write(buffer, 0, nRead); } } finally { in.close(); } } out.closeEntry(); } } finally { out.close(); } try { if (!tmpjar.renameTo(archiveFile)) { throw new IOException("Cannot replace archiveFile"); } } finally { tmpjar.delete(); } }
Source:
<code>protected TokenEndpointResponse performRequest(LoginOptions options) throws Exception { <START> return OAuth2.swapJWTForTokens(HttpAccess.DEFAULT, new URI(options.loginUrl), options.jwt); <END> }</code><technical_language>OAuth2.swapJWTForTokens call throws a bunch of exceptions though. need catch here, instead of logging them, call onAuthFlowError here</technical_language>

Target:
protected TokenEndpointResponse performRequest(LoginOptions options) { try { return OAuth2.swapJWTForTokens(HttpAccess.DEFAULT, new URI(options.loginUrl), options.jwt); } catch (Exception e) { onAuthFlowError("jwt_oauth_error", e.getLocalizedMessage()); callback.finish(); } return null; }
Source:
<code>private ServerRequest request() { Map<String, Object> request = new ArrayMap<>(); request.put(Fields.KIND.getValue(), mKind.getValue()); Map<String, Object> metadata = new ArrayMap<>(); metadata.put("sender", mSender.getId()); Date ref = new Date(); try { ref = mKind.equals(ServiceRequest.RequestKind.NODE_MESSAGE) ? DateSerialization.dateSerializer.toDate((String) mConstructingMap.get(Fields.DATE.getValue())) : new Date(); } catch (ParseException e) { <START> e.printStackTrace(); <END> } metadata.put("datetime", formatDate( new Date())); metadata.put("ref", formatDate(ref)); request.put("metadata", new JSONObject(metadata)); request.put("message", new JSONObject(mConstructingMap)); return new ServerRequest(new JSONObject(request)); }</code><technical_language>Log exception better</technical_language>

Target:
private ServerRequest request() { Map<String, Object> request = new ArrayMap<>(); request.put(Fields.KIND.getValue(), mKind.getValue()); Map<String, Object> metadata = new ArrayMap<>(); metadata.put("client", mSender.getId()); Date ref = new Date(); try { ref = mKind.equals(ServiceRequest.RequestKind.NODE_MESSAGE) ? DateSerialization.dateSerializer.toDate((String) mConstructingMap.get(Fields.DATE.getValue())) : new Date(); } catch (ParseException e) { Log.d("RequestBuilder", "Couldn't handle build ServerRequest correctly !"); } metadata.put("datetime", formatDate(new Date())); metadata.put("ref", formatDate(ref)); request.put("metadata", new JSONObject(metadata)); request.put("message", new JSONObject(mConstructingMap)); return new ServerRequest(new JSONObject(request)); }
Source:
<code>private PrefilledCardholderDetails getPrefilledCardholderDetails() { if (cardholderName != null) { <START> if (this.prefilledCardholderDetails == null) { <END> this.prefilledCardholderDetails = new PrefilledCardholderDetails(); } this.prefilledCardholderDetails.setCardholderName(cardholderName); } if (addressLine1 != null || addressLine2 != null || postcode != null || city != null || country != null) { if (this.prefilledCardholderDetails == null) { this.prefilledCardholderDetails = new PrefilledCardholderDetails(); } this.prefilledCardholderDetails.setAddress(addressLine1, addressLine2, postcode, city, country); } return prefilledCardholderDetails; }</code><technical_language>need this check this is null time</technical_language>

Target:
private PrefilledCardholderDetails getPrefilledCardholderDetails() { if (cardholderName != null) { this.prefilledCardholderDetails = new PrefilledCardholderDetails(); this.prefilledCardholderDetails.setCardholderName(cardholderName); } if (addressLine1 != null || addressLine2 != null || postcode != null || city != null || country != null) { if (this.prefilledCardholderDetails == null) { this.prefilledCardholderDetails = new PrefilledCardholderDetails(); } this.prefilledCardholderDetails.setAddress(addressLine1, addressLine2, postcode, city, country); } return prefilledCardholderDetails; }
Source:
<code>private static RedDeerProperties getByName(String name){ RedDeerProperties rdProperty; <START> try { <END> rdProperty = RedDeerProperties.getByName(name); } catch (RedDeerException e) { rdProperty = RedDeerProperties.getByName("reddeer." + name); } return rdProperty; }</code><technical_language>Do try catch please instead if (!name.startsWith("reddeer.") ..</technical_language>

Target:
private static RedDeerProperties getByName(String name){ if (name.startsWith("reddeer.")){ return RedDeerProperties.getByName(name); } else { return RedDeerProperties.getByName("reddeer." + name); } }
Source:
<code>public String getMainActivity() throws AndroidSdkException { <START> return activityName; <END> }</code><technical_language>this instrumentation start process fail for me, packageName needs included</technical_language>

Target:
public String getMainActivity() throws AndroidSdkException { if(activityName.contains(".")) return activityName; else return packageName + "." + activityName; }
Source:
<code>public StateDelta compare(State baseState) throws BundleException { BundleDescription[] <START> current = <END> this.getBundles(); StateDeltaImpl delta = new StateDeltaImpl(this); for (BundleDescription current1 : current) { BundleDescription existing = baseState.getBundleByLocation(current1.getLocation()); if (existing == null) { delta.recordBundleAdded((BundleDescriptionImpl) current1); } else if (updated.contains(current1.getLocation())) { delta.recordBundleUpdated((BundleDescriptionImpl) current1); } } BundleDescription[] existing = baseState.getBundles(); for (BundleDescription existing1 : existing) { BundleDescription local = getBundleByLocation(existing1.getLocation()); if (local == null) { delta.recordBundleRemoved((BundleDescriptionImpl) existing1); } } return delta; }</code><technical_language>rename currentBundles current in foreach loop</technical_language>

Target:
public StateDelta compare(State baseState) throws BundleException { BundleDescription[] currentBundles = this.getBundles(); StateDeltaImpl delta = new StateDeltaImpl(this); for (BundleDescription current : currentBundles) { BundleDescription existing = baseState.getBundleByLocation(current.getLocation()); if (existing == null) { delta.recordBundleAdded((BundleDescriptionImpl) current); } else if (updated.contains(current.getLocation())) { delta.recordBundleUpdated((BundleDescriptionImpl) current); } } BundleDescription[] existingBundles = baseState.getBundles(); for (BundleDescription existing : existingBundles) { BundleDescription local = getBundleByLocation(existing.getLocation()); if (local == null) { delta.recordBundleRemoved((BundleDescriptionImpl) existing); } } return delta; }
Source:
<code>protected void executeCommand() { <START> setGlusterVolumeName(volume.getName()); <END> if (volume.getAccessProtocols() == null) { volume.setAccessProtocol(AccessProtocol.GLUSTER); } VDSReturnValue returnValue = executeVdsCommand( VDSCommandType.CreateGlusterVolume, new CreateGlusterVolumeVDSParameters(getUpServer().getId(), volume)); if (!getSucceeded()) { errorType = AuditLogType.GLUSTER_VOLUME_CREATE_FAILED; return; } GlusterVolumeEntity createdVolume = (GlusterVolumeEntity) returnValue.getReturnValue(); addVolumeToDb(createdVolume); setVolumeOptions(createdVolume); }</code><technical_language>gluster volume is saved db change getGlusterVolumeName in auditLogableBase get db if null, instead of requiring user set this likes</technical_language>

Target:
protected void executeCommand() { setGlusterVolumeName(volume.getName()); volume.addAccessProtocol(AccessProtocol.GLUSTER); VDSReturnValue returnValue = runVdsCommand( VDSCommandType.CreateGlusterVolume, new CreateGlusterVolumeVDSParameters(getUpServer().getId(), volume)); setSucceeded(returnValue.getSucceeded()); GlusterVolumeEntity createdVolume = (GlusterVolumeEntity) returnValue.getReturnValue(); addVolumeToDb(createdVolume); setVolumeOptions(createdVolume); }
Source:
<code>public boolean isTimeAtStart(long t) { <START> synchronized (scoreBoardModel) { <END> if (isCountDirectionDown()) { return t == getMaximumTime(); } else { return t == getMinimumTime(); } } }</code><technical_language>coreLock</technical_language>

Target:
public boolean isTimeAtStart(long t) { synchronized (coreLock) { if (isCountDirectionDown()) { return t == getMaximumTime(); } else { return t == getMinimumTime(); } } }
Source:
<code>public void setContainers(Map<FactoryContainer, Attributes> map) { synchronized(_path) { _path.clear(); for (FactoryContainer key : <START> getReversedKeyList(map)) <END> { _path.put(key, map.get(key)); } } }</code><technical_language>This loop more efficient if getReversedKeyList replaced getReversedEntryList</technical_language>

Target:
public void setContainers(Map<FactoryContainer, Attributes> map) { synchronized(_path) { _path.clear(); for (Entry<FactoryContainer, Attributes> entry : getReversed(_path.entrySet())) { _path.put(entry.getKey(), entry.getValue()); } } }
Source:
<code>public boolean doCommand(final ILayer targetLayer, final FillHandlePasteCommand command) { TransactionalEditingDomain domain = TableEditingDomainUtils.getTableContextEditingDomain(tableManager.getTable()); <START> AbstractTransactionalCommand o = new AbstractTransactionalCommand(domain, null, null) { <END> @Override protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { boolean res = PapyrusFillHandlePasteCommandHandler.super.doCommand(targetLayer, command); return CommandResult.newOKCommandResult(Boolean.valueOf(res)); } }; domain.getCommandStack().execute(new GMFtoEMFCommandWrapper(o)); return ((Boolean) o.getCommandResult().getReturnValue()).booleanValue(); }</code><technical_language>Change name of "o" add final</technical_language>

Target:
public boolean doCommand(final ILayer targetLayer, final FillHandlePasteCommand command) { TransactionalEditingDomain domain = TableEditingDomainUtils.getTableContextEditingDomain(tableManager.getTable()); final AbstractTransactionalCommand transactionalCommand = new AbstractTransactionalCommand(domain, null, null) { @Override protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { final boolean result = PapyrusFillHandlePasteCommandHandler.super.doCommand(targetLayer, command); return CommandResult.newOKCommandResult(Boolean.valueOf(result)); } }; domain.getCommandStack().execute(new GMFtoEMFCommandWrapper(transactionalCommand)); return ((Boolean) transactionalCommand.getCommandResult().getReturnValue()).booleanValue(); }
Source:
<code>public void crcTest() { Crc32 crc = new Crc32(); byte[] buf = new byte[4000]; new Random().nextBytes(buf); crc.update(buf, 0, 4000); long value1 = crc.getValue(); crc = new Crc32(); crc.update(buf, 0, 4000); long value2 = crc.getValue(); <START> Assert.assertEquals(value1, value2); <END> }</code><technical_language>I thought that, argued ways though. if test fails due collision, worse actual code failing due collision. Chances of happening rare. However, if wrong crcs match not, caught a negative test</technical_language>

Target:
public void crcTest() { Crc32 crc = new Crc32(); byte[] buf = new byte[4000]; new Random().nextBytes(buf); crc.update(buf, 0, 4000); long value1 = crc.getValue(); crc = new Crc32(); crc.update(buf, 0, 4000); long value2 = crc.getValue(); Assert.assertEquals(value1, value2); buf[3999] = (byte) (~buf[3999]); crc = new Crc32(); crc.update(buf, 0, 4000); long value3 = crc.getValue(); Assert.assertFalse(value1 == value3); }
Source:
<code>private void updateStateForMessages(List<MessageInfo> messageEntries) throws StoreException { ListIterator<MessageInfo> messageEntriesIterator = messageEntries.listIterator(); while (messageEntriesIterator.hasNext()) { MessageInfo messageInfo = messageEntriesIterator.next(); if (!messageInfo.isDeleted()) { <START> IndexValue indexValue = findKey(messageInfo.getStoreKey(), null, EnumSet.allOf(IndexEntryType.class)); <END> messageInfo = new MessageInfo(messageInfo.getStoreKey(), messageInfo.getSize(), indexValue.isFlagSet(IndexValue.Flags.Delete_Index), indexValue.isFlagSet(IndexValue.Flags.Ttl_Update_Index), indexValue.getExpiresAtMs(), indexValue.getAccountId(), indexValue.getContainerId(), indexValue.getOperationTimeInMs()); messageEntriesIterator.set(messageInfo); } } }</code><technical_language>this findKey() check for states instead of TTL Update state here</technical_language>

Target:
private void updateStateForMessages(List<MessageInfo> messageEntries) throws StoreException { ListIterator<MessageInfo> messageEntriesIterator = messageEntries.listIterator(); while (messageEntriesIterator.hasNext()) { MessageInfo messageInfo = messageEntriesIterator.next(); if (!messageInfo.isDeleted()) { IndexValue indexValue = findKey(messageInfo.getStoreKey(), null, EnumSet.of(IndexEntryType.TTL_UPDATE, IndexEntryType.DELETE)); if (indexValue != null) { messageInfo = new MessageInfo(messageInfo.getStoreKey(), messageInfo.getSize(), indexValue.isFlagSet(IndexValue.Flags.Delete_Index), indexValue.isFlagSet(IndexValue.Flags.Ttl_Update_Index), indexValue.getExpiresAtMs(), indexValue.getAccountId(), indexValue.getContainerId(), indexValue.getOperationTimeInMs()); messageEntriesIterator.set(messageInfo); } } } }
Source:
<code>private static String className(Class<?> clazz) { String className = clazz.getSimpleName() .replaceAll("(.)([A-Z][a-z]+)", "$1_$2") .replaceAll("([a-z0-9])([A-Z])", "$1_$2") .toLowerCase(); String[] parts = clazz.getPackage().getName().split("\\."); if (parts.length == 4) { className = parts[3] + "/" + className; <START> } <END> switch (className) { case "invoice_item": return "invoiceitem"; case "file_upload": return "file"; default: return className; } }</code><technical_language>nit: remi's point, consider assert handling length > 4</technical_language>

Target:
private static String className(Class<?> clazz) { String className = clazz.getSimpleName() .replaceAll("(.)([A-Z][a-z]+)", "$1_$2") .replaceAll("([a-z0-9])([A-Z])", "$1_$2") .toLowerCase(); String[] parts = clazz.getPackage().getName().split("\\."); assert parts.length == 3 || parts.length == 4; if (parts.length == 4) { className = parts[3] + "/" + className; } switch (className) { case "invoice_item": return "invoiceitem"; case "file_upload": return "file"; default: return className; } }
Source:
<code><START> JobRecoveryNotActiveException(final UUID jobId, final Throwable cause) { <END> super(buildMessage(jobId), cause); }</code><technical_language>This public</technical_language>

Target:
public JobRecoveryNotActiveException(final UUID jobId, final Throwable cause) { super(buildMessage(jobId), cause); }
Source:
<code>public void newUserCanSignUpDesktop() { <START> performSuccessfulSignUpOnDesktopAs(createNewUser()); <END> }</code><technical_language>performUnsuccessfulSignUpOnDesktopAs(user)? If performSignUpOnDesktopAs(user)</technical_language>

Target:
public void newUserCanSignUpDesktop() { performSignUpOnDesktopAs(createNewUser()); }