auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void embeddedLdapServerRegistersExpectedAuthenticationProvider() { LdapAuthenticationProvider LdapAuthenticationProvider = (org.springframework.security.ldap.authentication.LdapAuthenticationProvider) appCtx.getBean( "ldapAuthenticationProvider"); Authentication authentication = LdapAuthenticationProvider.authenticate( new UsernamePasswordAuthenticationToken("przemyslaw.fusik", "password")); Assert.assertThat(authentication, CoreMatchers.notNullValue()); Assert.assertThat(authentication, CoreMatchers.instanceOf(UsernamePasswordAuthenticationToken.class)); Assert.assertThat(authentication.getPrincipal(), CoreMatchers.instanceOf(LdapUserDetailsImpl.class)); <START> Assert.assertThat(((LdapUserDetailsImpl) authentication.getPrincipal()).getDn(), <END> CoreMatchers.equalTo("uid=przemyslaw.fusik,ou=Users,dc=carlspring,dc=com")); Assert.assertThat(((LdapUserDetailsImpl) authentication.getPrincipal()).getPassword(), CoreMatchers.equalTo("password")); Assert.assertThat(((LdapUserDetailsImpl) authentication.getPrincipal()).getUsername(), CoreMatchers.equalTo("przemyslaw.fusik")); Assert.assertThat(((LdapUserDetailsImpl) authentication.getPrincipal()).getAuthorities(), CoreMatchers.hasItems( CoreMatchers.equalTo((GrantedAuthority) Privileges.ADMIN_CREATE_REPO), CoreMatchers.equalTo((GrantedAuthority) Privileges.ADMIN_DELETE_REPO), CoreMatchers.equalTo((GrantedAuthority) Privileges.ADMIN_CREATE_REPO), CoreMatchers.equalTo(new SimpleGrantedAuthority("VIEW_USER"))) ); }</code><technical_language>Cosmetic: define a variable for principal re-use it, instead of casting</technical_language>

Target:
public void embeddedLdapServerRegistersExpectedAuthenticationProvider() { LdapAuthenticationProvider LdapAuthenticationProvider = (org.springframework.security.ldap.authentication.LdapAuthenticationProvider) appCtx.getBean( "ldapAuthenticationProvider"); Authentication authentication = LdapAuthenticationProvider.authenticate( new UsernamePasswordAuthenticationToken("przemyslaw.fusik", "password")); Assert.assertThat(authentication, CoreMatchers.notNullValue()); Assert.assertThat(authentication, CoreMatchers.instanceOf(UsernamePasswordAuthenticationToken.class)); Assert.assertThat(authentication.getPrincipal(), CoreMatchers.instanceOf(LdapUserDetailsImpl.class)); LdapUserDetails ldapUserDetails = (LdapUserDetailsImpl) authentication.getPrincipal(); Assert.assertThat(ldapUserDetails.getDn(), CoreMatchers.equalTo("uid=przemyslaw.fusik,ou=Users,dc=carlspring,dc=com")); Assert.assertThat(ldapUserDetails.getPassword(), CoreMatchers.equalTo("password")); Assert.assertThat(ldapUserDetails.getUsername(), CoreMatchers.equalTo("przemyslaw.fusik")); Assert.assertThat(ldapUserDetails.getAuthorities(), CoreMatchers.hasItems( CoreMatchers.equalTo((GrantedAuthority) Privileges.ADMIN_CREATE_REPO), CoreMatchers.equalTo((GrantedAuthority) Privileges.ADMIN_DELETE_REPO), CoreMatchers.equalTo((GrantedAuthority) Privileges.ADMIN_CREATE_REPO), CoreMatchers.equalTo(new SimpleGrantedAuthority("VIEW_USER"))) ); }
Source:
<code>private static <E extends Enum<E>> Optional<Argument> byName(E value, ConfigRegistry config) { return makeArgument(Types.VARCHAR, String.class, value, e -> { final Field field; try { field = e.getDeclaringClass().getField(e.name()); } catch (final NoSuchFieldException ex) { <START> throw new RuntimeException(ex); <END> } final DatabaseValue databaseValue = field.getAnnotation(DatabaseValue.class); return databaseValue == null ? e.name() : databaseValue.value(); }, config); }</code><technical_language>please Unchecked.function/supplier for this sort of (inspired jool, if familiar that). I assume methods throw, uncheck a lambda preferred method ref</technical_language>

Target:
private static <E extends Enum<E>> Optional<Argument> byName(E value, ConfigRegistry config) { final Function<E, String> transform = e -> { final Field field = Unchecked.function(e.getDeclaringClass()::getField).apply(e.name()); final DatabaseValue databaseValue = field.getAnnotation(DatabaseValue.class); return databaseValue == null ? e.name() : databaseValue.value(); }; return makeArgument(Types.VARCHAR, String.class, value, transform, config); }
Source:
<code>public void run() { <START> android.os.Process.setThreadPriority( android.os.Process.THREAD_PRIORITY_BACKGROUND ); <END> final Thread thread = Thread.currentThread(); TileCanvasViewGroup tileCanvasViewGroup = mTileCanvasViewGroup.get(); Tile tile = mTile.get(); if( tileCanvasViewGroup != null ){ if( thread.isInterrupted() ){ tileCanvasViewGroup.onRenderTaskCancelled(); return; } if( !tileCanvasViewGroup.getRenderIsCancelled() && tile != null ){ tileCanvasViewGroup.generateTileBitmap( tile ); if ( thread.isInterrupted() ){ tileCanvasViewGroup.onRenderTaskCancelled(); return; } tileCanvasViewGroup.addTileToCurrentTileCanvasView( tile ); } } }</code><technical_language>is a reason for FQNS here, import android.os.Process; ... Process.setThreadPriority(...</technical_language>

Target:
public void run() { Process.setThreadPriority( Process.THREAD_PRIORITY_BACKGROUND ); final Thread thread = Thread.currentThread(); TileCanvasViewGroup tileCanvasViewGroup = mTileCanvasViewGroup.get(); Tile tile = mTile.get(); if( tileCanvasViewGroup != null ){ if( thread.isInterrupted() ){ tileCanvasViewGroup.onRenderTaskCancelled(); return; } if( !tileCanvasViewGroup.getRenderIsCancelled() && tile != null ){ tileCanvasViewGroup.generateTileBitmap( tile ); if ( thread.isInterrupted() ){ tileCanvasViewGroup.onRenderTaskCancelled(); return; } tileCanvasViewGroup.addTileToCurrentTileCanvasView( tile ); } } }
Source:
<code>protected VdcQueryReturnValue getAllDisksByStorageDomain(Guid domainId) { <START> return Backend.getInstance().RunQuery(VdcQueryType.GetAllDisksByStorageDomainId, <END> new StorageDomainQueryParametersBase(domainId)); }</code><technical_language>getBackend() instead of Backend.getInstance()</technical_language>

Target:
protected VdcQueryReturnValue getAllDisksByStorageDomain(Guid domainId) { return getBackend().RunQuery(VdcQueryType.GetAllDisksByStorageDomainId, new StorageDomainQueryParametersBase(domainId)); }
Source:
<code>public void createModelThrowsIfModelAlreadyExists(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion) { DigitalTwinsClient client = getClient(httpClient, serviceVersion); final List<String> modelsToCreate = new ArrayList<>(); final String wardModelId = UniqueIdHelper.getUniqueModelId(TestAssetDefaults.WARD_MODEL_ID, client, randomIntegerStringGenerator); final String wardModelPayload = TestAssetsHelper.getWardModelPayload(wardModelId); modelsToCreate.add(wardModelPayload); List<ModelData> createdModels = client.createModels(modelsToCreate); createdModels.forEach((modelData) -> { assertNotNull(modelData); }); assertRestException( <START> () -> client.createModels(modelsToCreate).forEach((modelData) -> { <END> }), HttpURLConnection.HTTP_CONFLICT); }</code><technical_language>do this for-each iteration, create models return a pageable anymore, blocking call complete result</technical_language>

Target:
public void createModelThrowsIfModelAlreadyExists(HttpClient httpClient, DigitalTwinsServiceVersion serviceVersion) { DigitalTwinsClient client = getClient(httpClient, serviceVersion); final List<String> modelsToCreate = new ArrayList<>(); final String wardModelId = UniqueIdHelper.getUniqueModelId(TestAssetDefaults.WARD_MODEL_ID, client, randomIntegerStringGenerator); final String wardModelPayload = TestAssetsHelper.getWardModelPayload(wardModelId); modelsToCreate.add(wardModelPayload); List<ModelData> createdModels = client.createModels(modelsToCreate); createdModels.forEach((modelData) -> { assertNotNull(modelData); }); assertRestException( () -> client.createModels(modelsToCreate), HttpURLConnection.HTTP_CONFLICT); }
Source:
<code>private void setAchievements() { if (checkAccount()) { try{ compositeDisposable.add(mediaWikiApi .getAchievements(Objects.requireNonNull(sessionManager.getCurrentAccount()).name) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe( response -> { if (response != null) { setUploadCount(Achievements.from(response)); } else { Timber.d("success"); layoutImageReverts.setVisibility(View.INVISIBLE); imageView.setVisibility(View.INVISIBLE); levelNumber.setText("You haven't qualified any level yet"); <START> } <END> }, t -> { Timber.e(t, "Fetching achievements statistics failed"); onError(); } )); } catch (Exception e){ Timber.d(e+"success"); } } }</code><technical_language>Please clear //onError(); line</technical_language>

Target:
private void setAchievements() { progressBar.setVisibility(View.VISIBLE); if (checkAccount()) { try{ compositeDisposable.add(mediaWikiApi .getAchievements(Objects.requireNonNull(sessionManager.getCurrentAccount()).name) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe( response -> { if (response != null) { setUploadCount(Achievements.from(response)); } else { Timber.d("success"); layoutImageReverts.setVisibility(View.INVISIBLE); imageView.setVisibility(View.INVISIBLE); showSnackBarWithRetry(); } }, t -> { Timber.e(t, "Fetching achievements statistics failed"); showSnackBarWithRetry(); } )); } catch (Exception e){ Timber.d(e+"success"); } } }
Source:
<code>static <T> CheckedFunction0<T> decorateCheckedSupplier(CircuitBreaker circuitBreaker, CheckedFunction0<T> supplier) { return () -> { circuitBreaker.acquirePermission(); Instant start = circuitBreaker.getClock().instant(); try { T returnValue = supplier.apply(); <START> Instant end = circuitBreaker.getClock().instant(); <END> long durationInNanos = Duration.between(start, end).toNanos(); circuitBreaker.onSuccess(durationInNanos, TimeUnit.NANOSECONDS); return returnValue; } catch (Exception exception) { Instant end = circuitBreaker.getClock().instant(); long durationInNanos = Duration.between(start, end).toNanos(); circuitBreaker.onError(durationInNanos, TimeUnit.NANOSECONDS, exception); throw exception; } }; }</code><technical_language>avoid creating Instant classes measure timings in order reduce GC pressure</technical_language>

Target:
static <T> CheckedFunction0<T> decorateCheckedSupplier(CircuitBreaker circuitBreaker, CheckedFunction0<T> supplier) { return () -> { circuitBreaker.acquirePermission(); final long start = circuitBreaker.getCurrentTimestamp(); try { T returnValue = supplier.apply(); long duration = circuitBreaker.getCurrentTimestamp() - start; circuitBreaker.onSuccess(duration, circuitBreaker.getTimestampUnit()); return returnValue; } catch (Exception exception) { long duration = circuitBreaker.getCurrentTimestamp() - start; circuitBreaker.onError(duration, circuitBreaker.getTimestampUnit(), exception); throw exception; } }; }
Source:
<code><START> public Integer getPrivatePort() { <END> return privatePort; }</code><technical_language>this change? private port null. Public port</technical_language>

Target:
public int getPrivatePort() { return privatePort; }
Source:
<code>public FunctionSignature[] getFunctionSignatures() { return new FunctionSignature[]{ <START> new BasicFunctionSignature(getType(null), ScalarArgument.GEOMETRY, <END> ScalarArgument.INT), new BasicFunctionSignature(getType(null), ScalarArgument.GEOMETRY, ScalarArgument.STRING)}; }</code><technical_language>Again, strange getType(null) calls</technical_language>

Target:
public FunctionSignature[] getFunctionSignatures() { return new FunctionSignature[]{ new BasicFunctionSignature(Type.GEOMETRY, ScalarArgument.GEOMETRY, ScalarArgument.INT), new BasicFunctionSignature(Type.GEOMETRY, ScalarArgument.GEOMETRY, ScalarArgument.STRING)}; }
Source:
<code>protected Configuration getRemoteCacheManagerConfig(String login, String password) { ConfigurationBuilder config = getDefaultConfigBuilder(); config.security().authentication().serverName(TEST_SERVER_NAME); <START> config.security().authentication().saslMechanism(getTestedMech()); <END> config.security().authentication().callbackHandler(new LoginHandler(login, password, TEST_REALM)); config.security().authentication().enable(); return config.build(); }</code><technical_language>fluent</technical_language>

Target:
protected Configuration getRemoteCacheManagerConfig(String login, String password) { ConfigurationBuilder config = getDefaultConfigBuilder(); config.security().authentication() .serverName(TEST_SERVER_NAME) .saslMechanism(getTestedMech()) .callbackHandler(new LoginHandler(login, password, TEST_REALM)) .enable(); return config.build(); }
Source:
<code>public QueryOperation of(T arg) { checkNotNull(arg); <START> return newInstance.apply(arg); <END> }</code><technical_language>this</technical_language>

Target:
public QueryOperation<T> of(T arg) { checkNotNull(arg); return this.newInstance.apply(arg); }
Source:
<code>@Override public Request authenticate(Route route, Response res) throws IOException { List<Challenge> challenges = res.challenges(); for (Challenge challenge : challenges) { if (!"Basic".equalsIgnoreCase(challenge.scheme())) continue; Request req = res.request(); HttpUrl url = req.url(); Proxy proxy = route.proxy(); InetSocketAddress proxyAddr = (InetSocketAddress)proxy.address(); PasswordAuthentication auth = java.net.Authenticator.requestPasswordAuthentication( proxyAddr.getHostName(), proxyAddr.getAddress(), proxyAddr.getPort(), url.scheme(), challenge.realm(), challenge.scheme(), url.url(), <START> java.net.Authenticator.RequestorType.PROXY); <END> if (auth != null) { String cred = Credentials.basic(auth.getUserName(), new String(auth.getPassword()), challenge.charset()); if (latestCredHashCode == cred.hashCode()) { latestCredHashCode = 0; throw new ProxyAuthException("Failed to authenticate with proxy"); } latestCredHashCode = cred.hashCode(); return req.newBuilder() .header("Proxy-Authorization", cred) .build(); } } return null; }</code><technical_language>Refactor this const static import</technical_language>

Target:
@Override public Request authenticate(Route route, Response res) throws IOException { List<Challenge> challenges = res.challenges(); for (Challenge challenge : challenges) { if (!"Basic".equalsIgnoreCase(challenge.scheme())) continue; Request req = res.request(); HttpUrl url = req.url(); Proxy proxy = route.proxy(); InetSocketAddress proxyAddr = (InetSocketAddress)proxy.address(); PasswordAuthentication auth = java.net.Authenticator.requestPasswordAuthentication( proxyAddr.getHostName(), proxyAddr.getAddress(), proxyAddr.getPort(), url.scheme(), challenge.realm(), challenge.scheme(), url.url(), PROXY); if (auth != null) { String cred = Credentials.basic(auth.getUserName(), new String(auth.getPassword()), challenge.charset()); if (latestCredHashCode == cred.hashCode()) { latestCredHashCode = 0; throw new ProxyAuthException("Failed to authenticate with proxy"); } latestCredHashCode = cred.hashCode(); return req.newBuilder() .header("Proxy-Authorization", cred) .build(); } } return null; }
Source:
<code>private void createKerberosLdapAAAConfigurations() { List<Properties> results = new ArrayList<>(); for (String domain : Config.<String> getValue(ConfigValues.DomainName).split("[,]", -1)) { Properties authConfig = new Properties(); authConfig.put(ExtensionsManager.CLASS, "org.ovirt.engine.extensions.aaa.builtin.kerberosldap.KerberosLdapAuthenticator"); authConfig.put(ExtensionsManager.PROVIDES, "org.ovirt.engine.core.authentication"); authConfig.put(ExtensionsManager.ENABLED, "true"); authConfig.put(ExtensionsManager.MODULE, "org.ovirt.engine.extensions.builtin"); authConfig.put(ExtensionsManager.NAME, String.format("builtin-authn-%1$s", domain)); authConfig.put("ovirt.engine.aaa.authn.profile.name", domain); <START> authConfig.put("ovirt.engine.aaa.authn.authz.plugin", String.format("builtin-authz-%1$s", domain)); <END> ExtensionsManager.getInstance().load(authConfig); Properties dirConfig = new Properties(); dirConfig.put(ExtensionsManager.CLASS, "org.ovirt.engine.extensions.aaa.builtin.kerberosldap.KerberosLdapDirectory"); dirConfig.put(ExtensionsManager.PROVIDES, "org.ovirt.engine.core.authorization"); dirConfig.put(ExtensionsManager.ENABLED, "true"); dirConfig.put(ExtensionsManager.MODULE, "org.ovirt.engine.extensions.builtin"); dirConfig.put(ExtensionsManager.NAME, String.format("builtin-authz-%1$s", domain)); dirConfig.put("ovirt.engine.aaa.authz.profile.name", domain); ExtensionsManager.getInstance().load(dirConfig); } }</code><technical_language>I added specific config implicitly a key vdc_table other name profile</technical_language>

Target:
private void createKerberosLdapAAAConfigurations() { List<Properties> results = new ArrayList<>(); for (String domain : Config.<String> getValue(ConfigValues.DomainName).split("[,]", -1)) { Properties authConfig = new Properties(); authConfig.put(ExtensionsManager.CLASS, "org.ovirt.engine.extensions.aaa.builtin.kerberosldap.KerberosLdapAuthenticator"); authConfig.put(ExtensionsManager.PROVIDES, "org.ovirt.engine.authentication"); authConfig.put(ExtensionsManager.ENABLED, "true"); authConfig.put(ExtensionsManager.MODULE, "org.ovirt.engine.extensions.builtin"); authConfig.put(ExtensionsManager.NAME, String.format("builtin-authn-%1$s", domain)); authConfig.put("ovirt.engine.aaa.authn.profile.name", domain); authConfig.put("ovirt.engine.aaa.authn.authz.plugin", String.format("builtin-authz-%1$s", domain)); ExtensionsManager.getInstance().load(authConfig); Properties dirConfig = new Properties(); dirConfig.put(ExtensionsManager.CLASS, "org.ovirt.engine.extensions.aaa.builtin.kerberosldap.KerberosLdapDirectory"); dirConfig.put(ExtensionsManager.PROVIDES, "org.ovirt.engine.authorization"); dirConfig.put(ExtensionsManager.ENABLED, "true"); dirConfig.put(ExtensionsManager.MODULE, "org.ovirt.engine.extensions.builtin"); dirConfig.put(ExtensionsManager.NAME, String.format("builtin-authz-%1$s", domain)); ExtensionsManager.getInstance().load(dirConfig); } }
Source:
<code>protected void check() { if (enableTimeLimiting()) { double errorMargin = blockingTimeoutErrorMargin(); <START> Preconditions.checkState( <END> errorMargin > 0, "Lock service timeout margin must be strictly positive but found %s", errorMargin); Preconditions.checkState( errorMargin < 1, "Lock service timeout margin must be strictly less than 1 but found %s", errorMargin); } }</code><technical_language>nit: combine a single state check, 0 1</technical_language>

Target:
protected void check() { if (enableTimeLimiting()) { double errorMargin = blockingTimeoutErrorMargin(); Preconditions.checkState( errorMargin > 0 && errorMargin < 1, "Lock service timeout margin must be strictly between 0 and 1 but found %s", errorMargin); } }
Source:
<code>public boolean <START> providesLevel(IndexingLevel level) { <END> switch (this) { case NONE: return level == NONE; case FULL: return true; case BOTH: return level == BOTH || level == STATISTICS || level == NOTIFICATIONS || level == NONE; case NOTIFICATIONS: return level == NOTIFICATIONS || level == NONE; case STATISTICS: return level == STATISTICS || level == NONE; default: return false; } }</code><technical_language>I see, this replaced with: return this.merge(level) == this; This avoid duplicating information in mergeTable</technical_language>

Target:
public boolean providesLevel(IndexingLevel level) { return this.merge(level) == this; }
Source:
<code>public InspectionReport inspect(@Valid final AgentClientMetadata agentClientMetadata) { final boolean jobSubmissionEnabled = this.environment.getProperty( JobConstants.JOB_SUBMISSION_ENABLED_PROPERTY_KEY, Boolean.class, true ); if (jobSubmissionEnabled) { return new InspectionReport( InspectionReport.Decision.ACCEPT, <START> "Job submission is enabled" <END> ); } else { final String message = environment.getProperty( JobConstants.JOB_SUBMISSION_DISABLED_MESSAGE_KEY, String.class, JobConstants.JOB_SUBMISSION_DISABLED_DEFAULT_MESSAGE ); return new InspectionReport( InspectionReport.Decision.REJECT, message ); } }</code><technical_language>This a constant</technical_language>

Target:
public InspectionReport inspect(@Valid final AgentClientMetadata agentClientMetadata) { final boolean jobSubmissionEnabled = this.environment.getProperty( JobConstants.JOB_SUBMISSION_ENABLED_PROPERTY_KEY, Boolean.class, true ); if (jobSubmissionEnabled) { return new InspectionReport( InspectionReport.Decision.ACCEPT, JOB_SUBMISSION_IS_ENABLED_MESSAGE ); } else { final String message = environment.getProperty( JobConstants.JOB_SUBMISSION_DISABLED_MESSAGE_KEY, String.class, JobConstants.JOB_SUBMISSION_DISABLED_DEFAULT_MESSAGE ); return new InspectionReport( InspectionReport.Decision.REJECT, message ); } }
Source:
<code>public RenderedImage writePNG( RenderedImage image, OutputStream outStream, float quality, WMSMapContent mapContent) { FilterType filterType = getFilterType(mapContent); PNGWriter writer = new PNGWriter(); boolean isScanlineSupported = writer.isScanlineSupported(image); if (!isScanlineSupported) { image = new ImageWorker(image) .rescaleToBytes() .forceComponentColorModel() .getRenderedImage(); } RenderedImage output = null; try { output = writer.writePNG(image, outStream, quality, filterType); } catch (Exception e) { <START> LOGGER.log(Level.FINER, "Failed to encode the PNG", e); <END> throw new ServiceException(e); } return output; }</code><technical_language>No... check if is a ClientStreamAbortedException wrapped, else. Check dispatcher it. <LINK_0></technical_language>

Target:
public RenderedImage writePNG( RenderedImage image, OutputStream outStream, float quality, WMSMapContent mapContent) { FilterType filterType = getFilterType(mapContent); PNGWriter writer = new PNGWriter(); boolean isScanlineSupported = writer.isScanlineSupported(image); if (!isScanlineSupported) { image = new ImageWorker(image) .rescaleToBytes() .forceComponentColorModel() .getRenderedImage(); } RenderedImage output = null; try { output = writer.writePNG(image, outStream, quality, filterType); } catch (Exception e) { throw new ServiceException("Failed to encode the PNG", e); } return output; }
Source:
<code>private void validateRefs(Item item) { for (Location location : Iterables.concat(Iterables.transform( Iterables.concat(Iterables.transform( item.getVersions(), Version.TO_ENCODINGS) ), <START> Encoding.TO_LOCATIONS))) { <END> Policy policy = location.getPolicy(); if (policy != null) { if (policy.getService() != null) { checkState(serviceResolver.serviceFor(policy.getService()).isPresent(), "Service ID " + policy.getService() + " invalid"); } if (policy.getPlayer() != null) { checkState(playerResolver.playerFor(policy.getPlayer()).isPresent(), "Player ID " + policy.getService() + " invalid"); } } ; } }</code><technical_language>I dump this iterable a variable for clarity. more a tad clunky in-lined..</technical_language>

Target:
private void validateRefs(Item item) { for (Location location : allLocations(item)) { Policy policy = location.getPolicy(); if (policy != null) { if (policy.getService() != null) { checkState(serviceResolver.serviceFor(policy.getService()).isPresent(), "Service ID " + policy.getService() + " invalid"); } if (policy.getPlayer() != null) { checkState(playerResolver.playerFor(policy.getPlayer()).isPresent(), "Player ID " + policy.getPlayer() + " invalid"); } } ; } }
Source:
<code>public void testRoundTripPOMs() throws Exception { URL resource = PomIOTest.class.getResource( filename ); assertNotNull( resource ); File pom = new File( resource.getFile() ); assertTrue( pom.exists() ); File targetFile = folder.newFile( "target.xml" ); FileUtils.copyFile( pom, targetFile ); List<Project> projects = pomIO.parseProject( targetFile ); FieldUtils.writeDeclaredField( projects.get( 0 ), "executionRoot", false, true); HashSet<Project> changed = new HashSet<>(projects); pomIO.rewritePOMs( changed ); <START> assertTrue( FileUtils.contentEqualsIgnoreEOL( pom, targetFile, StandardCharsets.UTF_8.toString() ) ); <END> assertTrue( FileUtils.contentEquals( targetFile, pom ) ); }</code><technical_language>Charset Charset.forName( projects.get( 0 ).getModel().getModelEncoding() )</technical_language>

Target:
public void testRoundTripPOMs() throws Exception { URL resource = PomIOTest.class.getResource( filename ); assertNotNull( resource ); File pom = new File( resource.getFile() ); assertTrue( pom.exists() ); File targetFile = folder.newFile( "target.xml" ); FileUtils.copyFile( pom, targetFile ); List<Project> projects = pomIO.parseProject( targetFile ); assertNull( projects.get( 0 ).getModel().getModelEncoding() ); FieldUtils.writeDeclaredField( projects.get( 0 ), "executionRoot", false, true); HashSet<Project> changed = new HashSet<>(projects); pomIO.rewritePOMs( changed ); assertTrue( FileUtils.contentEqualsIgnoreEOL( pom, targetFile, StandardCharsets.UTF_8.toString() ) ); assertTrue( FileUtils.contentEquals( targetFile, pom ) ); }
Source:
<code>public static void deleteDataPolicy( final String dataPolicyName, final Ds3Client client) { if (isEmpty(dataPolicyName)) { LOG.debug("Data policy name is null or empty"); return; } try { final DeleteDataPolicySpectraS3Response deleteDataPolicy = client .deleteDataPolicySpectraS3(new DeleteDataPolicySpectraS3Request(dataPolicyName)); <START> Assert.assertThat(deleteDataPolicy.getStatusCode(), CoreMatchers.is(204)); <END> } catch (final IOException|AssertionError e) { LOG.error("Data policy was not deleted as expected: {}", dataPolicyName); } try { client.getDataPolicySpectraS3(new GetDataPolicySpectraS3Request(dataPolicyName)); LOG.error("Data policy still exists despite deletion attempt: {}", dataPolicyName); } catch (final IOException e) { } }</code><technical_language>I change import for CoreMatchers a static import, omit CoreMatchers CoreMatchers.is</technical_language>

Target:
public static void deleteDataPolicy( final String dataPolicyName, final Ds3Client client) { if (isEmpty(dataPolicyName)) { LOG.debug("Data policy name is null or empty"); return; } try { final DeleteDataPolicySpectraS3Response deleteDataPolicy = client .deleteDataPolicySpectraS3(new DeleteDataPolicySpectraS3Request(dataPolicyName)); } catch (final IOException|AssertionError e) { LOG.error("Data policy was not deleted as expected: {}", dataPolicyName); } try { client.getDataPolicySpectraS3(new GetDataPolicySpectraS3Request(dataPolicyName)); LOG.error("Data policy still exists despite deletion attempt: {}", dataPolicyName); } catch (final IOException e) { } }
Source:
<code>Consumer<ClientOptionsBuilder> esTracing(Optional<HttpTracing> maybeHttpTracing) { if (!maybeHttpTracing.isPresent()) { return client -> { }; } HttpTracing httpTracing = maybeHttpTracing.get().clientOf("elasticsearch"); SpanCustomizer spanCustomizer = CurrentSpanCustomizer.create(httpTracing.tracing()); return client -> { client.decorator((delegate, ctx, req) -> { RequestLogAccess log = ctx.log(); if (log.isAvailable(RequestLogProperty.NAME)) { <START> String name = log.partial().name(); <END> if (name != null) { spanCustomizer.name(name); } } return delegate.execute(ctx, req); }); client.decorator(BraveClient.newDecorator(httpTracing)); }; }</code><technical_language>this is curious.. partial</technical_language>

Target:
Consumer<ClientOptionsBuilder> esTracing(Optional<HttpTracing> maybeHttpTracing) { if (!maybeHttpTracing.isPresent()) { return client -> { }; } HttpTracing httpTracing = maybeHttpTracing.get().clientOf("elasticsearch"); SpanCustomizer spanCustomizer = CurrentSpanCustomizer.create(httpTracing.tracing()); return client -> { client.decorator((delegate, ctx, req) -> { RequestLog log = ctx.log().partial(); if (log.isAvailable(RequestLogProperty.NAME)) { String name = log.name(); if (name != null) { spanCustomizer.name(name); } } return delegate.execute(ctx, req); }); client.decorator(BraveClient.newDecorator(httpTracing)); }; }
Source:
<code>@Test public void setLevelShouldPreventNullValue() { try { applicationInterceptor.setLevel(null); fail(); } catch (NullPointerException expected) { <START> } catch (IllegalArgumentException expected) { } <END> }</code><technical_language>Remove this 1.4? suggestion }</technical_language>

Target:
@Test public void setLevelShouldPreventNullValue() { try { applicationInterceptor.setLevel(null); fail(); } catch (NullPointerException expected) { } }
Source:
<code>public boolean onMapClick(@NonNull LatLng mapClickPoint) { <START> mapboxMap.getStyle(new Style.OnStyleLoaded() { <END> @Override public void onStyleLoaded(@NonNull Style style) { double clickLatitude = mapClickPoint.getLatitude(); double clickLongitude = mapClickPoint.getLongitude(); longTextView.setText(String.format(getString(R.string.saved_long_textview), String.valueOf(clickLongitude))); latTextView.setText(String.format(getString(R.string.saved_lat_textview), String.valueOf(clickLatitude))); if (sharedPreferences != null) { putCoordinateToSharedPref(SAVED_LAT_KEY, clickLatitude); putCoordinateToSharedPref(SAVED_LONG_KEY, clickLongitude); } moveMarkerToLngLat(clickLongitude, clickLatitude); } }); return true; }</code><technical_language>Style object is needed here</technical_language>

Target:
public boolean onMapClick(@NonNull LatLng mapClickPoint) { double clickLatitude = mapClickPoint.getLatitude(); double clickLongitude = mapClickPoint.getLongitude(); longTextView.setText(String.format( getString(R.string.saved_long_textview), String.valueOf(clickLongitude))); latTextView.setText(String.format( getString(R.string.saved_lat_textview), String.valueOf(clickLatitude))); if (sharedPreferences != null) { putCoordinateToSharedPref(SAVED_LAT_KEY, clickLatitude); putCoordinateToSharedPref(SAVED_LONG_KEY, clickLongitude); } moveMarkerToLngLat(clickLongitude, clickLatitude); return true; }
Source:
<code>@Override public MortarScope requireChild(Blueprint blueprint) { MortarScope unwrapped = super.requireChild(blueprint); if (unwrapped instanceof RealActivityScope) return unwrapped; RealActivityScope childScope = new RealActivityScope((RealMortarScope) unwrapped, duringOnCreate); replaceChild(blueprint.getMortarScopeName(), childScope); <START> if (loadingState != LoadingState.LOADING) { <END> childScope.onCreate(getChildBundle(childScope, latestSavedInstanceState, false)); } return childScope; }</code><technical_language>Partial usage of enum type nervous for future. if SAVING? get while in SAVING? a switch statement throws in default</technical_language>

Target:
@Override public MortarScope requireChild(Blueprint blueprint) { MortarScope unwrapped = super.requireChild(blueprint); if (unwrapped instanceof RealActivityScope) return unwrapped; RealActivityScope childScope = new RealActivityScope((RealMortarScope) unwrapped, loadingFromOnCreate); replaceChild(blueprint.getMortarScopeName(), childScope); if (loadingState != LoadingState.LOADING) { childScope.onCreate(getChildBundle(childScope, latestSavedInstanceState, false)); } return childScope; }
Source:
<code>protected void executeVmCommand() { addCustomValue("InterfaceType", (VmInterfaceType.forValue(getInterface().getType()).getDescription()).toString()); boolean succeeded = false; boolean macAddedToPool = false; try { if (isVnicProfileChanged(oldIface, getInterface())) { Network newNetwork = NetworkHelper.getNetworkByVnicProfileId(getInterface().getVnicProfileId()); Network oldNetwork = NetworkHelper.getNetworkByVnicProfileId(oldIface.getVnicProfileId()); if (ObjectUtils.notEqual(oldNetwork, newNetwork)) { <START> ExternalNetworkManager externalNetworkManager = new ExternalNetworkManager(oldIface); <END> externalNetworkManager.deallocateIfExternal(); } } if (macShouldBeChanged) { macAddedToPool = addMacToPool(getMacAddress()); } getInterface().setSpeed(VmInterfaceType.forValue(getInterface().getType()).getSpeed()); TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { @Override public Void runInTransaction() { getCompensationContext().snapshotEntity(oldIface); getVmNicDao().update(getInterface()); getCompensationContext().stateChanged(); return null; } }); succeeded = updateHost(); } finally { setSucceeded(succeeded); if (macAddedToPool) { if (succeeded) { MacPoolManager.getInstance().freeMac(oldIface.getMacAddress()); } else { MacPoolManager.getInstance().freeMac(getMacAddress()); } } } }</code><technical_language>inlined done in other places: new ExternalNetworkManager(oldIface).deallocateIfExternal();</technical_language>

Target:
protected void executeVmCommand() { addCustomValue("InterfaceType", (VmInterfaceType.forValue(getInterface().getType()).getDescription()).toString()); boolean succeeded = false; boolean macAddedToPool = false; try { if (isVnicProfileChanged(oldIface, getInterface())) { Network newNetwork = NetworkHelper.getNetworkByVnicProfileId(getInterface().getVnicProfileId()); Network oldNetwork = NetworkHelper.getNetworkByVnicProfileId(oldIface.getVnicProfileId()); if (ObjectUtils.notEqual(oldNetwork, newNetwork)) { new ExternalNetworkManager(oldIface).deallocateIfExternal(); } } if (macShouldBeChanged) { macAddedToPool = addMacToPool(getMacAddress()); } getInterface().setSpeed(VmInterfaceType.forValue(getInterface().getType()).getSpeed()); TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { @Override public Void runInTransaction() { getCompensationContext().snapshotEntity(oldIface); getVmNicDao().update(getInterface()); getCompensationContext().stateChanged(); return null; } }); succeeded = updateHost(); } finally { setSucceeded(succeeded); if (macAddedToPool) { if (succeeded) { MacPoolManager.getInstance().freeMac(oldIface.getMacAddress()); } else { MacPoolManager.getInstance().freeMac(getMacAddress()); } } } }
Source:
<code>public void setOptionMap(OptionMap optionMap) { <START> } <END></code><technical_language>@darranl this change optionMap is handled a breaking change. RemoteDomainConnectionService.start is this configure heartbeats a read timeout</technical_language>

Target:
public void setOptionMap(OptionMap optionMap) { this.optionMap = optionMap; }
Source:
<code>public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.embed_pcode_layout); <START> embedCodeEditText = (EditText) findViewById(R.id.embed_edit_text); <END> pCodeEditText = (EditText) findViewById(R.id.pcode_edit_text); apiKeyEditText = (EditText) findViewById(R.id.apikey_edit_text); secretEditText = (EditText) findViewById(R.id.secret_edit_text); accountIdEditText = (EditText) findViewById(R.id.accountid_edit_text); autoPlayCheckBox = (CheckBox) findViewById(R.id.auto_play_check_box); initButtonListeners(); }</code><technical_language>is redundant cast type of object findViewById remove casting type</technical_language>

Target:
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.embed_pcode_layout); embedCodeEditText = findViewById(R.id.embed_edit_text); pCodeEditText = findViewById(R.id.pcode_edit_text); apiKeyEditText = findViewById(R.id.apikey_edit_text); secretEditText = findViewById(R.id.secret_edit_text); accountIdEditText = findViewById(R.id.accountid_edit_text); autoPlayCheckBox = findViewById(R.id.auto_play_check_box); initButtonListeners(); }
Source:
<code>private synchronized void markIndexBuilt(Index index, boolean isFullRebuild) { String indexName = index.getIndexMetadata().name; if (isFullRebuild && index.supportsLoad(Index.LoadType.READ)) { queryableIndexes.add(indexName); logger.info("Index [" + indexName + "] became queryable."); } if (isFullRebuild && index.supportsLoad(Index.LoadType.WRITE)) { <START> writableIndexes.add(indexName); logger.info("Index [" + indexName + "] became writable."); <END> } AtomicInteger counter = inProgressBuilds.get(indexName); if (counter != null) { assert counter.get() > 0; if (counter.decrementAndGet() == 0) { inProgressBuilds.remove(indexName); if (!needsFullRebuild.contains(indexName) && DatabaseDescriptor.isDaemonInitialized()) SystemKeyspace.setIndexBuilt(baseCfs.keyspace.getName(), indexName); } } }</code><technical_language>I suggests a change of status, if writable before. is writable telling if or, better, boolean returned queryableIndexes.add: suggestion if (writableIndexes.add(indexName)) logger.info("Index [" + indexName + "] writable."); applies queryable indexes above</technical_language>

Target:
private synchronized void markIndexBuilt(Index index, boolean isFullRebuild) { String indexName = index.getIndexMetadata().name; if (isFullRebuild) { if (queryableIndexes.add(indexName)) logger.info("Index became queryable after successful build.", indexName); if (writableIndexes.put(indexName, index) == null) logger.info("Index became writable after successful build.", indexName); } AtomicInteger counter = inProgressBuilds.get(indexName); if (counter != null) { assert counter.get() > 0; if (counter.decrementAndGet() == 0) { inProgressBuilds.remove(indexName); if (!needsFullRebuild.contains(indexName) && DatabaseDescriptor.isDaemonInitialized()) SystemKeyspace.setIndexBuilt(baseCfs.keyspace.getName(), indexName); } } }
Source:
<code>public void initialize(QueryState queryState, QueryPlan queryPlan, DriverContext ctx, CompilationOpContext opContext) { super.initialize(queryState, queryPlan, ctx, opContext); work.initializeForFetch(opContext); try { JobConf job = new JobConf(conf); Operator<?> source = work.getSource(); if (source instanceof TableScanOperator) { TableScanOperator ts = (TableScanOperator) source; ColumnProjectionUtils.appendReadColumns( <START> job, ts.getNeededColumnIDs(), ts.getNeededColumns(), ts.getNeededGroupPaths()); <END> HiveInputFormat.pushFilters(job, ts); AcidUtils.setTransactionalTableScan(job, ts.getConf().isAcidTable()); AcidUtils.setAcidOperationalProperties(job, ts.getConf().getAcidOperationalProperties()); } sink = work.getSink(); fetch = new FetchOperator(work, job, source, getVirtualColumns(source)); source.initialize(conf, new ObjectInspector[]{fetch.getOutputObjectInspector()}); totalRows = 0; ExecMapper.setDone(false); } catch (Exception e) { LOG.error(StringUtils.stringifyException(e)); throw new RuntimeException(e); } }</code><technical_language>"Group" is a uniquely Parquet terminology. mind replacing Hive lingo</technical_language>

Target:
public void initialize(QueryState queryState, QueryPlan queryPlan, DriverContext ctx, CompilationOpContext opContext) { super.initialize(queryState, queryPlan, ctx, opContext); work.initializeForFetch(opContext); try { JobConf job = new JobConf(conf); Operator<?> source = work.getSource(); if (source instanceof TableScanOperator) { TableScanOperator ts = (TableScanOperator) source; ColumnProjectionUtils.appendReadColumns( job, ts.getNeededColumnIDs(), ts.getNeededColumns(), ts.getNeededNestedColumnPaths()); HiveInputFormat.pushFilters(job, ts); AcidUtils.setTransactionalTableScan(job, ts.getConf().isAcidTable()); AcidUtils.setAcidOperationalProperties(job, ts.getConf().getAcidOperationalProperties()); } sink = work.getSink(); fetch = new FetchOperator(work, job, source, getVirtualColumns(source)); source.initialize(conf, new ObjectInspector[]{fetch.getOutputObjectInspector()}); totalRows = 0; ExecMapper.setDone(false); } catch (Exception e) { LOG.error(StringUtils.stringifyException(e)); throw new RuntimeException(e); } }
Source:
<code>private boolean validateCommit(byte[] commit) { boolean returnValue = true; for (int offset = 0; returnValue && offset < commit.length; offset++) { int lineEnd = 0; for (lineEnd = offset; lineEnd < commit.length && commit[lineEnd] != '\n'; lineEnd++) <START> {}; <END> switch (commit[offset]) { case 'a': case 'c': returnValue = validateLine(commit, offset, lineEnd); break; case 't': case 'p': break; default: return returnValue; } offset = lineEnd; } return returnValue; }</code><technical_language>nit: unnecessary semicolon</technical_language>

Target:
private boolean validateCommit(byte[] commit) { boolean returnValue = true; for (int offset = 0; returnValue && offset < commit.length; offset++) { int lineEnd = 0; for (lineEnd = offset; lineEnd < commit.length && commit[lineEnd] != '\n'; lineEnd++) { } switch (commit[offset]) { case 'a': case 'c': returnValue = validateLine(commit, offset, lineEnd); break; case 't': case 'p': break; default: return returnValue; } offset = lineEnd; } return returnValue; }
Source:
<code>public void formatsTextFragmentsToHtml() throws Exception { final String[][] texts = { new String[] {"hi, *dude*!", "<p>hi, \n<em>dude</em>!</p>"}, new String[] { "hello, **dude**!", "<p>hello, \n<strong>dude</strong>!</p>", }, new String[] { "wazzup, ***dude***!", "<p>wazzup, \n<strong>\n <em>dude</em>\n</strong>!</p>", }, new String[] {"hey, _man_!", "<p>hey, \n<em>man</em>!</p>"}, new String[] {"x: `oops`", "<p>x: \n<code>oops</code></p>"}, new String[] { "[a](http://foo)", "<p>\n <a href=\"http://foo\">a</a>\n</p>", }, new String[] {"}}}\n", "<p>}}}</p>"}, }; for (final String[] pair : texts) { MatcherAssert.assertThat( new MarkdownTxtmark().html(pair[0]).trim(), Matchers.equalTo( <START> pair[1].replace("\n", System.getProperty("line.separator")) <END> ) ); } }</code><technical_language>@dmzaytsev static method replaceNewLine</technical_language>

Target:
public void formatsTextFragmentsToHtml() throws Exception { final String[][] texts = { new String[] {"hi, *dude*!", "<p>hi, \n<em>dude</em>!</p>"}, new String[] { "hello, **dude**!", "<p>hello, \n<strong>dude</strong>!</p>", }, new String[] { "wazzup, ***dude***!", MarkdownTxtmarkTest.join( "<p>wazzup, ", "<strong>", " <em>dude</em>", "</strong>!</p>" ), }, new String[] { "hey, _man_!", MarkdownTxtmarkTest.join("<p>hey, ", "<em>man</em>!</p>"), }, new String[] { "x: `oops`", MarkdownTxtmarkTest.join("<p>x: ", "<code>oops</code></p>"), }, new String[] { "[a](http://foo)", MarkdownTxtmarkTest.join( MarkdownTxtmarkTest.START_PARAGRAPH, " <a href=\"http://foo\">a</a>", MarkdownTxtmarkTest.END_PARAGRAPH ), }, new String[] {"}}}\n", "<p>}}}</p>"}, }; for (final String[] pair : texts) { MatcherAssert.assertThat( new MarkdownTxtmark().html(pair[0]).trim(), Matchers.equalTo(pair[1]) ); } }
Source:
<code>protected IStatus run(IProgressMonitor monitor) { <START> runnable.run(); <END> if (monitor.isCanceled()) { return Status.CANCEL_STATUS; } return Status.OK_STATUS; }</code><technical_language>Add catch clause for OperationCancelledException return CANCEL_STATUS</technical_language>

Target:
protected IStatus run(IProgressMonitor monitor) { try { runnable.run(); } catch (OperationCanceledException e) { return Status.CANCEL_STATUS; } if (monitor.isCanceled()) { return Status.CANCEL_STATUS; } return Status.OK_STATUS; }
Source:
<code>public void refreshPersonDetails() { if (!isAdded()) return; Person person = PeopleTable.getPerson(mPersonID, mLocalTableBlogID); <START> if (person != null) { <END> int avatarSz = getResources().getDimensionPixelSize(R.dimen.avatar_sz_large); String avatarUrl = GravatarUtils.fixGravatarUrl(person.getAvatarUrl(), avatarSz); mAvatarImageView.setImageUrl(avatarUrl, WPNetworkImageView.ImageType.AVATAR); mDisplayNameTextView.setText(person.getDisplayName()); mUsernameTextView.setText(person.getUsername()); mRoleTextView.setText(Role.getLabel(getActivity(), person.getRole())); mRemoveTextView.setText(String.format(getString(R.string.remove_user), person.getFirstName().toUpperCase())); mRemoveTextView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { } }); } }</code><technical_language>Interesting. guarding for null here, sense log this in case is null. Wdyt</technical_language>

Target:
public void refreshPersonDetails() { if (!isAdded()) return; Person person = PeopleTable.getPerson(mPersonID, mLocalTableBlogID); if (person != null) { int avatarSz = getResources().getDimensionPixelSize(R.dimen.avatar_sz_large); String avatarUrl = GravatarUtils.fixGravatarUrl(person.getAvatarUrl(), avatarSz); mAvatarImageView.setImageUrl(avatarUrl, WPNetworkImageView.ImageType.AVATAR); mDisplayNameTextView.setText(person.getDisplayName()); mUsernameTextView.setText(person.getUsername()); mRoleTextView.setText(Role.getLabel(getActivity(), person.getRole())); mRemoveTextView.setText(String.format(getString(R.string.remove_user), person.getFirstName().toUpperCase())); mRemoveTextView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { } }); } else { AppLog.w(AppLog.T.PEOPLE, "Person returned null from DB for personID: " + mPersonID + " & localTableBlogID: " + mLocalTableBlogID); } }
Source:
<code>protected Object parseResultFromReader(CSVReader flatFileReader) { int lineNumber = 0; FlatFileSpecificationForProcessingPreSplitLines preSplitSpec = getFlatFileSpecificationForPreSplitLines(); FlatFileParseTracker tracker = buildNewParseTrackerInstanceFromPrototype(); tracker.initialize(preSplitSpec); try { for (String[] segmentedLine : flatFileReader) { lineNumber++; String firstLineSegment = (segmentedLine.length > 0) ? segmentedLine[0] : KFSConstants.EMPTY_STRING; Object parseIntoObject = tracker.getObjectToParseInto(firstLineSegment); if (parseIntoObject != null) { FlatFileObjectSpecification parseSpecification = preSplitSpec.getObjectSpecification(parseIntoObject.getClass()); if (CollectionUtils.isNotEmpty(parseSpecification.getParseProperties())) { preSplitSpec.parseLineIntoObject(parseSpecification, segmentedLine, parseIntoObject, lineNumber); tracker.completeLineParse(); } } } } catch (RuntimeException e) { <START> LOG.error("parseResultFromReader: File parsing encountered an exception on line " + lineNumber <END> + " or line " + (lineNumber + 1) + "; the data file may have a syntax error"); throw e; } return tracker.getParsedObjects(); }</code><technical_language>include exception in log statement</technical_language>

Target:
protected Object parseResultFromReader(CSVReader flatFileReader) { int lineNumber = 0; FlatFileSpecificationForProcessingPreSplitLines preSplitSpec = getFlatFileSpecificationForPreSplitLines(); FlatFileParseTracker tracker = buildNewParseTrackerInstanceFromPrototype(); tracker.initialize(preSplitSpec); try { for (String[] segmentedLine : flatFileReader) { lineNumber++; String firstLineSegment = (segmentedLine.length > 0) ? segmentedLine[0] : KFSConstants.EMPTY_STRING; Object parseIntoObject = tracker.getObjectToParseInto(firstLineSegment); if (parseIntoObject != null) { FlatFileObjectSpecification parseSpecification = preSplitSpec.getObjectSpecification(parseIntoObject.getClass()); if (CollectionUtils.isNotEmpty(parseSpecification.getParseProperties())) { preSplitSpec.parseLineIntoObject(parseSpecification, segmentedLine, parseIntoObject, lineNumber); tracker.completeLineParse(); } } } } catch (RuntimeException e) { LOG.error("parseResultFromReader: File parsing encountered an exception on line " + lineNumber + " or line " + (lineNumber + 1) + "; the data file may have a syntax error", e); throw e; } return tracker.getParsedObjects(); }