auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void onLoadFinished(Loader<AsyncTaskResult<List<EnrolledCoursesResponse>>> asyncTaskResultLoader, AsyncTaskResult<List<EnrolledCoursesResponse>> result) { progressBar.setVisibility(View.GONE); if (result == null) { logger.warn("result is found null, was expecting non-null"); return; } myCourseList.setVisibility(View.VISIBLE); if (result.getEx() != null) { if (result.getEx() instanceof AuthException) { PrefManager prefs = new PrefManager(getActivity(), PrefManager.Pref.LOGIN); prefs.clearAuth(); logger.error(result.getEx()); getActivity().finish(); } else if (result.getEx() instanceof RetroHttpException) { logger.error(result.getEx()); <START> environment.getRouter().forceLogout( <END> getContext(), environment.getSegment(), environment.getNotificationDelegate()); } } else if (result.getResult() != null) { invalidateSwipeFunctionality(); ArrayList<EnrolledCoursesResponse> newItems = new ArrayList<EnrolledCoursesResponse>(result.getResult()); ((MyCoursesListActivity) getActivity()).updateDatabaseAfterDownload(newItems); if (result.getResult().size() == 0) { adapter.clear(); } else { adapter.setItems(newItems); adapter.notifyDataSetChanged(); } } else { adapter.clear(); } }</code><technical_language>want check if a 401 first</technical_language>

Target:
public void onLoadFinished(Loader<AsyncTaskResult<List<EnrolledCoursesResponse>>> asyncTaskResultLoader, AsyncTaskResult<List<EnrolledCoursesResponse>> result) { progressBar.setVisibility(View.GONE); if (result == null) { logger.warn("result is found null, was expecting non-null"); return; } myCourseList.setVisibility(View.VISIBLE); if (result.getEx() != null) { if (result.getEx() instanceof AuthException) { PrefManager prefs = new PrefManager(getActivity(), PrefManager.Pref.LOGIN); prefs.clearAuth(); logger.error(result.getEx()); getActivity().finish(); } else if (result.getEx() instanceof RetroHttpException) { logger.error(result.getEx()); if (((RetroHttpException) result.getEx()).getStatusCode() == 401) { environment.getRouter().forceLogout( getContext(), environment.getSegment(), environment.getNotificationDelegate()); } } } else if (result.getResult() != null) { invalidateSwipeFunctionality(); ArrayList<EnrolledCoursesResponse> newItems = new ArrayList<EnrolledCoursesResponse>(result.getResult()); ((MyCoursesListActivity) getActivity()).updateDatabaseAfterDownload(newItems); if (result.getResult().size() == 0) { adapter.clear(); } else { adapter.setItems(newItems); adapter.notifyDataSetChanged(); } } else { adapter.clear(); } }
Source:
<code>public void verifyFileSystemConfiguration() { try { getGoogleCredentials(); } catch (final IOException ioe) { logger.error("Failed to obtain application default credentials for Google Cloud Storage for OAuth scope '" + GoogleCloudStorageFileManager.GCS_OAUTH_SCOPE + "'", ioe); <START> throw new RuntimeException("Could not obtain application default credentials for Google Cloud Storage", ioe); <END> } final GoogleCloudStorageSinkConfiguration sinkConfiguration = configuration.configuration().getSinkConfiguration(name, GoogleCloudStorageSinkConfiguration.class); try { final URL bucketUrl = new URL(GoogleCloudStorageFileManager.GET_BUCKET_URL_PREFIX + URLEncoder.encode(sinkConfiguration.bucket, URL_ENCODING)); final GetBucketResponse response = googleGet(bucketUrl, GetBucketResponse.class); logger.info("Google Cloud Storage sink using bucket {}", name, response); URLEncoder.encode(sinkConfiguration.fileStrategy.workingDir, URL_ENCODING); URLEncoder.encode(sinkConfiguration.fileStrategy.publishDir, URL_ENCODING); } catch (final IOException ioe) { logger.error("Failed to fetch bucket information for Google Cloud Storage sink using bucket {}. Assuming destination unwritable.", name, sinkConfiguration.bucket); throw new RuntimeException(ioe); } }</code><technical_language>This UncheckedIOException</technical_language>

Target:
public void verifyFileSystemConfiguration() { try { getGoogleCredentials(); } catch (final IOException ioe) { logger.error("Failed to obtain application default credentials for Google Cloud Storage for OAuth scope '" + GoogleCloudStorageFileManager.GCS_OAUTH_SCOPE + "'", ioe); throw new UncheckedIOException("Could not obtain application default credentials for Google Cloud Storage", ioe); } final GoogleCloudStorageSinkConfiguration sinkConfiguration = configuration.configuration().getSinkConfiguration(name, GoogleCloudStorageSinkConfiguration.class); try { final URL bucketUrl = new URL(GoogleCloudStorageFileManager.GET_BUCKET_URL_PREFIX + URLEncoder.encode(sinkConfiguration.bucket, URL_ENCODING)); final GetBucketResponse response = googleGet(bucketUrl, GetBucketResponse.class); logger.info("Google Cloud Storage sink using bucket {}", name, response); URLEncoder.encode(sinkConfiguration.fileStrategy.workingDir, URL_ENCODING); URLEncoder.encode(sinkConfiguration.fileStrategy.publishDir, URL_ENCODING); } catch (final IOException ioe) { logger.error("Failed to fetch bucket information for Google Cloud Storage sink using bucket {}. Assuming destination unwritable.", name, sinkConfiguration.bucket); throw new UncheckedIOException(ioe); } }
Source:
<code>public void consume() { MentionsData data = null; try { data = DefaultMentionsEventExecutor.this.queue.take(); <START> data.increaseAttempts(); <END> if (data.isStop()) { this.halt = true; } else if (!data.isDeprecated()) { DefaultMentionsEventExecutor.this.logger .debug("[{}] - consumed. Queue size [{}]", data.getDocumentReference(), data.getVersion(), getQueueSize()); DefaultMentionsEventExecutor.this.dataConsumer.consume(data); } } catch (Exception e) { DefaultMentionsEventExecutor.this.logger .warn("Error during mention analysis of task [{}]. Cause [{}].", data, getRootCauseMessage(e)); if (data != null) { if (!data.tooManyAttempts()) { try { DefaultMentionsEventExecutor.this.queue.put(data); } catch (InterruptedException interruptedException) { DefaultMentionsEventExecutor.this.logger .error("Error when adding back a fail failed task [{}]. Cause [{}].", data, getRootCauseMessage(e)); } } else { DefaultMentionsEventExecutor.this.logger .error("[{}] abandoned because it has failed to many times.", data); } } } }</code><technical_language>removing this null check here</technical_language>

Target:
public void consume() { MentionsData data = null; try { data = DefaultMentionsEventExecutor.this.queue.take(); if (data != null) { data.increaseAttempts(); if (data.isStop()) { this.halt = true; } else if (!data.isDeprecated()) { DefaultMentionsEventExecutor.this.logger .debug("[{}] - consumed. Queue size [{}]", data.getDocumentReference(), data.getVersion(), getQueueSize()); DefaultMentionsEventExecutor.this.dataConsumer.consume(data); } } } catch (Exception e) { DefaultMentionsEventExecutor.this.logger .warn("Error during mention analysis of task [{}]. Cause [{}].", data, getRootCauseMessage(e)); if (data != null) { if (!data.tooManyAttempts()) { try { DefaultMentionsEventExecutor.this.queue.put(data); } catch (InterruptedException interruptedException) { DefaultMentionsEventExecutor.this.logger .error("Error when adding back a fail failed task [{}]. Cause [{}].", data, getRootCauseMessage(e)); } } else { DefaultMentionsEventExecutor.this.logger .error("[{}] abandoned because it has failed to many times.", data); } } } }
Source:
<code>public static RegistrationRequest build(GridNodeConfiguration configuration, String name, String description) { RegistrationRequest pendingRequest = new RegistrationRequest(configuration, name, description); GridNodeConfiguration pendingConfiguration = pendingRequest.configuration; if (pendingConfiguration.nodeConfigFile != null) { pendingRequest.configuration = GridNodeConfiguration.loadFromJSON(pendingConfiguration.nodeConfigFile); } pendingRequest.configuration.merge(pendingConfiguration); if (pendingConfiguration.host != null) { pendingRequest.configuration.host = pendingConfiguration.host; } if (pendingConfiguration.port != null) { pendingRequest.configuration.port = pendingConfiguration.port; } if (pendingConfiguration.remoteHost != null) { pendingRequest.configuration.remoteHost = pendingConfiguration.remoteHost; <START> } <END> pendingRequest.configuration.fixUpHost(); pendingRequest.configuration.fixUpCapabilities(); pendingRequest.configuration.dropCapabilitiesThatDoesNotMatchCurrentPlatform(); return pendingRequest; }</code><technical_language>This is needed, line added in GridNodeConfiguration.java is fixes remoteHost regression</technical_language>

Target:
public static RegistrationRequest build(GridNodeConfiguration configuration, String name, String description) { RegistrationRequest pendingRequest = new RegistrationRequest(configuration, name, description); GridNodeConfiguration pendingConfiguration = pendingRequest.configuration; if (pendingConfiguration.nodeConfigFile != null) { pendingRequest.configuration = GridNodeConfiguration.loadFromJSON(pendingConfiguration.nodeConfigFile); } pendingRequest.configuration.merge(pendingConfiguration); if (pendingConfiguration.host != null) { pendingRequest.configuration.host = pendingConfiguration.host; } if (pendingConfiguration.port != null) { pendingRequest.configuration.port = pendingConfiguration.port; } pendingRequest.configuration.fixUpHost(); pendingRequest.configuration.fixUpCapabilities(); pendingRequest.configuration.dropCapabilitiesThatDoesNotMatchCurrentPlatform(); return pendingRequest; }
Source:
<code>private void testReadWriteAndSeek(int bufferSize) throws Exception { final AzureBlobFileSystem fs = getFileSystem(); final AbfsConfiguration abfsConfiguration = fs.getAbfsStore().getAbfsConfiguration(); abfsConfiguration.setWriteBufferSize(bufferSize); abfsConfiguration.setReadBufferSize(bufferSize); abfsConfiguration.setAlwaysReadAhead(true); final byte[] b = new byte[2 * bufferSize]; new Random().nextBytes(b); try (FSDataOutputStream stream = fs.create(TEST_PATH)) { stream.write(b); } final byte[] readBufferForReadAhead = new byte[2 * bufferSize]; int resultForReadAhead; try (FSDataInputStream inputStreamForReadAhead = fs.open(TEST_PATH)) { inputStreamForReadAhead.seek(bufferSize); resultForReadAhead = inputStreamForReadAhead.read(readBufferForReadAhead, bufferSize, bufferSize); <START> assertNotEquals(-1, resultForReadAhead); <END> inputStreamForReadAhead.seek(0); resultForReadAhead = inputStreamForReadAhead.read(readBufferForReadAhead, 0, bufferSize); } assertNotEquals("data read in final read()", -1, resultForReadAhead); assertArrayEquals(readBufferForReadAhead, b); }</code><technical_language>seek read, check actual data in readBufferForReadAhead</technical_language>

Target:
private void testReadWriteAndSeek(int bufferSize) throws Exception { final AzureBlobFileSystem fs = getFileSystem(); final AbfsConfiguration abfsConfiguration = fs.getAbfsStore().getAbfsConfiguration(); abfsConfiguration.setWriteBufferSize(bufferSize); abfsConfiguration.setReadBufferSize(bufferSize); abfsConfiguration.setAlwaysReadAhead(true); final byte[] b = new byte[2 * bufferSize]; new Random().nextBytes(b); try (FSDataOutputStream stream = fs.create(TEST_PATH)) { stream.write(b); } final byte[] readBufferForReadAhead = new byte[2 * bufferSize]; int resultForReadAhead; try (FSDataInputStream inputStreamForReadAhead = fs.open(TEST_PATH)) { inputStreamForReadAhead.seek(bufferSize); resultForReadAhead = inputStreamForReadAhead.read(readBufferForReadAhead, bufferSize, bufferSize); assertNotEquals(-1, resultForReadAhead); assertArrayEquals(Arrays.copyOfRange(readBufferForReadAhead, bufferSize, 2 * bufferSize), Arrays.copyOfRange(b, bufferSize, 2 * bufferSize)); inputStreamForReadAhead.seek(0); resultForReadAhead = inputStreamForReadAhead.read(readBufferForReadAhead, 0, bufferSize); } assertNotEquals("data read in final read()", -1, resultForReadAhead); assertArrayEquals(readBufferForReadAhead, b); }
Source:
<code>private String getFilter(Annotation a, Requirement annotation) { StringBuilder filter = new StringBuilder(); boolean addAnd = false; if (a.containsKey("filter")) { filter.append(annotation.filter()); addAnd = true; } boolean andAdded = false; if (a.containsKey("name")) { filter.append('(') .append(annotation.namespace()) .append('=') .append(annotation.name()) .append(')'); if (addAnd) { filter.insert(0, "(&") .append(')'); andAdded = true; } addAnd = true; } if (a.containsKey("version") && annotation.version() .indexOf('$') == -1) { Version floor; try { floor = Version.parseVersion(annotation.version()); } catch (Exception e) { floor = null; analyzer.exception(e, "The version declared by the Requirement annotation attached to type %s is invalid", current.getFQN()); } if (floor != null) { int current = filter.lastIndexOf(")"); VersionRange range = new VersionRange(floor, floor.bumpMajor()); String rangeFilter = range.toFilter(); filter.append(rangeFilter.substring(2, rangeFilter.length() - 1)); if (andAdded) { filter.deleteCharAt(current) .append(')'); } else if (addAnd) { filter.insert(0, "(&") .append(')'); } } } <START> else if (a.containsKey("version")) { <END> String floor = annotation.version(); int current = filter.lastIndexOf(")"); filter.append("(version>=") .append(floor) .append(")(!(version>=${version;+00;") .append(floor) .append("}))"); if (andAdded) { filter.deleteCharAt(current) .append(')'); } else if (addAnd) { filter.insert(0, "(&") .append(')'); } } return filter.toString(); }</code><technical_language>test a.containsKey("version") twice. test if/else for $ inside</technical_language>

Target:
private String getFilter(Annotation a, Requirement annotation) { StringBuilder filter = new StringBuilder(); boolean addAnd = false; if (a.containsKey("filter")) { filter.append(annotation.filter()); addAnd = true; } boolean andAdded = false; if (a.containsKey("name")) { filter.append('(') .append(annotation.namespace()) .append('=') .append(annotation.name()) .append(')'); if (addAnd) { filter.insert(0, "(&") .append(')'); andAdded = true; } addAnd = true; } if (a.containsKey("version")) { if (annotation.version() .indexOf('$') == -1) { Version floor; try { floor = Version.parseVersion(annotation.version()); } catch (Exception e) { floor = null; analyzer.exception(e, "The version declared by the Requirement annotation attached to type %s is invalid", current.getFQN()); } if (floor != null) { int current = filter.lastIndexOf(")"); VersionRange range = new VersionRange(floor, floor.bumpMajor()); String rangeFilter = range.toFilter(); filter.append(rangeFilter.substring(2, rangeFilter.length() - 1)); if (andAdded) { filter.deleteCharAt(current) .append(')'); } else if (addAnd) { filter.insert(0, "(&") .append(')'); } } } else { String floor = annotation.version(); int current = filter.lastIndexOf(")"); filter.append("(version>=") .append(floor) .append(")(!(version>=${versionmask;+00;") .append(floor) .append("}))"); if (andAdded) { filter.deleteCharAt(current) .append(')'); } else if (addAnd) { filter.insert(0, "(&") .append(')'); } } } return filter.toString(); }
Source:
<code>public int getAvailableUnitForScsiDisk(Map<VmDevice, Integer> vmDeviceUnitMap, boolean reserveFirstTwoLuns, boolean reserveForScsiCd) { int cdPayloadUnitIndex = VmDeviceCommonUtils.getCdPayloadDeviceIndex("scsi"); int cdUnitIndex = VmDeviceCommonUtils.getCdDeviceIndex("scsi"); int unit = reserveFirstTwoLuns ? reserveForScsiCd ? <START> Math.max(cdPayloadUnitIndex, cdUnitIndex) + <END> 1 : 2 : 0; if (vmDeviceUnitMap == null) { return unit; } while (reserveForScsiCd && unit == cdPayloadUnitIndex || reserveForScsiCd && unit == cdUnitIndex || vmDeviceUnitMap.containsValue(unit)) { unit++; } return unit; }</code><technical_language>right, code I understand - reserveFirstTwoLuns=true, units 0 1 for CDs? current code assign units CD indices, of flag I assume not. cdUnitIndex = 7, this code return 8 I understand skipping units 0-7 (assuming 2 units reserved for CDs) default values cdPayloadUnitIndex=1, cdUnitIndex=2, reserve luns, right? return 1 0, I</technical_language>

Target:
public int getAvailableUnitForScsiDisk(Map<VmDevice, Integer> vmDeviceUnitMap, boolean reserveFirstTwoLuns, boolean reserveForScsiCd) { int unit = reserveFirstTwoLuns ? 2 : 0; int cdPayloadUnitIndex = VmDeviceCommonUtils.getCdPayloadDeviceIndex("scsi"); int cdUnitIndex = VmDeviceCommonUtils.getCdDeviceIndex("scsi"); while (reserveForScsiCd && unit == cdPayloadUnitIndex || reserveForScsiCd && unit == cdUnitIndex || (vmDeviceUnitMap != null && vmDeviceUnitMap.containsValue(unit))) { unit++; } return unit; }
Source:
<code>public MicroserviceMetadata(Map<String, Object> services) { services.forEach((basePath, service) -> { for (Method method : service.getClass().getMethods()) { if (method.isAnnotationPresent(PostConstruct.class) || method.isAnnotationPresent(PreDestroy.class)) { continue; } if (Modifier.isPublic(method.getModifiers()) && isHttpMethodAvailable(method)) { String relativePath = ""; if (method.getAnnotation(Path.class) != null) { relativePath = method.getAnnotation(Path.class).value(); } String absolutePath = String.format("%s/%s", basePath, relativePath); patternRouter.add(absolutePath, new HttpResourceModel(absolutePath, method, service, false)); } else if (Modifier.isPublic(method.getModifiers()) && method.getAnnotation(Path.class) != null) { <START> String relativePath = Utils.normalizePath(method.getAnnotation(Path.class).value()); <END> String absolutePath = String.format("%s/%s", basePath, relativePath); patternRouter.add(absolutePath, new HttpResourceModel(absolutePath, method, service, true)); } else { log.trace("Not adding method {}({}) to path routing like. " + "HTTP calls will not be routed to this method", method.getName(), method.getParameterTypes()); } } }); }</code><technical_language>this is normalized in patternRouter.add method, do need normalise path gain a bit of performance :)</technical_language>

Target:
public MicroserviceMetadata(Map<String, Object> services) { services.forEach((basePath, service) -> { for (Method method : service.getClass().getMethods()) { if (method.isAnnotationPresent(PostConstruct.class) || method.isAnnotationPresent(PreDestroy.class)) { continue; } if (Modifier.isPublic(method.getModifiers()) && isHttpMethodAvailable(method)) { String relativePath = ""; if (method.getAnnotation(Path.class) != null) { relativePath = method.getAnnotation(Path.class).value(); } String absolutePath = String.format("%s/%s", basePath, relativePath); patternRouter.add(absolutePath, new HttpResourceModel(absolutePath, method, service, false)); } else if (Modifier.isPublic(method.getModifiers()) && method.getAnnotation(Path.class) != null) { String relativePath = method.getAnnotation(Path.class).value(); String absolutePath = String.format("%s/%s", basePath, relativePath); patternRouter.add(absolutePath, new HttpResourceModel(absolutePath, method, service, true)); } else { log.trace("Not adding method {}({}) to path routing like. " + "HTTP calls will not be routed to this method", method.getName(), method.getParameterTypes()); } } }); }
Source:
<code>private boolean isS3SelectEnabled(ConnectorSession session) { if (!hiveClientConfig.isS3SelectPushdownEnabled()) { LOG.debug("S3Select is not enabled."); return false; } if (!HiveSessionProperties.isS3SelectPushdownEnabled(session)) { LOG.debug("Session S3SelectPushdown is disabled."); return false; } <START> LOG.info("S3Select is enabled."); <END> return true; }</code><technical_language>This line get logged a lot of times in a production system s3 select is enabled, no? (when I trace it, called HiveSplitManager.getSplits())</technical_language>

Target:
private boolean isS3SelectEnabled(ConnectorSession session) { if (!hiveClientConfig.isS3SelectPushdownEnabled()) { return false; } if (!HiveSessionProperties.isS3SelectPushdownEnabled(session)) { return false; } return true; }
Source:
<code>private List<LocalDate> generateUnadjustedDates( LocalDate regStart, LocalDate regEnd, RollConvention rollCnv, StubConvention stubCnv, boolean explicitInitStub, LocalDate overrideStart, boolean explicitFinalStub, LocalDate end) { if (stubCnv.isCalculateBackwards()) { ArgChecker.isFalse(explicitInitStub, "Value explicitInitStub must be false"); <START> ArgChecker.isFalse(explicitFinalStub, "Value explicitFinalStub must be false"); <END> return generateBackwards( this, regStart, regEnd, frequency, rollCnv, stubCnv, overrideStart, end); } else { return generateForwards( this, regStart, regEnd, frequency, rollCnv, stubCnv, explicitInitStub, overrideStart, explicitFinalStub, end); } }</code><technical_language>this restriction for calculation only</technical_language>

Target:
private List<LocalDate> generateUnadjustedDates( LocalDate regStart, LocalDate regEnd, RollConvention rollCnv, StubConvention stubCnv, boolean explicitInitStub, LocalDate overrideStart, boolean explicitFinalStub, LocalDate end) { if (stubCnv.isCalculateBackwards()) { ArgChecker.isFalse(explicitInitStub, "Value explicitInitStub must be false"); ArgChecker.isFalse(explicitFinalStub, "Value explicitFinalStub must be false"); return generateBackwards(this, regStart, regEnd, frequency, rollCnv, stubCnv, overrideStart); } else { return generateForwards( this, regStart, regEnd, frequency, rollCnv, stubCnv, explicitInitStub, overrideStart, explicitFinalStub, end); } }
Source:
<code>public void testNestedNonTerminals5() throws Exception { Grammar.NonTerminalId baseCaseId = new Grammar.NonTerminalId("BaseCase"); Grammar.StateId baseCaseEntry= new Grammar.StateId("BaseCaseEntry"); Grammar.StateId baseCaseExit = new Grammar.StateId("BaseCaseExit"); Grammar.NonTerminal baseCase = new Grammar.NonTerminal(baseCaseId, baseCaseEntry, new Grammar.State.OrderingInfo(-1), baseCaseExit, new Grammar.State.OrderingInfo(1)); Grammar.RegExState resx = new Grammar.RegExState(new Grammar.StateId("X"), baseCase, new Grammar.State.OrderingInfo(0), Pattern.compile("x")); baseCase.entryState.next.add(resx); resx.next.add(baseCase.exitState); Term expected = amb(klist(Token.kAppOf("K", "x"))); for (int i = 2; i < 10; i++) { Grammar.NonTerminal nt = new Grammar.NonTerminal(new Grammar.NonTerminalId("NT"+i), <START> new Grammar.StateId("NT"+i+"Entry"), new Grammar.State.OrderingInfo(-i), <END> new Grammar.StateId("NT"+i+"Exit"), new Grammar.State.OrderingInfo(2*i-1)); Grammar.NonTerminalState state = new Grammar.NonTerminalState( new Grammar.StateId("S"+i), nt, new Grammar.State.OrderingInfo(2*i-2), baseCase, false); nt.entryState.next.add(state); state.next.add(nt.exitState); baseCase = nt; expected = amb(klist(expected)); } { Term result = new Parser(new ParseState("x")).parse(baseCase, 0); expected = amb(klist(expected)); assertEquals("Single char check: ", expected, result); } assertEquals("Expected Nullable NTs", 0, NullabilityCheck.getReachableNullableNT(baseCase).size()); }</code><technical_language>please understand this changed 1 i? Like, wrong before? If wrong before, test fail? Etc</technical_language>

Target:
public void testNestedNonTerminals5() throws Exception { Grammar.NonTerminalId baseCaseId = new Grammar.NonTerminalId("BaseCase"); Grammar.StateId baseCaseEntry= new Grammar.StateId("BaseCaseEntry"); Grammar.StateId baseCaseExit = new Grammar.StateId("BaseCaseExit"); Grammar.NonTerminal baseCase = new Grammar.NonTerminal(baseCaseId, baseCaseEntry, new Grammar.State.OrderingInfo(-1), baseCaseExit, new Grammar.State.OrderingInfo(1)); Grammar.RegExState resx = new Grammar.RegExState(new Grammar.StateId("X"), baseCase, new Grammar.State.OrderingInfo(0), Pattern.compile("x")); baseCase.entryState.next.add(resx); resx.next.add(baseCase.exitState); Term expected = amb(klist(Token.kAppOf("K", "x"))); for (int i = 2; i < 10; i++) { Grammar.NonTerminal nt = new Grammar.NonTerminal(new Grammar.NonTerminalId("NT"+i), new Grammar.StateId("NT"+i+"Entry"), new Grammar.State.OrderingInfo(-i), new Grammar.StateId("NT"+i+"Exit"), new Grammar.State.OrderingInfo(2*i-1)); Grammar.NonTerminalState state = new Grammar.NonTerminalState( new Grammar.StateId("S"+i), nt, new Grammar.State.OrderingInfo(2*i-2), baseCase, false); nt.entryState.next.add(state); state.next.add(nt.exitState); baseCase = nt; expected = amb(klist(expected)); } { Term result = new Parser(new ParseState("x")).parse(baseCase, 0); expected = amb(klist(expected)); Assert.assertEquals("Single char check: ", expected, result); } Assert.assertEquals("Expected Nullable NTs", 0, NullabilityCheck.getReachableNullableNT(baseCase).size()); }
Source:
<code><START> private void usageLabel(@Nullable IdentifierTreeImpl node) { <END> if (node == null) { return; } labels.stream() .filter(couple -> couple.label.equals(node.name())) .map(couple -> couple.symbol) .findFirst() .ifPresent(labelSymbol -> { labelSymbol.usages.add(node); node.labelSymbol = labelSymbol; }); }</code><technical_language>Do break group of methods working tokens, i.e. firstTokenIndexAfter</technical_language>

Target:
private void usageLabel(@Nullable IdentifierTreeImpl node) { if (node == null) { return; } labels.stream() .filter(symbol -> symbol.name().equals(node.name())) .findFirst() .ifPresent(labelSymbol -> { labelSymbol.usages.add(node); node.labelSymbol = labelSymbol; }); }
Source:
<code>private void testWithoutAnyCandidateWhenDatabaseToLower() throws SQLException { deleteDb(getTestName()); <START> final Connection conn = getJdbcConnection("DATABASE_TO_LOWER=true;DATABASE_TO_UPPER=false"); <END> final Statement stat = conn.createStatement(); stat.execute("CREATE TABLE T2 ( ID INT IDENTITY )"); try { stat.execute("ALTER TABLE T1 DROP COLUMN ID"); fail("Table `t1` was accessible but should not have been."); } catch (SQLException e) { final String message = e.getMessage(); assertContains(message, "Table \"t1\" not found;"); } conn.close(); deleteDb(getTestName()); }</code><technical_language>DATABASE_TO_LOWER=TRUE is enough</technical_language>

Target:
private void testWithoutAnyCandidateWhenDatabaseToLower() throws SQLException { deleteDb(getTestName()); Connection conn = getConnectionWithSettings("DATABASE_TO_LOWER=TRUE"); Statement stat = conn.createStatement(); stat.execute("CREATE TABLE T2 ( ID INT IDENTITY )"); try { stat.execute("ALTER TABLE T1 DROP COLUMN ID"); fail("Table `t1` was accessible but should not have been."); } catch (SQLException e) { String message = e.getMessage(); assertContains(message, "Table \"t1\" not found;"); } conn.close(); deleteDb(getTestName()); }
Source:
<code>public Block copyRegion(int position, int length) { int positionCount = getPositionCount(); if (position < 0 || length < 0 || position + length > positionCount) { throw new IndexOutOfBoundsException("Invalid position " + position + " in block with " + positionCount + " positions"); } int startFieldBlockOffset = getFieldBlockOffset(position); int endFieldBlockOffset = getFieldBlockOffset(position + length); int fieldBlockLength = endFieldBlockOffset - startFieldBlockOffset; Block[] newBlocks = new Block[numFields]; for (int i = 0; i < numFields; i++) { newBlocks[i] = getFieldBlocks()[i].copyRegion(startFieldBlockOffset, fieldBlockLength); } int[] newOffsets = sliceOffsets(getFieldBlockOffsets(), position + getOffsetBase(), length); boolean[] newRowIsNull = compactBooleanArray(getRowIsNull(), position + getOffsetBase(), length); <START> if (Arrays.equals(newBlocks, getFieldBlocks()) && newOffsets == getFieldBlockOffsets() && newRowIsNull == getRowIsNull()) { <END> return this; } return new RowBlock(0, length, newRowIsNull, newOffsets, newBlocks); }</code><technical_language>comfortable depending "Block.equals(Object)" implemented. Please add a arraySame function</technical_language>

Target:
public Block copyRegion(int position, int length) { int positionCount = getPositionCount(); if (position < 0 || length < 0 || position + length > positionCount) { throw new IndexOutOfBoundsException("Invalid position " + position + " in block with " + positionCount + " positions"); } int startFieldBlockOffset = getFieldBlockOffset(position); int endFieldBlockOffset = getFieldBlockOffset(position + length); int fieldBlockLength = endFieldBlockOffset - startFieldBlockOffset; Block[] newBlocks = new Block[numFields]; for (int i = 0; i < numFields; i++) { newBlocks[i] = getFieldBlocks()[i].copyRegion(startFieldBlockOffset, fieldBlockLength); } int[] newOffsets = compactOffsets(getFieldBlockOffsets(), position + getOffsetBase(), length); boolean[] newRowIsNull = compactArray(getRowIsNull(), position + getOffsetBase(), length); if (arraySame(newBlocks, getFieldBlocks()) && newOffsets == getFieldBlockOffsets() && newRowIsNull == getRowIsNull()) { return this; } return new RowBlock(0, length, newRowIsNull, newOffsets, newBlocks); }
Source:
<code>void onSave(@SuppressWarnings("unused") ClickEvent e) { <START> if (cm.isClean(generation)) { upToChange(); return; } <END> ChangeFileApi.putContentOrMessage(revision, path, cm.getValue(), new GerritCallback<VoidResult>() { @Override public void onSuccess(VoidResult result) { upToChange(); } }); }</code><technical_language>Dead code? changes undone (Ctrl-z), Save button is disabled this handler called. changes undone Ctrl-z, e.g. * open file * type space * remove typed space backspace button cm.isClean(generation) returns false (Eclipse behaves way). error is get reported in end: "no changes made" cool, if detect this case call REST endpoint</technical_language>

Target:
void onSave(@SuppressWarnings("unused") ClickEvent e) { save().run(); }
Source:
<code>public Trader(String name, double cashInHand) { <START> super(); <END> this.name = name; this.cashInHand = cashInHand; this.position = new ArrayList<Holding>(); this.ordersPlaced = new ArrayList<Order>(); }</code><technical_language>Unnecessary call super</technical_language>

Target:
public Trader(String name, double cashInHand) { this.name = name; this.cashInHand = cashInHand; this.position = new ArrayList<Holding>(); this.ordersPlaced = new ArrayList<Order>(); }
Source:
<code>public void onDamage(EntityDamageByEntityEvent e) { if (e.getDamager() instanceof Bee) { if (e.getEntity() instanceof Player) { Player p = (Player) e.getEntity(); <START> if (!SlimefunUtils.isItemSimilar(SlimefunItems.SCUBA_HELMET, p.getInventory().getHelmet(), true) && !SlimefunUtils.isItemSimilar(SlimefunItems.HAZMAT_CHESTPLATE, p.getInventory().getChestplate(), true) && !SlimefunUtils.isItemSimilar(SlimefunItems.HAZMAT_LEGGINGS, p.getInventory().getLeggings(), true) && !SlimefunUtils.isItemSimilar(SlimefunItems.RUBBER_BOOTS, p.getInventory().getBoots(), true)) { <END> e.setDamage(0D); for (ItemStack armor : p.getInventory().getArmorContents()) { ItemUtils.damageItem(armor, 1, false); } } } } }</code><technical_language>This statement is wrong around, checking for opposite, remove negations here. armor item SlimefunItem need swapped too</technical_language>

Target:
public void onDamage(EntityDamageByEntityEvent e) { if (e.getDamager() instanceof Bee && e.getEntity() instanceof Player) { Player p = (Player) e.getEntity(); Optional<PlayerProfile> optional = PlayerProfile.find(p); if (!optional.isPresent()) { PlayerProfile.request(p); return; } PlayerProfile profile = optional.get(); if (profile.isProtected(ProtectionType.BEES)) { for (ItemStack armor : p.getInventory().getArmorContents()) { ItemUtils.damageItem(armor, 1, false); } e.setDamage(0D); } } }
Source:
<code>public String toString() { StringBuilder sb = new StringBuilder(getClass().getName()); sb.append(":"); <START> if (messageId != -1) sb.append("Request for messageId=").append(messageId).append("]"); <END> if (errorStatusCode != -1) sb.append(" returned ").append(toErrorMsg(errorStatusCode)); String message = getLocalizedMessage(); if (message != null) sb.append(": ").append(message); return sb.toString(); }</code><technical_language>this need end ]</technical_language>

Target:
public String toString() { StringBuilder sb = new StringBuilder(getClass().getName()); sb.append(":"); if (messageId != -1) sb.append("Request for messageId=").append(messageId); if (errorStatusCode != -1) sb.append(" returned ").append(toErrorMsg(errorStatusCode)); String message = getLocalizedMessage(); if (message != null) sb.append(": ").append(message); return sb.toString(); }
Source:
<code>public void shutdown() { <START> if (initLocker.get() && shutdownLocker.compareAndSet(false, true)) { <END> log.info("Shutting down transport..."); transport.sendMessage(new ShutdownRequestMessage()); } }</code><technical_language>this part of auto closeable well</technical_language>

Target:
public void shutdown() { if (initLocker.get() && shutdownLocker.compareAndSet(false, true)) { log.info("Shutting down transport..."); transport.sendMessage(new ShutdownRequestMessage()); executor.shutdown(); } }
Source:
<code>private RevWalk(final Repository repo, final ObjectReader or) { repository = repo; reader = or; idBuffer = new MutableObjectId(); objects = new ObjectIdOwnerMap<RevObject>(); roots = new ArrayList<RevCommit>(); queue = new DateRevQueue(); pending = new StartGenerator(this); sorting = EnumSet.of(RevSort.NONE); filter = RevFilter.ALL; treeFilter = TreeFilter.ALL; retainBody = true; <START> streamFileThreshold = (int) Math <END> .min(CoreConfig.KEY.parse(repo.getConfig()) .getStreamFileThreshold(), Integer.MAX_VALUE); }</code><technical_language>This unnecessary. ObjectLoader implementation is getCachedBytes() work for is < streamFileThreshold configured for ObjectReader implementation. In storage.file case, this is derived WindowCacheConfig, defaults new static default added. In storage.dfs, this is derived ReaderOptions, defaults new static default added</technical_language>

Target:
private RevWalk(final Repository repo, final ObjectReader or) { repository = repo; reader = or; idBuffer = new MutableObjectId(); objects = new ObjectIdOwnerMap<RevObject>(); roots = new ArrayList<RevCommit>(); queue = new DateRevQueue(); pending = new StartGenerator(this); sorting = EnumSet.of(RevSort.NONE); filter = RevFilter.ALL; treeFilter = TreeFilter.ALL; retainBody = true; }
Source:
<code>public void parsePropertyFiles_EmptyProperties() { initWithProperties(EMPTY_PROPERTIES); ReportParser reportParser = new ReportParser(configuration); reportParser.parsePropertiesFiles(propertyReports); <START> assertThat(configuration.getClassifications()).hasSize(0); <END> }</code><technical_language>isEmpty()</technical_language>

Target:
public void parsePropertyFiles_EmptyProperties() { initWithProperties(EMPTY_PROPERTIES); ReportParser reportParser = new ReportParser(configuration); reportParser.parseClassificationsFiles(classificationFiles); assertThat(configuration.getClassifications()).isEmpty(); }
Source:
<code>protected void service(final HttpServletRequest req, final HttpServletResponse resp) throws IOException { try { super.service(req, resp); } finally { try { audit(); <START> } catch (Throwable ignoreExceptionWhileLogging) { <END> } finally { currentCall.set(null); } } }</code><technical_language>log this</technical_language>

Target:
protected void service(final HttpServletRequest req, final HttpServletResponse resp) throws IOException { try { super.service(req, resp); } finally { try { audit(); } catch (Throwable ignoreExceptionWhileLogging) { log.warn("Error occurred during audit event dispatch", ignoreExceptionWhileLogging); } finally { currentCall.set(null); } } }
Source:
<code>public List<LoggerSource> getRelatedLoggers(boolean verbose) { List<LoggerSource> loggers = new ArrayList<>(); loggers.add( <START> new LoggerSource(Type.SCM, KeyManagerImpl.class, <END> defaultLevel(verbose))); return loggers; }</code><technical_language>I be: suggestion new LoggerSource(Type.OM, KeyManagerImpl.class,</technical_language>

Target:
public List<LoggerSource> getRelatedLoggers(boolean verbose) { List<LoggerSource> loggers = new ArrayList<>(); loggers.add( new LoggerSource(Type.OM, KeyManagerImpl.class, defaultLevel(verbose))); return loggers; }
Source:
<code>private float byteArrayToFloat(final byte[] bytes) { <START> ByteBuffer buffer = ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN); <END> return buffer.getFloat(); }</code><technical_language>final</technical_language>

Target:
private float byteArrayToFloat(final byte[] bytes) { final ByteBuffer buffer = ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN); return buffer.getFloat(); }
Source:
<code>public void init() { final StatusTransitioner.Transition st = statusTransitioner.init(); try { store.init(); <START> store.enableStoreEventNotifications(storeListener); <END> } catch (RuntimeException e) { st.failed(); throw new StateTransitionException(e); } st.succeeded(); }</code><technical_language>delay this registration cache event listener? is a needless penalty for caches event listeners</technical_language>

Target:
public void init() { final StatusTransitioner.Transition st = statusTransitioner.init(); try { store.init(); } catch (RuntimeException e) { st.failed(); throw new StateTransitionException(e); } st.succeeded(); }
Source:
<code>public void testCommitSingleTask() throws Exception { CountDownLatch task0ProcessedMessagesLatch = new CountDownLatch(1); CountDownLatch task1ProcessedMessagesLatch = new CountDownLatch(1); TestTask task0 = new TestTask(true, true, false, task0ProcessedMessagesLatch); task0.setCommitRequest(TaskCoordinator.RequestScope.CURRENT_TASK); TestTask task1 = new TestTask(true, false, true, task1ProcessedMessagesLatch); task1.setCommitRequest(TaskCoordinator.RequestScope.CURRENT_TASK); TaskInstance t0 = createTaskInstance(task0, taskName0, ssp0); TaskInstance t1 = createTaskInstance(task1, taskName1, ssp1); Map<TaskName, TaskInstance> tasks = new HashMap<>(); tasks.put(taskName0, t0); tasks.put(taskName1, t1); int maxMessagesInFlight = 1; AsyncRunLoop runLoop = new AsyncRunLoop(tasks, executor, consumerMultiplexer, maxMessagesInFlight, windowMs, commitMs, callbackTimeoutMs, maxThrottlingDelayMs, containerMetrics, () -> 0L, false); when(consumerMultiplexer.choose(false)).thenReturn(envelope0).thenReturn(null).thenReturn(envelope1).thenReturn(null); runLoop.run(); task0ProcessedMessagesLatch.await(); task1ProcessedMessagesLatch.await(); <START> verify(offsetManager).createCheckpoint(taskName0); <END> verify(offsetManager).writeCheckpoint(taskName0, any()); verify(offsetManager, never()).createCheckpoint(taskName1); verify(offsetManager, never()).writeCheckpoint(taskName1, any()); }</code><technical_language>Slightly cleaner verify TaskInstance's commit is called/not called instead of interacting OffsetManager (since contract AsyncRunLoop is TaskInstance, OffsetManager.)</technical_language>

Target:
public void testCommitSingleTask() throws Exception { CountDownLatch task0ProcessedMessagesLatch = new CountDownLatch(1); CountDownLatch task1ProcessedMessagesLatch = new CountDownLatch(1); TestTask task0 = new TestTask(true, true, false, task0ProcessedMessagesLatch); task0.setCommitRequest(TaskCoordinator.RequestScope.CURRENT_TASK); TestTask task1 = new TestTask(true, false, true, task1ProcessedMessagesLatch); task1.setCommitRequest(TaskCoordinator.RequestScope.CURRENT_TASK); TaskInstance t0 = createTaskInstance(task0, taskName0, ssp0); TaskInstance t1 = createTaskInstance(task1, taskName1, ssp1); Map<TaskName, TaskInstance> tasks = new HashMap<>(); tasks.put(taskName0, t0); tasks.put(taskName1, t1); int maxMessagesInFlight = 1; AsyncRunLoop runLoop = new AsyncRunLoop(tasks, executor, consumerMultiplexer, maxMessagesInFlight, windowMs, commitMs, callbackTimeoutMs, maxThrottlingDelayMs, containerMetrics, () -> 0L, false); when(consumerMultiplexer.choose(false)).thenReturn(envelope0).thenReturn(null).thenReturn(envelope1).thenReturn(null); runLoop.run(); task0ProcessedMessagesLatch.await(); task1ProcessedMessagesLatch.await(); verify(offsetManager).buildCheckpoint(taskName0); verify(offsetManager).writeCheckpoint(taskName0, any()); verify(offsetManager, never()).buildCheckpoint(taskName1); verify(offsetManager, never()).writeCheckpoint(taskName1, any()); }
Source:
<code>private void showDialogAboutZero(final String prefsKey, String title, String message) { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(app); if (prefsKey == null || !prefs.getBoolean(prefsKey, false)) { if (prefsKey != null) { prefs.edit().putBoolean(prefsKey, true).commit(); } alert = new AlertDialog.Builder(this); alert.setTitle(title); alert.setMessage(message); if (prefsKey != null) { alert.setPositiveButton(getString(R.string.zero_learn_more_learn_more), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Utils.visitInExternalBrowser(PageActivity.this, Uri.parse(getString(R.string.zero_webpage_url))); } }); } alert.setNegativeButton(getString(R.string.zero_learn_more_dismiss), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.dismiss(); } }); final AlertDialog ad = alert.create(); ad.setOnShowListener(new DialogInterface.OnShowListener() { @Override public void onShow(DialogInterface d) { if (prefsKey != null) { ad.getButton(DialogInterface.BUTTON_POSITIVE).setTypeface(Typeface.DEFAULT, Typeface.BOLD); } } <START> }); <END> ad.show(); } }</code><technical_language>Bolding dialog buttons is unusual. do need this? Android-y</technical_language>

Target:
private void showDialogAboutZero(final String prefsKey, String title, String message) { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(app); if (prefsKey == null || !prefs.getBoolean(prefsKey, false)) { if (prefsKey != null) { prefs.edit().putBoolean(prefsKey, true).commit(); } alert = new AlertDialog.Builder(this); alert.setTitle(title); alert.setMessage(message); if (prefsKey != null) { alert.setPositiveButton(getString(R.string.zero_learn_more_learn_more), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Utils.visitInExternalBrowser(PageActivity.this, Uri.parse(getString(R.string.zero_webpage_url))); } }); } alert.setNegativeButton(getString(R.string.zero_learn_more_dismiss), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.dismiss(); } }); AlertDialog ad = alert.create(); ad.show(); } }
Source:
<code>void iterationStart(HotRodHeader header, Subject subject, byte[] segmentMask, String filterConverterFactory, List<byte[]> filterConverterParams, int batch, boolean includeMetadata) { AdvancedCache<byte[], byte[]> cache = server.cache(header, subject); executor.execute(() -> { try { IterationState iterationState = server.getIterationManager().start(cache, segmentMask != null ? BitSet.valueOf(segmentMask) : null, filterConverterFactory, filterConverterParams, header.getValueMediaType(), batch, includeMetadata); <START> channel.closeFuture().addListener(iterationState.getReaper()); <END> writeResponse(header, header.encoder().iterationStartResponse(header, server, channel.alloc(), iterationState.getId())); } catch (Throwable t) { writeException(header, t); } }); }</code><technical_language>this leak a listener if iteration timed out</technical_language>

Target:
void iterationStart(HotRodHeader header, Subject subject, byte[] segmentMask, String filterConverterFactory, List<byte[]> filterConverterParams, int batch, boolean includeMetadata) { AdvancedCache<byte[], byte[]> cache = server.cache(header, subject); executor.execute(() -> { try { IterationState iterationState = server.getIterationManager().start(cache, segmentMask != null ? BitSet.valueOf(segmentMask) : null, filterConverterFactory, filterConverterParams, header.getValueMediaType(), batch, includeMetadata); iterationState.getReaper().registerChannel(channel); writeResponse(header, header.encoder().iterationStartResponse(header, server, channel.alloc(), iterationState.getId())); } catch (Throwable t) { writeException(header, t); } }); }
Source:
<code>public QueryControlResult stop(final String queryId) { final QueryControlResult queryControlResult = new QueryControlResult(); queryControlResult.setQueryId(queryId); <START> if (deleteQueryFromManager(queryId)) { <END> queryControlResult.setIsSuccess(true); queryControlResult.setMsg("Success: " + queryId + " is stopped."); } else { queryControlResult.setIsSuccess(false); queryControlResult.setMsg("Fail: There is no " + queryId); } return queryControlResult; }</code><technical_language>This is duplicated code</technical_language>

Target:
public QueryControlResult stop(final String queryId) { final QueryControlResult queryControlResult = new QueryControlResult(); queryControlResult.setQueryId(queryId); if (deleteQueryFromManager(queryId)) { queryControlResult.setIsSuccess(true); queryControlResult.setMsg(ResultMessage.stopSuccess(queryId)); } else { queryControlResult.setIsSuccess(false); queryControlResult.setMsg(ResultMessage.noQueryId(queryId)); } return queryControlResult; }
Source:
<code>private void showFormatUpgradeConfirmIfRequired() { StoragePool dc = getSelectedDataCentersForAttach().get(0); StorageDomain sd = getEntity(); StorageFormatUpgradeConfirmationModel model = new StorageFormatUpgradeConfirmationModel(); boolean shouldDisplay = model.initialize( Collections.singletonList(sd), dc, "OnShowFormatUpgrade", "Cancel", this); if (shouldDisplay) { <START> setConfirmWindow(model); <END> } else { UICommand okCommand = UICommand.createDefaultOkUiCommand( "OnShowFormatUpgrade", this); okCommand.execute(); } }</code><technical_language>please add new HelpTag HashName (as in StorageListModel)</technical_language>

Target:
private void showFormatUpgradeConfirmIfRequired() { StoragePool dc = getSelectedDataCentersForAttach().get(0); StorageDomain sd = getEntity(); StorageFormatUpgradeConfirmationModel model = new StorageFormatUpgradeConfirmationModel(); boolean shouldDisplay = model.initialize( Collections.singletonList(sd), dc, "OnShowFormatUpgrade", "Cancel", this); if (shouldDisplay) { setConfirmWindow(model); model.setHelpTag(HelpTag.attach_storage_domain_confirmation); model.setHashName("attach_storage_domain_confirmation"); } else { UICommand okCommand = UICommand.createDefaultOkUiCommand( "OnShowFormatUpgrade", this); okCommand.execute(); } }
Source:
<code>public void regularFloatingMedrecIsReloadingWithRecirculationModule() { Page page = new Page("project43", "SyntheticTests/LongPage"); AdsBaseObject ads = new AdsBaseObject(driver, page.getUrl()); <START> driver.manage().getCookies().stream().forEach(c -> System.out.println(c.getName() + " = " + c.getValue() + <END> ", httpOnly: " + c.isHttpOnly() + ", secure: " + c.isSecure())); ads.scrollToPosition(RECIRCULATION_SELECTOR); ads.wait.forElementVisible(RECIRCULATION_SELECTOR); checkIfNextModuleWillBe(ads, FMR_SELECTOR); checkIfNextModuleWillBe(ads, RECIRCULATION_SELECTOR); checkIfNextModuleWillBe(ads, FMR_SELECTOR); checkIfNextModuleWillBe(ads, RECIRCULATION_SELECTOR); checkIfNextModuleWillBe(ads, FMR_SELECTOR); checkIfNextModuleWillBe(ads, FMR_SELECTOR); }</code><technical_language>![MAJOR](<LINK_0> 'Severity: MAJOR') Replace this usage of System.out System.err a logger. [![rule](<LINK_1>](http://sonar-s4/coding_rules#rule_key=squid%3AS106)</technical_language>

Target:
public void regularFloatingMedrecIsReloadingWithRecirculationModule() { Page page = new Page("project43", "SyntheticTests/LongPage"); AdsBaseObject ads = new AdsBaseObject(driver, page.getUrl()); driver.manage().getCookies().stream().forEach(c -> System.out.println("Cookie " + c.getName() + " = " + c.getValue() + ", httpOnly: " + c.isHttpOnly() + ", secure: " + c.isSecure())); ads.wait.forElementPresent(RECIRCULATION_SELECTOR); ads.scrollToPosition(RECIRCULATION_SELECTOR); checkIfNextModuleWillBe(ads, FMR_SELECTOR); checkIfNextModuleWillBe(ads, RECIRCULATION_SELECTOR); checkIfNextModuleWillBe(ads, FMR_SELECTOR); checkIfNextModuleWillBe(ads, RECIRCULATION_SELECTOR); checkIfNextModuleWillBe(ads, FMR_SELECTOR); checkIfNextModuleWillBe(ads, FMR_SELECTOR); }
Source:
<code><START> public JdbcBlobUtils(LocalStorageStrategy storageStrategy, Provider<BlobBuilder> blobBuilders) { <END> this.storageStrategy = (JdbcStorageStrategy) checkNotNull(storageStrategy, "storageStrategy"); this.blobBuilders = checkNotNull(blobBuilders, "blobBuilders"); }</code><technical_language>here, remove public modifier null checks</technical_language>

Target:
JdbcBlobUtils(LocalStorageStrategy storageStrategy, Provider<BlobBuilder> blobBuilders) { this.storageStrategy = (JdbcStorageStrategy) storageStrategy; this.blobBuilders = blobBuilders; }
Source:
<code>private void copyTimestampsFromChangelog(Library library) { Date earliest = getEarliestChangeDate(library); <START> Date latest = getLatestChangeDate(library); <END> library.setCreationDate(earliest); }</code><technical_language>Unused</technical_language>

Target:
private void copyTimestampsFromChangelog(Library library) { Date earliest = getEarliestChangeDate(library); library.setCreationDate(earliest); }