auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public CacheStore(CachingTier<K, V> cachingTier, AuthoritativeTier<K, V> authoritativeTier) { this.cachingTier = cachingTier; this.authoritativeTier = authoritativeTier; <START> this.cachingTier.addInvalidationListener(new CachingTier.InvalidationListener<K, V>() { <END> @Override public void onInvalidation(K key, ValueHolder<V> valueHolder) { CacheStore.this.authoritativeTier.flush(key, valueHolder, CacheStore.this.cachingTier); } }); }</code><technical_language>I this code path is racy. for called constructor. thread safe, support a single listener registered (and changed). right this add method (and remove too, used) scare me, current implementation</technical_language>

Target:
public CacheStore(CachingTier<K, V> cachingTier, AuthoritativeTier<K, V> authoritativeTier) { this.cachingTier = cachingTier; this.authoritativeTier = authoritativeTier; this.cachingTier.setInvalidationListener(new CachingTier.InvalidationListener<K, V>() { @Override public void onInvalidation(K key, ValueHolder<V> valueHolder) { CacheStore.this.authoritativeTier.flush(key, valueHolder, CacheStore.this.cachingTier); } }); }
Source:
<code>protected void delete(Context context, Integer id) throws AuthorizeException { try { MetadataField metadataField = metadataFieldService.find(context, id); if (metadataField == null) { throw new ResourceNotFoundException("metadata field with id: " + id + " not found"); } metadataFieldService.delete(context, metadataField); } catch (SQLException e) { <START> throw new RuntimeException(e.getMessage(), e); <END> } }</code><technical_language>Again, getMessage() return null. Please replace a more informative error message</technical_language>

Target:
protected void delete(Context context, Integer id) throws AuthorizeException { try { MetadataField metadataField = metadataFieldService.find(context, id); if (metadataField == null) { throw new ResourceNotFoundException("metadata field with id: " + id + " not found"); } metadataFieldService.delete(context, metadataField); } catch (SQLException e) { throw new RuntimeException("error while trying to delete " + MetadataFieldRest.NAME + " with id: " + id, e); } }
Source:
<code>public void start(BundleContext context) throws Exception { fgBundleContext = context; super.start(context); plugin = this; <START> DEBUG = "true".equals(Platform.getDebugOption("org.eclipse.cdt.dsf.gdb/debug")); END> fDebugOptions = new GdbDebugOptions(context); }</code><technical_language>Please remove, is longer needed</technical_language>

Target:
public void start(BundleContext context) throws Exception { fgBundleContext = context; super.start(context); plugin = this; new GdbDebugOptions(context); }
Source:
<code>private static AsyncTimelockService createRawAsyncTimelockService( String client, Supplier<ManagedTimestampService> timestampServiceSupplier) { <START> ScheduledExecutorService reaperExecutor = (ScheduledExecutorService) new InstrumentedExecutorService( <END> Executors.newSingleThreadScheduledExecutor(new ThreadFactoryBuilder() .setNameFormat("async-lock-reaper-" + client + "-%d") .setDaemon(true) .build()), AtlasDbMetrics.getMetricRegistry(), "async-lock-reaper"); ScheduledExecutorService timeoutExecutor = (ScheduledExecutorService) new InstrumentedExecutorService( Executors.newSingleThreadScheduledExecutor(new ThreadFactoryBuilder() .setNameFormat("async-lock-timeouts-" + client + "-%d") .setDaemon(true) .build()), AtlasDbMetrics.getMetricRegistry(), "async-lock-timeouts"); return new AsyncTimelockServiceImpl( AsyncLockService.createDefault(reaperExecutor, timeoutExecutor), timestampServiceSupplier.get()); }</code><technical_language>this cast is safe</technical_language>

Target:
private static AsyncTimelockService createRawAsyncTimelockService( String client, Supplier<ManagedTimestampService> timestampServiceSupplier) { ScheduledExecutorService reaperExecutor = new InstrumentedScheduledExecutorService( Executors.newSingleThreadScheduledExecutor(new ThreadFactoryBuilder() .setNameFormat("async-lock-reaper-" + client + "-%d") .setDaemon(true) .build()), AtlasDbMetrics.getMetricRegistry(), "async-lock-reaper"); ScheduledExecutorService timeoutExecutor = new InstrumentedScheduledExecutorService( Executors.newSingleThreadScheduledExecutor(new ThreadFactoryBuilder() .setNameFormat("async-lock-timeouts-" + client + "-%d") .setDaemon(true) .build()), AtlasDbMetrics.getMetricRegistry(), "async-lock-timeouts"); return new AsyncTimelockServiceImpl( AsyncLockService.createDefault(reaperExecutor, timeoutExecutor), timestampServiceSupplier.get()); }
Source:
<code>public void setOutputChannelName(String outputChannelName) { <START> this.outputChannelName = outputChannelName; <END> }</code><technical_language>Assert.hasText()</technical_language>

Target:
public void setOutputChannelName(String outputChannelName) { Assert.hasText(outputChannelName, "'outputChannelName' must not be null or empty"); this.outputChannelName = outputChannelName; }
Source:
<code><START> public Collection<String> getProductSearchName() { <END> if (aias != null) { return ActionableItems.getNames(aias); } return Collections.emptyList(); }</code><technical_language>Interesting this method handle nulls for aias performSearch NPE. This exposed in a change test for this class</technical_language>

Target:
public Collection<String> getProductSearchName() { return ActionableItems.getNames(aias); }
Source:
<code>public static FormatStep hostnameFormatStep(final boolean leftJustify, final int minimumWidth, final boolean truncateBeginning, final int maximumWidth, final boolean qualified) { return new SegmentedFormatStep(leftJustify, minimumWidth, truncateBeginning, maximumWidth, null) { public String getSegmentedSubject(final ExtLogRecord record) { final String hostName = record.getHostName(); final int idx = hostName.indexOf('.'); <START> return idx == -1 ? hostName :hostName.substring(0, idx); <END> } }; }</code><technical_language>This return a fully qualified host name</technical_language>

Target:
public static FormatStep hostnameFormatStep(final boolean leftJustify, final int minimumWidth, final boolean truncateBeginning, final int maximumWidth, final boolean qualified) { return qualified ? hostnameFormatStep(leftJustify, minimumWidth, truncateBeginning, maximumWidth, null) : new SegmentedFormatStep(leftJustify, minimumWidth, truncateBeginning, maximumWidth, null) { public String getSegmentedSubject(final ExtLogRecord record) { final String hostName = record.getHostName(); final int idx = hostName.indexOf('.'); return idx == -1 ? hostName :hostName.substring(0, idx); } }; }
Source:
<code>public MethodOutcome createFHIRPatient(@ResourceParam Patient patient) { patient = patientResource.createFHIRPatient(patient); MethodOutcome retVal = new MethodOutcome(); retVal.setId(new IdType(FHIRConstants.PATIENT, patient.getId())); OperationOutcome outcome = new OperationOutcome(); CodeableConcept concept = new CodeableConcept(); Coding coding = concept.addCoding(); <START> coding.setDisplay("Patient is successfully created with"); <END> outcome.addIssue().setDetails(concept); retVal.setOperationOutcome(outcome); return retVal; }</code><technical_language>move messages constants</technical_language>

Target:
public MethodOutcome createFHIRPatient(@ResourceParam Patient patient) { patient = patientResource.createFHIRPatient(patient); MethodOutcome retVal = new MethodOutcome(); retVal.setId(new IdType(FHIRConstants.PATIENT, patient.getId())); OperationOutcome outcome = new OperationOutcome(); CodeableConcept concept = new CodeableConcept(); Coding coding = concept.addCoding(); coding.setDisplay("Patient is successfully created with id" + patient.getId()); outcome.addIssue().setDetails(concept); retVal.setOperationOutcome(outcome); return retVal; }
Source:
<code>public void read() throws IOException { <START> final MkItem item = this.emptyMkItemWithMemo(); <END> final DyMemo memo = new DyMemo(item); final XML xml = memo.read(); MatcherAssert.assertThat( xml.node().getFirstChild().getLocalName(), Matchers.equalTo("memo") ); }</code><technical_language>please inline item</technical_language>

Target:
public void read() throws IOException { final DyMemo memo = new DyMemo(this.emptyMkItemWithMemo()); final XML xml = memo.read(); MatcherAssert.assertThat( xml.node().getFirstChild().getLocalName(), Matchers.equalTo("memo") ); }
Source:
<code>protected InputStream readStream( ResultSet rs ) throws BinaryStoreException { boolean error = false; try { if (!rs.next()) { return null; } <START> return databaseType == Type.SQLSERVER ? rs.getBlob(1).getBinaryStream() : rs.getBinaryStream(1); <END> } catch (SQLException e) { error = true; throw new BinaryStoreException(e); } catch (RuntimeException e) { error = true; throw e; } finally { try { rs.close(); } catch (SQLException e) { if (!error) throw new BinaryStoreException(e); } } }</code><technical_language>more clear is DB-specific logic if do a switch(databaseType) a case SQLSERVER default. WDYT</technical_language>

Target:
protected InputStream readStream( ResultSet rs ) throws BinaryStoreException { boolean error = false; try { if (!rs.next()) { return null; } switch (databaseType) { case SQLSERVER: { return rs.getBlob(1).getBinaryStream(); } default: { return rs.getBinaryStream(1); } } } catch (SQLException e) { error = true; throw new BinaryStoreException(e); } catch (RuntimeException e) { error = true; throw e; } finally { try { rs.close(); } catch (SQLException e) { if (!error) throw new BinaryStoreException(e); } } }
Source:
<code>public static void main(String[] args) throws Exception { URL url = new URL("<LINK_1>"); EventLoopGroup group = new NioEventLoopGroup(); try { final SslContext sslContext = SslContextBuilder.forClient() .protocols("TLSv1.2", "TLSv1.3") .applicationProtocolConfig(new ApplicationProtocolConfig( ApplicationProtocolConfig.Protocol.ALPN, ApplicationProtocolConfig.SelectorFailureBehavior.NO_ADVERTISE, ApplicationProtocolConfig.SelectedListenerFailureBehavior.ACCEPT, ApplicationProtocolNames.HTTP_2, ApplicationProtocolNames.HTTP_1_1)) .build(); Bootstrap b = new Bootstrap(); b.group(group) .channel(NioSocketChannel.class) .handler(new Initializer(sslContext, url)); final Channel ch = b.connect(url.getHost(), url.getDefaultPort()).sync().channel(); <START> Thread.sleep(1000); END> int randomID = new Random().nextInt(60000 - 1000) + 1000; DnsQuery query = new DefaultDnsQuery(randomID, DnsOpCode.QUERY); query.setRecord(DnsSection.QUESTION, new DefaultDnsQuestion(QUERY_DOMAIN, DnsRecordType.A)); ch.writeAndFlush(query).sync(); ch.closeFuture().await(10, TimeUnit.SECONDS); } finally { group.shutdownGracefully(); } }</code><technical_language>a sleep here, handshake future. sslHandler.handshakeFuture().addListener(future -> { if (future.isSuccess()) {</technical_language>

Target:
public static void main(String[] args) throws Exception { URL url = new URL("<LINK_1>"); EventLoopGroup group = new NioEventLoopGroup(); try { final SslContext sslContext = SslContextBuilder.forClient() .applicationProtocolConfig(new ApplicationProtocolConfig( ApplicationProtocolConfig.Protocol.ALPN, ApplicationProtocolConfig.SelectorFailureBehavior.NO_ADVERTISE, ApplicationProtocolConfig.SelectedListenerFailureBehavior.ACCEPT, ApplicationProtocolNames.HTTP_2, ApplicationProtocolNames.HTTP_1_1)) .build(); Bootstrap b = new Bootstrap(); b.group(group) .channel(NioSocketChannel.class) .handler(new Initializer(sslContext, url)); Channel ch = b.connect(url.getHost(), url.getDefaultPort()).sync().channel(); ch.pipeline().get(ALPNHandler.class).promise().sync(); DnsQuery query = new DefaultDnsQuery(0, DnsOpCode.QUERY); query.setRecord(DnsSection.QUESTION, new DefaultDnsQuestion(QUERY_DOMAIN, DnsRecordType.A)); ch.writeAndFlush(query).sync(); ch.closeFuture().await(10, TimeUnit.SECONDS); } finally { group.shutdownGracefully(); } }
Source:
<code>private void checkOutputWritingStatus() { try { <START> outputCapturer.join(timeoutInSeconds * CONVERT_SECONDS_TO_MILLISECONDS); <END> } catch (InterruptedException e) { throw new ItemStreamException("Interrupted while waiting for the VEP output writer thread to finish. ", e); } if (outputCapturer.isAlive()) { outputCapturer.interrupt(); throw new ItemStreamException("Reached the timeout (" + timeoutInSeconds + " seconds) while waiting for VEP output writing to finish. Killed the thread."); } if (!writingOk.get()) { throw new ItemStreamException("VEP output writer thread could not finish properly. "); } }</code><technical_language>a bit extreme? timeoutInSeconds * 1000 in milliseconds</technical_language>

Target:
private void checkOutputWritingStatus() { try { outputCaptureThread.join(timeoutInSeconds * 1000L); } catch (InterruptedException e) { throw new ItemStreamException("Interrupted while waiting for the VEP output writer thread to finish. ", e); } if (outputCaptureThread.isAlive()) { outputCaptureThread.interrupt(); throw new ItemStreamException("Reached the timeout (" + timeoutInSeconds + " seconds) while waiting for VEP output writing to finish. The thread has been killed."); } if (!writingOk.get()) { throw new ItemStreamException("VEP output writer thread could not finish properly. "); } }
Source:
<code>public void initialize() { log.info("Start initializing " + getClass().getSimpleName()); if(Config.<Boolean>getValue(ConfigValues.PMHealthCheckEnabled)) { Integer pmHealthCheckInterval = Config.<Integer> getValue(ConfigValues.PMHealthCheckIntervalInSec); <START> SchedulerUtilQuartzImpl.getInstance().scheduleAFixedDelayJob(this, <END> "pmHealthCheck", new Class[]{}, new Object[]{}, pmHealthCheckInterval, pmHealthCheckInterval, TimeUnit.SECONDS); } log.info("Finished initializing " + getClass().getSimpleName()); }</code><technical_language>add some logging well, show is initialized</technical_language>

Target:
public void initialize() { if(Config.<Boolean>getValue(ConfigValues.PMHealthCheckEnabled)) { log.info("Start initializing " + getClass().getSimpleName()); Integer pmHealthCheckInterval = Config.<Integer> getValue(ConfigValues.PMHealthCheckIntervalInSec); SchedulerUtilQuartzImpl.getInstance().scheduleAFixedDelayJob(this, "pmHealthCheck", new Class[]{}, new Object[]{}, pmHealthCheckInterval, pmHealthCheckInterval, TimeUnit.SECONDS); log.info("Finished initializing " + getClass().getSimpleName()); } }
Source:
<code>public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final ModelNode patchingInfo = new ModelNode(); PathAddress patchingAddress = PathAddress.pathAddress( PathElement.pathElement(HOST, environment.getHostControllerName()), PathElement.pathElement(CORE_SERVICE, "patching")); OperationEntry opEntry = context.getRootResourceRegistration().getOperationEntry(patchingAddress, "show-history"); if(opEntry != null) { <START> context.addStep(patchingInfo, Util.createOperation("patch-info", patchingAddress), <END> opEntry.getOperationHandler(), OperationContext.Stage.RUNTIME); } final Path installationDir = environment.getHomeDir().toPath(); context.addStep(new OperationStepHandler() { @Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { System.out.println("Here is what we have as infos " + patchingInfo); ModelNode result = context.getResult(); result.get(SUMMARY_DEFINITION.getName()).set(createProductNode(context, environment, patchingInfo, installationDir)); } }, OperationContext.Stage.RUNTIME); }</code><technical_language>this "show-history"? L77 "patch-info"</technical_language>

Target:
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final ModelNode patchingInfo = new ModelNode(); PathAddress patchingAddress = PathAddress.pathAddress( PathElement.pathElement(HOST, environment.getHostControllerName()), PathElement.pathElement(CORE_SERVICE, "patching")); OperationEntry opEntry = context.getRootResourceRegistration().getOperationEntry(patchingAddress, "show-history"); if(opEntry != null) { context.addStep(patchingInfo, Util.createOperation("show-history", patchingAddress), opEntry.getOperationHandler(), OperationContext.Stage.RUNTIME); } final Path installationDir = environment.getHomeDir().toPath(); context.addStep(new OperationStepHandler() { @Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { ModelNode result = context.getResult(); result.get(SUMMARY_DEFINITION.getName()).set(createProductNode(context, new InstallationConfiguration( environment, environment.getProductConfig(), patchingInfo, installationDir))); } }, OperationContext.Stage.RUNTIME); }
Source:
<code>IStatus resolve(IProgressMonitor monitor) throws CoreException { assert fIndex == null; if (fIndex != null) return Status.CANCEL_STATUS; fIndex = CCorePlugin.getIndexManager() .getIndex(fTranslationUnit.getCProject(), IIndexManager.ADD_DEPENDENCIES | IIndexManager.ADD_DEPENDENT | IIndexManager.ADD_EXTENSION_FRAGMENTS_NAVIGATION); try { fIndex.acquireReadLock(); } catch (InterruptedException e) { return Status.CANCEL_STATUS; } try { <START> return ASTProvider.getASTProvider().runOnAST(fTranslationUnit, ASTProvider.WAIT_ACTIVE_ONLY, monitor, this); <END> } finally { fIndex.releaseReadLock(); } }</code><technical_language>If reading this correctly, if AST is fully built yet, this is freeze UI thread this is called detectHyperlinks. bug 324232 CElementHyperlinkDetector for a similar problem. WAIT_NO allow Step Selection while AST is built</technical_language>

Target:
IStatus resolve(IProgressMonitor monitor) throws CoreException { assert fIndex == null; if (fIndex != null) return Status.CANCEL_STATUS; fIndex = CCorePlugin.getIndexManager() .getIndex(fTranslationUnit.getCProject(), IIndexManager.ADD_DEPENDENCIES | IIndexManager.ADD_DEPENDENT | IIndexManager.ADD_EXTENSION_FRAGMENTS_NAVIGATION); try { fIndex.acquireReadLock(); } catch (InterruptedException e) { return Status.CANCEL_STATUS; } try { return ASTProvider.getASTProvider().runOnAST(fTranslationUnit, ASTProvider.WAIT_NO, monitor, this); } finally { fIndex.releaseReadLock(); } }
Source:
<code>public void login() { final LobbyServerProperties lobbyServerProperties = LobbyPropertyFetcherConfiguration.lobbyServerPropertiesFetcher() .fetchLobbyServerProperties() .orElseThrow(LobbyAddressFetchException::new); final LobbyLogin login = new LobbyLogin(ui, lobbyServerProperties); Optional.ofNullable(login.login()) .ifPresent( lobbyClient -> { final LobbyFrame lobbyFrame = new LobbyFrame(lobbyClient, lobbyServerProperties); GameRunner.hideMainFrame(); lobbyFrame.setVisible(true); boolean passwordChanged = false; if (lobbyClient.isPasswordChangeRequired()) { try { <START> passwordChanged = <END> ChangePasswordPanel.doPasswordChange( lobbyFrame, lobbyClient.getHttpLobbyClient(), ChangePasswordPanel.AllowCancelMode.DO_NOT_SHOW_CANCEL_BUTTON); if (passwordChanged) { DialogBuilder.builder() .parent(lobbyFrame) .title("Success") .infoMessage("Password successfully updated!") .showDialog(); } else { notifyTempPasswordInvalid(lobbyFrame, null); } } catch (final HttpInteractionException e) { notifyTempPasswordInvalid(lobbyFrame, e); } } }); }</code><technical_language>thoughts putting a do while(!passwordChanged); loop here? this loop people manually re-click a button get dialog. a thought, popups super annoying if users want completely cancel login procedure</technical_language>

Target:
public void login() { final LobbyServerProperties lobbyServerProperties = LobbyPropertyFetcherConfiguration.lobbyServerPropertiesFetcher() .fetchLobbyServerProperties() .orElseThrow(LobbyAddressFetchException::new); final LobbyLogin login = new LobbyLogin(ui, lobbyServerProperties); Optional.ofNullable(login.login()) .ifPresent( lobbyClient -> { final LobbyFrame lobbyFrame = new LobbyFrame(lobbyClient, lobbyServerProperties); GameRunner.hideMainFrame(); lobbyFrame.setVisible(true); if (lobbyClient.isPasswordChangeRequired()) { try { final boolean passwordChanged = ChangePasswordPanel.doPasswordChange( lobbyFrame, lobbyClient.getHttpLobbyClient(), ChangePasswordPanel.AllowCancelMode.DO_NOT_SHOW_CANCEL_BUTTON); if (passwordChanged) { DialogBuilder.builder() .parent(lobbyFrame) .title("Success") .infoMessage("Password successfully updated!") .showDialog(); } else { notifyTempPasswordInvalid(lobbyFrame, null); } } catch (final HttpInteractionException e) { notifyTempPasswordInvalid(lobbyFrame, e); } } }); }
Source:
<code>protected MessageHandler createHandler(Object bean, Method method, List<Annotation> annotations) { org.springframework.integration.transformer.Transformer transformer; if (AnnotatedElementUtils.isAnnotated(method, Bean.class.getName())) { Object target = this.resolveTargetBeanFromMethodWithBeanAnnotation(method); <START> transformer = this.extractTypeIfPossible(target, org.springframework.integration.transformer.Transformer.class); <END> if (transformer == null) { if (target instanceof AbstractReplyProducingMessageHandler) { return (MessageHandler) target; } transformer = new MethodInvokingTransformer(target); } } else { transformer = new MethodInvokingTransformer(bean, method); } MessageTransformingHandler handler = new MessageTransformingHandler(transformer); this.setOutputChannelIfPresent(annotations, handler); return handler; }</code><technical_language>deal case @Bean is a MessageTransformingHandler</technical_language>

Target:
protected MessageHandler createHandler(Object bean, Method method, List<Annotation> annotations) { org.springframework.integration.transformer.Transformer transformer; if (AnnotatedElementUtils.isAnnotated(method, Bean.class.getName())) { Object target = this.resolveTargetBeanFromMethodWithBeanAnnotation(method); transformer = this.extractTypeIfPossible(target, org.springframework.integration.transformer.Transformer.class); if (transformer == null) { if (this.extractTypeIfPossible(target, AbstractReplyProducingMessageHandler.class) != null) { return (MessageHandler) target; } transformer = new MethodInvokingTransformer(target); } } else { transformer = new MethodInvokingTransformer(bean, method); } MessageTransformingHandler handler = new MessageTransformingHandler(transformer); this.setOutputChannelIfPresent(annotations, handler); return handler; }
Source:
<code>public void update() { deltaProgress.tick(); if (worldObj.isRemote) { return; } if (scanning && isValid) { <START> int target = shouldScanDetails ? 30 : 10; <END> int back = 3; if (progress == 0) { deltaProgress.addDelta(0, target, 100); deltaProgress.addDelta(target, target + back, -100); } if (progress < target + back) { progress++; return; } progress = 0; scanSingleBlock(); if (!scanning) { if (shouldScanEntities) { scanEntities(); } finishScanning(); } } else if (progress != -1) { progress = -1; deltaProgress.setValue(0); } }</code><technical_language>If architect takes more a single tick for a block a huge amount of time scan entire blueprint, is avoid</technical_language>

Target:
public void update() { deltaProgress.tick(); if (worldObj.isRemote) { return; } if (scanning && isValid) { int target = shouldScanDetails ? 2 : 1; int back = shouldScanDetails ? 1 : 0; if (progress == 0) { deltaProgress.addDelta(0, target, 100); deltaProgress.addDelta(target, target + back, -100); } if (progress < target + back) { progress++; return; } progress = 0; scanSingleBlock(); if (!scanning) { if (shouldScanEntities) { scanEntities(); } finishScanning(); } } else if (progress != -1) { progress = -1; deltaProgress.setValue(0); } }
Source:
<code>protected static boolean checkNumeric(String contents) { <START> return NUMERIC.matcher(contents).matches(); <END> }</code><technical_language>this method check matches throw exception? repeat check throw everywhere. final too</technical_language>

Target:
protected static final void checkNumeric(String contents) throws IllegalArgumentException { if (!NUMERIC.matcher(contents).matches()) { throw new IllegalArgumentException("Input should only contain digits 0-9"); } }
Source:
<code>protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (AuthUI.canHandleIntent(getIntent())) { Intent intent = new Intent(ChooserActivity.this, AuthUiActivity .class); intent.putExtra(ExtraConstants.EMAIL_LINK_SIGN_IN, getIntent().getData().toString()); <START> startActivity(intent); <END> } setContentView(R.layout.activity_chooser); ButterKnife.bind(this); mActivities.setLayoutManager(new LinearLayoutManager(this)); mActivities.setAdapter(new ActivityChooserAdapter()); mActivities.setHasFixedSize(true); }</code><technical_language>call finish() return stop ChooserActivity displayed in this case</technical_language>

Target:
protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (AuthUI.canHandleIntent(getIntent())) { Intent intent = new Intent(ChooserActivity.this, AuthUiActivity .class); intent.putExtra(ExtraConstants.EMAIL_LINK_SIGN_IN, getIntent().getData().toString()); startActivity(intent); finish(); return; } setContentView(R.layout.activity_chooser); ButterKnife.bind(this); mActivities.setLayoutManager(new LinearLayoutManager(this)); mActivities.setAdapter(new ActivityChooserAdapter()); mActivities.setHasFixedSize(true); }
Source:
<code>protected void verifyAccessibleForInstructorsOfTheSameCourse(String[] submissionParams) { ______TS("course instructor can access"); InstructorAttributes instructor1OfCourse1 = data.instructors.get("instructor1OfCourse1"); StudentAttributes student1InCourse1 = data.students.get("student1InCourse1"); InstructorAttributes otherInstructor = data.instructors.get("instructor1OfCourse2"); gaeSimulation.loginAsInstructor(instructor1OfCourse1.googleId); <START> verifyCanAccess(addUserIdToParams(instructor1OfCourse1.googleId, submissionParams)); <END> verifyCannotMasquerade(addUserIdToParams(student1InCourse1.googleId, submissionParams)); verifyCannotMasquerade(addUserIdToParams(otherInstructor.googleId, submissionParams)); }</code><technical_language>Similarly, is this necessary</technical_language>

Target:
protected void verifyAccessibleForInstructorsOfTheSameCourse(String[] submissionParams) { ______TS("course instructor can access"); InstructorAttributes instructor1OfCourse1 = data.instructors.get("instructor1OfCourse1"); StudentAttributes student1InCourse1 = data.students.get("student1InCourse1"); InstructorAttributes otherInstructor = data.instructors.get("instructor1OfCourse2"); gaeSimulation.loginAsInstructor(instructor1OfCourse1.googleId); verifyCanAccess(submissionParams); verifyCannotMasquerade(addUserIdToParams(student1InCourse1.googleId, submissionParams)); verifyCannotMasquerade(addUserIdToParams(otherInstructor.googleId, submissionParams)); }
Source:
<code>private String buildProcedureQuery( String procedureName, List<Object> parameters ) { <START> StringBuilder sb = new StringBuilder(); <END> sb.append( "CALL " ).append( procedureName ).append( "(" ); boolean first = true; for ( Object parameter : parameters ) { if ( !first ) { sb.append( "," ); } sb.append( parameter ); first = false; } sb.append( ")" ); return sb.toString(); }</code><technical_language>String joiner simplify looping checks, important in time</technical_language>

Target:
private String buildProcedureQuery( String procedureName, List<Object> parameters ) { StringJoiner stringJoiner = new StringJoiner( ",", "CALL " + procedureName + "(", ")" ); for ( Object parameter : parameters ) { stringJoiner.add( parameter.toString() ); } return stringJoiner.toString(); }
Source:
<code>@VisibleForTesting Call<MwQueryResponse<QueryResult>> request(@NonNull Service service, @NonNull final String userName, @NonNull final Callback cb) { cancel(); groupCall = service.request(userName); groupCall.enqueue(new retrofit2.Callback<MwQueryResponse<QueryResult>>() { @Override public void onResponse(Call<MwQueryResponse<QueryResult>> call, Response<MwQueryResponse<QueryResult>> response) { if (response.isSuccessful()) { final MwQueryResponse<QueryResult> body = response.body(); final QueryResult query = body.query(); if (response.body().success()) { cb.success(call, query.id(), query.getGroupsFor(userName)); } else if (response.body().hasError()) { cb.failure(call, new LoginClient.LoginFailedException( "Failed to retrieve <START> group membership data. " <END> + body.getError().toString())); } else { cb.failure(call, new LoginClient.LoginFailedException( "Unexpected error trying to retrieve group membership data. " + body.toString())); } } else { cb.failure(call, new LoginClient.LoginFailedException(response.message())); } } @Override public void onFailure(Call<MwQueryResponse<QueryResult>> call, Throwable caught) { cb.failure(call, caught); } }); return groupCall; }</code><technical_language>Consider updating this message include new additional info more generic, "additional user info" similar</technical_language>

Target:
@VisibleForTesting Call<MwQueryResponse<QueryResult>> request(@NonNull Service service, @NonNull final String userName, @NonNull final Callback cb) { cancel(); groupCall = service.request(userName); groupCall.enqueue(new retrofit2.Callback<MwQueryResponse<QueryResult>>() { @Override public void onResponse(Call<MwQueryResponse<QueryResult>> call, Response<MwQueryResponse<QueryResult>> response) { if (response.isSuccessful()) { final MwQueryResponse<QueryResult> body = response.body(); final QueryResult query = body.query(); if (response.body().success()) { cb.success(call, query.id(), query.getGroupsFor(userName)); } else if (response.body().hasError()) { cb.failure(call, new LoginClient.LoginFailedException( "Failed to retrieve user ID and group membership data. " + body.getError().toString())); } else { cb.failure(call, new LoginClient.LoginFailedException( "Unexpected error trying to retrieve user ID and group membership data. " + body.toString())); } } else { cb.failure(call, new LoginClient.LoginFailedException(response.message())); } } @Override public void onFailure(Call<MwQueryResponse<QueryResult>> call, Throwable caught) { cb.failure(call, caught); } }); return groupCall; }
Source:
<code>public ElideResponse post(String baseUrlEndPoint, String path, String jsonApiDocument, MultivaluedMap<String, String> queryParams, User opaqueUser, String apiVersion, UUID requestId) { <START> return post(baseUrlEndPoint, path, jsonApiDocument, queryParams, null, opaqueUser, apiVersion, requestId); <END> }</code><technical_language>empty hashmap</technical_language>

Target:
public ElideResponse post(String baseUrlEndPoint, String path, String jsonApiDocument, MultivaluedMap<String, String> queryParams, User opaqueUser, String apiVersion, UUID requestId) { return post(baseUrlEndPoint, path, jsonApiDocument, queryParams, Collections.emptyMap(), opaqueUser, apiVersion, requestId); }
Source:
<code>protected void failed(Throwable t) { log.error(errorMessage, t); <START> taskHandler.handleErrorMessage(format("%s: %s", errorMessage, t.getMessage())); <END> }</code><technical_language>UI get a bit verbose errors this change</technical_language>

Target:
protected void failed(Throwable t) { log.error(errorMessage, t); taskHandler.handleErrorMessage(errorMessage); }
Source:
<code>protected void awaitConsistency() { if (view.getConsistencyModel() == ConsistencyModel.EVENTUAL) { <START> Uninterruptibles.sleepUninterruptibly(20, TimeUnit.SECONDS); <END> } }</code><technical_language>override this in SwiftContainerIntegrationLiveTest if needed? This sleep is unfortunate slows tests unnecessarily, uncommon case of eventual consistency</technical_language>

Target:
protected void awaitConsistency() { if (view.getConsistencyModel() == ConsistencyModel.EVENTUAL) { Uninterruptibles.sleepUninterruptibly(10, TimeUnit.SECONDS); } }
Source:
<code>protected void validateImpl(@Nonnull DexType type) { Set<String> <START> notProcessedFields = <END> new HashSet<String>(validators.keySet()); for (DexField field : type.getFields()) { String name = field.getId(); DexValidator<DexField> validator = validators.get(name); if (validator != null) { notProcessedFields.remove(name); validator.validate(field); } } for (String field : notProcessedFields) { Assert.fail("Not processed field: " + field); } }</code><technical_language>sort fields (an other validation targets)? reason is assertion failure deterministic help. (as need deterministic in compiled output order)</technical_language>

Target:
protected void validateImpl(@Nonnull DexType type) { TreeSet<String> notProcessedFields = new TreeSet<String>(validators.keySet()); for (DexField field : type.getFields()) { String name = field.getId(); DexValidator<DexField> validator = validators.get(name); if (validator != null) { notProcessedFields.remove(name); validator.validate(field); } } for (String field : notProcessedFields) { Assert.fail("Not processed field: " + field); } }
Source:
<code>protected List<ResourceGroupSpec> getRootGroups() { if (lastRefresh.get() == 0) { throw new PrestoException(CONFIGURATION_UNAVAILABLE, "Root groups cannot be fetched from database"); } <START> if (System.nanoTime() - lastRefresh.get() > maxRefreshInterval.toMillis() * 1_000_000) { <END> throw new PrestoException( CONFIGURATION_UNAVAILABLE, format("Selectors cannot be fetched from database. Current selectors are loaded %s ago", succinctNanos(System.nanoTime() - lastRefresh.get()).toString())); } if (this.selectors.get().isEmpty()) { throw new PrestoException(CONFIGURATION_INVALID, "No root groups are configured"); } return rootGroups.get(); }</code><technical_language>logic succinctNanos is easier read</technical_language>

Target:
protected List<ResourceGroupSpec> getRootGroups() { checkMaxRefreshInterval(); if (this.selectors.get().isEmpty()) { throw new PrestoException(CONFIGURATION_INVALID, "No root groups are configured"); } return rootGroups.get(); }
Source:
<code><START> public Response removeAttachment(@PathParam("ID") String applicationId, @QueryParam("attachment") String attachment, @HeaderParam("Referer") String referer) { <END> try { if (!isApplicationCall(referer)) { return Response.status(Status.FORBIDDEN).build(); } java.nio.file.Path path = Paths.get(getSettingValue("application.storagePath"), applicationId, attachment); File file = path.toFile(); if (file.exists()) { if (file.delete()) { logger.log(Level.INFO, String.format("Removed application attachment %s", file.getAbsolutePath())); return Response.noContent().build(); } } } catch (Exception e) { logger.log(Level.SEVERE, String.format("Exception serving application attachment %s", attachment), e); return Response.status(Status.INTERNAL_SERVER_ERROR).build(); } return Response.status(Status.NOT_FOUND).build(); }</code><technical_language>(for endpoints involved) "String attachments" OS-paths (.., ., / etc)</technical_language>

Target:
public Response removeAttachment(@PathParam("ID") String applicationId, @QueryParam("attachment") String attachment, @HeaderParam("Referer") String referer) { if (!isApplicationCall(referer)) { return Response.status(Status.FORBIDDEN).build(); } String attachmentsFolder = getSettingValue("application.storagePath"); if (StringUtils.isEmpty(attachmentsFolder)) { logger.log(Level.SEVERE, "application.storagePath not set"); return Response.status(Status.INTERNAL_SERVER_ERROR).build(); } applicationId = sanitizeFilename(applicationId); attachment = sanitizeFilename(attachment); if (StringUtils.isEmpty(applicationId) || StringUtils.isEmpty(attachment)) { return Response.status(Status.BAD_REQUEST).build(); } try { java.nio.file.Path path = Paths.get(attachmentsFolder, applicationId, attachment); File file = path.toFile(); if (file.exists() && file.delete()) { logger.log(Level.INFO, String.format("Removed application attachment %s", file.getAbsolutePath())); return Response.noContent().build(); } } catch (Exception e) { logger.log(Level.SEVERE, String.format("Exception serving application attachment %s", attachment), e); return Response.status(Status.INTERNAL_SERVER_ERROR).build(); } return Response.status(Status.NOT_FOUND).build(); }
Source:
<code>protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putInt(STATE_KEY_NUM_ATTACHMENTS_LOADING, mNumAttachmentsLoading); outState.putString(STATE_KEY_WAITING_FOR_ATTACHMENTS, mWaitingForAttachments.name()); outState.putParcelableArrayList(STATE_KEY_ATTACHMENTS, createAttachmentList()); outState.putSerializable(STATE_KEY_QUOTED_TEXT_MODE, mQuotedTextMode); outState.putBoolean(STATE_KEY_SOURCE_MESSAGE_PROCED, mSourceMessageProcessed); outState.putLong(STATE_KEY_DRAFT_ID, mDraftId); outState.putSerializable(STATE_IDENTITY, mIdentity); outState.putBoolean(STATE_IDENTITY_CHANGED, mIdentityChanged); outState.putString(STATE_IN_REPLY_TO, mInReplyTo); outState.putString(STATE_REFERENCES, mReferences); outState.putSerializable(STATE_KEY_HTML_QUOTE, mQuotedHtmlContent); outState.putBoolean(STATE_KEY_READ_RECEIPT, mReadReceipt); outState.putBoolean(STATE_KEY_DRAFT_NEEDS_SAVING, draftNeedsSaving); outState.putBoolean(STATE_KEY_FORCE_PLAIN_TEXT, mForcePlainText); <START> outState.putSerializable(STATE_KEY_QUOTED_TEXT_FORMAT, mQuotedTextFormat); <END> outState.putBoolean(STATE_FIRST_TIME_EMPTY_SUBJECT, mFirstTimeEmptySubject); recipientPresenter.onSaveInstanceState(outState); }</code><technical_language>Again, empty line intentionally a visual divider</technical_language>

Target:
protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putInt(STATE_KEY_NUM_ATTACHMENTS_LOADING, mNumAttachmentsLoading); outState.putString(STATE_KEY_WAITING_FOR_ATTACHMENTS, mWaitingForAttachments.name()); outState.putParcelableArrayList(STATE_KEY_ATTACHMENTS, createAttachmentList()); outState.putSerializable(STATE_KEY_QUOTED_TEXT_MODE, mQuotedTextMode); outState.putBoolean(STATE_KEY_SOURCE_MESSAGE_PROCED, mSourceMessageProcessed); outState.putLong(STATE_KEY_DRAFT_ID, mDraftId); outState.putSerializable(STATE_IDENTITY, mIdentity); outState.putBoolean(STATE_IDENTITY_CHANGED, mIdentityChanged); outState.putString(STATE_IN_REPLY_TO, mInReplyTo); outState.putString(STATE_REFERENCES, mReferences); outState.putSerializable(STATE_KEY_HTML_QUOTE, mQuotedHtmlContent); outState.putBoolean(STATE_KEY_READ_RECEIPT, mReadReceipt); outState.putBoolean(STATE_KEY_DRAFT_NEEDS_SAVING, draftNeedsSaving); outState.putBoolean(STATE_KEY_FORCE_PLAIN_TEXT, mForcePlainText); outState.putSerializable(STATE_KEY_QUOTED_TEXT_FORMAT, mQuotedTextFormat); outState.putBoolean(STATE_ALREADY_NOTIFIED_USER_OF_EMPTY_SUBJECT, alreadyNotifiedUserOfEmptySubject); recipientPresenter.onSaveInstanceState(outState); }
Source:
<code>public static RequestBodyImpl createInstance(AnnotationModel annotation, ApiContext context) { RequestBodyImpl from = new RequestBodyImpl(); from.setDescription(annotation.getValue("description", String.class)); from.setRequired(annotation.getValue("required", Boolean.class)); String ref = annotation.getValue("ref", String.class); if (ref != null && !ref.isEmpty()) { from.setRef(ref); } final List<ContentImpl> contents = createList(); extractAnnotations(annotation, context, "content", ContentImpl::createInstance, contents::add); for (ContentImpl content : contents) { <START> ContentImpl.merge(content, from.content, true, context); <END> } return from; }</code><technical_language>existing design of OpenAPI Impl, merge operations invoked creation of instances. public void visitOpenAPI(AnnotationModel definition, AnnotatedElement element, ApiContext context) { OpenAPIImpl.merge(OpenAPIImpl.createInstance(definition, context), context.getApi(), true, context); }</technical_language>

Target:
public static RequestBodyImpl createInstance(AnnotationModel annotation, ApiContext context) { RequestBodyImpl from = new RequestBodyImpl(); from.setDescription(annotation.getValue("description", String.class)); from.setRequired(annotation.getValue("required", Boolean.class)); String ref = annotation.getValue("ref", String.class); if (ref != null && !ref.isEmpty()) { from.setRef(ref); } final List<ContentImpl> contents = createList(); extractAnnotations(annotation, context, "content", ContentImpl::createInstance, contents::add); for (ContentImpl content : contents) { content.getMediaTypes().forEach(from.content::addMediaType); } return from; }
Source:
<code><START> protected final void validatePage() { <END> String text = fNameField.getText(); RefactoringStatus status = fRefactoringProcessor.validateNewElementName(text); setPageComplete(status); }</code><technical_language>this method private</technical_language>

Target:
private void validatePage() { String text = fNameField.getText(); RefactoringStatus status = fRefactoringProcessor.validateNewElementName(text); setPageComplete(status); }
Source:
<code>private RevCommit createCommit(NoteMap map, PersonIdent author, String message, RevCommit... parents) throws IOException { <START> ObjectInserter inserter = db.newObjectInserter(); <END> CommitBuilder b = new CommitBuilder(); b.setTreeId(map.writeTree(inserter)); b.setAuthor(author); b.setCommitter(gerritIdent); if (parents.length > 0) { b.setParentIds(parents); } b.setMessage(message); return revWalk.parseCommit(inserter.insert(b)); }</code><technical_language>reuse ObjectInserter a field</technical_language>

Target:
private RevCommit createCommit(NoteMap map, PersonIdent author, String message, RevCommit... parents) throws IOException { CommitBuilder b = new CommitBuilder(); b.setTreeId(map.writeTree(inserter)); b.setAuthor(author); b.setCommitter(gerritIdent); if (parents.length > 0) { b.setParentIds(parents); } b.setMessage(message); ObjectId commitId = inserter.insert(b); inserter.flush(); return revWalk.parseCommit(commitId); }
Source:
<code>private static PlanFragment createValuesPlan() { Symbol symbol = new Symbol("column"); PlanNodeId valuesNodeId = new PlanNodeId("plan"); PlanFragment planFragment = new PlanFragment( new PlanFragmentId("plan"), new ValuesNode(valuesNodeId, ImmutableList.of(symbol), ImmutableList.of(ImmutableList.of(new StringLiteral("foo")))), ImmutableMap.of(symbol, VARCHAR), SOURCE_DISTRIBUTION, ImmutableList.of(valuesNodeId), new PartitioningScheme(Partitioning.create(SINGLE_DISTRIBUTION, ImmutableList.of()), ImmutableList.of(symbol)), StageExecutionStrategy.ungroupedExecution(), <START> emptyMap(), <END> emptyMap()); return planFragment; }</code><technical_language>ImmutableMap.of()</technical_language>

Target:
private static PlanFragment createValuesPlan() { Symbol symbol = new Symbol("column"); PlanNodeId valuesNodeId = new PlanNodeId("plan"); PlanFragment planFragment = new PlanFragment( new PlanFragmentId("plan"), new ValuesNode(valuesNodeId, ImmutableList.of(symbol), ImmutableList.of(ImmutableList.of(new StringLiteral("foo")))), ImmutableMap.of(symbol, VARCHAR), SOURCE_DISTRIBUTION, ImmutableList.of(valuesNodeId), new PartitioningScheme(Partitioning.create(SINGLE_DISTRIBUTION, ImmutableList.of()), ImmutableList.of(symbol)), StageExecutionStrategy.ungroupedExecution(), StatsAndCosts.empty()); return planFragment; }
Source:
<code>public void testDmPingResponse() throws IllegalAccessException { MsgEcho ping = new MsgEcho( "PING:TEST" ); AgentMessageProcessor processor = (AgentMessageProcessor) agent.getMessagingClient().getMessageProcessor(); processor.processMessage( ping ); List<Message> messages = this.client.messagesForTheDm; Assert.assertTrue( messages.size() == 1 ); Message message = messages.get(0); Assert.assertTrue( message instanceof MsgEcho ); MsgEcho echo = (MsgEcho) message; <START> Assert.assertTrue( echo.getContent().equals( "PONG:TEST" ) ); <END> }</code><technical_language>Assert.assertEquals</technical_language>

Target:
public void testDmPingResponse() throws IllegalAccessException { MsgEcho ping = new MsgEcho( "PING:TEST", 1234L ); AgentMessageProcessor processor = (AgentMessageProcessor) agent.getMessagingClient().getMessageProcessor(); processor.processMessage( ping ); List<Message> messages = this.client.messagesForTheDm; Assert.assertEquals( 1, messages.size() ); Message message = messages.get(0); Assert.assertTrue( message instanceof MsgEcho ); MsgEcho echo = (MsgEcho) message; Assert.assertEquals( "PONG:TEST", echo.getContent() ); Assert.assertEquals( 1234L, echo.getExpirationTime() ); }
Source:
<code>protected boolean canDoAction() { boolean retValue = true; if (disk == null) { retValue = false; addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_VM_IMAGE_DOES_NOT_EXIST); } <START> <END> if (retValue) { buildSharedLockMap(); } retValue = retValue && acquireLockInternal(); if (retValue && disk.getVmEntityType() == VmEntityType.VM && (getParameters().getStorageDomainId() == null || Guid.Empty.equals(getParameters().getStorageDomainId()))) { getParameters().setStorageDomainId(disk.getstorage_ids().get(0)); setStorageDomainId(disk.getstorage_ids().get(0)); } if (retValue && !disk.getstorage_ids().contains(getParameters().getStorageDomainId())) { retValue = false; addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STOARGE_DOMAIN_IS_WRONG); } StorageDomainValidator validator = new StorageDomainValidator(getStorageDomain()); retValue = retValue && validator.isDomainExistAndActive(getReturnValue().getCanDoActionMessages()) && validator.domainIsValidDestination(getReturnValue().getCanDoActionMessages()); if (retValue && disk.getimageStatus() == ImageStatus.LOCKED) { retValue = false; addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_OBJECT_LOCKED); } if (retValue) { if (disk.getVmEntityType() == VmEntityType.VM) { retValue = canRemoveVmDisk(); } else if (disk.getVmEntityType() == VmEntityType.TEMPLATE) { retValue = canRemoveTemplateDisk(); } } return retValue; }</code><technical_language>add acquireLockInternal if</technical_language>

Target:
protected boolean canDoAction() { boolean retValue = true; if (disk == null) { retValue = false; addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_VM_IMAGE_DOES_NOT_EXIST); } if (retValue) { buildSharedLockMap(); retValue = acquireLockInternal(); } if (retValue && disk.getVmEntityType() == VmEntityType.VM && (getParameters().getStorageDomainId() == null || Guid.Empty.equals(getParameters().getStorageDomainId()))) { getParameters().setStorageDomainId(disk.getstorage_ids().get(0)); setStorageDomainId(disk.getstorage_ids().get(0)); } if (retValue && !disk.getstorage_ids().contains(getParameters().getStorageDomainId())) { retValue = false; addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STOARGE_DOMAIN_IS_WRONG); } StorageDomainValidator validator = new StorageDomainValidator(getStorageDomain()); retValue = retValue && validator.isDomainExistAndActive(getReturnValue().getCanDoActionMessages()) && validator.domainIsValidDestination(getReturnValue().getCanDoActionMessages()); if (retValue && disk.getimageStatus() == ImageStatus.LOCKED) { retValue = false; addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_OBJECT_LOCKED); } if (retValue) { if (disk.getVmEntityType() == VmEntityType.VM) { retValue = canRemoveVmDisk(); } else if (disk.getVmEntityType() == VmEntityType.TEMPLATE) { retValue = canRemoveTemplateDisk(); } } return retValue; }
Source:
<code><START> protected PrestoVerifier() <END> { }</code><technical_language>I this private PrestoVerifier() {}</technical_language>

Target:
private PrestoVerifier() { }
Source:
<code><START> public default <A extends Statement> A addAndGetStatement(A statement) { <END> getStmts().add(statement); statement.setParentNode((Node) this); return statement; }</code><technical_language>Intellij tells "public" is necessary here</technical_language>

Target:
default <A extends Statement> A addAndGetStatement(A statement) { getStmts().add(statement); statement.setParentNode((Node) this); return statement; }
Source:
<code>private String schemaDisplayName(final String connectionName) { if ("REJECT".equalsIgnoreCase(connectionName)) { return "Reject Schema"; } if (EConnectionType.FLOW_MAIN.getName().equalsIgnoreCase(connectionName)) { return "Schema"; } <START> return "Schema" + " " + connectionName; <END> }</code><technical_language>need concatenate "Schema" " ", done a single string here</technical_language>

Target:
private String schemaDisplayName(final String connectionName) { if ("REJECT".equalsIgnoreCase(connectionName)) { return "Reject Schema"; } if (EConnectionType.FLOW_MAIN.getName().equalsIgnoreCase(connectionName)) { return "Schema"; } return "Schema " + connectionName; }