auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private SessionId handleAcrChange(SessionId session, List<Prompt> prompts) { if (session != null) { if (session.getState() == SessionIdState.AUTHENTICATED) { String sessionPrompts; if (prompts.contains(Prompt.LOGIN)) { sessionPrompts = prompt; } else { prompts.add(Prompt.LOGIN); sessionPrompts = session.getSessionAttributes().get("prompt"); sessionPrompts = StringUtils.isEmpty(sessionPrompts) ? "" : (sessionPrompts + " "); sessionPrompts = sessionPrompts + Prompt.LOGIN.getParamName(); } <START> session.getSessionAttributes().put("prompt", sessionPrompts); <END> session.setState(SessionIdState.UNAUTHENTICATED); String remoteIp = networkService.getRemoteIp(); session.getSessionAttributes().put(Constants.REMOTE_IP, remoteIp); sessionIdService.updateSessionId(session); sessionIdService.reinitLogin(session, false); } } return session; }</code><technical_language>do work replace 11 lines 4 ? if (!prompts.contains(Prompt.LOGIN)) { prompts.add(Prompt.LOGIN); } session.getSessionAttributes().put("prompt", StringUtils.implode(prompts, " ");</technical_language>

Target:
private SessionId handleAcrChange(SessionId session, List<Prompt> prompts) { if (session != null) { if (session.getState() == SessionIdState.AUTHENTICATED) { if (!prompts.contains(Prompt.LOGIN)) { prompts.add(Prompt.LOGIN); } session.getSessionAttributes().put("prompt", org.xdi.oxauth.model.util.StringUtils.implode(prompts, " ")); session.setState(SessionIdState.UNAUTHENTICATED); String remoteIp = networkService.getRemoteIp(); session.getSessionAttributes().put(Constants.REMOTE_IP, remoteIp); sessionIdService.updateSessionId(session); sessionIdService.reinitLogin(session, false); } } return session; }
Source:
<code>public boolean get(URIish uri, CredentialItem... items) throws UnsupportedCredentialItem { for (CredentialItem i : items) { if (i instanceof CredentialItem.Username) { ((CredentialItem.Username) i).setValue(username); continue; } if (i instanceof CredentialItem.Password) { ((CredentialItem.Password) i).setValue(password); continue; } if (i instanceof CredentialItem.StringType) { String promptText = i.getPromptText(); <START> if (promptText.matches("(?i)(password:|passphrase for)(.*)")) { END> ((CredentialItem.StringType) i).setValue(new String( password)); continue; } } throw new UnsupportedCredentialItem(uri, i.getClass().getName() + ":" + i.getPromptText()); } return true; }</code><technical_language>end ':'? Currently 'password' ':' 'passphrase for' suffixed everything. a space 'for' is required</technical_language>

Target:
public boolean get(URIish uri, CredentialItem... items) throws UnsupportedCredentialItem { for (CredentialItem i : items) { if (i instanceof CredentialItem.Username) { ((CredentialItem.Username) i).setValue(username); continue; } if (i instanceof CredentialItem.Password) { ((CredentialItem.Password) i).setValue(password); continue; } if (i instanceof CredentialItem.StringType) { String promptText = i.getPromptText(); if (promptText.matches("(?i)(\\bpassword\\b|\\bpassphrase\\b)(\\s)?(for)?(\\s)?(.*)?(:?)")) { ((CredentialItem.StringType) i).setValue(new String( password)); continue; } } throw new UnsupportedCredentialItem(uri, i.getClass().getName() + ":" + i.getPromptText()); } return true; }
Source:
<code>public ByteBuffer toByteBuffer() { final short numNonZeroRegisters = getNumNonZeroRegisters(); if (storageBuffer.remaining() == getNumBytesForDenseStorage() && numNonZeroRegisters < DENSE_THRESHOLD) { final ByteBuffer retVal = ByteBuffer.wrap(new byte[numNonZeroRegisters * 3 + getNumHeaderBytes()]); setVersion(retVal); setRegisterOffset(retVal, getRegisterOffset()); setNumNonZeroRegisters(retVal, numNonZeroRegisters); setMaxOverflowValue(retVal, getMaxOverflowValue()); setMaxOverflowRegister(retVal, getMaxOverflowRegister()); final int startPosition = getPayloadBytePosition(); retVal.position(getPayloadBytePosition(retVal)); final byte[] zipperBuffer = new byte[NUM_BYTES_FOR_BUCKETS]; ByteBuffer roStorageBuffer = storageBuffer.asReadOnlyBuffer(); roStorageBuffer.position(startPosition); roStorageBuffer.get(zipperBuffer); <START> final ByteOrder byteOrder = retVal.order(); <END> for (int i = 0; i < NUM_BYTES_FOR_BUCKETS; ++i) { if (zipperBuffer[i] != 0) { final short val = (short) (0xffff & (i + startPosition - initPosition)); retVal.putShort(val); retVal.put(zipperBuffer[i]); } } retVal.rewind(); return retVal.asReadOnlyBuffer(); } return storageBuffer.asReadOnlyBuffer(); }</code><technical_language>remove byteorder</technical_language>

Target:
public ByteBuffer toByteBuffer() { final ByteBuffer myBuffer = getStorageBuffer(); final int initialPosition = getInitPosition(); final short numNonZeroRegisters = getNumNonZeroRegisters(); if (myBuffer.remaining() == getNumBytesForDenseStorage() && numNonZeroRegisters < DENSE_THRESHOLD) { final ByteBuffer retVal = ByteBuffer.wrap(new byte[numNonZeroRegisters * 3 + getNumHeaderBytes()]); setVersion(retVal); setRegisterOffset(retVal, getRegisterOffset()); setNumNonZeroRegisters(retVal, numNonZeroRegisters); setMaxOverflowValue(retVal, getMaxOverflowValue()); setMaxOverflowRegister(retVal, getMaxOverflowRegister()); final int startPosition = getPayloadBytePosition(); retVal.position(getPayloadBytePosition(retVal)); final byte[] zipperBuffer = new byte[NUM_BYTES_FOR_BUCKETS]; ByteBuffer roStorageBuffer = myBuffer.asReadOnlyBuffer(); roStorageBuffer.position(startPosition); roStorageBuffer.get(zipperBuffer); final ByteOrder byteOrder = retVal.order(); for (int i = 0; i < NUM_BYTES_FOR_BUCKETS; ++i) { if (zipperBuffer[i] != 0) { final short val = (short) (0xffff & (i + startPosition - initialPosition)); retVal.putShort(val); retVal.put(zipperBuffer[i]); } } retVal.rewind(); return retVal.asReadOnlyBuffer(); } return myBuffer.asReadOnlyBuffer(); }
Source:
<code>public void finish() { <START> String shell = new DefaultShell().getText(); <END> new WaitUntil(new ShellWithTextIsAvailable(NEW_DOCKER_CONNECTION_SHELL)); new WaitUntil(new WidgetIsEnabled(new FinishButton())); new FinishButton().click(); new WaitWhile(new ShellWithTextIsAvailable(shell), TimePeriod.LONG); new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG); }</code><technical_language>do retrieve text of currently focused shell? if is a modal shell, some popup etc. this broken. New docker connection wizard change title while is opened? If not, remove this line 58 this text constant again</technical_language>

Target:
public void finish() { new WaitUntil(new ShellWithTextIsAvailable(NEW_DOCKER_CONNECTION_SHELL)); new WaitUntil(new WidgetIsEnabled(new FinishButton())); new FinishButton().click(); new WaitWhile(new ShellWithTextIsAvailable(NEW_DOCKER_CONNECTION_SHELL), TimePeriod.LONG); new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG); }
Source:
<code>private static void queryRewrite(PinotQuery pinotQuery) { invokeCompileTimeFunctions(pinotQuery); <START> rewriteSelections(pinotQuery.getSelectList()); <END> Expression filterExpression = pinotQuery.getFilterExpression(); if (filterExpression != null) { pinotQuery.setFilterExpression(updateComparisonPredicate(filterExpression)); } Expression havingExpression = pinotQuery.getHavingExpression(); if (havingExpression != null) { pinotQuery.setHavingExpression(updateComparisonPredicate(havingExpression)); } rewriteNonAggregationGroupByToDistinct(pinotQuery); Map<Identifier, Expression> aliasMap = extractAlias(pinotQuery.getSelectList()); applyAlias(aliasMap, pinotQuery); validate(aliasMap, pinotQuery); }</code><technical_language>query compilation time for SQL 5ms in cases (as compared micro-seconds for PQL). suspect is additional processing these. Tagging @siddharthteotia share findings</technical_language>

Target:
private static void queryRewrite(PinotQuery pinotQuery) { invokeCompileTimeFunctions(pinotQuery); rewriteSelections(pinotQuery.getSelectList()); Expression filterExpression = pinotQuery.getFilterExpression(); if (filterExpression != null) { pinotQuery.setFilterExpression(updateComparisonPredicate(filterExpression)); } Expression havingExpression = pinotQuery.getHavingExpression(); if (havingExpression != null) { pinotQuery.setHavingExpression(updateComparisonPredicate(havingExpression)); } applyOrdinals(pinotQuery); rewriteNonAggregationGroupByToDistinct(pinotQuery); Map<Identifier, Expression> aliasMap = extractAlias(pinotQuery.getSelectList()); applyAlias(aliasMap, pinotQuery); validate(aliasMap, pinotQuery); }
Source:
<code>public Integer call() throws Exception { PrintWriter writer = null; int passes = 0; int failures = 0; try { writer = writer(outputFile); ListMultimap<String, Interpretation> expected = read(expectedFile); ListMultimap<String, Interpretation> observed = read(observedFile); for (String sample : observed.keySet()) { <START> for (Interpretation e : expected.get(sample)) { <END> Genotype expectedGenotype = asGenotype(e); for (Haplotype expectedHaplotype : expectedGenotype.getHaplotypes()) { for (AlleleList expectedAlleleList : expectedHaplotype.getAlleleLists()) { if (shouldValidate(e, expectedAlleleList)) { for (Allele expectedAllele : expectedAlleleList.getAlleles()) { boolean match = false; for (Interpretation o : observed.get(sample)) { AlleleList observedAlleleList = asAlleleList(o); if (sameLocus(observedAlleleList, expectedAlleleList)) { if (shouldValidate(o, observedAlleleList)) { for (Allele observedAllele : observedAlleleList.getAlleles()) { if (matchByField(expectedAllele.getGlstring(), observedAllele.getGlstring()) >= resolution) { match = true; break; } } } } if (match) { passes++; } else { failures++; } } if (!printSummary) { writer.println((match ? "PASS" : "FAIL") + "\t" + sample + "\t" + expectedAllele); } } } } } } } if (printSummary) { writer.println("PASS\t" + passes); writer.println("FAIL\t" + failures); } return 0; } finally { try { writer.close(); } catch (Exception e) { e.printStackTrace(); System.exit(1); } } }</code><technical_language>spaces instead of tab characters</technical_language>

Target:
public Integer call() throws Exception { PrintWriter writer = null; int passes = 0; int failures = 0; try { writer = writer(outputFile); ListMultimap<String, Interpretation> expected = read(expectedFile); ListMultimap<String, Interpretation> observed = read(observedFile); for (String sample : observed.keySet()) { for (Interpretation e : expected.get(sample)) { Genotype expectedGenotype = asGenotype(e); for (Haplotype expectedHaplotype : expectedGenotype.getHaplotypes()) { for (AlleleList expectedAlleleList : expectedHaplotype.getAlleleLists()) { if (shouldValidate(e, expectedAlleleList)) { for (Allele expectedAllele : expectedAlleleList.getAlleles()) { boolean match = false; for (Interpretation o : observed.get(sample)) { AlleleList observedAlleleList = asAlleleList(o); if (sameLocus(observedAlleleList, expectedAlleleList)) { for (Allele observedAllele : observedAlleleList.getAlleles()) { if (matchByField(expectedAllele.getGlstring(), observedAllele.getGlstring()) >= resolution) { match = true; break; } } } if (match) { passes++; } else { failures++; } } if (!printSummary) { writer.println((match ? "PASS" : "FAIL") + "\t" + sample + "\t" + expectedAllele); } } } } } } } if (printSummary) { writer.println("PASS\t" + passes); writer.println("FAIL\t" + failures); } return 0; } finally { try { writer.close(); } catch (Exception e) { e.printStackTrace(); System.exit(1); } } }
Source:
<code>public void updateTick (World world, int x, int y, int z, Random random) { if (!world.isRemote) { <START> this.func_149853_b(world, random, x, y, z); <END> } }</code><technical_language>I this called here. Growth update tick distinct growth bonemeal (the probability of distinct is important, least). suggest moving func_149853_b code a separate method so: java public void attemptGrowth(World world, int x, int y, int z, Random random, int probability) { int meta = world.getBlockMetadata(x, y, z); EnumSaplingType saplingType = getSaplingType(meta); if (random.nextInt(probability) == 0 && canGrow(saplingType, meta, world, x, y, z)) func_149879_c(world, x, y, z, random); } calling updateTick func_149853_b</technical_language>

Target:
public void updateTick (World world, int x, int y, int z, Random random) { if (!world.isRemote) { this.checkAndDropBlock(world, x, y, z); int meta = world.getBlockMetadata(x, y, z); EnumSaplingType saplingType = getSaplingType(meta); if (random.nextInt(saplingType.growthProbability) == 0 && hasEnoughLightToGrow(saplingType, world, x, y, z)) func_149879_c(world, x, y, z, random); } }
Source:
<code>public Meal(String name, ArrayList<Food> ingredients) { this.name = name; <START> this.ingredients = ingredients; <END> }</code><technical_language>Is this a shallow copy? Do need deep copy? giving a reference ingredients copying array</technical_language>

Target:
public Meal(String name, ArrayList<Food> ingredients) { this.name = name; this.ingredients = new ArrayList<Food>(); for(Food f : ingredients) { this.ingredients.add(f); } }
Source:
<code>protected void demandUnload(SynchronizedResourceSet resourceSet, Resource resource, IProgressMonitor monitor) { <START> lock.lock(); <END> try { unloadingPool.execute(new ResourceUnloader(resourceSet, resource, monitor)); } finally { lock.unlock(); } }</code><technical_language>do need lock this code? ExecutorService.execute is thread safe,</technical_language>

Target:
protected void demandUnload(SynchronizedResourceSet resourceSet, Resource resource, IProgressMonitor monitor) { unloadingPool.execute(new ResourceUnloader(resourceSet, resource, monitor)); }
Source:
<code>public void onAttach(final Activity activity) { super.onAttach(activity); this.activity = (AbstractBindServiceActivity) activity; this.application = (WalletApplication) activity.getApplication(); this.config = application.getConfiguration(); <START> hideBalance = config.getHideBalanceOnLaunch(); <END> this.wallet = application.getWallet(); this.loaderManager = LoaderManager.getInstance(this); showLocalBalance = getResources().getBoolean(R.bool.show_local_balance); }</code><technical_language>this requirement: If setting for Hide Balance = balance hidden returning home screen (regardless of state) hideBalance set in onResume()</technical_language>

Target:
public void onAttach(final Activity activity) { super.onAttach(activity); this.activity = (AbstractBindServiceActivity) activity; this.application = (WalletApplication) activity.getApplication(); this.config = application.getConfiguration(); this.wallet = application.getWallet(); this.loaderManager = LoaderManager.getInstance(this); hideBalance = config.getHideBalance(); showLocalBalance = getResources().getBoolean(R.bool.show_local_balance); }
Source:
<code>public EventResult submitEventSync(Event event, Callable<EventResult> callable) { FutureTask<EventResult> task = submitTaskInternal(event, callable); if (task != null) { try { return task.get(); } catch (CancellationException e) { log.infoFormat("Failed to submit event using submitEventSync (the event was cancelled)- pool {0} , exception {1}", event.getStoragePoolId(), <START> e); <END> } catch (Exception e) { log.errorFormat("Failed at submitEventSync, for pool {0} with exception {1}", event.getStoragePoolId(), e); } } return null; }</code><technical_language>Do want entire stacktrace</technical_language>

Target:
public EventResult submitEventSync(Event event, Callable<EventResult> callable) { FutureTask<EventResult> task = submitTaskInternal(event, callable); if (task != null) { try { return task.get(); } catch (CancellationException e) { log.debugFormat("Failed to submit event using submitEventSync (the event was cancelled)- pool {0} , exception {1}", event.getStoragePoolId(), e); } catch (Exception e) { log.errorFormat("Failed at submitEventSync, for pool {0} with exception {1}", event.getStoragePoolId(), e); } } return null; }
Source:
<code>private void importReceipt() { <START> permissionsDelegate.checkPermissionAndMaybeAsk(Manifest.permission.READ_EXTERNAL_STORAGE) <END> .subscribe(() -> { try { final ImportPhotoPdfDialogFragment fragment = new ImportPhotoPdfDialogFragment(); fragment.show(getChildFragmentManager(), ImportPhotoPdfDialogFragment.TAG); } catch (IllegalStateException ex) { floatingActionMenu.post(() -> { floatingActionMenu.open(true); final ImportPhotoPdfDialogFragment fragment = new ImportPhotoPdfDialogFragment(); fragment.show(getChildFragmentManager(), ImportPhotoPdfDialogFragment.TAG); }); } }, throwable -> Toast.makeText(getContext(), getString(R.string.toast_no_storage_permissions), Toast.LENGTH_SHORT).show()); }</code><technical_language>this piece is required here. rather, need if file attempt import is Android M a file scheme (ie file://...). If a content schema (ie content://), require this. for prompt for permissions fact if user is import a file:// schemed object? I a similar flow in place for user opens image file of Smart Receipts clicks send/share icon attach Smart Receipts. Check out IntentImportInformationInteractor.java's process(Intent) method handles types</technical_language>

Target:
private void importReceipt() { final ImportPhotoPdfDialogFragment fragment = new ImportPhotoPdfDialogFragment(); fragment.show(getChildFragmentManager(), ImportPhotoPdfDialogFragment.TAG); }
Source:
<code>public Diff getPrimeRefining() { <START> Diff main = null; <END> if (primeRefining != null) { main = primeRefining; } else { for (Diff refBy : this.getRefinedBy()) { if (refBy instanceof ReferenceChange) { ReferenceChange rc = (ReferenceChange)refBy; if (this.getView() == rc.getValue()) { main = rc; break; } } else if (refBy instanceof AttributeChange) { AttributeChange ac = (AttributeChange)refBy; if (this.getView() == ac.getValue()) { main = ac; break; } } } } return main; }</code><technical_language>replace test (primeRefining == null) execute statements else block. return primeRefining field "if", main local variable is useful</technical_language>

Target:
public Diff getPrimeRefining() { if (primeRefining == null) { for (Diff refBy : this.getRefinedBy()) { if (refBy instanceof ReferenceChange) { ReferenceChange rc = (ReferenceChange)refBy; if (this.getView() == rc.getValue()) { primeRefining = rc; break; } } else if (refBy instanceof AttributeChange) { AttributeChange ac = (AttributeChange)refBy; if (this.getView() == ac.getValue()) { primeRefining = ac; break; } } } } return primeRefining; }
Source:
<code>public void validate(File templateFile) throws IOException { SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); Schema schema; Validator validator; try { schema = factory.newSchema(getSchemaFile()); validator = schema.newValidator(); validator.validate(new StreamSource(templateFile)); } catch (SAXException e) { log.error(e.getMessage(), e); <START> throw new APIException(e); <END> } }</code><technical_language>@ivange94 please APIException(String messageKey, Object[] parameters, Throwable cause) a messageKey = code message.properties; is e need remember exceptions shown user devs forced catch them. good if internationalized</technical_language>

Target:
public void validate(File templateFile) throws IOException { final SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); final Schema schema; final Validator validator; try { schema = factory.newSchema(getSchemaFile()); validator = schema.newValidator(); validateMetatags(templateFile); validator.validate(new StreamSource(templateFile)); } catch (SAXException e) { log.error(e.getMessage(), e); throw new APIException("radiology.report.template.validation.error", null, e); } }
Source:
<code>public Direction getDirection(ITmfEvent event) { try { <START> IKernelAnalysisEventLayout layout = TRACE_LAYOUTS.get(event.getTrace()); <END> if (layout == null) { return null; } String evname = event.getName(); if (layout.eventsNetworkReceive().contains(evname)) { return Direction.EFFECT; } else if (layout.eventsNetworkSend().contains(evname)) { return Direction.CAUSE; } } catch (ExecutionException e) { } return null; }</code><technical_language>do getUnchecked() if load() method throw exception. ExecutionException is a wrapper allows catching potential exceptions get thrown load()</technical_language>

Target:
public Direction getDirection(ITmfEvent event) { IKernelAnalysisEventLayout layout = TRACE_LAYOUTS.get(event.getTrace()); if (layout == null) { return null; } String evname = event.getName(); if (layout.eventsNetworkReceive().contains(evname)) { return Direction.EFFECT; } else if (layout.eventsNetworkSend().contains(evname)) { return Direction.CAUSE; } return null; }
Source:
<code>public void setUp() throws Exception { this.baseDir = this.temp.newFolder("base"); final File file1 = new File(this.baseDir.getAbsolutePath() + "/a.out"); final File file2 = new File(this.baseDir.getAbsolutePath() + "/testdir"); final File file3 = new File(file2.getAbsolutePath() + "/b.out"); final File file4 = new File(file2.getAbsolutePath() + "/testdir"); final File file5 = new File(file2.getAbsolutePath() + "/c.out"); final File file6 = new File(file4.getAbsolutePath() + "/c1.out"); final File file7 = new File(file4.getAbsolutePath() + "/c2.out"); file1.createNewFile(); file2.mkdir(); file3.createNewFile(); file4.mkdir(); file5.createNewFile(); file6.createNewFile(); file7.createNewFile(); <START> createBigDir(this.baseDir.getAbsolutePath()); <END> byte[] fileData = new byte[]{1, 2, 3}; FileOutputStream out = new FileOutputStream(file1); out.write(fileData); out.close(); fileData = new byte[]{2, 3, 4}; out = new FileOutputStream(file3); out.write(fileData); out.close(); this.sourceDir = this.temp.newFolder("src"); FileUtils.copyDirectory(this.baseDir, this.sourceDir); this.destDir = this.temp.newFolder("dest"); }</code><technical_language>Thanks for improving tests. suggest a separate test for special long argument case. This tests more focused intention clearer</technical_language>

Target:
public void setUp() throws Exception { this.baseDir = this.temp.newFolder("base"); final File file1 = new File(this.baseDir.getAbsolutePath() + "/a.out"); final File file2 = new File(this.baseDir.getAbsolutePath() + "/testdir"); final File file3 = new File(file2.getAbsolutePath() + "/b.out"); final File file4 = new File(file2.getAbsolutePath() + "/testdir"); final File file5 = new File(file2.getAbsolutePath() + "/c.out"); final File file6 = new File(file4.getAbsolutePath() + "/c1.out"); final File file7 = new File(file4.getAbsolutePath() + "/c2.out"); file1.createNewFile(); file2.mkdir(); file3.createNewFile(); file4.mkdir(); file5.createNewFile(); file6.createNewFile(); file7.createNewFile(); byte[] fileData = new byte[]{1, 2, 3}; FileOutputStream out = new FileOutputStream(file1); out.write(fileData); out.close(); fileData = new byte[]{2, 3, 4}; out = new FileOutputStream(file3); out.write(fileData); out.close(); this.sourceDir = this.temp.newFolder("src"); FileUtils.copyDirectory(this.baseDir, this.sourceDir); this.destDir = this.temp.newFolder("dest"); }
Source:
<code>private UserContext(final CountryCode country, final Locale language, final List<Locale> fallbackLanguages, final ZoneId zoneId, final Reference<Zone> zone, final Reference<CustomerGroup> customerGroup, final Reference<Channel> channel) { this.country = country; this.language = language; this.fallbackLanguages = fallbackLanguages; this.zoneId = zoneId; <START> this.zone = zone; <END> this.customerGroup = Optional.ofNullable(customerGroup); this.channel = Optional.ofNullable(channel); }</code><technical_language>zone (reference) zoneID completely things</technical_language>

Target:
private UserContext(final CountryCode country, final Locale language, final List<Locale> fallbackLanguages, final ZoneId zoneId, final Reference<Zone> zone, final Reference<CustomerGroup> customerGroup, final Reference<Channel> channel) { this.country = country; this.language = language; this.fallbackLanguages = fallbackLanguages; this.zoneId = zoneId; this.zone = zone; this.customerGroup = Optional.ofNullable(customerGroup); this.channel = Optional.ofNullable(channel); this.currency = Monetary.getCurrency("EUR"); this.priceFinder = PriceFinder.of(currency, country, this.customerGroup, this.channel); this.priceFormatter = PriceFormatter.of(language); }
Source:
<code>private void zoom(ITmfChartTimeProvider viewer, final int <START> count, final <END> int x) { long newDuration = viewer.getWindowDuration(); if( newDuration == 0) { return; } double ratio = 1.0; if (count > 0) { ratio = ZOOM_FACTOR; newDuration = Math.round(ZOOM_FACTOR * newDuration); } else { ratio = 1.0 / ZOOM_FACTOR; newDuration = (long) Math.ceil(newDuration * ratio); } newDuration = Math.max(MIN_WINDOW_SIZE, newDuration); IAxis xAxis = getChart().getAxisSet().getXAxis(0); long timeAtXPos = limitXDataCoordinate(xAxis.getDataCoordinate(x)) + viewer.getTimeOffset(); long newWindowStartTime = timeAtXPos - Math.round(ratio * (timeAtXPos - viewer.getWindowStartTime())); long newWindowEndTime = validateWindowEndTime(newWindowStartTime, newWindowStartTime + newDuration); newWindowStartTime = validateWindowStartTime(newWindowStartTime); viewer.updateWindow(newWindowStartTime, newWindowEndTime); }</code><technical_language>split method, protect count=0</technical_language>

Target:
private void zoom(ITmfChartTimeProvider viewer, final int count, final int x) { long newDuration = viewer.getWindowDuration(); if (newDuration == 0 || count == 0) { return; } double ratio = 1.0; if (count > 0) { ratio = ZOOM_FACTOR; newDuration = Math.round(ZOOM_FACTOR * newDuration); } else { ratio = 1.0 / ZOOM_FACTOR; newDuration = (long) Math.ceil(newDuration * ratio); } newDuration = Math.max(MIN_WINDOW_SIZE, newDuration); IAxis xAxis = getChart().getAxisSet().getXAxis(0); long timeAtXPos = limitXDataCoordinate(xAxis.getDataCoordinate(x)) + viewer.getTimeOffset(); long newWindowStartTime = timeAtXPos - Math.round(ratio * (timeAtXPos - viewer.getWindowStartTime())); long newWindowEndTime = validateWindowEndTime(newWindowStartTime, newWindowStartTime + newDuration); newWindowStartTime = validateWindowStartTime(newWindowStartTime); xAxis.setRange(new Range(newWindowStartTime - viewer.getTimeOffset(), newWindowEndTime - viewer.getTimeOffset())); viewer.updateWindow(newWindowStartTime, newWindowEndTime); }
Source:
<code>private static List<StreamSet> groupJoinedStreams(JobGraph jobGraph) { Multimap<OperatorSpec, InputOperatorSpec> joinOpSpecToInputOpSpecs = OperatorSpecGraphAnalyzer.getJoinToInputOperatorSpecs( jobGraph.getApplicationDescriptorImpl().getInputOperators().values()); <START> Map<String, TableDescriptor> tableDescMap = jobGraph.getTables().stream() <END> .collect(Collectors.toMap(TableDescriptor::getTableId, desc -> desc)); List<StreamSet> streamSets = new ArrayList<>(); for (OperatorSpec joinOpSpec : joinOpSpecToInputOpSpecs.keySet()) { Collection<InputOperatorSpec> joinedInputOpSpecs = joinOpSpecToInputOpSpecs.get(joinOpSpec); StreamSet streamSet = getStreamSet(joinOpSpec.getOpId(), joinedInputOpSpecs, jobGraph); if (joinOpSpec instanceof StreamTableJoinOperatorSpec) { StreamTableJoinOperatorSpec streamTableJoinOperatorSpec = (StreamTableJoinOperatorSpec) joinOpSpec; TableDescriptor tableDescriptor = tableDescMap.get(streamTableJoinOperatorSpec.getTableId()); if (tableDescriptor instanceof LocalTableDescriptor) { LocalTableDescriptor localTableDescriptor = (LocalTableDescriptor) tableDescriptor; Collection<String> sideInputs = ListUtils.emptyIfNull(localTableDescriptor.getSideInputs()); Iterable<StreamEdge> sideInputStreams = sideInputs.stream().map(jobGraph::getStreamEdge)::iterator; Iterable<StreamEdge> streams = streamSet.getStreamEdges(); streamSet = new StreamSet(streamSet.getSetId(), Iterables.concat(streams, sideInputStreams)); } } streamSets.add(streamSet); } return Collections.unmodifiableList(streamSets); }</code><technical_language>Minor: tableDescriptors</technical_language>

Target:
private static List<StreamSet> groupJoinedStreams(JobGraph jobGraph) { Multimap<OperatorSpec, InputOperatorSpec> joinOpSpecToInputOpSpecs = OperatorSpecGraphAnalyzer.getJoinToInputOperatorSpecs( jobGraph.getApplicationDescriptorImpl().getInputOperators().values()); Map<String, TableDescriptor> tableDescriptors = jobGraph.getTables().stream() .collect(Collectors.toMap(TableDescriptor::getTableId, Function.identity())); List<StreamSet> streamSets = new ArrayList<>(); for (OperatorSpec joinOpSpec : joinOpSpecToInputOpSpecs.keySet()) { Collection<InputOperatorSpec> joinedInputOpSpecs = joinOpSpecToInputOpSpecs.get(joinOpSpec); StreamSet streamSet = getStreamSet(joinOpSpec.getOpId(), joinedInputOpSpecs, jobGraph); if (joinOpSpec instanceof StreamTableJoinOperatorSpec) { StreamTableJoinOperatorSpec streamTableJoinOperatorSpec = (StreamTableJoinOperatorSpec) joinOpSpec; TableDescriptor tableDescriptor = tableDescriptors.get(streamTableJoinOperatorSpec.getTableId()); if (tableDescriptor instanceof LocalTableDescriptor) { LocalTableDescriptor localTableDescriptor = (LocalTableDescriptor) tableDescriptor; Collection<String> sideInputs = ListUtils.emptyIfNull(localTableDescriptor.getSideInputs()); Iterable<StreamEdge> sideInputStreams = sideInputs.stream().map(jobGraph::getStreamEdge)::iterator; Iterable<StreamEdge> streams = streamSet.getStreamEdges(); streamSet = new StreamSet(streamSet.getSetId(), Iterables.concat(streams, sideInputStreams)); } } streamSets.add(streamSet); } return Collections.unmodifiableList(streamSets); }
Source:
<code>private static void addAllFieldsFromRelation(SelectAnalysis context, AnalyzedRelation relation) { for (Symbol field : relation.outputs()) { <START> if (!isSysColumn(field)) { <END> context.add(Symbols.pathFromSymbol(field), field); } } }</code><technical_language>suggestion var columnIdent = Symbols.pathFromSymbol(field) if (!columnIdent.isSystemColumn()) { context.add(columnIdent, field); }</technical_language>

Target:
private static void addAllFieldsFromRelation(SelectAnalysis context, AnalyzedRelation relation) { for (Symbol field : relation.outputs()) { var columnIdent = Symbols.pathFromSymbol(field); if (!columnIdent.isSystemColumn()) { context.add(Symbols.pathFromSymbol(field), field); } } }
Source:
<code>private void removeDetachedServers(List<VDS> existingServers, List<GlusterServerInfo> fetchedServers) { for (final VDS server : existingServers) { if (isRemovableStatus(server.getStatus()) && serverDetached(server, fetchedServers)) { log.debugFormat("Server {0} has been removed directly using the gluster CLI. Removing it from engine as well.", server.getName()); logUtil.logServerMessage(server, AuditLogType.GLUSTER_SERVER_REMOVED_FROM_CLI); <START> logUtil.logAuditMessage(server.getVdsGroupId(), null, server, <END> AuditLogType.GLUSTER_SERVER_REMOVED_FROM_CLI, new HashMap<String, String>() { { put(GlusterConstants.VDS_GROUP_NAME, server.getVdsGroupName()); } }); try { removeServerFromDb(server); runVdsCommand(VDSCommandType.RemoveVds, new RemoveVdsVDSCommandParameters(server.getId())); } catch (Exception e) { log.errorFormat("Error while removing server {0} from database!", server.getName(), e); } } } }</code><technical_language>logServerMessage internally calls logAuditMessage. in effect, calling this twice. I fix in GlusterAuditLogUtil - in logAuditMessage, if server is passed, server.getVdsGroupId setVdsGroupId in AuditLogableBase</technical_language>

Target:
private void removeDetachedServers(List<VDS> existingServers, List<GlusterServerInfo> fetchedServers) { for (final VDS server : existingServers) { if (isRemovableStatus(server.getStatus()) && serverDetached(server, fetchedServers)) { log.debugFormat("Server {0} has been removed directly using the gluster CLI. Removing it from engine as well.", server.getName()); logUtil.logServerMessage(server, AuditLogType.GLUSTER_SERVER_REMOVED_FROM_CLI); try { removeServerFromDb(server); runVdsCommand(VDSCommandType.RemoveVds, new RemoveVdsVDSCommandParameters(server.getId())); } catch (Exception e) { log.errorFormat("Error while removing server {0} from database!", server.getName(), e); } } } }
Source:
<code>private void refreshIcons() { Iterator<Stereotype> iter = getUMLElement().getAppliedStereotypes().iterator(); Stereotype stereotype = iter.next(); Image icon = ElementUtil.getStereotypeImage(getUMLElement(), stereotype, SHAPE_CONSTANT); if (icon != null) { <START> if (icon.getLocation() != "" && icon.getLocation() != null) { <END> try { getPrimaryShape().setIcon(icon.getLocation()); } catch (MalformedURLException e) { Activator.log.error(icon.getLocation() + " " + e.getLocalizedMessage(), e); } } else { getPrimaryShape().setIcon(Activator.getShape(getUMLElement(), stereotype, false)); } } }</code><technical_language>Replace a constant</technical_language>

Target:
private void refreshIcons() { Iterator<Stereotype> iter = getUMLElement().getAppliedStereotypes().iterator(); Stereotype stereotype = iter.next(); Image icon = ElementUtil.getStereotypeImage(getUMLElement(), stereotype, SHAPE_CONSTANT); if (icon != null) { if (icon.getLocation() != null && !icon.getLocation().isEmpty()) { try { ShapeNamedElementFigure shape = getPrimaryShape(); if (shape != null) { shape.setIcon(icon.getLocation()); } } catch (MalformedURLException e) { Activator.log.error(String.format("$0 $2", icon.getLocation(), e.getLocalizedMessage()), e); } } else { getPrimaryShape().setIcon(Activator.getShape(getUMLElement(), stereotype, false)); } } }
Source:
<code>private void submitFirewallConfiguration() throws KuraException { <START> short timeout = 30; END> this.pendingFirewallConfigurationChange = true; this.configurationService.snapshot(); while (this.pendingFirewallConfigurationChange && timeout > 0) { timeout -= 0.5; try { Thread.sleep(500); } catch (InterruptedException e) { } } if (this.pendingFirewallConfigurationChange) { logger.warn("Did not receive a firewall configuration change event"); this.pendingFirewallConfigurationChange = false; } }</code><technical_language>this need set float</technical_language>

Target:
private void submitFirewallConfiguration() throws KuraException { short timeout = 30000; final short sleep = 500; this.pendingFirewallConfigurationChange = true; this.configurationService.snapshot(); while (this.pendingFirewallConfigurationChange && timeout > 0) { timeout -= sleep; try { Thread.sleep(sleep); } catch (InterruptedException e) { } } if (this.pendingFirewallConfigurationChange) { logger.warn("Did not receive a firewall configuration change event"); this.pendingFirewallConfigurationChange = false; } }
Source:
<code>protected Command getCommand(IEvaluationContext context) { Command result = UnexecutableCommand.INSTANCE; TransactionalEditingDomain editingDomain = getEditingDomain(context); EObject selectedElement = getSelectedElement(); if (selectedElement instanceof NamedElement) { final NamedElement namedElement = (NamedElement) selectedElement; final String label = UMLLabelInternationalization.getInstance().getLabelWithoutUML(namedElement); if (null != label && LabelInternationalizationPreferencesUtils.getInternationalizationPreference(namedElement)) { AbstractTransactionalCommand cmd = new <START> RenameNamedElementLabelCommand( <END> editingDomain, "ChangeLabelCommand", namedElement, label, "Rename label...", "New label:"); result = new GMFtoEMFCommandWrapper(cmd); } else { final String currentName = namedElement.getName(); if (currentName != null) { result = new RenameElementCommand( editingDomain, "Rename", namedElement, currentName, "Rename...", "New name:"); } } } return result; }</code><technical_language>discuss Nicolas, this class is useless. LabelInternationalizationUtils.getSetLabelCommand I</technical_language>

Target:
protected Command getCommand(IEvaluationContext context) { Command result = UnexecutableCommand.INSTANCE; TransactionalEditingDomain editingDomain = getEditingDomain(context); EObject selectedElement = getSelectedElement(); if (selectedElement instanceof NamedElement) { final NamedElement namedElement = (NamedElement) selectedElement; final String label = UMLLabelInternationalization.getInstance().getLabelWithoutUML(namedElement); if (null != label && LabelInternationalizationPreferencesUtils.getInternationalizationPreference(namedElement)) { AbstractTransactionalCommand cmd = new RenameNamedElementLabelCommand(editingDomain, "ChangeLabelCommand", namedElement, label, Messages.RenameNamedElementHandler_Label_DialogTitle); result = new GMFtoEMFCommandWrapper(cmd); } else { final String currentName = namedElement.getName(); if (currentName != null) { EStructuralFeature nameFeature = namedElement.eClass().getEStructuralFeature("name"); result = new RenameElementCommand(editingDomain, "Rename", namedElement, currentName, nameFeature, Messages.RenameNamedElementHandler_Name_DialogTitle, Messages.RenameNamedElementHandler_Name_DialogMessage); } } } return result; }
Source:
<code>public void addCustomHeaders() throws URISyntaxException { Map<String, String> inputHeaders = new LinkedHashMap<>(); inputHeaders.put("header1", "value1"); inputHeaders.put("header2", "value2"); SyncManager.addCustomRequestHeaders(inputHeaders); Map<String, String> outputHeaders = SyncManager.getCustomRequestHeaders(new URI("http://localhost")); <START> assertEquals(2, outputHeaders.size()); <END> }</code><technical_language>get values for header1 header2</technical_language>

Target:
public void addCustomHeaders() throws URISyntaxException { Map<String, String> inputHeaders = new LinkedHashMap<>(); inputHeaders.put("header1", "value1"); inputHeaders.put("header2", "value2"); SyncManager.addCustomRequestHeaders(inputHeaders); Map<String, String> outputHeaders = SyncManager.getCustomRequestHeaders(new URI("http://localhost")); assertEquals(2, outputHeaders.size()); Iterator<Map.Entry<String, String>> it = outputHeaders.entrySet().iterator(); Map.Entry<String, String> header1 = it.next(); assertEquals("header1", header1.getKey()); assertEquals("value1", header1.getValue()); Map.Entry<String, String> header2 = it.next(); assertEquals("header2", header2.getKey()); assertEquals("value2", header2.getValue()); }
Source:
<code>public String getLogFileParentDir() { ArrayList<String> elements = new ArrayList<String>(); <START> if(mPrefix.length() > 0) { <END> elements.add(mPrefix); } if(mTopic.length() > 0) { elements.add(mTopic); } return StringUtils.join(elements, "/"); }</code><technical_language>If want safe, do: if (mPrefix != null && mPrefix.length()) > 0 ) { coding style side, a space 'if'</technical_language>

Target:
public String getLogFileParentDir() { ArrayList<String> elements = new ArrayList<String>(); if (mPrefix != null && mPrefix.length() > 0) { elements.add(mPrefix); } if (mTopic != null && mTopic.length() > 0) { elements.add(mTopic); } return StringUtils.join(elements, "/"); }
Source:
<code>public boolean removeBlobStore(PartitionId id) { <START> return partitionTostore.remove(id) == null ? false : true; <END> }</code><technical_language>Simpler: return partitionTostore.remove(id) != null; Also, partitionToStore (camel case)</technical_language>

Target:
public boolean removeBlobStore(PartitionId id) { return partitionToStore.remove(id) != null; }
Source:
<code>public XmlStringBuilder toXML(XmlEnvironment xmlEnvironment) { <START> XmlStringBuilder xml = new XmlStringBuilder(this); <END> xml.attribute("type", type) .rightAngleBracket(); xml.escape(uri.toString()); xml.closeElement(this); return xml; }</code><technical_language>appears unrelated this change (and wrong)</technical_language>

Target:
public XmlStringBuilder toXML(XmlEnvironment xmlEnvironment) { XmlStringBuilder xml = new XmlStringBuilder(this, xmlEnvironment); xml.attribute("type", type) .rightAngleBracket(); xml.escape(uri.toString()); xml.closeElement(this); return xml; }
Source:
<code>public static byte[] renderExceptionToPng(Exception e) { final StringBuilder sb = new StringBuilder(); sb.append("Exception occurred: "); final String stack = Throwables.getStackTraceAsString(e) ; <START> sb.append(getFirstNLines(stack, 5)); <END> final String text = sb.toString(); final String[] lines = text.split("\n"); BufferedImage img = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB); Graphics2D g2d = img.createGraphics(); g2d.setFont(font); int lineWidth = 0; int lineHeight = 0; FontMetrics fm = g2d.getFontMetrics(); for (String line : lines) { lineWidth = Math.max(lineWidth, fm.stringWidth(line)); lineHeight = Math.max(lineHeight, fm.getHeight()); } g2d.dispose(); final int paddingLeft = 10; final int paddingTop = 10; final int imgWidth = paddingLeft + lineWidth; final int imgHeight = paddingTop + lineHeight * lines.length; img = new BufferedImage(imgWidth, imgHeight, BufferedImage.TYPE_INT_RGB); g2d = img.createGraphics(); g2d.setFont(font); g2d.setColor(Color.WHITE); g2d.fillRect(0, 0, imgWidth, imgHeight); fm = g2d.getFontMetrics(); g2d.setColor(Color.BLACK); int yOffset = 0; for (String line : lines) { g2d.drawString(line, paddingLeft, yOffset + fm.getAscent()); yOffset += lineHeight; } g2d.dispose(); final ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { ImageIO.write(img, "png", baos); } catch (IOException ex) { throw new RuntimeException(e); } return baos.toByteArray(); }</code><technical_language>Is this want configurable a system property</technical_language>

Target:
public static byte[] renderExceptionToPng(Exception e) { final StringBuilder sb = new StringBuilder(); sb.append("Exception occurred: "); final String stack = Throwables.getStackTraceAsString(e) ; sb.append(getFirstNLines(stack, MAX_STACKTRACE_LINES)); final String text = sb.toString(); final String[] lines = text.split("\n"); BufferedImage img = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB); Graphics2D g2d = img.createGraphics(); g2d.setFont(font); int lineWidth = 0; int lineHeight = 0; FontMetrics fm = g2d.getFontMetrics(); for (String line : lines) { lineWidth = Math.max(lineWidth, fm.stringWidth(line)); lineHeight = Math.max(lineHeight, fm.getHeight()); } g2d.dispose(); final int paddingLeft = 10; final int paddingTop = 10; final int imgWidth = paddingLeft + lineWidth; final int imgHeight = paddingTop + lineHeight * lines.length; img = new BufferedImage(imgWidth, imgHeight, BufferedImage.TYPE_INT_RGB); g2d = img.createGraphics(); g2d.setFont(font); g2d.setColor(Color.WHITE); g2d.fillRect(0, 0, imgWidth, imgHeight); fm = g2d.getFontMetrics(); g2d.setColor(Color.BLACK); int yOffset = 0; for (String line : lines) { g2d.drawString(line, paddingLeft, yOffset + fm.getAscent()); yOffset += lineHeight; } g2d.dispose(); final ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { ImageIO.write(img, "png", baos); } catch (IOException ex) { throw new RuntimeException(e); } return baos.toByteArray(); }
Source:
<code>private String sendMessageForActionDelete(String correlationID, String message, ParameterResolutionContext prc) throws SenderException, TimeOutException { if (StringUtils.isEmpty(message)) { throw new SenderException(getLogPrefix() + "input string cannot be empty but must contain a documentId"); } CmisObject object = null; try { object = getCmisObject(message); } catch (CmisObjectNotFoundException e) { if (StringUtils.isNotEmpty(getResultOnNotFound())) { log.info(getLogPrefix() + "document with id [" + message + "] not found", e); return getResultOnNotFound(); } else { throw new SenderException(e); } } if (object.hasAllowableAction(Action.CAN_DELETE_OBJECT)) { Document suppDoc = (Document) object; suppDoc.delete(true); <START> return "Document Deleted"; <END> } else { throw new SenderException(getLogPrefix() + "Document cannot be deleted"); } }</code><technical_language>return a XML output instead</technical_language>

Target:
private String sendMessageForActionDelete(String correlationID, String message, ParameterResolutionContext prc) throws SenderException, TimeOutException { if (StringUtils.isEmpty(message)) { throw new SenderException(getLogPrefix() + "input string cannot be empty but must contain a documentId"); } CmisObject object = null; try { object = getCmisObject(message); } catch (CmisObjectNotFoundException e) { if (StringUtils.isNotEmpty(getResultOnNotFound())) { log.info(getLogPrefix() + "document with id [" + message + "] not found", e); return getResultOnNotFound(); } else { throw new SenderException(e); } } if (object.hasAllowableAction(Action.CAN_DELETE_OBJECT)) { Document suppDoc = (Document) object; suppDoc.delete(true); return correlationID; } else { throw new SenderException(getLogPrefix() + "Document cannot be deleted"); } }
Source:
<code>public static void checkLatitude(double latitude) { <START> if (Double.isNaN(latitude) || Double.isInfinite(latitude) || latitude < MIN_LATITUDE || latitude > MAX_LATITUDE) { throw new RuntimeException("Latitude must be between -90 and 90"); } <END> }</code><technical_language>suggestion Preconditions.checkArgument(latitude >= MIN_LATITUDE && latitude <= MAX_LATITUDE, "Latitude -90 90");</technical_language>

Target:
private static void checkLatitude(double latitude) { Preconditions .checkArgument(latitude >= MIN_LATITUDE && latitude <= MAX_LATITUDE, "Latitude must be between -90 and 90"); }
Source:
<code><START> public ConfidenceQualifiedNumber getAverage() { <END> return getAverage(System.currentTimeMillis(), getConfig(TIMESTAMP_GRACE_TIME).toMilliseconds()); }</code><technical_language>call getAverage() method, TIMESTAMP_GRACE_TIME is used. I missing something</technical_language>

Target:
public ConfidenceQualifiedNumber getAverage() { return getAverage(System.currentTimeMillis(), 0); }
Source:
<code>public ListenableFuture<?> truncateExportToSeqNo(StreamStartAction action, long sequenceNumber, long generationIdCreated) { return m_es.submit(new Runnable() { @Override public void run() { try { m_tupleCount = sequenceNumber; if (action == StreamStartAction.RECOVER) { if (sequenceNumber < 0) { exportLog.error("Snapshot does not include valid truncation point for partition " + m_partitionId); return; } if (m_committedBuffers.truncateToSequenceNumber(sequenceNumber, generationIdCreated)) { m_gapTracker = new ExportSequenceNumberTracker(); } else { m_gapTracker.truncateAfter(sequenceNumber); } if (exportLog.isDebugEnabled()) { exportLog.debug("Truncating tracker via snapshot truncation to " + sequenceNumber + ", tracker map is " + m_gapTracker.toString()); } } if (action == StreamStartAction.REJOIN) { <START> if (m_committedBuffers.deletePBDFromOlderGeneration(generationIdCreated)) { <END> m_gapTracker = new ExportSequenceNumberTracker(); } } resetStateInRejoinOrRecover(sequenceNumber, action); handleDrainedSource(null); } catch (Throwable t) { VoltDB.crashLocalVoltDB("Error while trying to truncate export to seq " + sequenceNumber, true, t); } } }); }</code><technical_language>select a simpler name; I propose 'dropStaleBuffers' 'dropStaleBlocks'</technical_language>

Target:
public ListenableFuture<?> truncateExportToSeqNo(StreamStartAction action, long sequenceNumber, long generationIdCreated) { return m_es.submit(new Runnable() { @Override public void run() { try { if (action == StreamStartAction.RECOVER) { if (sequenceNumber < 0) { exportLog.error("Snapshot does not include valid truncation point for partition " + m_partitionId); return; } if (m_committedBuffers.deleteStaleBlocks(generationIdCreated)) { m_gapTracker = m_committedBuffers.scanForGap(); } m_committedBuffers.truncateToSequenceNumber(sequenceNumber); m_gapTracker.truncateAfter(sequenceNumber); } if (action == StreamStartAction.REJOIN) { if (m_committedBuffers.deleteStaleBlocks(generationIdCreated)) { m_gapTracker = m_committedBuffers.scanForGap(); } } if (exportLog.isDebugEnabled()) { exportLog.debug("Truncating tracker via snapshot truncation to " + sequenceNumber + ", action is " + action + ", generationId is " + generationIdCreated + ", tracker map is " + m_gapTracker.toString()); } m_tupleCount = sequenceNumber; resetStateInRejoinOrRecover(sequenceNumber, action); handleDrainedSource(null); } catch (Throwable t) { VoltDB.crashLocalVoltDB("Error while trying to truncate export to seq " + sequenceNumber, true, t); } } }); }
Source:
<code>public void setTopics(String topics) { <START> this.topics = topics.split(","); <END> }</code><technical_language>Figured this is new code.. fine semver check point</technical_language>

Target:
public void setTopics(String topics) { this.topics = Iterables.toArray(Splitter.on(',').trimResults().omitEmptyStrings().split(topics), String.class); }