auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public RowMapper<T> specialize(ResultSet rs, StatementContext ctx) throws SQLException { final List<String> columnNames = getColumnNames(rs); final List<ColumnNameMatcher> columnNameMatchers = ctx.getConfig(ReflectionMappers.class).getColumnNameMatchers(); final List<String> unmatchedColumns = new ArrayList<>(columnNames); RowMapper<T> mapper = specialize0(ctx, columnNames, columnNameMatchers, unmatchedColumns) .orElseThrow(() -> new IllegalArgumentException(String.format( <START> UNMATCHED_CONSTRUCTOR_PARAMETERS, factory))); <END> if (ctx.getConfig(ReflectionMappers.class).isStrictMatching() && anyColumnsStartWithPrefix(unmatchedColumns, prefix, columnNameMatchers)) { throw new IllegalArgumentException( String.format(UNMATCHED_COLUMNS_STRICT, factory.getDeclaringClass().getSimpleName(), unmatchedColumns)); } return mapper; }</code><technical_language>error message constants updated "constructor static factory method" instead of "constructor."</technical_language>

Target:
public RowMapper<T> specialize(ResultSet rs, StatementContext ctx) throws SQLException { final List<String> columnNames = getColumnNames(rs); final List<ColumnNameMatcher> columnNameMatchers = ctx.getConfig(ReflectionMappers.class).getColumnNameMatchers(); final List<String> unmatchedColumns = new ArrayList<>(columnNames); RowMapper<T> mapper = specialize0(ctx, columnNames, columnNameMatchers, unmatchedColumns) .orElseThrow(() -> new IllegalArgumentException(String.format( UNMATCHED_CONSTRUCTOR_PARAMETERS, factory))); if (ctx.getConfig(ReflectionMappers.class).isStrictMatching() && anyColumnsStartWithPrefix(unmatchedColumns, prefix, columnNameMatchers)) { throw new IllegalArgumentException( String.format(UNMATCHED_COLUMNS_STRICT, factory, unmatchedColumns)); } return mapper; }
Source:
<code>public HaxeComponentName getComponentName() { <START> return null; <END> }</code><technical_language>this change</technical_language>

Target:
public HaxeComponentName getComponentName() { final PsiIdentifier identifier = getNameIdentifier(); return identifier != null ? new HaxeComponentNameImpl(getNode()) : null; }
Source:
<code><START> final IntPair newSnake(int k, int x) { <END> return new IntPair(x, k+x); }</code><technical_language>Sure, faster long. a tradeoff speed maintainability. If a method returns int's I find easier understand (and maintain) if this is explicitly expressed. suggestion: I shortly measure out difference in performance memory consumption diffing 1mb texts. know</technical_language>

Target:
final long newSnake(int k, int x) { long ret=((long)x)<<32; return(ret | (k+x)); }
Source:
<code>public void onAutomatedTransferStatusChecked(OnAutomatedTransferStatusChecked event) { if (isFinishing()) { return; } if (event.isError()) { handleAutomatedTransferFailed(event.error.message); } else { if (event.isCompleted) { mAutomatedTransferProgressDialog.setProgress(99); mDispatcher.dispatch(SiteActionBuilder.newFetchSiteAction(mSite)); } else { mAutomatedTransferProgressDialog.setProgress(event.currentStep * 100 / event.totalSteps); mHandler.postDelayed(new Runnable() { @Override public void run() { <START> mDispatcher.dispatch(SiteActionBuilder.newCheckAutomatedTransferStatusAction(mSite)); <END> } }, 1000); } } }</code><technical_language>wondering if need recheck soon - recheck in a seconds provide a good experience</technical_language>

Target:
public void onAutomatedTransferStatusChecked(OnAutomatedTransferStatusChecked event) { if (isFinishing()) { return; } if (event.isError()) { handleAutomatedTransferFailed(event.error.message); } else { if (event.isCompleted) { mAutomatedTransferProgressDialog.setProgress(99); mDispatcher.dispatch(SiteActionBuilder.newFetchSiteAction(mSite)); } else { mAutomatedTransferProgressDialog.setProgress(event.currentStep * 100 / event.totalSteps); mHandler.postDelayed(new Runnable() { @Override public void run() { mDispatcher.dispatch(SiteActionBuilder.newCheckAutomatedTransferStatusAction(mSite)); } }, 3000); } } }
Source:
<code>public void remove(Map<String, Object> input){ if(pathElement instanceof LiteralPathElement){ <START> removeLiterals(input); <END> }else{ removeComputed(input); } }</code><technical_language>reduce number of methods word remove, call this handleLiteral</technical_language>

Target:
public void remove(Map<String, Object> input){ if(pathElement instanceof LiteralPathElement){ handleLiterals(input); }else{ handleComputed(input); } }
Source:
<code>private void verifyClaims(DecodedJWT jwt, Map<String, Object> claims) throws TokenExpiredException, InvalidClaimException { for (Map.Entry<String, Object> entry : claims.entrySet()) { switch (entry.getKey()) { case PublicClaims.AUDIENCE: <START> assertValidAudienceClaim(jwt.getAudience(), Arrays.asList((String[]) entry.getValue())); <END> break; case PublicClaims.EXPIRES_AT: assertValidDateClaim(jwt.getExpiresAt(), (Long) entry.getValue(), true); break; case PublicClaims.ISSUED_AT: assertValidDateClaim(jwt.getIssuedAt(), (Long) entry.getValue(), false); break; case PublicClaims.NOT_BEFORE: assertValidDateClaim(jwt.getNotBefore(), (Long) entry.getValue(), false); break; case PublicClaims.ISSUER: assertValidIssuerClaim(jwt.getIssuer(), Arrays.asList((String[]) entry.getValue())); break; case PublicClaims.JWT_ID: assertValidStringClaim(entry.getKey(), jwt.getId(), (String) entry.getValue()); break; case PublicClaims.SUBJECT: assertValidStringClaim(entry.getKey(), jwt.getSubject(), (String) entry.getValue()); break; default: assertValidClaim(jwt.getClaim(entry.getKey()), entry.getKey(), entry.getValue()); break; } } }</code><technical_language>Rolling this suggestion assertValidAudienceClaim(jwt.getAudience(), (List<String>) entry.getValue());</technical_language>

Target:
private void verifyClaims(DecodedJWT jwt, Map<String, Object> claims) throws TokenExpiredException, InvalidClaimException { for (Map.Entry<String, Object> entry : claims.entrySet()) { switch (entry.getKey()) { case PublicClaims.AUDIENCE: assertValidAudienceClaim(jwt.getAudience(), (List<String>) entry.getValue()); break; case PublicClaims.EXPIRES_AT: assertValidDateClaim(jwt.getExpiresAt(), (Long) entry.getValue(), true); break; case PublicClaims.ISSUED_AT: assertValidDateClaim(jwt.getIssuedAt(), (Long) entry.getValue(), false); break; case PublicClaims.NOT_BEFORE: assertValidDateClaim(jwt.getNotBefore(), (Long) entry.getValue(), false); break; case PublicClaims.ISSUER: assertValidIssuerClaim(jwt.getIssuer(), (List<String>) entry.getValue()); break; case PublicClaims.JWT_ID: assertValidStringClaim(entry.getKey(), jwt.getId(), (String) entry.getValue()); break; case PublicClaims.SUBJECT: assertValidStringClaim(entry.getKey(), jwt.getSubject(), (String) entry.getValue()); break; default: assertValidClaim(jwt.getClaim(entry.getKey()), entry.getKey(), entry.getValue()); break; } } }
Source:
<code>public Mono<Response<AppendBlobItem>> createWithResponse(BlobHttpHeaders headers, Map<String, String> metadata, BlobRequestConditions requestConditions) { try { return withContext(context -> createWithResponse(headers, metadata, requestConditions, context), <START> STORAGE_TRACING_PROPERTIES); <END> } catch (RuntimeException ex) { return monoError(logger, ex); } }</code><technical_language>pretty call withContext needs pass this constant, I helpful if defined in storage.common withTracingContext automatically add this. Otherwise, I Storage folks liable forget mess tracing :)</technical_language>

Target:
public Mono<Response<AppendBlobItem>> createWithResponse(BlobHttpHeaders headers, Map<String, String> metadata, BlobRequestConditions requestConditions) { try { return withContext(context -> createWithResponse(headers, metadata, requestConditions, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } }
Source:
<code>private void recreateResponse(FeedbackResponseAttributes newResponse, FeedbackResponseAttributes oldResponse) throws InvalidParametersException, EntityAlreadyExistsException { try { newResponse.setId(null); FeedbackResponse createdResponseEntity = (FeedbackResponse) frDb.createEntity(newResponse); frDb.deleteEntity(oldResponse); frcLogic.updateFeedbackResponseCommentsForChangingResponseId (oldResponse.getId(), createdResponseEntity.getId()); } catch (EntityAlreadyExistsException e) { log.warning("Trying to update an existing response to one that already exists."); throw new EntityAlreadyExistsException(Const.StatusMessages.FEEDBACK_RESPONSE_RECIPIENT_ALREADY_EXISTS); } catch (EntityDoesNotExistException e) { <START> log.warning("Trying to update a feedback response comment that does not exist"); <END> } }</code><technical_language>exception silenced here</technical_language>

Target:
private void recreateResponse( FeedbackResponseAttributes newResponse, FeedbackResponseAttributes oldResponse) throws InvalidParametersException, EntityAlreadyExistsException, EntityDoesNotExistException { try { newResponse.setId(null); FeedbackResponse createdResponseEntity = (FeedbackResponse) frDb.createEntity(newResponse); frDb.deleteEntity(oldResponse); frcLogic.updateFeedbackResponseCommentsForChangingResponseId (oldResponse.getId(), createdResponseEntity.getId()); } catch (EntityAlreadyExistsException e) { log.warning("Trying to update an existing response to one that already exists."); throw new EntityAlreadyExistsException(Const.StatusMessages.FEEDBACK_RESPONSE_RECIPIENT_ALREADY_EXISTS); } }
Source:
<code>protected Object handleInvocation(Object proxy, Method method, Object[] args) throws Throwable { boolean runExperiment = useExperimental(); Object target = runExperiment ? experimentalService : fallbackService; try { return method.invoke(target, args); } catch (InvocationTargetException e) { if (runExperiment) { log.info("Experiment failed; we will revert to the fallback service. We will allow attempting to" + " use the experimental service again in milliseconds.", <START> SafeArg.of("retryDurationMillis", REFRESH_INTERVAL.toMillis()), <END> e); markExperimentFailure(); } if (e.getTargetException() instanceof NotInitializedException) { log.warn("Resource is not initialized yet!"); } throw e.getTargetException(); } }</code><technical_language>log duration</technical_language>

Target:
protected Object handleInvocation(Object proxy, Method method, Object[] args) throws Throwable { boolean runExperiment = useExperimental(); Object target = runExperiment ? experimentalService : fallbackService; try { return method.invoke(target, args); } catch (InvocationTargetException e) { if (runExperiment) { markExperimentFailure(e); } if (e.getTargetException() instanceof NotInitializedException) { log.warn("Resource is not initialized yet!"); } throw e.getTargetException(); } }
Source:
<code>public Edge addEdge(AddEdgeQuery uniQuery) { UniEdge edge = new UniEdge(uniQuery.getProperties(), uniQuery.getOutVertex(), uniQuery.getInVertex(), graph); try { index(this.edgeSchemas, edge, true); } catch (DocumentAlreadyExistsException ex) { throw Graph.Exceptions.edgeWithIdAlreadyExists(edge.id()); <START> } catch (IOException e) { <END> } return edge; }</code><technical_language>catch IOException in index(...)</technical_language>

Target:
public Edge addEdge(AddEdgeQuery uniQuery) { UniEdge edge = new UniEdge(uniQuery.getProperties(), uniQuery.getOutVertex(), uniQuery.getInVertex(), graph); try { index(this.edgeSchemas, edge, true); } catch (DocumentAlreadyExistsException ex) { throw Graph.Exceptions.edgeWithIdAlreadyExists(edge.id()); } return edge; }
Source:
<code>protected void channelRead0(ChannelHandlerContext ctx, OlapMessage.Command cmd) throws Exception { if (LOG.isTraceEnabled()) { LOG.trace("Received " + cmd); } if(cmd.getType()!=OlapMessage.Command.Type.STATUS){ ctx.fireChannelRead(cmd); return; } OlapJobStatus status = jobRegistry.getStatus(cmd.getUniqueName()); OlapMessage.Status statusMsg = cmd.getExtension(OlapMessage.Status.command); if (statusMsg.hasWaitTimeMillis() && status != null) { long waitTime = statusMsg.getWaitTimeMillis(); switch (status.checkState()) { case SUBMITTED: case RUNNING: <START> status.wait(waitTime, TimeUnit.MILLISECONDS); <END> } } writeResponse(ctx.channel(),cmd.getUniqueName(),status); if (LOG.isTraceEnabled()) { LOG.trace("Status " + status); } }</code><technical_language>need default case</technical_language>

Target:
protected void channelRead0(ChannelHandlerContext ctx, OlapMessage.Command cmd) throws Exception { if (LOG.isTraceEnabled()) { LOG.trace("Received " + cmd); } if(cmd.getType()!=OlapMessage.Command.Type.STATUS){ ctx.fireChannelRead(cmd); return; } OlapJobStatus status = jobRegistry.getStatus(cmd.getUniqueName()); OlapMessage.Status statusMsg = cmd.getExtension(OlapMessage.Status.command); if (statusMsg.hasWaitTimeMillis() && status != null) { long waitTime = statusMsg.getWaitTimeMillis(); switch (status.checkState()) { case SUBMITTED: case RUNNING: status.wait(waitTime, TimeUnit.MILLISECONDS); default: } } writeResponse(ctx.channel(),cmd.getUniqueName(),status); if (LOG.isTraceEnabled()) { LOG.trace("Status " + status); } }
Source:
<code><START> public PollResponse(OperationStatus status, String otherStatus, T value, Duration retryAfter, Map<Object, Object> properties) { <END> Objects.requireNonNull(status, "The status input parameter cannot be null."); if (status == OperationStatus.OTHER) { if (Objects.isNull(otherStatus) || otherStatus.trim().length() == 0) { throw new IllegalArgumentException("otherStatus can not be empty or null for OperationState.OTHER"); } }else{ if (!Objects.isNull(otherStatus)) { throw new IllegalArgumentException("otherStatus can not have value for any OperationState except OperationState.OTHER"); } } this.status = status; this.value = value; this.retryAfter = retryAfter; this.properties = properties; this.otherStatus = otherStatus; }</code><technical_language>I simplify constructor - if user supplied 'otherStatus', need supply operation status, automatically OTHER</technical_language>

Target:
private PollResponse(OperationStatus status, String otherStatus, T value, Duration retryAfter, Map<Object, Object> properties) { Objects.requireNonNull(status, "The status input parameter cannot be null."); this.status = status; this.value = value; this.retryAfter = retryAfter; this.properties = properties; this.otherStatus = otherStatus; }
Source:
<code>public int updateHandlesWithNewPrefix(Context context, String newPrefix, String oldPrefix) throws SQLException { <START> String hql = "UPDATE Handle set handle = concat(:newPrefix,'/',handle_id) WHERE handle like concat(:oldPrefix,'%')"; <END> Query query = createQuery(context, hql); query.setString("newPrefix", newPrefix); query.setString("oldPrefix", oldPrefix); return query.executeUpdate(); }</code><technical_language>of handle_id strange me. I this post stackoverflow <LINK_0></technical_language>

Target:
public int updateHandlesWithNewPrefix(Context context, String newPrefix, String oldPrefix) throws SQLException { String hql = "UPDATE Handle set handle = concat(:newPrefix,'/',id) WHERE handle like concat(:oldPrefix,'%')"; Query query = createQuery(context, hql); query.setString("newPrefix", newPrefix); query.setString("oldPrefix", oldPrefix); return query.executeUpdate(); }
Source:
<code>public void testWrongFormatNumber() throws Exception { NumberCellEditor editor; editor = new NumberCellEditor(shell, Integer.class); editor.setValue(" "); editor.getValue(); assertNull(editor.getValue() ); editor.setValue("aa"); <START> editor.getValue(); <END> assertNull(editor.getValue() ); }</code><technical_language>this obsolete if isValueValidis implemented..</technical_language>

Target:
public void testWrongFormatNumber() throws Exception { NumberCellEditor editor; editor = new NumberCellEditor(shell, Integer.class); editor.getValue(); assertNull(editor.getValue()); editor.setValue("aa"); editor.getValue(); assertNull(editor.getValue()); }
Source:
<code>public static Optional<PrimitiveType> fromToken(String token) { <START> return Optional.ofNullable(LOOKUP.get(token)); <END> }</code><technical_language>this optional I throw (equivalent Enum.valueOf) in this PR simply calls .get() optional throw if called illegally</technical_language>

Target:
public static PrimitiveType fromToken(String token) { return LOOKUP.get(token); }
Source:
<code>public static List<X500Principal> toSubjects(List<X509Certificate> certificates) { List<X500Principal> subjects = new ArrayList<X500Principal>(certificates.size()); <START> if (certificates != null) { <END> for (X509Certificate certificate : certificates) { subjects.add(certificate.getSubjectX500Principal()); } } return subjects; }</code><technical_language>if certificate is null, line raise NPE</technical_language>

Target:
public static List<X500Principal> toSubjects(List<X509Certificate> certificates) { if (certificates != null) { List<X500Principal> subjects = new ArrayList<X500Principal>(certificates.size()); for (X509Certificate certificate : certificates) { subjects.add(certificate.getSubjectX500Principal()); } return subjects; } else { return Collections.emptyList(); } }
Source:
<code>public void adjustCost(ResultSetNode rsn) throws StandardException { if (fetchFirst==-1 && offset ==-1) return; CostEstimate costEstimate = rsn.getFinalCostEstimate(false); long totalRowCount = costEstimate.getEstimatedRowCount(); long currentOffset = offset==-1?0:offset; long currentFetchFirst = fetchFirst==-1?totalRowCount:fetchFirst; scaleFactor = (double) currentFetchFirst/(double) totalRowCount; if (scaleFactor >= 1.0d) { } else { costEstimate.setEstimatedRowCount(currentOffset+currentFetchFirst); costEstimate.setRemoteCost(scaleFactor*costEstimate.getRemoteCost()); int numPartitions = costEstimate.partitionCount(); if (numPartitions <= 0) numPartitions = 1; <START> costEstimate.setRemoteCostPerPartition(costEstimate.remoteCost()/numPartitions); <END> } }</code><technical_language>nit: spaces /</technical_language>

Target:
public void adjustCost(ResultSetNode rsn) throws StandardException { if (fetchFirst==-1 && offset ==-1) return; CostEstimate costEstimate = rsn.getFinalCostEstimate(false); long totalRowCount = costEstimate.getEstimatedRowCount(); long currentOffset = offset==-1?0:offset; long currentFetchFirst = fetchFirst==-1?totalRowCount:fetchFirst; scaleFactor = (double) currentFetchFirst/(double) totalRowCount; if (scaleFactor >= 1.0d) { } else { costEstimate.setEstimatedRowCount(currentOffset+currentFetchFirst); costEstimate.setRemoteCost(scaleFactor*costEstimate.getRemoteCost()); costEstimate.setRemoteCostPerPartition(costEstimate.remoteCost(), costEstimate.partitionCount()); } }
Source:
<code>private Iterator<Content> iteratorsFor(final List<Publisher> publishers, ContentListingCriteria criteria) { final String uri = criteria.getProgress().getUri(); final List<ContentCategory> initialCats = remainingTables(criteria); final List<ContentCategory> allCats = criteria.getCategories(); return Iterators.concat(Iterators.transform(publishers.iterator(), new Function<Publisher, Iterator<Content>>() { @Override public Iterator<Content> apply(final Publisher publisher) { return contentIterator(first(publisher, publishers) ? initialCats : allCats, new ListingCursorBuilder<Content>() { public DBObject queryForCategory(ContentCategory category) { MongoQueryBuilder query = where().fieldEquals("publisher", publisher.key()); if(first(publisher, publishers) && first(category, initialCats) && !Strings.isNullOrEmpty(uri) ) { query.fieldGreaterThan(ID, uri); } return query.build(); } @Override public DBCursor cursorFor(ContentCategory category) { return contentTables.collectionFor(category) .find(queryForCategory(category)) .batchSize(1) .sort(new MongoSortBuilder().ascending("publisher").ascending(MongoConstants.ID).build()) .addOption(Bytes.QUERYOPTION_NOTIMEOUT) <START> .noCursorTimeout(true); <END> } @Override public Function<DBObject, Content> translatorFor(ContentCategory contentCategory) { return toContentFunction(contentCategory); } }); } private <T> boolean first(T e, List<T> es) { return e.equals(es.get(0)); } })); }</code><technical_language>revert this, fixed Emi's changes for running equiv full publisher</technical_language>

Target:
private Iterator<Content> iteratorsFor(final List<Publisher> publishers, ContentListingCriteria criteria) { return iteratorsFor(publishers, criteria, false); }
Source:
<code>public void testChownToOwnGroup() throws Exception { <START> Assume.assumeFalse(System.getProperty("os.name").startsWith( "Windows" )); <END> String file1 = "some-file.dat"; createFileWithJunk(file1, 100); String fullPath = testDir + pathSep + file1; Path path = Paths.get(fullPath); GroupPrincipal group = Files.readAttributes(path, PosixFileAttributes.class, LinkOption.NOFOLLOW_LINKS).group(); vertx.fileSystem().chown(fullPath, null, group.getName(), ar -> { deleteFile(file1); assertTrue(ar.succeeded()); testComplete(); }); await(); }</code><technical_language>create a method isWindows() containing: System.getProperty("os.name").startsWith( "Windows" ) avoid writing code times</technical_language>

Target:
public void testChownToOwnGroup() throws Exception { Assume.assumeFalse(Utils.isWindows()); String file1 = "some-file.dat"; createFileWithJunk(file1, 100); String fullPath = testDir + pathSep + file1; Path path = Paths.get(fullPath); GroupPrincipal group = Files.readAttributes(path, PosixFileAttributes.class, LinkOption.NOFOLLOW_LINKS).group(); vertx.fileSystem().chown(fullPath, null, group.getName(), ar -> { deleteFile(file1); assertTrue(ar.succeeded()); testComplete(); }); await(); }
Source:
<code>public IncomingMessageEnvelope(SystemStreamPartition systemStreamPartition, String offset, Object key, Object message, int size) { this.systemStreamPartition = systemStreamPartition; this.offset = offset; this.key = key; this.message = message; this.size = size; <START> } <END></code><technical_language>default arrival time currentTimeMillis here</technical_language>

Target:
public IncomingMessageEnvelope(SystemStreamPartition systemStreamPartition, String offset, Object key, Object message, int size) { this.systemStreamPartition = systemStreamPartition; this.offset = offset; this.key = key; this.message = message; this.size = size; this.arrivalTime = Instant.now().toEpochMilli(); }
Source:
<code>protected List<InstanceGiven> extractGivenValues(ScesimModelDescriptor scesimModelDescriptor, List<FactMappingValue> factMappingValues, ClassLoader classLoader, ExpressionEvaluatorFactory expressionEvaluatorFactory) { List<InstanceGiven> instanceGiven = new ArrayList<>(); Map<FactIdentifier, List<FactMappingValue>> groupByFactIdentifier = groupByFactIdentifierAndFilter(factMappingValues, FactMappingType.GIVEN); boolean hasError = false; for (Map.Entry<FactIdentifier, List<FactMappingValue>> entry : groupByFactIdentifier.entrySet()) { try { FactIdentifier factIdentifier = entry.getKey(); Map<List<String>, Object> paramsForBean = getParamsForBean(scesimModelDescriptor, factIdentifier, entry.getValue(), expressionEvaluatorFactory); Object bean = createObject(getDirectMapping(paramsForBean).getOptional(), factIdentifier.getClassName(), paramsForBean, classLoader); instanceGiven.add(new InstanceGiven(factIdentifier, bean)); } catch (Exception e) { <START> logger.error("Error in GIVEN data " + entry.getKey() + ": " + e.getMessage(), e); <END> hasError = true; } } if (hasError) { throw new ScenarioException("Error in GIVEN data"); } return instanceGiven; }</code><technical_language>@danielezonca Pls check for null in e.getMessage; if null, provide a meaningful substitution</technical_language>

Target:
protected List<InstanceGiven> extractGivenValues(ScesimModelDescriptor scesimModelDescriptor, List<FactMappingValue> factMappingValues, ClassLoader classLoader, ExpressionEvaluatorFactory expressionEvaluatorFactory) { List<InstanceGiven> instanceGiven = new ArrayList<>(); Map<FactIdentifier, List<FactMappingValue>> groupByFactIdentifier = groupByFactIdentifierAndFilter(factMappingValues, FactMappingType.GIVEN); boolean hasError = false; for (Map.Entry<FactIdentifier, List<FactMappingValue>> entry : groupByFactIdentifier.entrySet()) { try { FactIdentifier factIdentifier = entry.getKey(); Map<List<String>, Object> paramsForBean = getParamsForBean(scesimModelDescriptor, factIdentifier, entry.getValue(), expressionEvaluatorFactory); Object bean = createObject(getDirectMapping(paramsForBean).getOptional(), factIdentifier.getClassName(), paramsForBean, classLoader); instanceGiven.add(new InstanceGiven(factIdentifier, bean)); } catch (Exception e) { String errorMessage = e.getMessage() != null ? e.getMessage() : e.getClass().getCanonicalName(); logger.error("Error in GIVEN data " + entry.getKey() + ": " + errorMessage, e); hasError = true; } } if (hasError) { throw new ScenarioException("Error in GIVEN data"); } return instanceGiven; }
Source:
<code>public Date determineLastBilledDateByInvoicingOption(List<ContractsAndGrantsBillingAwardAccount> awardAccounts, String invoicingOptionCode, Date awardLastBilledDate) { Date computedLastBilledDate = null; if (StringUtils.equalsIgnoreCase(ArConstants.INV_ACCOUNT, invoicingOptionCode) || StringUtils.equalsIgnoreCase(ArConstants.INV_CONTRACT_CONTROL_ACCOUNT, invoicingOptionCode)) { ContractsAndGrantsBillingAwardAccount accountToUse = null; <START> for (ContractsAndGrantsBillingAwardAccount awardAccount : awardAccounts) { <END> if (ObjectUtils.isNotNull(accountToUse)) { if (isNotExpenditureAccount(awardAccount) && awardAccount.getCurrentLastBilledDate().after(accountToUse.getCurrentLastBilledDate())) { accountToUse = awardAccount; } } else { accountToUse = awardAccount; } } computedLastBilledDate = accountToUse.getCurrentLastBilledDate(); } else if (StringUtils.equalsIgnoreCase(ArConstants.INV_AWARD, invoicingOptionCode) || StringUtils.equalsIgnoreCase(ArConstants.INV_SCHEDULE, invoicingOptionCode)) { computedLastBilledDate = awardLastBilledDate; } return computedLastBilledDate; }</code><technical_language>Is safe assume this list is non-empty? If empty, accountToUse remain null</technical_language>

Target:
public Date determineLastBilledDateByInvoicingOption(List<ContractsAndGrantsBillingAwardAccount> awardAccounts, String invoicingOptionCode, Date awardLastBilledDate) { Date computedLastBilledDate = null; if (StringUtils.equalsIgnoreCase(ArConstants.INV_ACCOUNT, invoicingOptionCode) || StringUtils.equalsIgnoreCase(ArConstants.INV_CONTRACT_CONTROL_ACCOUNT, invoicingOptionCode)) { ContractsAndGrantsBillingAwardAccount accountToUse = null; for (ContractsAndGrantsBillingAwardAccount awardAccount : awardAccounts) { if (ObjectUtils.isNotNull(accountToUse)) { if (isNotExpenditureAccount(awardAccount) && ObjectUtils.isNotNull(awardAccount.getCurrentLastBilledDate()) && ObjectUtils.isNotNull(accountToUse.getCurrentLastBilledDate()) && awardAccount.getCurrentLastBilledDate().after(accountToUse.getCurrentLastBilledDate())) { accountToUse = awardAccount; } } else if (isNotExpenditureAccount(awardAccount)) { accountToUse = awardAccount; } } if (ObjectUtils.isNotNull(accountToUse)) { computedLastBilledDate = accountToUse.getCurrentLastBilledDate(); } else { LOG.error("determineLastBilledDateByInvoicingOption: NO award accounts passed to method when award had invoice option of Account or Contract Control Account. lastBilledDate being returned as NULL."); } } else if (StringUtils.equalsIgnoreCase(ArConstants.INV_AWARD, invoicingOptionCode) || StringUtils.equalsIgnoreCase(ArConstants.INV_SCHEDULE, invoicingOptionCode)) { computedLastBilledDate = awardLastBilledDate; } return computedLastBilledDate; }
Source:
<code>private void parse(File targetFile) throws IOException { BufferedReader br = new BufferedReader(new FileReader(targetFile)); String txt; try { while ((txt = br.readLine()) != null) { txt = txt.trim(); if (txt.length() > 0 && !txt.startsWith("#")) { rules.add(new IgnoreRule(txt)); } } } catch (IOException e) { <START> throw e; <END> } finally { br.close(); } }</code><technical_language>Style-nit: Useless catch/throw. declare catch, throw caller</technical_language>

Target:
private void parse(File targetFile) throws IOException { BufferedReader br = new BufferedReader(new FileReader(targetFile)); String txt; try { while ((txt = br.readLine()) != null) { txt = txt.trim(); if (txt.length() > 0 && !txt.startsWith("#")) rules.add(new IgnoreRule(txt)); } } catch (IOException e) { throw e; } finally { br.close(); } }
Source:
<code>static protected <T> T[][] shuffleArray(T [][] input) { T[][] output = input.clone(); Integer indices = new Integer[input.length]; for (int idx = 0; idx < indices.length; idx += 1) { indices[idx] = Integer.valueOf(idx); } List<Integer> permutation = Arrays.asList(indices); Collections.shuffle(permutation); <START> T[] tmp = input[permutation.get(0)]; <END> for (int idx = 0; idx < input.length-1; idx += 1) { output[idx] = input[permutation.get(idx + 1)]; } output[input.length-1] = tmp; return output; }</code><technical_language>This in original code, puzzling nonetheless. is gained shifting elements of permuted list 1 position assigning array? a more straightforward element element assignment position? Is this compensate for some skew Collections.shuffle output? arbitrary</technical_language>

Target:
static protected <T> T[][] shuffleArray(T [][] input) { T[][] output = input.clone(); Integer indices = new Integer[input.length]; for (int idx = 0; idx < indices.length; idx += 1) { indices[idx] = Integer.valueOf(idx); } List<Integer> permutation = Arrays.asList(indices); Collections.shuffle(permutation); for (int idx = 0; idx < input.length; idx += 1) { output[idx] = input[permutation.get(idx)]; } return output; }
Source:
<code>public static PushTapTarget fromString(String target) { for (PushTapTarget entry : PushTapTarget.values()) { if (entry.getTarget().equals(target)) { return entry; } } <START> throw new IllegalArgumentException("No enum found for string: " + target); <END> }</code><technical_language>making app crash, sdk handle this case dismiss notification</technical_language>

Target:
public static PushTapTarget fromString(String target) { for (PushTapTarget entry : PushTapTarget.values()) { if (entry.getTarget().equals(target)) { return entry; } } return ERROR; }
Source:
<code>protected Statement getStatement(ParameterAccessor accessor, Object[] runtimeParameters, ReturnedType returnedType) { String bucketName = getCouchbaseOperations().getCouchbaseBucket().name(); Expression bucket = N1qlUtils.escapedBucket(bucketName); FromPath select; if (partTree.isCountProjection()) { select = select(count("*")); } else { <START> { <END> select = N1qlUtils.createSelectClauseForEntity(bucketName, returnedType, this.getCouchbaseOperations().getConverter().getMappingContext()); } } WherePath selectFrom = select.from(bucket); N1qlQueryCreator queryCreator = new N1qlQueryCreator(partTree, accessor, selectFrom, getCouchbaseOperations().getConverter(), getQueryMethod()); LimitPath selectFromWhereOrderBy = queryCreator.createQuery(); if (queryMethod.isPageQuery()) { Pageable pageable = accessor.getPageable(); Assert.notNull(pageable); return selectFromWhereOrderBy.limit(pageable.getPageSize()).offset(pageable.getOffset()); } else if (queryMethod.isSliceQuery() && accessor.getPageable() != null) { Pageable pageable = accessor.getPageable(); Assert.notNull(pageable); return selectFromWhereOrderBy.limit(pageable.getPageSize() + 1).offset(pageable.getOffset()); } else if (partTree.isLimiting()) { return selectFromWhereOrderBy.limit(partTree.getMaxResults()); } else { return selectFromWhereOrderBy; } }</code><technical_language>unnecessary brackets ;)</technical_language>

Target:
protected Statement getStatement(ParameterAccessor accessor, Object[] runtimeParameters, ReturnedType returnedType) { String bucketName = getCouchbaseOperations().getCouchbaseBucket().name(); Expression bucket = N1qlUtils.escapedBucket(bucketName); FromPath select; if (partTree.isCountProjection()) { select = select(count("*")); } else { select = N1qlUtils.createSelectClauseForEntity(bucketName, returnedType, this.getCouchbaseOperations().getConverter()); } WherePath selectFrom = select.from(bucket); N1qlQueryCreator queryCreator = new N1qlQueryCreator(partTree, accessor, selectFrom, getCouchbaseOperations().getConverter(), getQueryMethod()); LimitPath selectFromWhereOrderBy = queryCreator.createQuery(); if (queryMethod.isPageQuery()) { Pageable pageable = accessor.getPageable(); Assert.notNull(pageable); return selectFromWhereOrderBy.limit(pageable.getPageSize()).offset(pageable.getOffset()); } else if (queryMethod.isSliceQuery() && accessor.getPageable() != null) { Pageable pageable = accessor.getPageable(); Assert.notNull(pageable); return selectFromWhereOrderBy.limit(pageable.getPageSize() + 1).offset(pageable.getOffset()); } else if (partTree.isLimiting()) { return selectFromWhereOrderBy.limit(partTree.getMaxResults()); } else { return selectFromWhereOrderBy; } }
Source:
<code>public static Script createP2SHOutputScript(int threshold, List<ECKey> pubkeys) { <START> pubkeys = new ArrayList<ECKey>(pubkeys); <END> Collections.sort(pubkeys, new PubKeyComparator()); Script redeemScript = ScriptBuilder.createMultiSigOutputScript(threshold, pubkeys); byte[] hash = Utils.sha256hash160(redeemScript.getProgram()); return ScriptBuilder.createP2SHOutputScript(hash); }</code><technical_language>assert size of keys exceed IsStandard limits (15, I think?)</technical_language>

Target:
public static Script createP2SHOutputScript(int threshold, List<ECKey> pubkeys) { pubkeys = new ArrayList<ECKey>(pubkeys); final Comparator comparator = UnsignedBytes.lexicographicalComparator(); Collections.sort(pubkeys, new Comparator<ECKey>() { @Override public int compare(ECKey k1, ECKey k2) { return comparator.compare(k1.getPubKey(), k2.getPubKey()); } }); Script redeemScript = ScriptBuilder.createMultiSigOutputScript(threshold, pubkeys); byte[] hash = Utils.sha256hash160(redeemScript.getProgram()); return ScriptBuilder.createP2SHOutputScript(hash); }
Source:
<code>public BadRequestException() { <START> this("invalid request"); <END> }</code><technical_language>@Captain-P-Goldfish please define this error message a constant in ResponseCodeConstants class</technical_language>

Target:
public BadRequestException() { this(ResponseCodeConstants.INVALID_REQUEST); }
Source:
<code>private MutableMetric lookupMetric(String name) { <START> MutableMetric metric = getRegistry().get(name); <END> return metric; }</code><technical_language>done in line ?</technical_language>

Target:
private MutableMetric lookupMetric(String name) { return getRegistry().get(name); }
Source:
<code>public Expression visitSpatialJoin(SpatialJoinNode node, Void context) { Expression leftPredicate = node.getLeft().accept(this, context); Expression rightPredicate = node.getRight().accept(this, context); switch (node.getType()) { case INNER: return combineConjuncts(ImmutableList.<Expression>builder() .add(pullExpressionThroughSymbols(leftPredicate, node.getOutputSymbols())) .add(pullExpressionThroughSymbols(rightPredicate, node.getOutputSymbols())) .build()); case LEFT: return combineConjuncts(ImmutableList.<Expression>builder() .add(pullExpressionThroughSymbols(leftPredicate, node.getOutputSymbols())) .addAll(pullNullableConjunctsThroughOuterJoin(extractConjuncts(rightPredicate), node.getOutputSymbols(), node.getRight().getOutputSymbols()::contains)) .build()); default: <START> throw new UnsupportedOperationException("Unknown spatial join type: " + node.getType()); <END> } }</code><technical_language>nit: IllegalArgumentException, Unsupported spatial join type:</technical_language>

Target:
public Expression visitSpatialJoin(SpatialJoinNode node, Void context) { Expression leftPredicate = node.getLeft().accept(this, context); Expression rightPredicate = node.getRight().accept(this, context); switch (node.getType()) { case INNER: return combineConjuncts(ImmutableList.<Expression>builder() .add(pullExpressionThroughSymbols(leftPredicate, node.getOutputSymbols())) .add(pullExpressionThroughSymbols(rightPredicate, node.getOutputSymbols())) .build()); case LEFT: return combineConjuncts(ImmutableList.<Expression>builder() .add(pullExpressionThroughSymbols(leftPredicate, node.getOutputSymbols())) .addAll(pullNullableConjunctsThroughOuterJoin(extractConjuncts(rightPredicate), node.getOutputSymbols(), node.getRight().getOutputSymbols()::contains)) .build()); default: throw new IllegalArgumentException("Unsupported spatial join type: " + node.getType()); } }
Source:
<code>public int readData(byte[] buffer) throws IOException { <START> int readBytes = 0; <END> if (getInputStream() != null && getInputStream().available() > 0) { int numBytesToRead = getInputStream().available(); if (numBytesToRead > buffer.length) numBytesToRead = buffer.length; readBytes = getInputStream().read(buffer, 0, numBytesToRead); } return readBytes; }</code><technical_language>Check buffer null</technical_language>

Target:
public int readData(byte[] buffer) throws IOException { if (buffer == null) throw new NullPointerException("Buffer cannot be null."); int readBytes = 0; if (getInputStream() != null && getInputStream().available() > 0) { int numBytesToRead = getInputStream().available(); if (numBytesToRead > buffer.length) numBytesToRead = buffer.length; readBytes = getInputStream().read(buffer, 0, numBytesToRead); } return readBytes; }
Source:
<code>public SliceDictionaryColumnWriter(int column, Type type, CompressionKind compression, int bufferSize, OrcEncoding orcEncoding, DataSize stringStatisticsLimit) { checkArgument(column >= 0, "column is negative"); this.column = column; this.type = requireNonNull(type, "type is null"); this.compression = requireNonNull(compression, "compression is null"); try { <START> this.orcDecompressor = createOrcDecompressor(orcDataSourceId, compression, 1024 * 1024); <END> } catch (OrcCorruptionException e) { throw new RuntimeException(e); } this.bufferSize = bufferSize; this.orcEncoding = requireNonNull(orcEncoding, "orcEncoding is null"); this.stringStatisticsLimitInBytes = toIntExact(requireNonNull(stringStatisticsLimit, "stringStatisticsLimit is null").toBytes()); if (orcEncoding == DWRF) { this.dataStream = new LongOutputStreamV1(compression, bufferSize, false, DATA); this.tempDictionaryIdDataStream = new LongOutputStreamV1(compression, bufferSize, false, DATA); } else { this.dataStream = new LongOutputStreamV2(compression, bufferSize, false, DATA); this.tempDictionaryIdDataStream = new LongOutputStreamV2(compression, bufferSize, false, DATA); } this.presentStream = new PresentOutputStream(compression, bufferSize); this.dictionaryDataStream = new ByteArrayOutputStream(compression, bufferSize, StreamKind.DICTIONARY_DATA); this.dictionaryLengthStream = createLengthOutputStream(compression, bufferSize, orcEncoding); this.statisticsBuilder = newStringStatisticsBuilder(); }</code><technical_language>is in memory, a 1MB buffer large. 32k?... this matters</technical_language>

Target:
public SliceDictionaryColumnWriter(int column, Type type, CompressionKind compression, int bufferSize, OrcEncoding orcEncoding, DataSize stringStatisticsLimit) { checkArgument(column >= 0, "column is negative"); this.column = column; this.type = requireNonNull(type, "type is null"); this.compression = requireNonNull(compression, "compression is null"); this.bufferSize = bufferSize; this.orcEncoding = requireNonNull(orcEncoding, "orcEncoding is null"); this.stringStatisticsLimitInBytes = toIntExact(requireNonNull(stringStatisticsLimit, "stringStatisticsLimit is null").toBytes()); if (orcEncoding == DWRF) { this.dataStream = new LongOutputStreamV1(compression, bufferSize, false, DATA); this.tempDictionaryIdDataStream = new LongOutputStreamV1(compression, bufferSize, false, DATA); } else { this.dataStream = new LongOutputStreamV2(compression, bufferSize, false, DATA); this.tempDictionaryIdDataStream = new LongOutputStreamV2(compression, bufferSize, false, DATA); } this.presentStream = new PresentOutputStream(compression, bufferSize); this.dictionaryDataStream = new ByteArrayOutputStream(compression, bufferSize, StreamKind.DICTIONARY_DATA); this.dictionaryLengthStream = createLengthOutputStream(compression, bufferSize, orcEncoding); this.statisticsBuilder = newStringStatisticsBuilder(); }
Source:
<code>public GlusterStorageDomainDRSyncJob() { super(); <START> backend = Injector.get(BackendInternal.class); storageDomainDao = Injector.get(StorageDomainDao.class); geoRepDao = Injector.get(GlusterGeoRepDao.class); <END> }</code><technical_language>instead Injector here, pls @Inject annotation, intend GlusterStorageDomainDRSyncJob, declare @Inject Injector.get(GlusterStorageDomainDRSyncJob.class);</technical_language>

Target:
public GlusterStorageDomainDRSyncJob() { super(); }
Source:
<code>public SipMessage.Builder<T> withRecordRouteHeaders(final RecordRouteHeader... recordRoutes) { if (recordRoutes != null) { this.recordRouteHeaders = ensureList(this.recordRouteHeaders); this.recordRouteHeaders.clear(); <START> recordRouteHeader = recordRoutes[0]; <END> this.recordRouteHeaders.addAll(Arrays.asList(recordRoutes)); } return this; }</code><technical_language>same, this blow if pass in empty array</technical_language>

Target:
public SipMessage.Builder<T> withRecordRouteHeaders(final RecordRouteHeader... recordRoutes) { if (recordRoutes != null && recordRoutes.length > 0) { this.recordRouteHeaders = ensureList(this.recordRouteHeaders); this.recordRouteHeaders.clear(); recordRouteHeader = recordRoutes[0]; this.recordRouteHeaders.addAll(Arrays.asList(recordRoutes)); } return this; }
Source:
<code>private String encodeAttributes(List<String> attributesToRetrieve, boolean forURL) throws UnsupportedEncodingException { if (attributesToRetrieve == null) { return null; } StringBuilder params = new StringBuilder(); if (forURL) { <START> params.append("?attributes="); <END> } for (int i = 0; i < attributesToRetrieve.size(); ++i) { if (i > 0) { params.append(","); } params.append(URLEncoder.encode(attributesToRetrieve.get(i), "UTF-8")); } return params.toString(); }</code><technical_language>attributes is deprecated. attributesToRetrieve now. Instead of manually mingling attributes, I create a Query, call setAttributesToRetrieve() build() boom! go: simpler, more reliable</technical_language>

Target:
private String encodeAttributes(List<String> attributesToRetrieve, boolean forURL) throws UnsupportedEncodingException { if (attributesToRetrieve == null) { return null; } StringBuilder params = new StringBuilder(); if (forURL) { params.append("?attributesToRetrieve="); } for (int i = 0; i < attributesToRetrieve.size(); ++i) { if (i > 0) { params.append(","); } params.append(URLEncoder.encode(attributesToRetrieve.get(i), "UTF-8")); } return params.toString(); }
Source:
<code>public ImageIcon getIcon() { if (confidence == Alert.CONFIDENCE_FALSE_POSITIVE) { <START> return DisplayUtils.getScaledIcon(new ImageIcon(Constant.OK_FLAG_IMAGE_URL)); <END> } switch (risk) { case Alert.RISK_INFO: return DisplayUtils.getScaledIcon(Constant.INFO_FLAG_IMAGE_URL); case Alert.RISK_LOW: return DisplayUtils.getScaledIcon(Constant.LOW_FLAG_IMAGE_URL); case Alert.RISK_MEDIUM: return DisplayUtils.getScaledIcon(Constant.MED_FLAG_IMAGE_URL); case Alert.RISK_HIGH: return DisplayUtils.getScaledIcon(Constant.HIGH_FLAG_IMAGE_URL); } return null; }</code><technical_language>method other statements</technical_language>

Target:
public ImageIcon getIcon() { if (confidence == Alert.CONFIDENCE_FALSE_POSITIVE) { return DisplayUtils.getScaledIcon(Constant.OK_FLAG_IMAGE_URL); } switch (risk) { case Alert.RISK_INFO: return DisplayUtils.getScaledIcon(Constant.INFO_FLAG_IMAGE_URL); case Alert.RISK_LOW: return DisplayUtils.getScaledIcon(Constant.LOW_FLAG_IMAGE_URL); case Alert.RISK_MEDIUM: return DisplayUtils.getScaledIcon(Constant.MED_FLAG_IMAGE_URL); case Alert.RISK_HIGH: return DisplayUtils.getScaledIcon(Constant.HIGH_FLAG_IMAGE_URL); } return null; }
Source:
<code>public void afterPropertiesSet() { if (this.beanName == null) { LOGGER.error("The MessageHandler [" + this.handler + "] will be created without a 'componentName'. " + "Consider specifying the 'beanName' property on this ConsumerEndpointFactoryBean."); } else { try { if (!this.beanName.startsWith("org.springframework")) { MessageHandler targetHandler = this.handler; if (AopUtils.isAopProxy(targetHandler)) { Object target = ((Advised) targetHandler).getTargetSource().getTarget(); if (target instanceof MessageHandler) { targetHandler = (MessageHandler) target; } } if (targetHandler instanceof IntegrationObjectSupport) { ((IntegrationObjectSupport) targetHandler).setComponentName(this.beanName); } } } catch (Exception e) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Could not set component name for handler " + this.handler + " for " + this.beanName + " :" + e.getMessage()); } } } if (!(this.handler instanceof ReactiveMessageHandlerAdapter)) { adviceChain(); } else { <START> LOGGER.warn("the advice chain cannot be applied for 'ReactiveMessageHandler'"); <END> } if (this.channelResolver == null) { this.channelResolver = ChannelResolverUtils.getChannelResolver(this.beanFactory); } initializeEndpoint(); }</code><technical_language>s/for/to a/</technical_language>

Target:
public void afterPropertiesSet() { if (this.beanName == null) { LOGGER.error("The MessageHandler [" + this.handler + "] will be created without a 'componentName'. " + "Consider specifying the 'beanName' property on this ConsumerEndpointFactoryBean."); } else { try { if (!this.beanName.startsWith("org.springframework")) { MessageHandler targetHandler = this.handler; if (AopUtils.isAopProxy(targetHandler)) { Object target = ((Advised) targetHandler).getTargetSource().getTarget(); if (target instanceof MessageHandler) { targetHandler = (MessageHandler) target; } } if (targetHandler instanceof IntegrationObjectSupport) { ((IntegrationObjectSupport) targetHandler).setComponentName(this.beanName); } } } catch (Exception e) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Could not set component name for handler " + this.handler + " for " + this.beanName + " :" + e.getMessage()); } } } if (!(this.handler instanceof ReactiveMessageHandlerAdapter)) { adviceChain(); } else if (!CollectionUtils.isEmpty(this.adviceChain)) { LOGGER.warn("the advice chain cannot be applied to a 'ReactiveMessageHandler'"); } if (this.channelResolver == null) { this.channelResolver = ChannelResolverUtils.getChannelResolver(this.beanFactory); } initializeEndpoint(); }
Source:
<code>public static void copyResourceToProject(String resource, File destination) { try { InputStream inputStream = FileUtil.class.getResourceAsStream(resource); destination.getParentFile().mkdirs(); OutputStream outputStream = new FileOutputStream(destination); IOUtils.copy(inputStream, outputStream); <START> IOUtils.closeQuietly(outputStream); <END> } catch (IOException e) { throw new IllegalStateException(e); } }</code><technical_language>close inputstream well</technical_language>

Target:
public static void copyResourceToProject(String resource, File destination) { try { InputStream inputStream = FileUtil.class.getResourceAsStream(resource); destination.getParentFile().mkdirs(); OutputStream outputStream = new FileOutputStream(destination); IOUtils.copy(inputStream, outputStream); IOUtils.closeQuietly(inputStream); IOUtils.closeQuietly(outputStream); } catch (IOException e) { throw new IllegalStateException(e); } }
Source:
<code><START> public Rational add(Rational that) { <END> final int commonDenominator = this.denominator * that.denominator; return new Rational( this.numerator * that.denominator + that.numerator * this.denominator, commonDenominator); }</code><technical_language>a good methods a higher wider access modifier need to. track here, try [adhere practise](<LINK_0> noted in POLICIES. This (and a more) changed public package-private</technical_language>

Target:
Rational add(Rational that) { final int commonDenominator = this.denominator * that.denominator; return new Rational( this.numerator * that.denominator + that.numerator * this.denominator, commonDenominator); }
Source:
<code>void process(BitVector changedBits, BitVector deletedBits) { toEntityIntBags(changedBits, deletedBits); subscriptions.get(0).processAll(changed, deleted); <START> for (int i = 0, s = subscriptions.size(); s > i; i++) { <END> subscriptions.get(i).process(changed, deleted); } }</code><technical_language>i start 1, processed preceding LOC</technical_language>

Target:
void process(BitVector changedBits, BitVector deletedBits) { toEntityIntBags(changedBits, deletedBits); subscriptions.get(0).processAll(changed, deleted); for (int i = 1, s = subscriptions.size(); s > i; i++) { subscriptions.get(i).process(changed, deleted); } }