auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void bindTo(MeterRegistry registry) { stoppedCounter = Counter.builder(workspaceMetric("stopped.total")) .description("The count of stopped workspaces") .register(registry); eventService.subscribe( event -> { <START> if (event.getPrevStatus() == WorkspaceStatus.STOPPING <END> && event.getStatus() == WorkspaceStatus.STOPPED) { stoppedCounter.increment(); } }, WorkspaceStatusEvent.class); }</code><technical_language>I guess check if error is empty</technical_language>

Target:
public void bindTo(MeterRegistry registry) { stoppedCounter = Counter.builder(workspaceMetric("stopped.total")) .description("The count of stopped workspaces") .register(registry); eventService.subscribe( event -> { if ((event.getError() == null) && (event.getPrevStatus() == WorkspaceStatus.STOPPING && event.getStatus() == WorkspaceStatus.STOPPED)) { stoppedCounter.increment(); } }, WorkspaceStatusEvent.class); }
Source:
<code>private void handleCreateTableMutationCode(MetaDataMutationResult result, MutationCode code, CreateTableStatement statement, String schemaName, String tableName, PTable parent) throws SQLException { switch(code) { case NEWER_TABLE_FOUND: if (!statement.ifNotExists()) { throw new NewerTableAlreadyExistsException(schemaName, tableName, result.getTable()); } case UNALLOWED_TABLE_MUTATION: throw new SQLExceptionInfo.Builder(SQLExceptionCode.CANNOT_MUTATE_TABLE) .setSchemaName(schemaName).setTableName(tableName).build().buildException(); case CONCURRENT_TABLE_MUTATION: addTableToCache(result); throw new ConcurrentTableMutationException(schemaName, tableName); case AUTO_PARTITION_SEQUENCE_NOT_FOUND: case CANNOT_COERCE_AUTO_PARTITION_ID: case UNABLE_TO_CREATE_CHILD_LINK: case PARENT_TABLE_NOT_FOUND: case TABLE_NOT_IN_REGION: <START> throwsSQLExceptionUtil(String.valueOf(code), schemaName, tableName); <END> case TOO_MANY_INDEXES: case UNABLE_TO_UPDATE_PARENT_TABLE: throwsSQLExceptionUtil(String.valueOf(code), SchemaUtil.getSchemaNameFromFullName( parent.getPhysicalName().getString()),SchemaUtil.getTableNameFromFullName( parent.getPhysicalName().getString())); default: throw new SQLException("Exception occurred while creating table Mutation code:" + code.toString()); } }</code><technical_language>nice simplification</technical_language>

Target:
public boolean handleCreateTableMutationCode(MetaDataMutationResult result, MutationCode code, CreateTableStatement statement, String schemaName, String tableName, PTable parent) throws SQLException { switch(code) { case TABLE_ALREADY_EXISTS: if(result.getTable() != null) { addTableToCache(result); } if(!statement.ifNotExists()) { throw new TableAlreadyExistsException(schemaName, tableName, result.getTable()); } return true; case NEWER_TABLE_FOUND: if (!statement.ifNotExists()) { throw new NewerTableAlreadyExistsException(schemaName, tableName, result.getTable()); } return false; case UNALLOWED_TABLE_MUTATION: throwsSQLExceptionUtil("CANNOT_MUTATE_TABLE",schemaName,tableName); case CONCURRENT_TABLE_MUTATION: addTableToCache(result); throw new ConcurrentTableMutationException(schemaName, tableName); case AUTO_PARTITION_SEQUENCE_NOT_FOUND: throw new SQLExceptionInfo.Builder(SQLExceptionCode.AUTO_PARTITION_SEQUENCE_UNDEFINED) .setSchemaName(schemaName).setTableName(tableName).build().buildException(); case CANNOT_COERCE_AUTO_PARTITION_ID: case UNABLE_TO_CREATE_CHILD_LINK: case PARENT_TABLE_NOT_FOUND: case TABLE_NOT_IN_REGION: throwsSQLExceptionUtil(String.valueOf(code), schemaName, tableName); case TOO_MANY_INDEXES: case UNABLE_TO_UPDATE_PARENT_TABLE: throwsSQLExceptionUtil(String.valueOf(code), SchemaUtil.getSchemaNameFromFullName( parent.getPhysicalName().getString()),SchemaUtil.getTableNameFromFullName( parent.getPhysicalName().getString())); default: throw new SQLExceptionInfo.Builder(SQLExceptionCode.UNEXPECTED_MUTATION_CODE) .setSchemaName(schemaName).setTableName(tableName).setMessage("mutation code: " + code).build().buildException(); } }
Source:
<code>protected void process(final SpaceReference source, final SpaceReference destination) { visitDocuments(source, new Visitor<DocumentReference>() { @Override public void visit(DocumentReference oldChildReference) { DocumentReference newChildReference = oldChildReference.replaceParent(source, destination); <START> if (MoveJob.this.hasAccess(Right.VIEW, newChildReference)) { <END> maybeMove(oldChildReference, newChildReference); } } }); }</code><technical_language>I understand this check is here. maybeMove is check of checking rights</technical_language>

Target:
protected void process(final SpaceReference source, final SpaceReference destination) { visitDocuments(source, new Visitor<DocumentReference>() { @Override public void visit(DocumentReference oldChildReference) { DocumentReference newChildReference = oldChildReference.replaceParent(source, destination); maybeMove(oldChildReference, newChildReference); } }); }
Source:
<code><START> File remove(long sizeInBytes) { <END> rwLock.writeLock().lock(); try { File reserveFile = null; Queue<File> reserveFilesForSize = internalMap.get(sizeInBytes); if (reserveFilesForSize != null) { if (reserveFilesForSize.size() != 0) { reserveFile = reserveFilesForSize.remove(); } if (reserveFilesForSize.size() == 0) { internalMap.remove(sizeInBytes); } } return reserveFile; } finally { rwLock.writeLock().unlock(); } }</code><technical_language>check for return throw if false</technical_language>

Target:
File remove(long sizeInBytes) { File reserveFile = null; Queue<File> reserveFilesForSize = internalMap.get(sizeInBytes); if (reserveFilesForSize != null && reserveFilesForSize.size() != 0) { reserveFile = reserveFilesForSize.remove(); } return reserveFile; }
Source:
<code>public List<NameValuePair> extract(EpdqTemplateData templateData) { List<NameValuePair> nameValuePairs = super.extract(templateData); EpdqParameterBuilder parameterBuilder = newParameterBuilder(nameValuePairs) .add(BROWSER_COLOR_DEPTH, getBrowserColorDepth(templateData)); <START> if (isNotBlank(templateData.getAuthCardDetails().getJsNavigatorLanguage())) { <END> parameterBuilder.add(BROWSER_LANGUAGE, getBrowserLanguage(templateData)); } return parameterBuilder.build(); }</code><technical_language>I a null check I need a blank string check. Locale.forLanguageTag("").toLanguageTag() Locale.forLanguageTag(" ").toLanguageTag() similar return "und" (undefined), is a legitimate language tag. I need worry edge case of browsers sending a valid language tag (however, do need deal JavaScript enabled do null check). Plus, if do a null check a blank string check, cool code this: java String language = Optional.ofNullable(templateData.getAuthCardDetails().getJsNavigatorLanguage()) .map(Locale::forLanguageTag).map(Locale::toLanguageTag).orElse("en-GB");</technical_language>

Target:
public List<NameValuePair> extract(EpdqTemplateData templateData) { List<NameValuePair> nameValuePairs = super.extract(templateData); EpdqParameterBuilder parameterBuilder = newParameterBuilder(nameValuePairs) .add(BROWSER_COLOR_DEPTH, getBrowserColorDepth(templateData)); Optional.ofNullable(templateData.getAuthCardDetails().getJsNavigatorLanguage()) .map(Locale::forLanguageTag).map(Locale::toLanguageTag).ifPresent(lang -> parameterBuilder.add(BROWSER_LANGUAGE, lang)); return parameterBuilder.build(); }
Source:
<code>public SpeakerViewHolder(View itemView, Context context) { super(itemView); ButterKnife.bind(this, itemView); this.context = context; itemView.setOnClickListener(view -> { String speakerName = speaker.getName(); Intent intent = new Intent(this.context, SpeakerDetailsActivity.class); <START> intent.putExtra(Speaker.Companion.getSPEAKER(), speakerName); <END> try{ if(android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP){ Bundle bundle = ActivityOptions.makeSceneTransitionAnimation((Activity) this.context, speakerImage, speakerImage.getTransitionName()).toBundle(); this.context.startActivity(intent, bundle); } else{ this.context.startActivity(intent); } } catch(Exception e){ Timber.d("Speaker's transition doesnt occur"); } }); }</code><technical_language>Companion</technical_language>

Target:
public SpeakerViewHolder(View itemView, Context context) { super(itemView); ButterKnife.bind(this, itemView); this.context = context; itemView.setOnClickListener(view -> { String speakerName = speaker.getName(); Intent intent = new Intent(this.context, SpeakerDetailsActivity.class); intent.putExtra(Speaker.SPEAKER, speakerName); try{ if(android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP){ Bundle bundle = ActivityOptions.makeSceneTransitionAnimation((Activity) this.context, speakerImage, speakerImage.getTransitionName()).toBundle(); this.context.startActivity(intent, bundle); } else{ this.context.startActivity(intent); } } catch(Exception e){ Timber.d("Speaker's transition doesnt occur"); } }); }
Source:
<code>public static boolean needToAnalyze(Result result) { <START> if (getInstance().doNotAnalyzeAbortedJob()) { <END> return result != Result.SUCCESS && result != Result.ABORTED; } else { return result != Result.SUCCESS; } }</code><technical_language>find out if manually aborted pseudo code java InterruptedBuildAction a = build.getAction(InterruptedBuildAction.class); for(CauseOfInterruption : a.getCauses()) { if (cause instanceof UserInterruption) { //User aborted run, do } }</technical_language>

Target:
public static boolean needToAnalyze(Result result) { if (getInstance().isDoNotAnalyzeAbortedJob()) { return result != Result.SUCCESS && result != Result.ABORTED; } else { return result != Result.SUCCESS; } }
Source:
<code>public String setMoveTooltip(MergeMode mode, Diff diff, boolean isFromLeft) { EObject right = null; EObject left = null; EObject ancestor = null; String tooltip; <START> boolean isContainmentReference = false; if (diff instanceof ReferenceChange) { if (((ReferenceChange)diff).getReference().isContainment()) { isContainmentReference = true; <END> Match valueMatch = diff.getMatch().getComparison().getMatch( ((ReferenceChange)diff).getValue()); left = valueMatch.getLeft(); right = valueMatch.getRight(); ancestor = valueMatch.getOrigin(); } } if (isContainmentReference && isContainerMove(isFromLeft, ancestor, right, left)) { tooltip = setMoveContainerTooltip(mode, diff, isFromLeft, left, right, ancestor); } else { tooltip = setMovePositionTooltip(mode, diff, isFromLeft); } return tooltip; }</code><technical_language>check for containment in a method of, I think, AddTooltipManager. extracted, if exist in a util class</technical_language>

Target:
public String setMoveTooltip(MergeMode mode, Diff diff, boolean isFromLeft) { EObject right = null; EObject left = null; EObject ancestor = null; String tooltip; boolean isContainmentReference = isContainmentReferenceChange(diff); if (isContainmentReference) { Match valueMatch = diff.getMatch().getComparison().getMatch(((ReferenceChange)diff).getValue()); left = valueMatch.getLeft(); right = valueMatch.getRight(); ancestor = valueMatch.getOrigin(); } if (isContainmentReference && isContainerMove(isFromLeft, ancestor, right, left)) { tooltip = setMoveContainerTooltip(mode, diff, isFromLeft, left, right, ancestor); } else { tooltip = setMovePositionTooltip(mode, diff, isFromLeft); } return tooltip; }
Source:
<code>private void addJoinFieldMapping(XContentBuilder builder, ElasticsearchPersistentProperty property) throws IOException { JoinTypeRelation[] joinTypeRelations = property.getRequiredAnnotation(JoinTypeRelations.class).relations(); if (joinTypeRelations.length == 0) { return; } builder.startObject(property.getFieldName()); <START> <END> builder.field(FIELD_PARAM_TYPE, TYPE_VALUE_JOIN); builder.startObject(JOIN_TYPE_RELATIONS); for (JoinTypeRelation joinTypeRelation: joinTypeRelations) { String parent = joinTypeRelation.parent(); String[] children = joinTypeRelation.children(); if (children.length > 1) { builder.array(parent, children); } else if (children.length == 1) { builder.field(parent, children[0]); } } builder.endObject(); builder.endObject(); }</code><technical_language>I log a warning message here, sense a JoinField proper annotations</technical_language>

Target:
private void addJoinFieldMapping(XContentBuilder builder, ElasticsearchPersistentProperty property) throws IOException { JoinTypeRelation[] joinTypeRelations = property.getRequiredAnnotation(JoinTypeRelations.class).relations(); if (joinTypeRelations.length == 0) { logger.warn("Property {}s type is JoinField but its annotation JoinTypeRelation is " + "not properly maintained", property.getFieldName()); return; } builder.startObject(property.getFieldName()); builder.field(FIELD_PARAM_TYPE, TYPE_VALUE_JOIN); builder.startObject(JOIN_TYPE_RELATIONS); for (JoinTypeRelation joinTypeRelation: joinTypeRelations) { String parent = joinTypeRelation.parent(); String[] children = joinTypeRelation.children(); if (children.length > 1) { builder.array(parent, children); } else if (children.length == 1) { builder.field(parent, children[0]); } } builder.endObject(); builder.endObject(); }
Source:
<code>public void testSchemaTypePromotion() throws Exception { <START> LOG.debug("########## testSchemaTypePromotion ##############"); <END> InputStream stream = new ByteArrayInputStream(csvLines2.getBytes("utf8")); Schema schema = CSVUtil.inferSchema("TestRecord", stream, new CSVProperties.Builder().hasHeader().build()); Assert.assertNotNull(schema.getField("long")); Assert.assertNotNull(schema.getField("nullable_double")); Assert.assertNotNull(schema.getField("nullable_double2")); Assert.assertNotNull(schema.getField("string")); Assert.assertEquals("Should infer a long", schema(Schema.Type.LONG), schema.getField("long").schema()); Assert.assertEquals("Should infer a double (third row is decimal)", nullable(Schema.Type.DOUBLE), schema.getField("nullable_double").schema()); Assert.assertEquals("Should infer a double (second row is decimal)", nullable(Schema.Type.DOUBLE), schema.getField("nullable_double2").schema()); Assert.assertEquals("Should infer a nullable string (third row is string)", schema(Schema.Type.STRING), schema.getField("string").schema()); LOG.debug("########## END typePromotion ############"); }</code><technical_language>need for debug lines here, please</technical_language>

Target:
public void testSchemaTypePromotion() throws Exception { InputStream stream = new ByteArrayInputStream(csvLines2.getBytes("utf8")); Schema schema = CSVUtil.inferSchema("TestRecord", stream, new CSVProperties.Builder().hasHeader().build()); Assert.assertNotNull(schema.getField("long")); Assert.assertNotNull(schema.getField("nullable_double")); Assert.assertNotNull(schema.getField("nullable_double2")); Assert.assertNotNull(schema.getField("string")); Assert.assertEquals("Should infer a long", schema(Schema.Type.LONG), schema.getField("long").schema()); Assert.assertEquals("Should infer a double (third row is decimal)", nullable(Schema.Type.DOUBLE), schema.getField("nullable_double").schema()); Assert.assertEquals("Should infer a double (second row is decimal)", nullable(Schema.Type.DOUBLE), schema.getField("nullable_double2").schema()); Assert.assertEquals("Should infer a nullable string (third row is string)", schema(Schema.Type.STRING), schema.getField("string").schema()); }
Source:
<code>public void deleteLoadBalancerDomainFromFreeIPA(Stack stack) { if (manageCertificateAndDnsInPem()) { Set<LoadBalancer> loadBalancers = loadBalancerPersistenceService.findByStackId(stack.getId()); if (!loadBalancers.isEmpty()) { Optional<LoadBalancer> loadBalancerOptional = selectLoadBalancer(loadBalancers); if (loadBalancerOptional.isEmpty()) { LOGGER.debug("Unabled to determine load balancer type. Load balancer will not be deleted from FreeIPA."); <START> return; <END> } LoadBalancer loadBalancer = loadBalancerOptional.get(); String endpoint = loadBalancer.getEndpoint(); String domain = getDomainFromStack(stack); if (StringUtils.isNotEmpty(loadBalancer.getDns())) { dnsV1Endpoint.deleteDnsCnameRecord(stack.getEnvironmentCrn(), domain, endpoint); } else if (StringUtils.isNotEmpty(loadBalancer.getIp())) { dnsV1Endpoint.deleteDnsARecord(stack.getEnvironmentCrn(), domain, endpoint); } else { LOGGER.debug("Unable to find DNS or IP for load balancer. Load balancer will not be deleted from FreeIPA."); } } } }</code><technical_language>for this return</technical_language>

Target:
public void deleteLoadBalancerDomainFromFreeIPA(Stack stack) { if (manageCertificateAndDnsInPem()) { Set<LoadBalancer> loadBalancers = loadBalancerPersistenceService.findByStackId(stack.getId()); if (!loadBalancers.isEmpty()) { Optional<LoadBalancer> loadBalancerOptional = loadBalancerConfigService.selectLoadBalancer(loadBalancers, LoadBalancerType.PRIVATE); if (loadBalancerOptional.isPresent()) { LoadBalancer loadBalancer = loadBalancerOptional.get(); String endpoint = loadBalancer.getEndpoint(); String domain = getDomainFromStack(stack); try { if (StringUtils.isNotEmpty(loadBalancer.getDns())) { LOGGER.debug("Deleted load balancer with CNAME from FreeIPA", endpoint); dnsV1Endpoint.deleteDnsCnameRecord(stack.getEnvironmentCrn(), domain, endpoint); } else if (StringUtils.isNotEmpty(loadBalancer.getIp())) { LOGGER.debug("Deleted load balancer with A record from FreeIPA", endpoint); dnsV1Endpoint.deleteDnsARecord(stack.getEnvironmentCrn(), domain, endpoint); } else { LOGGER.debug("Unable to find DNS or IP for load balancer. Load balancer will not be deleted from FreeIPA."); } } catch (Exception e) { LOGGER.error("Unable to delete load balancer domain from FreeIPA", e); } } else { LOGGER.debug("Unable to determine load balancer type. Load balancer will not be deleted from FreeIPA."); } } } }
Source:
<code>public CompilePanel(CompileOutputDisplay outputDisplay) { <START> panel_ = new FocusPanel(); <END> outputDisplay_ = outputDisplay; panel_.setWidget(outputDisplay_.asWidget()); errorList_ = new SourceMarkerList(); initWidget(panel_); }</code><technical_language>purpose of a FocusPanel here</technical_language>

Target:
public CompilePanel(CompileOutputDisplay outputDisplay) { panel_ = new SimplePanel(); outputDisplay_ = outputDisplay; panel_.setWidget(outputDisplay_.asWidget()); errorList_ = new SourceMarkerList(); initWidget(panel_); }
Source:
<code>public void init(IActionBars bars, IWorkbenchPage page) { for (Object <START> element : <END> cache) { ((EditorContribution) element).contribute(bars.getMenuManager(), false, bars.getToolBarManager(), true); } }</code><technical_language>rename contribution</technical_language>

Target:
public void init(IActionBars bars, IWorkbenchPage page) { for (Object contribution : cache) { ((EditorContribution) contribution).contribute(bars.getMenuManager(), false, bars.getToolBarManager(), true); } }
Source:
<code>public void download(Batch batch, Map<DownloadBatchId, DownloadBatch> downloadBatchMap) { DownloadBatch runningDownloadBatch = downloadBatchMap.get(batch.downloadBatchId()); if (runningDownloadBatch != null) { <START> Log.w("Ignoring duplicate batch with id " + batch.downloadBatchId()); <END> return; } CallbackThrottle callbackThrottle = callbackThrottleCreator.create(); DownloadBatch downloadBatch = DownloadBatchFactory.newInstance( batch, fileOperations, downloadsBatchPersistence, downloadsFilePersistence, callbackThrottle, connectionChecker ); downloadBatch.persist(); download(downloadBatch, downloadBatchMap); }</code><technical_language>This triggered submitAllStoredDownloads right? say: "Already running download for DownloadBatchId: %s , ensure duplicating identifiers."</technical_language>

Target:
public void download(Batch batch, Map<DownloadBatchId, DownloadBatch> downloadBatchMap) { DownloadBatch runningDownloadBatch = downloadBatchMap.get(batch.downloadBatchId()); if (runningDownloadBatch != null) { Log.w(String.format( "Already running download for DownloadBatchId: %s, ensure you are not duplicating identifiers.", batch.downloadBatchId().rawId() )); return; } CallbackThrottle callbackThrottle = callbackThrottleCreator.create(); DownloadBatch downloadBatch = DownloadBatchFactory.newInstance( batch, fileOperations, downloadsBatchPersistence, downloadsFilePersistence, callbackThrottle, connectionChecker ); downloadBatch.persist(); download(downloadBatch, downloadBatchMap); }
Source:
<code>public ServerPermission(String name, String actions) { super(name, actions); <START> } <END></code><technical_language>reason include unused constructor</technical_language>

Target:
public ServerPermission(String name, String actions) { super(validatePermissionName(name), validatePermissionActions(actions)); }
Source:
<code><START> public FunctionImplementationType getFunctionImplementationType() <END> { return SQL; }</code><technical_language>This a function derived RoutineCharacteristics.language. is expose language implementation type</technical_language>

Target:
public FunctionImplementationType getFunctionImplementationType() { return FunctionImplementationType.SQL; }
Source:
<code><START> public Boolean getSabbatical() <END> { return _sabbatical; }</code><technical_language>Boolean instead of boolean</technical_language>

Target:
public boolean getSabbatical() { return _sabbatical; }
Source:
<code>public Collection<Ref> call() throws GitAPIException, JGitInternalException { checkCallable(); Transport transport = null; try { transport = Transport.open(repo, remote); transport.setOptionUploadPack(uploadPack); configure(transport); Collection<RefSpec> refSpecs = new ArrayList<RefSpec>(1); if (tags) refSpecs.add(new RefSpec( "refs/tags/*:refs/remotes/origin/tags/*")); if (heads) refSpecs.add(new RefSpec("refs/heads/*:refs/remotes/origin/*")); Collection<Ref> refs; Map<String, Ref> refmap = new HashMap<String, Ref>(); <START> FetchConnection fc = transport.openFetch(); <END> try { refs = fc.getRefs(); if (refSpecs.isEmpty()) for (Ref r : refs) refmap.put(r.getName(), r); else for (Ref r : refs) for (RefSpec rs : refSpecs) if (rs.matchSource(r)) { refmap.put(r.getName(), r); break; } } finally { fc.close(); } return refmap.values(); } catch (URISyntaxException e) { throw new InvalidRemoteException(MessageFormat.format( JGitText.get().invalidRemote, remote)); } catch (TransportException e) { throw new JGitInternalException( JGitText.get().exceptionCaughtDuringExecutionOfLsRemoteCommand, e); } catch (NotSupportedException e) { throw new JGitInternalException( JGitText.get().exceptionCaughtDuringExecutionOfLsRemoteCommand, e); } finally { if (transport != null) transport.close(); } }</code><technical_language>move this variable out of try blocks close in finally transport is closed. a single try block in this method</technical_language>

Target:
public Collection<Ref> call() throws GitAPIException, JGitInternalException { checkCallable(); Transport transport = null; FetchConnection fc = null; try { transport = Transport.open(repo, remote); transport.setOptionUploadPack(uploadPack); configure(transport); Collection<RefSpec> refSpecs = new ArrayList<RefSpec>(1); if (tags) refSpecs.add(new RefSpec( "refs/tags/*:refs/remotes/origin/tags/*")); if (heads) refSpecs.add(new RefSpec("refs/heads/*:refs/remotes/origin/*")); Collection<Ref> refs; Map<String, Ref> refmap = new HashMap<String, Ref>(); fc = transport.openFetch(); refs = fc.getRefs(); if (refSpecs.isEmpty()) for (Ref r : refs) refmap.put(r.getName(), r); else for (Ref r : refs) for (RefSpec rs : refSpecs) if (rs.matchSource(r)) { refmap.put(r.getName(), r); break; } return refmap.values(); } catch (URISyntaxException e) { throw new InvalidRemoteException(MessageFormat.format( JGitText.get().invalidRemote, remote)); } catch (TransportException e) { throw new JGitInternalException( JGitText.get().exceptionCaughtDuringExecutionOfLsRemoteCommand, e); } catch (NotSupportedException e) { throw new JGitInternalException( JGitText.get().exceptionCaughtDuringExecutionOfLsRemoteCommand, e); } finally { if (fc != null) fc.close(); if (transport != null) transport.close(); } }
Source:
<code>public void process(String programmeId) { Map<String, Identified> resolvedContent = contentResolver.findByCanonicalUris(ImmutableSet.of(PaHelper.getFilmUri(programmeId), PaHelper.getEpisodeUri(programmeId))).asResolvedMap(); try { Item item = (Item) Iterables.getOnlyElement(resolvedContent.values()); Broadcast broadcast = BY_BROADCAST_DATE.min(Iterables.concat(Iterables.transform(item.getVersions(), Version.TO_BROADCASTS))); if (featureDate.contains(broadcast.getTransmissionTime())) { contentGroup.addContent(item.childRef()); } } catch (NoSuchElementException e) { <START> log .error("No content found for programme Id: " + programmeId, e); <END> } }</code><technical_language>throw exception here; called process a programmeId, expects programmeId processed. If happen of error, caller decide deal it. If log do nothing, decision</technical_language>

Target:
public void process(String programmeId) { Map<String, Identified> resolvedContent = contentResolver.findByCanonicalUris(ImmutableSet.of(PaHelper.getFilmUri(programmeId), PaHelper.getEpisodeUri(programmeId))).asResolvedMap(); Item item = (Item) Iterables.getOnlyElement(resolvedContent.values()); Broadcast broadcast = BY_BROADCAST_DATE.min(Iterables.concat(Iterables.transform(item.getVersions(), Version.TO_BROADCASTS))); if (featureDate.contains(broadcast.getTransmissionTime())) { contentGroup.addContent(item.childRef()); } }
Source:
<code><START> private Optional<String> getSystemDefaultStreamProperty(String systemName, String propertyName) { <END> Map<String, String> defaultStreamProperties = getDefaultStreamProperties(systemName); String defaultStreamProperty = defaultStreamProperties.get(propertyName); if (StringUtils.isNotEmpty(defaultStreamProperty)) { return Optional.of(defaultStreamProperty); } else { String fallbackStreamProperty = get(String.format(SYSTEMS_PREFIX + "%s.%s", systemName, propertyName)); if (StringUtils.isNotEmpty(fallbackStreamProperty)) { return Optional.of(fallbackStreamProperty); } else { return Optional.empty(); } } }</code><technical_language>Minor: add java docs for this method</technical_language>

Target:
private Optional<String> getSystemDefaultStreamProperty(String systemName, String propertyName) { Map<String, String> defaultStreamProperties = getDefaultStreamProperties(systemName); String defaultStreamProperty = defaultStreamProperties.get(propertyName); if (StringUtils.isNotEmpty(defaultStreamProperty)) { return Optional.of(defaultStreamProperty); } else { String fallbackStreamProperty = get(String.format(SYSTEM_ID_PREFIX, systemName) + propertyName); if (StringUtils.isNotEmpty(fallbackStreamProperty)) { return Optional.of(fallbackStreamProperty); } else { return Optional.empty(); } } }
Source:
<code>public void validate_shouldFailIfDestDoesNotMatchAFilePattern() { ArtifactPlan artifactPlan = new ArtifactPlan("foo/bar", ".."); artifactPlan.validate(null); <START> assertThat(artifactPlan.errors().on(ArtifactPlan.DEST), is("Invalid destination path. Destination path should match the pattern " + FilePathTypeValidator.PATH_PATTERN)); <END> }</code><technical_language>error message please :) lines of "must a relative path" reads a regular expression</technical_language>

Target:
public void validate_shouldFailIfDestDoesNotMatchAFilePattern() { ArtifactPlan artifactPlan = new ArtifactPlan("foo/bar", ".."); artifactPlan.validate(null); assertThat(artifactPlan.errors().on(ArtifactPlan.DEST), is("Invalid destination path. Destination path should match the pattern (([.]\\/)?[.][^. ]+)|([^. ].+[^. ])|([^. ][^. ])|([^. ])")); }
Source:
<code>public void onSiteChanged(OnSiteChanged event) { if (getSelectedSite() == null && mSiteStore.hasSite()) { setSelectedSite(mSiteStore.getSites().get(0)); } if (getSelectedSite() == null) { return; } SiteModel site = mSiteStore.getSiteByLocalId(getSelectedSite().getId()); if (site != null) { mSelectedSite = site; } if (getMySiteFragment() != null) { getMySiteFragment().onSiteChanged(); <START> } <END> }</code><technical_language>site is assigned mSiteStore.getSiteByLocalId(getSelectedSite().getId()) this, pass getMySiteFragment().onSiteChanged() getMySiteFragment().onSiteChanged(site) avoid calling getSelectedSite() refreshSelectedSiteDetails(getSelectedSite()) in MySiteFragment.onSiteChanged()? MySiteFragment.getSelectedSite() method calls WPMainActivity.getSelectedSite(), passing site getMySiteFragment().onSiteChanged(site), right</technical_language>

Target:
public void onSiteChanged(OnSiteChanged event) { if (getSelectedSite() == null && mSiteStore.hasSite()) { setSelectedSite(mSiteStore.getSites().get(0)); } if (getSelectedSite() == null) { return; } SiteModel site = mSiteStore.getSiteByLocalId(getSelectedSite().getId()); if (site != null) { mSelectedSite = site; } if (getMySiteFragment() != null) { getMySiteFragment().onSiteChanged(site); } }
Source:
<code>public int compare(ScanNode o1, ScanNode o2) { <START> return (int) (GlobalPlanRewriteUtil.getTableVolume(o1) - GlobalPlanRewriteUtil.getTableVolume(o2)); <END> }</code><technical_language>overflow difference of table volumes more range of integer value</technical_language>

Target:
public int compare(ScanNode o1, ScanNode o2) { long compare = GlobalPlanRewriteUtil.getTableVolume(o1) - GlobalPlanRewriteUtil.getTableVolume(o2); if (compare == 0) { return 0; } else if (compare > 0) { return 1; } else { return -1; } }
Source:
<code>public Map<Long, Number> mapping(Map<Long, Number> originalDatapoints, List<String> constants) { SystemAssert.requireArgument(constants != null && constants.size() == 1, "If constants provided for diff transform, only exactly one constant allowed."); Map<Long, Number> diffDatapoints = new HashMap<>(); Number subtrahend; try { subtrahend = Long.parseLong(constants.get(0)); } catch (NumberFormatException nfe) { try { subtrahend = Double.parseDouble(constants.get(0)); <START> } catch (NumberFormatException nfe2) { <END> throw new SystemException("Illegal constant value " + constants.get(0) + " supplied to diff transform."); } } for (Map.Entry<Long, Number> entry : originalDatapoints.entrySet()) { diffDatapoints.put(entry.getKey(), NumberOperations.subtract(entry.getValue(), subtrahend)); } return diffDatapoints; }</code><technical_language>This double-try-catch logic for extracting a long-or-double multiple times in this PR, I suggest wrapping a helper method in NumberOperations code chunks a one-liner. stack trace of resulting exception user transform</technical_language>

Target:
public Map<Long, Number> mapping(Map<Long, Number> originalDatapoints, List<String> constants) { SystemAssert.requireArgument(constants != null && constants.size() == 1, "If constants provided for diff transform, only exactly one constant allowed."); Map<Long, Number> diffDatapoints = new HashMap<>(); Number subtrahend; try { subtrahend = NumberOperations.parseConstant(constants.get(0)); } catch (IllegalArgumentException iae) { throw new SystemException("Illegal constant supplied to Diff Value Reducer: " + constants.get(0)); } for (Map.Entry<Long, Number> entry : originalDatapoints.entrySet()) { diffDatapoints.put(entry.getKey(), NumberOperations.subtract(entry.getValue(), subtrahend)); } return diffDatapoints; }
Source:
<code>private void runPendingTasks() { runPendingTasksExec.submit( new Callable<Void>() { @Override public Void call() throws Exception { try { List<RemoteTaskRunnerWorkItem> copy = Lists.newArrayList(pendingTasks.values()); for (RemoteTaskRunnerWorkItem taskRunnerWorkItem : copy) { String taskId = taskRunnerWorkItem.getTaskId(); try { if (tryAssignTasks.putIfAbsent(taskId, taskId) == null && tryAssignTask(pendingTaskPayloads.get(taskId), taskRunnerWorkItem)) { pendingTaskPayloads.remove(taskId); } } catch (Exception e) { log.makeAlert(e, "Exception while trying to assign task") .addData("taskId", taskRunnerWorkItem.getTaskId()) .emit(); RemoteTaskRunnerWorkItem workItem = pendingTasks.remove(taskId); taskComplete(workItem, null, TaskStatus.failure(taskId)); } finally { <START> tryAssignTasks.remove(taskId); <END> } } } catch (Exception e) { log.makeAlert(e, "Exception in running pending tasks").emit(); } return null; } } ); }</code><technical_language>I this run if tryAssignTasks.putIfAbsent returned non-null, means some other thread is handling this task</technical_language>

Target:
private void runPendingTasks() { runPendingTasksExec.submit( new Callable<Void>() { @Override public Void call() throws Exception { try { List<RemoteTaskRunnerWorkItem> copy = Lists.newArrayList(pendingTasks.values()); for (RemoteTaskRunnerWorkItem taskRunnerWorkItem : copy) { String taskId = taskRunnerWorkItem.getTaskId(); if (tryAssignTasks.putIfAbsent(taskId, taskId) == null) { try { if (tryAssignTask(pendingTaskPayloads.get(taskId), taskRunnerWorkItem)) { pendingTaskPayloads.remove(taskId); } } catch (Exception e) { log.makeAlert(e, "Exception while trying to assign task") .addData("taskId", taskRunnerWorkItem.getTaskId()) .emit(); RemoteTaskRunnerWorkItem workItem = pendingTasks.remove(taskId); taskComplete(workItem, null, TaskStatus.failure(taskId)); } finally { tryAssignTasks.remove(taskId); } } } } catch (Exception e) { log.makeAlert(e, "Exception in running pending tasks").emit(); } return null; } } ); }
Source:
<code>public BugzillaRestTaskEditorPage(TaskEditor editor, String connectorKind) { super(editor, connectorKind); <START> setNeedsPrivateSection(false); <END> setNeedsSubmitButton(false); }</code><technical_language>do set false? set true</technical_language>

Target:
public BugzillaRestTaskEditorPage(TaskEditor editor, String connectorKind) { super(editor, connectorKind); setNeedsPrivateSection(true); setNeedsSubmitButton(true); }
Source:
<code>protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_project_management); pref = PreferenceManager.getDefaultSharedPreferences(this); db = ((TranslationRecorderApp)getApplication()).getDatabase(); Toolbar mToolbar = (Toolbar) findViewById(R.id.project_management_toolbar); setSupportActionBar(mToolbar); if (getSupportActionBar() != null) { ImageView imageView = findViewById(R.id.identicon); getSupportActionBar().setDisplayShowTitleEnabled(false); int userId = pref.getInt(Settings.KEY_PROFILE, -1); final User user = db.getUser(userId); String svg = Jdenticon.Companion.toSvg(user.getHash(), 512, 0f); imageView.setBackground(Sharp.loadString(svg).getDrawable()); imageView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); <START> imageView.setOnClickListener(identiconPlayerClick(user.getAudio().toString())); <END> } if (savedInstanceState != null) { mZipping = savedInstanceState.getBoolean(STATE_ZIPPING, false); mExporting = savedInstanceState.getBoolean(STATE_EXPORTING, false); mProgress = savedInstanceState.getInt(STATE_PROGRESS, 0); mProgressTitle = savedInstanceState.getString(STATE_PROGRESS_TITLE, null); mDbResyncing = savedInstanceState.getBoolean(STATE_RESYNC, false); } }</code><technical_language>group this a function "initializeIdenticon"</technical_language>

Target:
protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_project_management); pref = PreferenceManager.getDefaultSharedPreferences(this); db = ((TranslationRecorderApp)getApplication()).getDatabase(); Toolbar mToolbar = (Toolbar) findViewById(R.id.project_management_toolbar); setSupportActionBar(mToolbar); if (getSupportActionBar() != null) { getSupportActionBar().setDisplayShowTitleEnabled(false); initializeIdenticon(); } if (savedInstanceState != null) { mZipping = savedInstanceState.getBoolean(STATE_ZIPPING, false); mExporting = savedInstanceState.getBoolean(STATE_EXPORTING, false); mProgress = savedInstanceState.getInt(STATE_PROGRESS, 0); mProgressTitle = savedInstanceState.getString(STATE_PROGRESS_TITLE, null); mDbResyncing = savedInstanceState.getBoolean(STATE_RESYNC, false); } }
Source:
<code>public UserAccount getCurrentUser() { final Account account = getCurrentAccount(); <START> return account == null ? null : buildUserAccount(account); <END> }</code><technical_language>need this. buildUserAccount() a null check</technical_language>

Target:
public UserAccount getCurrentUser() { return buildUserAccount(getCurrentAccount()); }
Source:
<code>public void writeExecutionEnvironmentContainerIdMapping(String processorId, String executionEnvContainerId) { Preconditions.checkNotNull(processorId, "Container's logical processor id can not be null."); Preconditions.checkNotNull(executionEnvContainerId, "Container's physical execution environment container id can not be null."); <START> LOG.info("Container has executionEnvContainerId as {}", processorId, executionEnvContainerId); <END> metadataStore.put(processorId, valueSerde.toBytes(executionEnvContainerId)); metadataStore.flush(); }</code><technical_language>nit: Processor: executionEnvContainerId: consistent in other places. I remember Prateek a clean PR for this :)</technical_language>

Target:
public void writeExecutionEnvironmentContainerIdMapping(String processorId, String executionEnvContainerId) { Preconditions.checkNotNull(processorId, "Container's logical processor id can not be null."); Preconditions.checkNotNull(executionEnvContainerId, "Container's physical execution environment container id can not be null."); LOG.info("Processor has executionEnvContainerId as {}", processorId, executionEnvContainerId); metadataStore.put(processorId, valueSerde.toBytes(executionEnvContainerId)); metadataStore.flush(); }
Source:
<code>private void createQuestionsWithResponses() { questionsWithResponses = new ArrayList<>(); int qnIndx = 1; for (FeedbackQuestionAttributes questionAttributes : bundle.getSortedQuestions()) { int numOfResponseBoxes = questionAttributes.numberOfEntitiesToGiveFeedbackTo; int maxResponsesPossible = bundle.recipientList.get(questionAttributes.getId()).size(); if (numOfResponseBoxes == Const.MAX_POSSIBLE_RECIPIENTS || numOfResponseBoxes > maxResponsesPossible) { numOfResponseBoxes = maxResponsesPossible; } FeedbackSubmissionEditQuestion question = createQuestion(questionAttributes, qnIndx); List<FeedbackSubmissionEditResponse> responses = createResponses(questionAttributes, qnIndx, numOfResponseBoxes); <START> boolean isInstructorCommentsOnResponsesAllowed = <END> questionAttributes.getQuestionDetails().isInstructorCommentsOnResponsesAllowed(); boolean isFeedbackParticipantCommentsOnResponsesAllowed = questionAttributes.getQuestionDetails().isFeedbackParticipantCommentsOnResponsesAllowed(); questionsWithResponses.add(new StudentFeedbackSubmissionEditQuestionsWithResponses( question, responses, numOfResponseBoxes, maxResponsesPossible, isInstructorCommentsOnResponsesAllowed, isFeedbackParticipantCommentsOnResponsesAllowed)); qnIndx++; } }</code><technical_language>In addition, if question passed StudentFeedbackSubmissionEditQuestionsWithResponses, variables</technical_language>

Target:
private void createQuestionsWithResponses() { questionsWithResponses = new ArrayList<>(); int qnIndx = 1; for (FeedbackQuestionAttributes questionAttributes : bundle.getSortedQuestions()) { int numOfResponseBoxes = questionAttributes.numberOfEntitiesToGiveFeedbackTo; int maxResponsesPossible = bundle.recipientList.get(questionAttributes.getId()).size(); if (numOfResponseBoxes == Const.MAX_POSSIBLE_RECIPIENTS || numOfResponseBoxes > maxResponsesPossible) { numOfResponseBoxes = maxResponsesPossible; } FeedbackSubmissionEditQuestion question = createQuestion(questionAttributes, qnIndx); List<FeedbackSubmissionEditResponse> responses = createResponses(questionAttributes, qnIndx, numOfResponseBoxes); boolean isFeedbackParticipantCommentsOnResponsesAllowed = questionAttributes.getQuestionDetails().isFeedbackParticipantCommentsOnResponsesAllowed(); questionsWithResponses.add(new StudentFeedbackSubmissionEditQuestionsWithResponses( question, responses, numOfResponseBoxes, maxResponsesPossible, isFeedbackParticipantCommentsOnResponsesAllowed)); qnIndx++; } }
Source:
<code>public void init() { <START> ITEMS = new ArrayList<>(Arrays.asList("first", "middle", "last")); <END> dataProvider = DataProvider.ofCollection(ITEMS); dataController = new DataControllerStub(); dataView = new ListDataViewImpl(dataController); }</code><technical_language>ITEMS -> items</technical_language>

Target:
public void init() { items = new ArrayList<>(Arrays.asList("first", "middle", "last")); dataProvider = DataProvider.ofCollection(items); dataController = new DataControllerStub(); dataView = new ListDataViewImpl(dataController); }
Source:
<code>public synchronized void removed(IExtension[] extensions) { theAdapterManager.flushLookup(); for (IExtension extension : extensions) { for (List<IAdapterFactory> <START> list : <END> theAdapterManager.getFactories().values()) { for (Iterator<IAdapterFactory> it2 = (list).iterator(); it2.hasNext();) { IAdapterFactory factory = it2.next(); if (!(factory instanceof AdapterFactoryProxy)) continue; if (((AdapterFactoryProxy) factory).originatesFrom(extension)) { it2.remove(); } } } } }</code><technical_language>rename adapterFactories</technical_language>

Target:
public synchronized void removed(IExtension[] extensions) { theAdapterManager.flushLookup(); for (IExtension extension : extensions) { for (List<IAdapterFactory> adapterFactories : theAdapterManager.getFactories().values()) { for (Iterator<IAdapterFactory> it2 = (adapterFactories).iterator(); it2.hasNext();) { IAdapterFactory factory = it2.next(); if (!(factory instanceof AdapterFactoryProxy)) continue; if (((AdapterFactoryProxy) factory).originatesFrom(extension)) { it2.remove(); } } } } }
Source:
<code>private static KeyStore getKeyStore(File keyStore, String keyStorePassword) throws Exception { InputStream is = null; try { is = new FileInputStream(keyStore); KeyStore ks = KeyStore.getInstance("JKS"); ks.load(is, keyStorePassword.toCharArray()); <START> is.close(); <END> return ks; } finally { if (is != null) { is.close(); } } }</code><technical_language>this is needed - finally clause closes anyway</technical_language>

Target:
private static KeyStore getKeyStore(File keyStore, String keyStorePassword) throws Exception { InputStream is = null; try { is = new FileInputStream(keyStore); KeyStore ks = KeyStore.getInstance("JKS"); ks.load(is, keyStorePassword.toCharArray()); return ks; } finally { if (is != null) { is.close(); } } }
Source:
<code>private Metacard transformGeoEntryToMetacard(GeoEntry geoEntry) { if (!GeoCodingConstants.CITY_FEATURE_CODES.contains(geoEntry.getFeatureCode())) { return null; } Metacard metacard = new MetacardImpl(geoNamesMetacardType); String id = uuidGenerator.generateUuid(); metacard.setAttribute( new AttributeImpl( Core.TITLE, geoEntry.getName() + ", " + geoEntry.getCountryCode() + "(" + id.substring(0, 4) <START> + ")")); <END> metacard.setAttribute(new AttributeImpl(Core.DESCRIPTION, geoEntry.getAlternateNames())); metacard.setAttribute(new AttributeImpl(Location.COUNTRY_CODE, geoEntry.getCountryCode())); metacard.setAttribute(new AttributeImpl(Core.ID, id)); metacard.setAttribute( new AttributeImpl( GeoEntryAttributes.FEATURE_CODE_ATTRIBUTE_NAME, geoEntry.getFeatureCode())); metacard.setAttribute( new AttributeImpl(GeoEntryAttributes.POPULATION_ATTRIBUTE_NAME, geoEntry.getPopulation())); Double latitude = geoEntry.getLatitude(); Double longitude = geoEntry.getLongitude(); if (latitude != null && longitude != null) { Coordinate coordinate = new Coordinate(longitude, latitude); Geometry geometry = new GeometryFactory().createPoint(coordinate); String wkt = WKT_WRITER_THREAD_LOCAL.get().write(geometry); metacard.setAttribute(new AttributeImpl(Core.LOCATION, wkt)); } metacard.setAttribute( new AttributeImpl( Core.METACARD_TAGS, Arrays.asList(GAZETTEER_METACARD_TAG, GeoCodingConstants.GEONAMES_TAG))); return metacard; }</code><technical_language>nit: I cleaner if useString.format(..)</technical_language>

Target:
private Metacard transformGeoEntryToMetacard(GeoEntry geoEntry) { if (!GeoCodingConstants.CITY_FEATURE_CODES.contains(geoEntry.getFeatureCode())) { return null; } Metacard metacard = new MetacardImpl(geoNamesMetacardType); String id = uuidGenerator.generateUuid(); metacard.setAttribute( new AttributeImpl( Core.TITLE, String.format( TITLE_FORMAT, geoEntry.getName(), geoEntry.getCountryCode(), id.substring(0, 4)))); metacard.setAttribute(new AttributeImpl(Core.DESCRIPTION, geoEntry.getAlternateNames())); metacard.setAttribute(new AttributeImpl(Location.COUNTRY_CODE, geoEntry.getCountryCode())); metacard.setAttribute(new AttributeImpl(Core.ID, id)); metacard.setAttribute( new AttributeImpl( GeoEntryAttributes.FEATURE_CODE_ATTRIBUTE_NAME, geoEntry.getFeatureCode())); metacard.setAttribute( new AttributeImpl(GeoEntryAttributes.POPULATION_ATTRIBUTE_NAME, geoEntry.getPopulation())); Double latitude = geoEntry.getLatitude(); Double longitude = geoEntry.getLongitude(); if (latitude != null && longitude != null) { Coordinate coordinate = new Coordinate(longitude, latitude); Geometry geometry = new GeometryFactory().createPoint(coordinate); String wkt = WKT_WRITER_THREAD_LOCAL.get().write(geometry); metacard.setAttribute(new AttributeImpl(Core.LOCATION, wkt)); } metacard.setAttribute( new AttributeImpl( Core.METACARD_TAGS, Arrays.asList(GAZETTEER_METACARD_TAG, GeoCodingConstants.GEONAMES_TAG))); return metacard; }
Source:
<code>public void expandPanels() { if (isElementPresent("collapse-panels-button")) { clickCollapseExpandButtonAndWaitForPanelsToExpand(); <START> waitForPanelsToExpand(); <END> } }</code><technical_language>Is double wait needed</technical_language>

Target:
public void expandPanels() { if (isElementPresent("collapse-panels-button")) { clickCollapseExpandButtonAndWaitForPanelsToExpand(); } }
Source:
<code>public void shouldShowListWhenFoundPatientsByQuery() { when(patientDAO.getAllPatients()).thenReturn(patientList); syncedPatientsPresenter.setQuery("TEST"); syncedPatientsPresenter.updateLocalPatientsList(); <START> verify(view).updateListVisibility(true); <END> }</code><technical_language>verify updateAdapter(patientList) method ? check if called proper list</technical_language>

Target:
public void shouldShowListWhenFoundPatientsByQuery() { final String query = "given_name_3"; when(patientDAO.getAllPatients()).thenReturn(Observable.just(patientList)); syncedPatientsPresenter.setQuery(query); syncedPatientsPresenter.updateLocalPatientsList(); verify(view).updateListVisibility(true); verify(view).updateAdapter(Collections.singletonList(patientList.get(2))); }
Source:
<code>void submit() { view.submit(versionRecordManager.getCurrentPath()); <START> versionRecordManager.restoreToCurrentVersion(); <END> concurrentUpdateSessionInfo = null; }</code><technical_language>this is correct method!? I (from code) show a popup restore file current version. Other editors versionRecordManager.reloadVersions(path); in "save success callbacks". want check XLS Score Card Editor "Upload file" Editor for similar problems. compile this PR _see_ doing; in case code review is misguided</technical_language>

Target:
void submit() { view.submit(versionRecordManager.getCurrentPath()); concurrentUpdateSessionInfo = null; }
Source:
<code>public TTransport getTransport(final TTransport trans) { TSocket tSocket = null; if (trans instanceof TSocket) { tSocket = (TSocket) trans; } else if (trans instanceof TSaslServerTransport) { TSaslServerTransport saslTrans = (TSaslServerTransport) trans; tSocket = (TSocket)(saslTrans.getUnderlyingTransport()); } String remoteHost = tSocket != null ? tSocket.getSocket().getInetAddress().getCanonicalHostName() : null; if (remoteHost != null && isHostFromTrustedDomain(remoteHost, trustedDomain)) { LOG.info("No authentication performed because the connecting host " + remoteHost + " is " + "from the trusted domain " + trustedDomain); return noAuthFactory.getTransport(trans); <START> } else { <END> return otherFactory.getTransport(trans); } }</code><technical_language>need this else block. return otherFactory.getTransport(trans)...</technical_language>

Target:
public TTransport getTransport(final TTransport trans) { TSocket tSocket = null; if (trans instanceof TSocket) { tSocket = (TSocket) trans; } else if (trans instanceof TSaslServerTransport) { TSaslServerTransport saslTrans = (TSaslServerTransport) trans; tSocket = (TSocket)(saslTrans.getUnderlyingTransport()); } String remoteHost = tSocket != null ? tSocket.getSocket().getInetAddress().getCanonicalHostName() : null; if (remoteHost != null && isHostFromTrustedDomain(remoteHost, trustedDomain)) { LOG.info("No authentication performed because the connecting host " + remoteHost + " is " + "from the trusted domain " + trustedDomain); return noAuthFactory.getTransport(trans); } return otherFactory.getTransport(trans); }