auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public <T> ServiceBuilder<T> register(ServiceBuilder<T> builder) { if (this.transactionDependency != null) { this.transactionDependency.register(builder); } if (this.tsrServiceName != null) { this.tsrSupplier = builder.requires(this.tsrServiceName); <START> } <END> return super.register(builder); }</code><technical_language>dependency variable above, collapse registration of transactionDependency tsrDependency into: new CompositeDependency(this.transationDependency, this.tsrDependency).register();</technical_language>

Target:
public <T> ServiceBuilder<T> register(ServiceBuilder<T> builder) { new CompositeDependency(this.transactionDependency, this.tsrDependency).register(builder); return super.register(builder); }
Source:
<code><START> protected void createFullHistory(String id, ITmfStateProvider provider, File htFile) throws TmfTraceException { <END> if (htFile.exists()) { final int version = provider.getVersion(); try { IStateHistoryBackend backend = StateHistoryBackendFactory.createHistoryTreeBackendExistingFile( id, htFile, version); fHtBackend = backend; fStateSystem = StateSystemFactory.newStateSystem(backend, false); fInitialized.countDown(); return; } catch (IOException e) { } } final int QUEUE_SIZE = 10000; try { IStateHistoryBackend backend = StateHistoryBackendFactory.createHistoryTreeBackendNewFile( id, htFile, provider.getVersion(), provider.getStartTime(), QUEUE_SIZE); fHtBackend = backend; fStateSystem = StateSystemFactory.newStateSystem(backend); provider.assignTargetStateSystem(fStateSystem); build(provider); } catch (IOException e) { throw new TmfTraceException(e.toString(), e); } }</code><technical_language>want increase visibility for unit tests though</technical_language>

Target:
private void createFullHistory(String id, ITmfStateProvider provider, File htFile) throws TmfTraceException { if (htFile.exists()) { final int version = provider.getVersion(); try { IStateHistoryBackend backend = StateHistoryBackendFactory.createHistoryTreeBackendExistingFile( id, htFile, version); fHtBackend = backend; fStateSystem = StateSystemFactory.newStateSystem(backend, false); fInitialized.countDown(); return; } catch (IOException e) { } } final int QUEUE_SIZE = 10000; try { IStateHistoryBackend backend = StateHistoryBackendFactory.createHistoryTreeBackendNewFile( id, htFile, provider.getVersion(), provider.getStartTime(), QUEUE_SIZE); fHtBackend = backend; fStateSystem = StateSystemFactory.newStateSystem(backend); provider.assignTargetStateSystem(fStateSystem); build(provider); } catch (IOException e) { throw new TmfTraceException(e.toString(), e); } }
Source:
<code>public void forward_fromSetParameters_withoutBeforeEnterObserver() { ForwardSetParameterView.clear(); setNavigationTargets(ForwardSetParameterView.class, ForwardSetParameterBackView.class); navigate("forward/setParameter/test"); <START> Assert.assertEquals( <END> "afterNavigation must not be invoked after forwardTo in setParameter", false, ForwardSetParameterView.afterNavigationInvocked); Assert.assertEquals("forwardTo ForwardSetParameterBackView failed", true, ForwardSetParameterView.backBeforeEnterInvoked); }</code><technical_language>assertFalse assertTrue instead of assertEquals</technical_language>

Target:
public void forward_fromSetParameters_withoutBeforeEnterObserver() { ForwardSetParameterView.clear(); setNavigationTargets(ForwardSetParameterView.class, ForwardSetParameterBackView.class); navigate("forward/setParameter/test"); Assert.assertFalse( "afterNavigation must not be invoked after forwardTo in setParameter", ForwardSetParameterView.afterNavigationInvoked); Assert.assertTrue("forwardTo ForwardSetParameterBackView failed", ForwardSetParameterView.backBeforeEnterInvoked); }
Source:
<code>public boolean parseUpdates() { synchronized (m_updates) { <START> if (m_updates.booleanValue()) { <END> m_updates = false; return true; } } return false; }</code><technical_language>need call booleanValue() here</technical_language>

Target:
public boolean parseUpdates() { if (m_updates.get()) { m_updates.set(false); return true; } return false; }
Source:
<code>private boolean isSniEnabled() { <START> return sniDomains.keySet().size() > 0; <END> }</code><technical_language>return !sniDomains.isEmpty();</technical_language>

Target:
private boolean isSniEnabled() { return !sniDomains.isEmpty(); }
Source:
<code>public void enableSSL() throws Exception { if (m_sslPropsFile == null) { m_sslContext = null; return; } File configFile = new File(m_sslPropsFile); InputStreamReader configIsr; try { FileInputStream configFis = new FileInputStream(configFile); configIsr = new InputStreamReader(configFis); } catch (FileNotFoundException e) { throw new IllegalArgumentException("Can't read ssl config file " + m_sslPropsFile); } String keyStorePath = null; <START> String keyStorePassword = null; <END> String trustStorePath = null; String trustStorePassword = null; try (BufferedReader br = new BufferedReader(configIsr)) { String configLine; while ((configLine = br.readLine()) != null) { configLine.trim(); if (configLine.startsWith(SSLConfiguration.KEYSTORE_PASSWORD_CONFIG_PROP)) { keyStorePassword = SSLConfiguration.parseValue(configLine, SSLConfiguration.KEYSTORE_PASSWORD_CONFIG_PROP); } else if (configLine.startsWith(SSLConfiguration.KEYSTORE_CONFIG_PROP)) { keyStorePath = SSLConfiguration.parseValue(configLine, SSLConfiguration.KEYSTORE_CONFIG_PROP); } else if (configLine.startsWith(SSLConfiguration.TRUSTSTORE_PASSWORD_CONFIG_PROP)) { trustStorePassword = SSLConfiguration.parseValue(configLine, SSLConfiguration.TRUSTSTORE_PASSWORD_CONFIG_PROP); } else if (configLine.startsWith(SSLConfiguration.TRUSTSTORE_CONFIG_PROP)) { trustStorePath = SSLConfiguration.parseValue(configLine, SSLConfiguration.TRUSTSTORE_CONFIG_PROP); } else { throw new IllegalArgumentException("Unexpected entry in ssl config file " + configLine); } } } SSLConfiguration.SslConfig sslConfig = new SSLConfiguration.SslConfig(keyStorePath, keyStorePassword, trustStorePath, trustStorePassword); SSLConfiguration.applySystemProperties(sslConfig); if (!sslConfig.isValid()) { throw new IllegalArgumentException("Some ssl configuration is missing. keyStore, keyStorePassword, " + "trustStore and trustStorePassword need to be specified"); } if (sslConfig.isConfigured()) { m_sslContext = SSLConfiguration.initializeSslContext(sslConfig); } else { m_sslContext = null; } }</code><technical_language>need keyStore keyStorePassword. remove</technical_language>

Target:
public void enableSSL() { if (!m_enableSSL || m_sslContextRef.get() != null) return; synchronized (m_sslContextRef) { try { m_sslContextRef.set(SSLConfiguration.initializeSslContext(m_sslConfig)); } catch (IOException | NoSuchAlgorithmException | KeyStoreException | CertificateException | UnrecoverableKeyException | KeyManagementException ex) { throw new IllegalArgumentException("Failed to initialize SSL from config file: " + m_sslPropsFile, ex); } } }
Source:
<code>public void logout( final AsyncCallback<Void> responder ) { synchronized( currentUserLock ) { Invoker.invokeAsync( USER_MANAGER_SERVER_ALIAS, "logout", new Object[] { Backendless.getApplicationId(), Backendless.getVersion() }, new AsyncCallback<Void>() { @Override public void handleResponse( Void response ) { try { handleLogout(); } catch( Throwable e ) { if( responder != null ) responder.handleFault( new BackendlessFault( e ) ); } if( responder != null ) responder.handleResponse( response ); } @Override public void handleFault( BackendlessFault fault ) { if( fault.getCode().equals( "3064" ) || fault.getCode().equals( "3091" ) || fault.getCode().equals( "3090" ) || fault.getCode().equals( "3023" ) ) { <START> handleResponse( null ); <END> return; } if( responder != null ) responder.handleFault( fault ); } } ); } }</code><technical_language>synchronous call? places call logout (for example login() loginWithFacebook). error codes handled there</technical_language>

Target:
public void logout( final AsyncCallback<Void> responder ) { synchronized( currentUserLock ) { Invoker.invokeAsync( USER_MANAGER_SERVER_ALIAS, "logout", new Object[] { Backendless.getApplicationId(), Backendless.getVersion() }, new AsyncCallback<Void>() { @Override public void handleResponse( Void response ) { try { handleLogout(); } catch( Throwable e ) { if( responder != null ) responder.handleFault( new BackendlessFault( e ) ); } if( responder != null ) responder.handleResponse( response ); } @Override public void handleFault( BackendlessFault fault ) { if( !isLogoutFaultAllowed( fault.getCode() ) ) { handleResponse( null ); return; } if( responder != null ) responder.handleFault( fault ); } } ); } }
Source:
<code>public void queueDelete(Location l, boolean destroy) { <START> new Throwable().printStackTrace(); <END> queueLock.readLock().lock(); try { deletionQueue.put(l, destroy); } finally { queueLock.readLock().unlock(); } }</code><technical_language>printing a stacktrace here...</technical_language>

Target:
public void queueDelete(Location l, boolean destroy) { queueLock.readLock().lock(); try { deletionQueue.put(l, destroy); } finally { queueLock.readLock().unlock(); } }
Source:
<code>private void handleNewDatastream() { List<Datastream> newDatastreams = _adapter.getAllDatastreams().stream() <START> .filter(ds -> ds.getTarget() == null) <END> .map(ds -> setDatastreamTarget(ds)) .filter(ds -> ds.getTarget() != null) .collect(Collectors.toList()); if (newDatastreams.size() == 0) { return; } boolean succeeded = newDatastreams.stream().allMatch(ds -> _adapter.updateDatastream(ds)); if (succeeded) { _eventQueue.put(CoordinatorEvent.createLeaderDoAssignmentEvent()); return; } if (!leaderDoAssignmentScheduled.get()) { LOG.warn("Schedule retry for handling new datastream"); leaderDoAssignmentScheduled.set(true); _executor.schedule(() -> { _eventQueue.put(CoordinatorEvent.createHandleNewDatastreamEvent()); leaderDoAssignmentScheduled.set(false); }, _config.getRetryIntervalMS(), TimeUnit.MILLISECONDS); } }</code><technical_language>need log this connector failed give topic name. is current behavior do retry this happens? Do rest layer get target topic instead return failure user if conncetor is able service this call</technical_language>

Target:
private void handleNewDatastream() { List<Datastream> newDatastreams = _adapter.getAllDatastreams().stream() .filter(ds -> ds.getTarget() == null) .map(ds -> setDatastreamTarget(ds)) .filter(ds -> ds.getTarget() != null) .collect(Collectors.toList()); if (newDatastreams.size() == 0) { return; } boolean succeeded = newDatastreams.stream().allMatch(ds -> { boolean updated = _adapter.updateDatastream(ds); if (!updated) { LOG.warn("failed to update datastream target for " + ds.getName()); } return updated; }); if (succeeded) { _eventQueue.put(CoordinatorEvent.createLeaderDoAssignmentEvent()); return; } if (leaderDoAssignmentScheduled.compareAndSet(false, true)){ LOG.warn("Schedule retry for handling new datastream"); _executor.schedule(() -> { _eventQueue.put(CoordinatorEvent.createHandleNewDatastreamEvent()); leaderDoAssignmentScheduled.set(false); }, _config.getRetryIntervalMS(), TimeUnit.MILLISECONDS); } }
Source:
<code>private DeserializationRuntimeConverter createDecimalConverter(DecimalType decimalType) { return avroObject -> { final byte[] bytes; if (avroObject instanceof GenericFixed) { bytes = ((GenericFixed) avroObject).bytes(); } else if (avroObject instanceof ByteBuffer) { ByteBuffer byteBuffer = (ByteBuffer) avroObject; bytes = new byte[byteBuffer.remaining()]; byteBuffer.get(bytes); } else { bytes = (byte[]) avroObject; } <START> return DecimalData.fromUnscaledBytes(bytes, decimalType.getPrecision(), decimalType.getScale()); <END> }; }</code><technical_language>avoid depending LogicalType in hot path (runtime code). get precision scale out of lambda final modifier</technical_language>

Target:
private DeserializationRuntimeConverter createDecimalConverter(DecimalType decimalType) { final int precision = decimalType.getPrecision(); final int scale = decimalType.getScale(); return avroObject -> { final byte[] bytes; if (avroObject instanceof GenericFixed) { bytes = ((GenericFixed) avroObject).bytes(); } else if (avroObject instanceof ByteBuffer) { ByteBuffer byteBuffer = (ByteBuffer) avroObject; bytes = new byte[byteBuffer.remaining()]; byteBuffer.get(bytes); } else { bytes = (byte[]) avroObject; } return DecimalData.fromUnscaledBytes(bytes, precision, scale); }; }
Source:
<code>StatementClient startQuery(String sql, Map<String, String> sessionPropertiesOverride) { String source = firstNonNull(clientInfo.get("ApplicationName"), "presto-jdbc"); <START> String traceToken = clientInfo.get("TraceToken"); <END> Iterable<String> clientTags = Splitter.on(',').trimResults().omitEmptyStrings() .split(nullToEmpty(clientInfo.get("ClientTags"))); Map<String, String> allProperties = new HashMap<>(sessionProperties); allProperties.putAll(sessionPropertiesOverride); int millis = networkTimeoutMillis.get(); Duration timeout = (millis > 0) ? new Duration(millis, MILLISECONDS) : new Duration(999, DAYS); ClientSession session = new ClientSession( httpUri, user, source, Optional.ofNullable(traceToken), ImmutableSet.copyOf(clientTags), clientInfo.get("ClientInfo"), catalog.get(), schema.get(), timeZoneId.get(), locale.get(), ImmutableMap.of(), ImmutableMap.copyOf(allProperties), ImmutableMap.copyOf(preparedStatements), transactionId.get(), timeout); return queryExecutor.startQuery(session, sql); }</code><technical_language>Change this variable Optional<String>. provides null safety avoiding a local variable null</technical_language>

Target:
StatementClient startQuery(String sql, Map<String, String> sessionPropertiesOverride) { String source = firstNonNull(clientInfo.get("ApplicationName"), "presto-jdbc"); Optional<String> traceToken = Optional.ofNullable(clientInfo.get("TraceToken")); Iterable<String> clientTags = Splitter.on(',').trimResults().omitEmptyStrings() .split(nullToEmpty(clientInfo.get("ClientTags"))); Map<String, String> allProperties = new HashMap<>(sessionProperties); allProperties.putAll(sessionPropertiesOverride); int millis = networkTimeoutMillis.get(); Duration timeout = (millis > 0) ? new Duration(millis, MILLISECONDS) : new Duration(999, DAYS); ClientSession session = new ClientSession( httpUri, user, source, traceToken, ImmutableSet.copyOf(clientTags), clientInfo.get("ClientInfo"), catalog.get(), schema.get(), timeZoneId.get(), locale.get(), ImmutableMap.of(), ImmutableMap.copyOf(allProperties), ImmutableMap.copyOf(preparedStatements), transactionId.get(), timeout); return queryExecutor.startQuery(session, sql); }
Source:
<code>public boolean runOnceOnly(R resource) { try { <START> lock.lock(); <END> if (!shutdownSignal) { init(resource); return true; } } catch (Throwable e) { cleanup(resource, e); } finally { lock.unlock(); } return false; }</code><technical_language>chance get rid of 'lock' instead synchronized here? In Java locks need in pattern: lock.lock(); try { // do stuff } finally { lock.unlock(); } current one; this is broken lock.lock() call fail, unlocking a lock :(</technical_language>

Target:
public synchronized boolean runOnceOnly(R resource) { try { if (!shutdownSignal) { init(resource); return true; } } catch (Throwable e) { cleanup(resource, e); } return false; }
Source:
<code>public static void publishCatalog(ZooKeeper zk, int version) throws KeeperException, InterruptedException { String path = VoltZK.catalogbytes + "/" + version; <START> hostLog.info("***publish " + path); <END> Stat stat = new Stat(); byte[] data = zk.getData(path, false, stat); ByteBuffer buffer = ByteBuffer.wrap(data); byte status = buffer.get(); assert (status == (byte)ZKCatalogStatus.PENDING.ordinal()); int expectedNodeCount = buffer.getInt(); buffer.position(0); buffer.put((byte)ZKCatalogStatus.COMPLETE.ordinal()); buffer.putInt(expectedNodeCount); zk.setData(path, buffer.array(), stat.getVersion()); List<String> children = zk.getChildren(VoltZK.catalogbytes, false); for (String child : children) { int priorVersion = Integer.parseInt(child); if (priorVersion < version) { hostLog.info("***deleting " + ZKUtil.joinZKPath(VoltZK.catalogbytes, child)); ZKUtil.deleteRecursively(zk, ZKUtil.joinZKPath(VoltZK.catalogbytes, child)); } } }</code><technical_language>loggings for debug? If log debug/trace level</technical_language>

Target:
public static void publishCatalog(ZooKeeper zk, int version) throws KeeperException, InterruptedException { String path = VoltZK.catalogbytes + "/" + version; Stat stat = new Stat(); byte[] data = zk.getData(path, false, stat); ByteBuffer buffer = ByteBuffer.wrap(data); byte status = buffer.get(); assert (status == (byte)ZKCatalogStatus.PENDING.ordinal()); int catalogSegmentCount = buffer.getInt(); buffer.position(0); buffer.put((byte)ZKCatalogStatus.COMPLETE.ordinal()); buffer.putInt(catalogSegmentCount); zk.setData(path, buffer.array(), stat.getVersion()); List<String> children = zk.getChildren(VoltZK.catalogbytes, false); for (String child : children) { int priorVersion = Integer.parseInt(child); if (priorVersion < version) { ZKUtil.deleteRecursively(zk, ZKUtil.joinZKPath(VoltZK.catalogbytes, child)); } } }
Source:
<code>public void testSemiJoinMemoryReservationYield(Type type) { List<Page> input = createPages(type, 5_000, 500, false); <START> RowPagesBuilder rowPagesBuilder = rowPagesBuilder(false, Ints.asList(0), type); <END> SetBuilderOperatorFactory setBuilderOperatorFactory = new SetBuilderOperatorFactory( 1, new PlanNodeId("test"), type, 0, rowPagesBuilder.getHashChannel(), 10, new JoinCompiler()); GroupByHashYieldAssertion.GroupByHashYieldResult result = finishOperatorWithYieldingGroupByHash( input, type, setBuilderOperatorFactory, operator -> ((SetBuilderOperator) operator).getCapacity(), 170_000); assertGreaterThanOrEqual(result.getYieldCount(), 7); assertGreaterThan(result.getMaxReservedBytes(), 20L << 20); assertEquals(result.getOutput().stream().mapToInt(Page::getPositionCount).sum(), 0); }</code><technical_language>This is redundant. hashChannel is needed. Check constructor of SetBuilderOperatorFactory set number good enough</technical_language>

Target:
public void testSemiJoinMemoryReservationYield(Type type) { List<Page> input = createPagesWithDistinctHashKeys(type, 5_000, 500); SetBuilderOperatorFactory setBuilderOperatorFactory = new SetBuilderOperatorFactory( 1, new PlanNodeId("test"), type, 0, Optional.of(1), 10, new JoinCompiler()); GroupByHashYieldAssertion.GroupByHashYieldResult result = finishOperatorWithYieldingGroupByHash( input, type, setBuilderOperatorFactory, operator -> ((SetBuilderOperator) operator).getCapacity(), 170_000); assertGreaterThanOrEqual(result.getYieldCount(), 7); assertGreaterThan(result.getMaxReservedBytes(), 20L << 20); assertEquals(result.getOutput().stream().mapToInt(Page::getPositionCount).sum(), 0); }
Source:
<code>private void readEscapedString(){ int chr; while (true) { chr = sr.read(); if (chr == BACKSLASH) { sr.read(); <START> continue; <END> } else if (chr == QUOTATION_MARK) { break; } else if (chr == -1) { throw new IllegalArgumentException("EOF reached while reading JSON field name"); } } }</code><technical_language>This statement removed (does add much, next cycle)</technical_language>

Target:
private void readEscapedString(){ int chr; while (true) { chr = sr.read(); if (chr == BACKSLASH) { chr = sr.read(); } else if (chr == QUOTATION_MARK) { break; } if (chr == -1) { throw new IllegalArgumentException("EOF reached while reading JSON field name"); } } }
Source:
<code>public StructuredRecord merge(StructuredRecord joinKey, Iterable<JoinElement<StructuredRecord>> joinRow) { <START> StructuredRecord.Builder outRecordBuilder; <END> outRecordBuilder = StructuredRecord.builder(outputSchema); for (JoinElement<StructuredRecord> joinElement : joinRow) { String stageName = joinElement.getStageName(); StructuredRecord record = joinElement.getInputRecord(); Map<String, String> fieldsToRename = perStageFieldsToRename.row(stageName); for (Schema.Field field : record.getSchema().getFields()) { String inputFieldName = field.getName(); if (!fieldsToRename.containsKey(inputFieldName)) { continue; } String outputFieldName = fieldsToRename.get(inputFieldName); outRecordBuilder.set(outputFieldName, record.get(inputFieldName)); } } return outRecordBuilder.build(); }</code><technical_language>combine lines 131 132. separate declaration initialization</technical_language>

Target:
public StructuredRecord merge(StructuredRecord joinKey, Iterable<JoinElement<StructuredRecord>> joinRow) { StructuredRecord.Builder outRecordBuilder = StructuredRecord.builder(outputSchema); for (JoinElement<StructuredRecord> joinElement : joinRow) { String stageName = joinElement.getStageName(); StructuredRecord record = joinElement.getInputRecord(); Map<String, String> selectedFields = perStageSelectedFields.row(stageName); for (Schema.Field field : record.getSchema().getFields()) { String inputFieldName = field.getName(); if (!selectedFields.containsKey(inputFieldName)) { continue; } String outputFieldName = selectedFields.get(inputFieldName); outRecordBuilder.set(outputFieldName, record.get(inputFieldName)); } } return outRecordBuilder.build(); }
Source:
<code>public static List<InetSocketAddress> toSocketAddresses(String commaSeparatedAddressesWithPorts) { final String servers[] = commaSeparatedAddressesWithPorts.split(","); return Arrays.stream(servers) .map(s -> { <START> String parts[] = s.split(":"); <END> if (parts.length > 1) { return SocketUtils.socketAddress(parts[0].trim(), Integer.parseInt(parts[1].trim())); } else { return SocketUtils.socketAddress(parts[0].trim(),53); } }) .collect(Collectors.toList()); }</code><technical_language>Good point</technical_language>

Target:
public static List<InetSocketAddress> toSocketAddresses(String commaSeparatedAddressesWithPorts) { final String[] servers = commaSeparatedAddressesWithPorts.split(","); return Arrays.stream(servers) .map(s -> { final HostAndPort hp = HostAndPort.fromString(s.trim()) .withDefaultPort(53) .requireBracketsForIPv6(); return SocketUtils.socketAddress(hp.getHostText(), hp.getPort()); }) .collect(Collectors.toList()); }
Source:
<code>protected final void check() { Preconditions.checkArgument(!keyStorePath().isPresent() || keyStorePassword().isPresent(), <START> "keyStorePassword cannot be absent if keyStorePath is present"); <END> }</code><technical_language>need reject if keyStorePassword is present keyStorePath is</technical_language>

Target:
protected final void check() { Preconditions.checkArgument( keyStorePath().isPresent() == keyStorePassword().isPresent(), "keyStorePath and keyStorePassword must both be present or both be absent"); Preconditions.checkArgument( !keyStoreKeyAlias().isPresent() || keyStorePath().isPresent(), "keyStorePath must be present if keyStoreKeyAlias is present"); }
Source:
<code>private static <T> List<T> getReversed(Collection<T> collection) { <START> ArrayList<T> result = new ArrayList<>(); result.addAll(collection); <END> Collections.reverse(result); return result; }</code><technical_language>Simpler: ArrayList<T> result = new ArrayList<>(collection);</technical_language>

Target:
private static <T> List<T> getReversed(Collection<T> collection) { ArrayList<T> result = new ArrayList<>(collection); Collections.reverse(result); return result; }
Source:
<code><START> public void shouldGetBuiltInExtension() throws OperationException { <END> ContextService contextService = Framework.getService(ContextService.class); Map<String, ContextHelper> contextHelperList = contextService.getHelperFunctions(); assertTrue(contextHelperList.containsKey("Fn")); assertNotNull(contextHelperList.get("Fn")); assertTrue(contextHelperList.get("Fn") instanceof PlatformFunctions); }</code><technical_language>This change needed</technical_language>

Target:
public void shouldGetBuiltInExtension() { ContextService contextService = Framework.getService(ContextService.class); Map<String, ContextHelper> contextHelperList = contextService.getHelperFunctions(); assertTrue(contextHelperList.containsKey("Fn")); assertNotNull(contextHelperList.get("Fn")); assertTrue(contextHelperList.get("Fn") instanceof PlatformFunctions); }
Source:
<code>public void deleteData(String feedName, String cluster) throws FalconException, ParseException, IOException { Entity existingEntity = configStore.get(EntityType.FEED, feedName); if (existingEntity == null) { throw new FalconException("Feed Not Found " + feedName); } Feed feed = (Feed) existingEntity; Storage rawStorage = FeedHelper.createStorage(cluster, feed); String feedPathTemplate = rawStorage.getUriTemplate(LocationType.DATA); <START> Properties vars = new Properties(); <END> vars.put(FeedDataPath.VARS.YEAR.name(), "*"); vars.put(FeedDataPath.VARS.MONTH.name(), "*"); vars.put(FeedDataPath.VARS.DAY.name(), "*"); vars.put(FeedDataPath.VARS.HOUR.name(), "*"); vars.put(FeedDataPath.VARS.MINUTE.name(), "*"); String feedPath = ExpressionHelper.substitute(feedPathTemplate, vars); FileStatus files = fs.globStatus(new Path(feedPath)); for (FileStatus file : files) { fs.delete(file.getPath(), true); } }</code><technical_language>delete feed base path ? files delete</technical_language>

Target:
public void deleteData(String feedName, String cluster) throws FalconException, ParseException, IOException { Entity existingEntity = configStore.get(EntityType.FEED, feedName); if (existingEntity == null) { throw new FalconException("Feed Not Found " + feedName); } Feed feed = (Feed) existingEntity; Storage rawStorage = FeedHelper.createStorage(cluster, feed); String feedPathTemplate = rawStorage.getUriTemplate(LocationType.DATA); Path feedBasePath = FeedHelper.getFeedBasePath(feedPathTemplate); fs.delete(feedBasePath, true); }
Source:
<code>public static FirewallType getDefaultFirewallType(Version clusterCompatibilityVersion) { <START> return clusterCompatibilityVersion.less(Version.v4_2) ? FirewallType.IPTABLES : FirewallType.FIREWALLD; <END> }</code><technical_language>leave IPTABLES default for new 3.6 clusters. new 4.x cluster is created in RHV 4.2, hosts 4.2 VDSM of channel, firewalld work fine</technical_language>

Target:
public static FirewallType getDefaultFirewallType(Version clusterCompatibilityVersion) { return clusterCompatibilityVersion.greater(Version.v3_6) ? FirewallType.FIREWALLD : FirewallType.IPTABLES; }
Source:
<code>private void showOverlayTutorialOne() { new ShowcaseView.Builder(mActivity) .setContentTitle(R.string.tutorial_one_title) .setContentText(R.string.tutorial_one_summary) <START> .singleShot(TUTORIAL_VERSION) <END> .setShowcaseEventListener(new OnShowcaseEventListener() { @Override public void onShowcaseViewShow(final ShowcaseView scv) { } @Override public void onShowcaseViewHide(final ShowcaseView scv) { scv.setVisibility(View.GONE); showOverlayTutorialTwo(); } @Override public void onShowcaseViewDidHide(final ShowcaseView scv) { } }) .build(); }</code><technical_language>if a new tutorial out want users again? sense I suppose! :+1:</technical_language>

Target:
private void showOverlayTutorialOne() { hideText(); new ShowcaseView.Builder(mActivity) .setContentTitle(R.string.tutorial_one_title) .setContentText(R.string.tutorial_one_summary) .singleShot(TUTORIAL_VERSION) .setShowcaseEventListener(new OnShowcaseEventListener() { @Override public void onShowcaseViewShow(final ShowcaseView scv) { scv.setButtonText(mActivity.getResources().getString(R.string.tutorial_next)); } @Override public void onShowcaseViewHide(final ShowcaseView scv) { scv.setVisibility(View.GONE); showOverlayTutorialTwo(); } @Override public void onShowcaseViewDidHide(final ShowcaseView scv) { } }) .build(); }
Source:
<code>protected String elementLabel(GraphicalEditPart editPart) { if (editPart instanceof ActivityPartitionNameEditPart) { <START> editPart = (GraphicalEditPart) editPart.getParent(); <END> } Collection<String> displayValue = DEFAULT_LABEL_DISPLAY; IMaskManagedLabelEditPolicy policy = (IMaskManagedLabelEditPolicy) editPart.getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY); if (policy != null) { displayValue = policy.getCurrentDisplayValue(); } return getCustomLabel(getUMLElement(editPart), displayValue); }</code><technical_language>Do need modified parameter of method ? strange me. I misunderstand if need pass new editPart getCustomLabel in result part a internal copy avoid modified method parameter</technical_language>

Target:
protected String elementLabel(GraphicalEditPart editPart) { GraphicalEditPart graphicalEditPart = editPart; if (editPart instanceof ActivityPartitionNameEditPart) { graphicalEditPart = (GraphicalEditPart) editPart.getParent(); } Collection<String> displayValue = DEFAULT_LABEL_DISPLAY; IMaskManagedLabelEditPolicy policy = (IMaskManagedLabelEditPolicy) editPart.getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY); if (policy != null) { displayValue = policy.getCurrentDisplayValue(); } return getCustomLabel(getUMLElement(graphicalEditPart), displayValue); }
Source:
<code>public void invalidCaCertificateWithKubernetesApiMode() { Map<String, Comparable> properties = new HashMap<String, Comparable>(); <START> properties.put(SERVICE_DNS.key(), null); <END> new KubernetesConfig(properties); }</code><technical_language>need it. I guess Kubernetes API is default mode</technical_language>

Target:
public void invalidCaCertificateWithKubernetesApiMode() { Map<String, Comparable> properties = new HashMap<String, Comparable>(); new KubernetesConfig(properties); }
Source:
<code>public String computeHmac256(final String stringToSign) { try { Mac hmacSha256 = Mac.getInstance("HmacSHA256"); hmacSha256.init(new SecretKeySpec(this.accountKey, "HmacSHA256")); byte[] utf8Bytes = stringToSign.getBytes(StandardCharsets.UTF_8); return Base64.getEncoder().encodeToString(hmacSha256.doFinal(utf8Bytes)); } catch (final NoSuchAlgorithmException e) { throw new RuntimeException(e); } catch (InvalidKeyException e) { <START> throw new RuntimeException("Please double check the account key. Error details: " + e.getMessage()); <END> } }</code><technical_language>new ClientLogger.logAndThrow API throw exception</technical_language>

Target:
public String computeHmac256(final String stringToSign) { try { Mac hmacSha256 = Mac.getInstance("HmacSHA256"); hmacSha256.init(new SecretKeySpec(this.accountKey, "HmacSHA256")); byte[] utf8Bytes = stringToSign.getBytes(StandardCharsets.UTF_8); return Base64.getEncoder().encodeToString(hmacSha256.doFinal(utf8Bytes)); } catch (final NoSuchAlgorithmException e) { LOGGER.asError().log(e.getMessage()); throw new RuntimeException(e); } catch (InvalidKeyException e) { LOGGER.asError().log("Please double check the account key. Error details: " + e.getMessage()); throw new RuntimeException("Please double check the account key. Error details: " + e.getMessage()); } }
Source:
<code>private void compileProlog(ObjectId prolog, File tempDir) throws IOException, CompileException { File tempRules = File.createTempFile("rules", ".pl", tempDir); Compiler comp = new Compiler(); OutputStream out = new FileOutputStream(tempRules); try { <START> git.open(prolog).copyTo(out); <END> comp.prologToJavaSource(tempRules.getPath(), tempDir.getPath()); } finally { out.close(); tempRules.delete(); } }</code><technical_language>This ensure file flushed. means stuck in a buffer shared other open file handle created Compiler. work Windows, files open for writing reading time. need ensure file is written closed call Prolog Compiler</technical_language>

Target:
private void compileProlog(ObjectId prolog, File tempDir) throws IOException, CompileException { File tempRules = File.createTempFile("rules", ".pl", tempDir); Compiler comp = new Compiler(); OutputStream out = new FileOutputStream(tempRules); try { git.open(prolog).copyTo(out); } finally { out.flush(); out.close(); } try { comp.prologToJavaSource(tempRules.getPath(), tempDir.getPath()); } finally { tempRules.delete(); } }
Source:
<code>public static void assertFilesEqual(final File f1, final File f2) { try { if (f1.length() != f2.length()) { throw new SAMException("Files " + f1 + " and " + f2 + " are different lengths."); } final FileInputStream s1 = new FileInputStream(f1); final FileInputStream s2 = new FileInputStream(f2); final byte[] buf1 = new byte[1024 * 1024]; final byte[] buf2 = new byte[1024 * 1024]; int len1; while ((len1 = s1.read(buf1)) != -1) { final int len2 = s2.read(buf2); if (len1 != len2) { <START> s1.close(); <END> s2.close(); throw new SAMException("Unexpected EOF comparing files that are supposed to be the same length."); } if (!Arrays.equals(buf1, buf2)) { s1.close(); s2.close(); throw new SAMException("Files " + f1 + " and " + f2 + " differ."); } } s1.close(); s2.close(); } catch (IOException e) { throw new SAMException("Exception comparing files " + f1 + " and " + f2, e); } }</code><technical_language>Good catch these. Instead of putting closes exit points, I more sense lift creation of FileInputStreams a try-with-resources block guaranteed closed matter function exits</technical_language>

Target:
public static void assertFilesEqual(final File f1, final File f2) { if (f1.length() != f2.length()) { throw new SAMException("File " + f1 + " is " + f1.length() + " bytes but file " + f2 + " is " + f2.length() + " bytes."); } try ( final FileInputStream s1 = new FileInputStream(f1); final FileInputStream s2 = new FileInputStream(f2); ) { final byte[] buf1 = new byte[1024 * 1024]; final byte[] buf2 = new byte[1024 * 1024]; int len1; while ((len1 = s1.read(buf1)) != -1) { final int len2 = s2.read(buf2); if (len1 != len2) { throw new SAMException("Unexpected EOF comparing files that are supposed to be the same length."); } if (!Arrays.equals(buf1, buf2)) { throw new SAMException("Files " + f1 + " and " + f2 + " differ."); } } } catch (final IOException e) { throw new SAMException("Exception comparing files " + f1 + " and " + f2, e); } }
Source:
<code>protected void executeQueryCommand() { List<GlusterVolumeEntity> eligibleVolumeList = new ArrayList<GlusterVolumeEntity>(); Guid masterVolumeId = getParameters().getVolumeId(); GlusterVolumeEntity masterVolume = getGlusterVolumeDao().getById(masterVolumeId); List<VDSGroup> vdsGroups = getDbFacade().getVdsGroupDao().getAll(); for (VDSGroup vdsGroup : vdsGroups) { <START> if (vdsGroup.getId() != masterVolume.getClusterId() && vdsGroup.getcompatibility_version().equals(getDbFacade().getVdsGroupDao().get(masterVolume.getClusterId()).getcompatibility_version()) && vdsGroup.supportsGlusterService()) { <END> List<GlusterVolumeEntity> volumes = getGlusterVolumeDao().getByClusterId(vdsGroup.getId()); for (GlusterVolumeEntity volume : volumes) { if (volume.getStatus() == GlusterStatus.UP && volume.getAdvancedDetails().getCapacityInfo().getUsedSize().equals(0L) && volume.getAdvancedDetails().getCapacityInfo().getFreeSize() >= masterVolume.getAdvancedDetails().getCapacityInfo().getUsedSize()) { eligibleVolumeList.add(volume); } } } } getQueryReturnValue().setReturnValue(eligibleVolumeList); }</code><technical_language>getDbFacade().getVdsGroupDao() assigned a variable loop earlier masterVolume ?</technical_language>

Target:
protected void executeQueryCommand() { Guid masterVolumeId = getParameters().getVolumeId(); GlusterVolumeEntity masterVolume = getGlusterVolumeDao().getById(masterVolumeId); getQueryReturnValue().setReturnValue(getEligibleVolumesList(getUpVolumesWithSuggestedCapacityAndNotInMasterCluster(masterVolume), getExistingSessionSlaveVolumes())); }
Source:
<code>public QueueAsyncClient createQueue(String queueName, Map<String, String> metadata) { QueueAsyncClient queueAsyncClient = new QueueAsyncClient(client, queueName); try { queueAsyncClient.create(metadata).block(); } catch (StorageErrorException ex) { <START> if (!StorageErrorCode.QUEUE_ALREADY_EXISTS.toString().equals(ex.value().message())) { <END> throw ex; } } return queueAsyncClient; }</code><technical_language>this check</technical_language>

Target:
public Mono<Response<QueueAsyncClient>> createQueue(String queueName, Map<String, String> metadata) { QueueAsyncClient queueAsyncClient = new QueueAsyncClient(client, queueName); return queueAsyncClient.create(metadata) .map(response -> new SimpleResponse<>(response, queueAsyncClient)); }
Source:
<code>public void render(BaseViewHolder tag, Caption model) { ViewHolder viewHolder = (ViewHolder) tag; String captionText = model.content; <START> if (captionText.endsWith("<br />")) { <END> captionText = captionText.substring(0, captionText.length() - 6); } viewHolder.transcriptTv.setText(captionText); final int position = getPosition(model); viewHolder.transcriptTv.setTextColor(isSelected(position) ? edx_brand_gray_base : edx_brand_primary_base); }</code><technical_language>camptionText ends <br/></technical_language>

Target:
public void render(BaseViewHolder tag, Caption model) { final ViewHolder viewHolder = (ViewHolder) tag; String captionText = model.content; if (captionText.endsWith("<br />")) { captionText = captionText.substring(0, captionText.length() - 6); } viewHolder.transcriptTv.setText(captionText); final int position = getPosition(model); if (isSelected(position)) { viewHolder.transcriptTv.setTextColor(SELECTED_TRANSCRIPT_COLOR); viewHolder.transcriptTv.setTypeface(Typeface.DEFAULT_BOLD); } else { viewHolder.transcriptTv.setTextColor(UNSELECTED_TRANSCRIPT_COLOR); viewHolder.transcriptTv.setTypeface(Typeface.DEFAULT); } }
Source:
<code>public void testWrite() throws Exception { OpenFalconWriter openFalconWriter = new OpenFalconWriter(new JsonFactory(), ImmutableList.<String>of(), "localhost", "project=falcon,module=judge"); StringWriter writer = new StringWriter(); openFalconWriter.write(writer, dummyServer(), dummyQuery(), dummyResults()); String json = writer.toString(); <START> assertThatJson(json).isArray().ofLength(1); <END> }</code><technical_language>Please, check content of JSON: expected fields values... Test result types</technical_language>

Target:
public void testWrite() throws Exception { OpenFalconWriter openFalconWriter = new OpenFalconWriter(new JsonFactory(), ImmutableList.<String>of(), "localhost", "project=falcon,module=judge"); StringWriter writer = new StringWriter(); openFalconWriter.write(writer, dummyServer(), dummyQuery(), dummyResults()); String json = writer.toString(); assertThatJson(json) .isArray().ofLength(1); assertThatJson(json) .node("[0].metric").isEqualTo("MemoryAlias.ObjectPendingFinalizationCount") .node("[0].endpoint").isEqualTo("localhost") .node("[0].counterType").isEqualTo("GAUGE") .node("[0].step").isEqualTo(60) .node("[0].value").isEqualTo(10); }
Source:
<code>public String getSupportEndPoint() throws OpenStackException { String msnError = "It is not possible to obtain the Support endpoint"; List<String> regions = getRegionsForService("support") ; if (regions == null || regions.size() == 0) { String msn = msnError + " : " + "No support endpoits in any region"; log.error(msn); throw new OpenStackException(msn); } log.debug("Get url for Support server in region " + regions.get(0)); String url; try { <START> url = getEndPointByNameAndRegionName("support", regions.get(0)); <END> } catch (OpenStackException e) { String msn = msnError + " : " + e.getMessage(); log.error(msn); throw new OpenStackException(msn); } return url; }</code><technical_language>configure a default endpoint of a region (Spain2) if is for one</technical_language>

Target:
public String getSupportEndPoint() throws OpenStackException { String msnError = "It is not possible to obtain the Security endpoint"; List<String> regions = getRegionsForService("security") ; if (regions == null || regions.size() == 0) { String msn = msnError + " : " + "No security endpoint in any region"; log.error(msn); throw new OpenStackException(msn); } log.debug("Get url for security server in region " + regions.get(0)); String url; try { url = getEndPointByNameAndRegionName("security", regions.get(0)); } catch (OpenStackException e) { String msn = msnError + " : " + e.getMessage(); log.error(msn); throw new OpenStackException(msn); } return url; }
Source:
<code>public void concealsMembers() throws IOException { final MkContainer container = new MkGrizzlyContainer() .next(new MkAnswer.Simple(HttpURLConnection.HTTP_NO_CONTENT)) .next(new MkAnswer.Simple(HttpURLConnection.HTTP_INTERNAL_ERROR)) .start(); final RtPublicMembers members = new RtPublicMembers( new ApacheRequest(container.home()), organization() ); members.conceal(user()); final MkQuery req = container.take(); MatcherAssert.assertThat( req.method(), Matchers.equalTo(Request.DELETE) ); MatcherAssert.assertThat( req.body(), Matchers.isEmptyOrNullString() ); MatcherAssert.assertThat( req.uri().toString(), Matchers.endsWith(MEMBER_URL) ); this.thrown.expect(AssertionError.class); members.conceal(user()); <START> container.stop(); <END> }</code><technical_language>@cvrebert need stop container in finally block? if some method produce unexpected exception</technical_language>

Target:
public void concealsMembers() throws IOException { final MkContainer container = new MkGrizzlyContainer() .next(new MkAnswer.Simple(HttpURLConnection.HTTP_NO_CONTENT)) .next(new MkAnswer.Simple(HttpURLConnection.HTTP_INTERNAL_ERROR)) .start(); try { final RtPublicMembers members = new RtPublicMembers( new ApacheRequest(container.home()), organization() ); members.conceal(user()); final MkQuery req = container.take(); MatcherAssert.assertThat( req.method(), Matchers.equalTo(Request.DELETE) ); MatcherAssert.assertThat( req.body(), Matchers.isEmptyOrNullString() ); MatcherAssert.assertThat( req.uri().toString(), Matchers.endsWith(MEMBER_URL) ); this.thrown.expect(AssertionError.class); members.conceal(user()); } finally { container.stop(); } }
Source:
<code>public static <T> int indexOf(T[] array, T o) { checkArgument(array != null, "Input array is null"); for (int index = 0; index < array.length; index++) { if (array[index] == o) { <START> return index; <END> } else if (o != null && o.equals(array[index])) { return index; } } return -1; }</code><technical_language>statement instead of two</technical_language>

Target:
public static <T> int indexOf(T[] array, T o) { checkArgument(array != null, "Input array is null"); for (int index = 0; index < array.length; index++) { if (Objects.equal(o, array[index])) { return index; } } return -1; }
Source:
<code>public <T> T createInstance(StoreConfiguration cfg) { if (cfg instanceof DeployedStoreConfiguration) { DeployedStoreConfiguration deployedConfiguration = (DeployedStoreConfiguration) cfg; DeployedCacheStoreMetadata deployedCacheStoreMetadata = null; try { <START> InfinispanLogger.ROOT_LOGGER.info(String.format("Waiting for deployment of Custom Cache Store (%s).", deployedConfiguration.getCustomStoreClassName())); <END> deployedCacheStoreMetadata = getPromise(deployedConfiguration.getCustomStoreClassName()).get(TIMEOUT_SECONDS, TimeUnit.SECONDS); return (T) deployedCacheStoreMetadata.getLoaderWriterRawInstance(); } catch (InterruptedException | ExecutionException e) { throw new IllegalStateException("An error occurred while processing the deployment", e); } catch (TimeoutException e) { InfinispanLogger.ROOT_LOGGER.error(String.format("Waiting for deployment of Custom Cache Store (%s) timed out. Please check if this cache store is really present.", deployedConfiguration.getCustomStoreClassName())); } } return null; }</code><technical_language>this INFO message, DEBUG instead</technical_language>

Target:
public <T> T createInstance(StoreConfiguration cfg) { if (cfg instanceof DeployedStoreConfiguration) { DeployedStoreConfiguration deployedConfiguration = (DeployedStoreConfiguration) cfg; DeployedCacheStoreMetadata deployedCacheStoreMetadata = null; try { InfinispanLogger.ROOT_LOGGER.debug(String.format("Waiting for deployment of Custom Cache Store (%s).", deployedConfiguration.getCustomStoreClassName())); deployedCacheStoreMetadata = getPromise(deployedConfiguration.getCustomStoreClassName()).get(TIMEOUT_SECONDS, TimeUnit.SECONDS); return (T) deployedCacheStoreMetadata.getLoaderWriterRawInstance(); } catch (InterruptedException | ExecutionException e) { throw new IllegalStateException("An error occurred while processing the deployment", e); } catch (TimeoutException e) { InfinispanLogger.ROOT_LOGGER.loadingCustomCacheStoreTimeout(deployedConfiguration.getCustomStoreClassName()); } } return null; }
Source:
<code>public void start() { final int concurrencyLevel = configuration.locking().concurrencyLevel(); localTransactions = CollectionFactory.makeConcurrentMap(concurrencyLevel, 0.75f, concurrencyLevel); globalToLocalTransactions = CollectionFactory.makeConcurrentMap(concurrencyLevel, 0.75f, concurrencyLevel); if (configuration.clustering().cacheMode().isClustered()) { minTopologyRecalculationLock = new ReentrantLock(); remoteTransactions = CollectionFactory.makeConcurrentMap(concurrencyLevel, 0.75f, concurrencyLevel); notifier.addListener(this); clustered = true; } boolean totalOrder = configuration.transaction().transactionProtocol().isTotalOrder(); if (clustered && !totalOrder) { completedTransactionsInfo = new CompletedTransactionsInfo(); ThreadFactory tf = new ThreadFactory() { @Override public Thread newThread(Runnable r) { String address = rpcManager != null ? rpcManager.getTransport().getAddress().toString() : "local"; Thread th = new Thread(r, "TxCleanupService," + cacheName + "," + address); th.setDaemon(true); return th; } }; <START> executorService = Executors.newScheduledThreadPool(2, tf); <END> long interval = configuration.transaction().reaperWakeUpInterval(); executorService.scheduleAtFixedRate(new Runnable() { @Override public void run() { completedTransactionsInfo.cleanupCompletedTransactions(); } }, interval, interval, TimeUnit.MILLISECONDS); executorService.scheduleAtFixedRate(new Runnable() { @Override public void run() { cleanupOrphanedTransactions(); } }, interval, interval, TimeUnit.MILLISECONDS); } }</code><technical_language>Do need 2 threads</technical_language>

Target:
public void start() { final int concurrencyLevel = configuration.locking().concurrencyLevel(); localTransactions = CollectionFactory.makeConcurrentMap(concurrencyLevel, 0.75f, concurrencyLevel); globalToLocalTransactions = CollectionFactory.makeConcurrentMap(concurrencyLevel, 0.75f, concurrencyLevel); if (configuration.clustering().cacheMode().isClustered()) { minTopologyRecalculationLock = new ReentrantLock(); remoteTransactions = CollectionFactory.makeConcurrentMap(concurrencyLevel, 0.75f, concurrencyLevel); notifier.addListener(this); clustered = true; } boolean totalOrder = configuration.transaction().transactionProtocol().isTotalOrder(); if (clustered && !totalOrder) { completedTransactionsInfo = new CompletedTransactionsInfo(); ThreadFactory tf = new ThreadFactory() { @Override public Thread newThread(Runnable r) { String address = rpcManager != null ? rpcManager.getTransport().getAddress().toString() : "local"; Thread th = new Thread(r, "TxCleanupService," + cacheName + "," + address); th.setDaemon(true); return th; } }; executorService = Executors.newSingleThreadScheduledExecutor(tf); long interval = configuration.transaction().reaperWakeUpInterval(); executorService.scheduleAtFixedRate(new Runnable() { @Override public void run() { completedTransactionsInfo.cleanupCompletedTransactions(); } }, interval, interval, TimeUnit.MILLISECONDS); executorService.scheduleAtFixedRate(new Runnable() { @Override public void run() { cleanupOrphanedTransactions(); } }, interval, interval, TimeUnit.MILLISECONDS); } }
Source:
<code>public ValidatingOutputFormat getValidatingOutputFormat(PipelineConfigurer pipelineConfigurer) { FileFormat format = config.getFormat(); return <START> pipelineConfigurer.usePlugin(ValidatingOutputFormat.PLUGIN_TYPE, format.name().toLowerCase(), <END> format.name().toLowerCase(), config.getRawProperties()); }</code><technical_language>style: previous line besides return. Also, indentation for a new line 2 spaces 4</technical_language>

Target:
protected ValidatingOutputFormat getValidatingOutputFormat(PipelineConfigurer pipelineConfigurer) { FileFormat format = config.getFormat(); return pipelineConfigurer.usePlugin(ValidatingOutputFormat.PLUGIN_TYPE, format.name().toLowerCase(), format.name().toLowerCase(), config.getRawProperties()); }