auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public Image changeDpi(URI sourceUri, int dpi) throws IOException { if (!new File(sourceUri).exists()) { throw new FileNotFoundException("sourceUri must exist: " + sourceUri.getRawPath()); } if (dpi <= 0) { throw new IllegalArgumentException("dpi must be > 0, but was " + Integer.toString(dpi)); } File tempFile = File.createTempFile("dpiChangedImage-", RAW_IMAGE_FORMAT, TMPDIR); try { <START> tempFile.deleteOnExit(); <END> URI imageUri = tempFile.toURI(); ImageConverter imageConverter = new ImageConverter(sourceUri); imageConverter.addResult(imageUri).resizeToDpi(dpi); logger.info("Resizing as to DPI", sourceUri, tempFile, dpi); imageConverter.run(); logger.trace("Loading {}", tempFile); Image buffer = ImageIO.read(tempFile); logger.trace("{} successfully loaded", tempFile); return buffer; } finally { logger.debug("Deleting {}", tempFile); tempFile.delete(); logger.trace("Successfully deleted {}", tempFile); } }</code><technical_language>add this deleteOnExit if delete this file in finally block</technical_language>

Target:
public Image changeDpi(URI sourceUri, int dpi) throws IOException { if (!new File(sourceUri).exists()) { throw new FileNotFoundException("sourceUri must exist: " + sourceUri.getRawPath()); } if (dpi <= 0) { throw new IllegalArgumentException("dpi must be > 0, but was " + Integer.toString(dpi)); } return summarize("dpiChangedImage-", RAW_IMAGE_FORMAT, sourceUri, λ -> λ.resizeToDpi(dpi), "Resizing as to DPI", dpi); }
Source:
<code>public void testInt3166GroovyScriptExecutingMessageProcessorPerformance() throws Exception { final Message<?> message = new GenericMessage<Object>("test"); ScriptSource scriptSource = new StaticScriptSource("Thread.sleep(100)", Script.class.getName()); final MessageProcessor<Object> processor = new GroovyScriptExecutingMessageProcessor(scriptSource); StopWatch stopWatch = new StopWatch(); stopWatch.start(); ExecutorService executor = Executors.newFixedThreadPool(10); for (int i = 0; i < 10; i++) { executor.execute(new Runnable() { @Override public void run() { processor.processMessage(message); } }); } executor.shutdown(); assertTrue(executor.awaitTermination(2, TimeUnit.SECONDS)); stopWatch.stop(); <START> assertThat(stopWatch.getTotalTimeMillis(), Matchers.lessThan(1000L)); <END> }</code><technical_language>Hmmm - I verify (concurrency), timers (2 1 second) a tight for comfort - especially a busy CI build server. passing in AtomicIntegers variables var1.incrementAndGet(); Thread.sleep(100); var2.set(Math.max(var1.get(), var2.get()); var1.decrementAndGet() ... assertTrue(var2.get() > 1)</technical_language>

Target:
public void testInt3166GroovyScriptExecutingMessageProcessorPerformance() throws Exception { final Message<?> message = new GenericMessage<Object>("test"); final AtomicInteger var1 = new AtomicInteger(); final AtomicInteger var2 = new AtomicInteger(); String script = "var1.incrementAndGet(); Thread.sleep(100); var2.set(Math.max(var1.get(), var2.get())); var1.decrementAndGet()"; ScriptSource scriptSource = new StaticScriptSource(script, Script.class.getName()); final MessageProcessor<Object> processor = new GroovyScriptExecutingMessageProcessor(scriptSource, new ScriptVariableGenerator() { @Override public Map<String, Object> generateScriptVariables(Message<?> message) { Map<String, Object> variables = new HashMap<String, Object>(2); variables.put("var1", var1); variables.put("var2", var2); return variables; } }); ExecutorService executor = Executors.newFixedThreadPool(10); for (int i = 0; i < 10; i++) { executor.execute(new Runnable() { @Override public void run() { processor.processMessage(message); } }); } executor.shutdown(); assertTrue(executor.awaitTermination(10, TimeUnit.SECONDS)); assertTrue(var2.get() > 1); }
Source:
<code>public MetricData getDatapointsForRange(Locator locator, Range range, Granularity gran) { RollupType rollupType = null; String rollupTypeStr = metaCache.safeGet(locator, rollupTypeCacheKey); if ( rollupTypeStr != null ) { rollupType = RollupType.fromString(rollupTypeStr); } if ( rollupType == null ) { <START> rollupType = RollupType.BF_BASIC; <END> } return getNumericMetricDataForRange(locator, range, gran, rollupType); }</code><technical_language>initialize rollupType RollupType.BF_BASIC beginning of method, right? a cleaner, stands out for some reason</technical_language>

Target:
public MetricData getDatapointsForRange(Locator locator, Range range, Granularity gran) { RollupType rollupType = RollupType.BF_BASIC; String rollupTypeStr = metaCache.safeGet(locator, rollupTypeCacheKey); if ( rollupTypeStr != null ) { rollupType = RollupType.fromString(rollupTypeStr); } return getNumericMetricDataForRange(locator, range, gran, rollupType); }
Source:
<code>private int compareOrdered(final NakadiCursor c1, final NakadiCursor c2) { if (!c2.isInitial()) { return -1; } Iterator<Timeline> timelineIterator = null; NakadiCursor first = c1; if (first.getTimeline().getLatestPosition() == null) { timelineIterator = createTimelinesIterator(first.getEventType(), first.getTimeline().getOrder()); first = NakadiCursor.of(timelineIterator.next(), first.getPartition(), first.getOffset()); } while (first.getTimeline().getOrder() != c2.getTimeline().getOrder()) { <START> final boolean isFirstAtEndOfTimeline = first.isLast(); <END> if (!isFirstAtEndOfTimeline) { return -1; } if (null == timelineIterator) { timelineIterator = createTimelinesIterator(first.getEventType(), first.getTimeline().getOrder() + 1); } final Timeline nextTimeline = timelineIterator.next(); final String initialOffset = StaticStorageWorkerFactory.get(nextTimeline).getBeforeFirstOffset(); first = NakadiCursor.of(nextTimeline, first.getPartition(), initialOffset); } return first.getOffset().compareTo(c2.getOffset()); }</code><technical_language>I this variable inlined</technical_language>

Target:
private int compareOrdered(final NakadiCursor c1, final NakadiCursor c2) { if (!c2.isInitial()) { return -1; } Iterator<Timeline> timelineIterator = null; NakadiCursor first = c1; if (first.getTimeline().getLatestPosition() == null) { timelineIterator = createTimelinesIterator(first.getEventType(), first.getTimeline().getOrder()); first = NakadiCursor.of(timelineIterator.next(), first.getPartition(), first.getOffset()); } while (first.getTimeline().getOrder() != c2.getTimeline().getOrder()) { if (!first.isLast()) { return -1; } if (null == timelineIterator) { timelineIterator = createTimelinesIterator(first.getEventType(), first.getTimeline().getOrder() + 1); } final Timeline nextTimeline = timelineIterator.next(); final String initialOffset = StaticStorageWorkerFactory.get(nextTimeline).getBeforeFirstOffset(); first = NakadiCursor.of(nextTimeline, first.getPartition(), initialOffset); } return first.getOffset().compareTo(c2.getOffset()); }
Source:
<code>public List<AttributeStatement> createEvidenceStatements(final List accessConstentValues, final List evidenceInstanceAccessConsentValues) { List<AttributeStatement> statements; <START> if (CollectionUtils.isEmpty(accessConstentValues)) { <END> LOG.debug("No Access Consent found for Evidence"); } if (CollectionUtils.isEmpty(evidenceInstanceAccessConsentValues)) { LOG.debug("No Instance Access Consent found for Evidence"); } statements = OpenSAML2ComponentBuilder.getInstance().createEvidenceStatements(accessConstentValues, evidenceInstanceAccessConsentValues, NHIN_NS); LOG.trace("SamlCallbackHandler.createEvidenceStatements() -- End"); return statements; }</code><technical_language>2 if conditions log statements unnecessary. rew3ord write log statement in OpenSaml2Builder.createEvidenceStatements method</technical_language>

Target:
public List<AttributeStatement> createEvidenceStatements(final List accessConstentValues, final List evidenceInstanceAccessConsentValues) { List<AttributeStatement> statements; statements = OpenSAML2ComponentBuilder.getInstance().createEvidenceStatements(accessConstentValues, evidenceInstanceAccessConsentValues, NHIN_NS); LOG.trace("SamlCallbackHandler.createEvidenceStatements() -- End"); return statements; }
Source:
<code><START> public void andWaitForSuccess() { <END> task.getUnchecked(); }</code><technical_language>andWaitForSuccess() return result</technical_language>

Target:
public T andWaitForSuccess() { return task.getUnchecked(); }
Source:
<code><START> public void restoreDefaults(Organization organization) { <END> final Organization persistedOrg = organizationRepo.findOne(organization.getId()); Organization parentOrg = organizationRepo.findOne(organization.getParentOrganization().getId()); persistedOrg.getAggregateWorkflowSteps().clear(); parentOrg.getAggregateWorkflowSteps().forEach(ws -> { persistedOrg.addAggregateWorkflowStep(ws); }); organizationRepo.save(persistedOrg); }</code><technical_language>is this simple. I set organizations hierarchically. ![screen shot 2017-09-04 12 53 14 pm](<LINK_1> I modified child organization, creating new workflow steps original them. I errors reset Test College. succeed. ![screen shot 2017-09-04 12 52 31 pm](<LINK_0> I errors reset Test Department. succeed. ![screen shot 2017-09-04 12 53 04 pm](<LINK_2> Test Degree is able reset workflow, if cleaned workflow step created original</technical_language>

Target:
public Organization restoreDefaults(Organization organization) { Organization persistedOrg = organizationRepo.findOne(organization.getId()); Organization parentOrg = organizationRepo.findOne(organization.getParentOrganization().getId()); persistedOrg.clearAggregatedWorkflowStepsFromHiarchy(); parentOrg.getAggregateWorkflowSteps().forEach(ws -> { persistedOrg.addAggregateWorkflowStep(ws); }); return organizationRepo.save(persistedOrg); }
Source:
<code>public int run(String[] arg0) throws Exception { final int port = getConf().getInt(TRACE_SERVER_HTTP_PORT_KEY, DEFAULT_HTTP_PORT); BasicConfigurator.configure(); final String home = getConf().get(TRACE_SERVER_HTTP_JETTY_HOME_KEY, DEFAULT_HTTP_HOME); Server server = new Server(port); ProtectionDomain domain = Main.class.getProtectionDomain(); URL location = domain.getCodeSource().getLocation(); WebAppContext webapp = new WebAppContext(); webapp.setContextPath("/"); if (home.length() != 0) { webapp.setTempDirectory(new File(home)); } <START> String warPath = location.toString().split("target")[0] + "build/trace-webapp-demo.war"; <END> webapp.setWar(warPath); server.setHandler(webapp); server.start(); server.join(); return 0; }</code><technical_language>oh, deploying war. need remove this do a standard resources-based embedded web app. please open a new JIRA for this well</technical_language>

Target:
public int run(String[] arg0) throws Exception { final int port = getConf().getInt(TRACE_SERVER_HTTP_PORT_KEY, DEFAULT_HTTP_PORT); BasicConfigurator.configure(); final String home = getConf().get(TRACE_SERVER_HTTP_JETTY_HOME_KEY, DEFAULT_HTTP_HOME); ProtectionDomain domain = Main.class.getProtectionDomain(); URL location = domain.getCodeSource().getLocation(); String webappDirLocation = location.toString().split("target")[0] +"src/main/webapp"; Server server = new Server(port); WebAppContext root = new WebAppContext(); root.setContextPath(home); root.setDescriptor(webappDirLocation + "/WEB-INF/web.xml"); root.setResourceBase(webappDirLocation); root.setParentLoaderPriority(true); server.setHandler(root); server.start(); server.join(); return 0; }
Source:
<code>public PendingIntent createPendingIntent(Context context, int pendingIntentId, Intent intent) { <START> return PendingIntent.getService(context, 0, intent, 0); <END> }</code><technical_language>sending pendingIntentId passed this method instead of 0</technical_language>

Target:
public PendingIntent createPendingIntent(Context context, int pendingIntentId, Intent intent) { return PendingIntent.getService(context, pendingIntentId, intent, 0); }
Source:
<code>public static ByteRange fromStartOffset(long startOffset) throws InvalidByteRangeException { if (startOffset < 0) { <START> throw new InvalidByteRangeException(startOffset, UNDEFINED_OFFSET); <END> } return new ByteRange(startOffset, UNDEFINED_OFFSET, ByteRangeType.FROM_START_OFFSET); }</code><technical_language>if this exception class knew type - print relevant details in exception</technical_language>

Target:
public static ByteRange fromStartOffset(long startOffset) { if (startOffset < 0) { throw new IllegalArgumentException("Invalid range offsets provided for ByteRange; startOffset=" + startOffset); } return new ByteRange(startOffset, UNDEFINED_OFFSET, ByteRangeType.FROM_START_OFFSET); }
Source:
<code>public void configurePipeline(PipelineConfigurer pipelineConfigurer) { FailureCollector collector = pipelineConfigurer.getStageConfigurer().getFailureCollector(); config.validate(collector); collector.getOrThrowException(); if (config.containsMacro(NAME_FORMAT)) { for (FileFormat f: FileFormat.values()) { try { pipelineConfigurer.usePlugin(ValidatingInputFormat.PLUGIN_TYPE, f.name().toLowerCase(), f.name().toLowerCase(), config.getRawProperties()); } catch (InvalidPluginConfigException e) { LOG.warn("Failed to register format '{}', which means it cannot be used when the pipeline is run." + <START> "Missing properties: {}, invalid properties: {}", <END> f.name(), e.getMissingProperties(), e.getInvalidProperties()); } } return; } FileFormat fileFormat = config.getFormat(); Schema schema = null; ValidatingInputFormat validatingInputFormat = pipelineConfigurer.usePlugin(ValidatingInputFormat.PLUGIN_TYPE, fileFormat.name().toLowerCase(), fileFormat.name().toLowerCase(), config.getRawProperties()); FormatContext context = new FormatContext(collector, null); validateInputFormatProvider(context, fileFormat, validatingInputFormat); if (validatingInputFormat != null) { schema = validatingInputFormat.getSchema(context); } validatePathField(collector, schema); pipelineConfigurer.getStageConfigurer().setOutputSchema(schema); }</code><technical_language>indentation 2 spaces 4</technical_language>

Target:
public void configurePipeline(PipelineConfigurer pipelineConfigurer) { FailureCollector collector = pipelineConfigurer.getStageConfigurer().getFailureCollector(); config.validate(collector); collector.getOrThrowException(); if (config.containsMacro(NAME_FORMAT)) { for (FileFormat f: FileFormat.values()) { try { pipelineConfigurer.usePlugin(ValidatingInputFormat.PLUGIN_TYPE, f.name().toLowerCase(), f.name().toLowerCase(), config.getRawProperties()); } catch (InvalidPluginConfigException e) { LOG.warn("Failed to register format '{}', which means it cannot be used when the pipeline is run. " + "Missing properties: {}, invalid properties: {}", f.name(), e.getMissingProperties(), e.getInvalidProperties().stream().map(InvalidPluginProperty::getName).collect(Collectors.toList())); } } return; } FileFormat fileFormat = config.getFormat(); Schema schema = null; ValidatingInputFormat validatingInputFormat = pipelineConfigurer.usePlugin(ValidatingInputFormat.PLUGIN_TYPE, fileFormat.name().toLowerCase(), fileFormat.name().toLowerCase(), config.getRawProperties()); FormatContext context = new FormatContext(collector, null); validateInputFormatProvider(context, fileFormat, validatingInputFormat); if (validatingInputFormat != null) { schema = validatingInputFormat.getSchema(context); } validatePathField(collector, schema); pipelineConfigurer.getStageConfigurer().setOutputSchema(schema); }
Source:
<code>private static List<String> loadFromResources(String fileName) { try { Path resource = Paths.get(LicenseChecker.class.getResource("/" + fileName).toURI()); List<String> result = Files .readAllLines(resource) .stream() .filter(line -> !line.startsWith("#") && !line.isEmpty()) .collect(Collectors.toList()); LOG.debug("Loaded items from resource {}", result.size(), fileName); return result; } catch (Throwable e) { <START> LOG.warn("Error while loading resource", e); <END> } return Collections.emptyList(); }</code><technical_language>fail hard implies some programming error, mislead people thinking is wrong licensing</technical_language>

Target:
private static List<String> loadFromResources(String fileName) { try { Path resource = Paths.get(LicenseChecker.class.getResource("/" + fileName).toURI()); List<String> result = Files .readAllLines(resource) .stream() .filter(line -> !line.startsWith("#") && !line.isEmpty()) .collect(Collectors.toList()); LOG.debug("Loaded items from resource {}", result.size(), fileName); return result; } catch (Throwable e) { throw new RuntimeException("Error while loading resource", e); } }
Source:
<code>public void writeRows(Stream<List<Object>> rows, String sheetName) { try { Sheet sheet = workbook.getSheet(sheetName); rows.forEach( <START> row -> { <END> internalWriteRow(row, sheet, sheet.getLastRowNum() + 1); }); } catch (RuntimeException e) { throw new XlsxWriterException(e); } }</code><technical_language>SonarLint reports in IntelliJ: Code smell Minor squid:S1602 Lamdbas statement nest this statement in a block</technical_language>

Target:
public void writeRows(Stream<List<Object>> rows, String sheetName) { try { Sheet sheet = workbook.getSheet(sheetName); rows.forEach(row -> writeRow(row, sheet, sheet.getLastRowNum() + 1)); } catch (RuntimeException e) { throw new XlsxWriterException(e); } }
Source:
<code>public void smallerCounterexampleFoundIsCorrectEvenIfOriginalFailureIsNotNamed() { final String propertyName = "mySuperProperty"; final String[] originalArguments = {"first", "second", "third"}; final String[] arguments = {"first"}; final long[] seeds = {12345, 8842}; final AssertionError smallerFailure = new AssertionError(); final AssertionError originalFailure = new AssertionError(); final AssertionError actual = PropertyFalsified.smallerCounterexampleFound( propertyName, originalArguments, arguments, seeds, smallerFailure, originalFailure); final String expected = "Property named 'mySuperProperty' failed:\n" + "With arguments: [first]\n" + "First arguments found to also provoke a failure: [first, second, third]\n" + "Seeds for reproduction: [12345, 8842]"; Assert.assertEquals(expected, actual.getMessage()); <START> } <END></code><technical_language>modify src/site/markdown/usage/seed.md reflect new format of failure message</technical_language>

Target:
public void smallerCounterexampleFoundIsCorrectEvenIfOriginalFailureIsNotNamed() { String propertyName = "mySuperProperty"; String[] originalArguments = {"first", "second", "third"}; String[] arguments = {"first"}; long[] seeds = {12345, 8842}; AssertionError smallerFailure = new AssertionError(); AssertionError originalFailure = new AssertionError(); AssertionError actual = PropertyFalsified.smallerCounterexampleFound( propertyName, originalArguments, arguments, seeds, smallerFailure, originalFailure); String expected = "Property named 'mySuperProperty' failed:\n" + "With arguments: [first]\n" + "First arguments found to also provoke a failure: [first, second, third]\n" + "Seeds for reproduction: [12345, 8842]"; assertEquals(expected, actual.getMessage()); }
Source:
<code>public void testInsertNewFieldIfDataTypeIsStructureWhenDataTypeIsStructureButHasFields() { <START> final DataType dataType = mock(DataType.class); <END> when(dataTypeSelectComponent.getValue()).thenReturn(structure); when(dataType.getSubDataTypes()).thenReturn(asList(mock(DataType.class), mock(DataType.class))); doReturn(dataType).when(listItem).getDataType(); listItem.insertNewFieldIfDataTypeIsStructure(); verify(listItem, never()).insertNestedField(); }</code><technical_language>please update method name. I name **IfDataTypeIsStructure** **WhenDataTypeIsStructure**</technical_language>

Target:
public void testInsertNewFieldIfDataTypeIsStructureWhenDataTypeIsStructureButHasFields() { final DataType dataType = mock(DataType.class); final String hash = "hash"; when(dataTypeSelectComponent.getValue()).thenReturn(structure); when(dataType.getSubDataTypes()).thenReturn(asList(mock(DataType.class), mock(DataType.class))); doReturn(dataType).when(listItem).getDataType(); listItem.insertNewFieldIfDataTypeIsStructure(hash); verify(dataTypeList, never()).insertNestedField(anyString()); }
Source:
<code>private boolean loadMappingsFromOldWorkspace(Map<String, Integer> map) { String STATE_FILE = ".fileTypes"; IPath pluginStateLocation = TeamPlugin.getPlugin().getStateLocation().append(STATE_FILE); File f = pluginStateLocation.toFile(); if (!f.exists()) return false; try (DataInputStream input = new DataInputStream(new FileInputStream(f))) { <START> map.putAll(readOldFormatExtensionMappings(input)); <END> } catch (IOException ex) { TeamPlugin.log(IStatus.ERROR, ex.getMessage(), ex); return false; } return true; }</code><technical_language>Lost file deletion, happen 'input' is closed</technical_language>

Target:
private boolean loadMappingsFromOldWorkspace(Map<String, Integer> map) { String STATE_FILE = ".fileTypes"; IPath pluginStateLocation = TeamPlugin.getPlugin().getStateLocation().append(STATE_FILE); File f = pluginStateLocation.toFile(); if (!f.exists()) return false; try { DataInputStream input = new DataInputStream(new FileInputStream(f)); try { map.putAll(readOldFormatExtensionMappings(input)); } finally { input.close(); f.delete(); } } catch (IOException ex) { TeamPlugin.log(IStatus.ERROR, ex.getMessage(), ex); return false; } return true; }
Source:
<code>public void error(String message, String sourceName, int line, String lineSource, int lineOffset) { <START> System.out.println("Error : " + message); <END> }</code><technical_language>Logger instead of System.out.println</technical_language>

Target:
public void error(String message, String sourceName, int line, String lineSource, int lineOffset) { log.warn("Error : " + message); }
Source:
<code>public void write(LittleEndianOutputStream stream) throws IOException; public void write(final File idxFile) throws IOException; <START> public default void write(final Path indexPath) throws IOException { <END> write(indexPath.toFile()); }</code><technical_language>I idea default throw OperationUnsupportedException call toFile() work of time fail</technical_language>

Target:
public void write(LittleEndianOutputStream stream) throws IOException; public default void write(final File idxFile) throws IOException { write(idxFile.toPath()); }
Source:
<code>private static void iteratePublicStaticIntFields(DetailAST objBlock, Consumer<String> consumer) throws CheckstyleException { for (DetailAST member = objBlock.getFirstChild(); member != null; member = member.getNextSibling()) { <START> boolean isVariables = member.getType() == TokenTypes.VARIABLES; <END> if (isVariables && isPublicStaticFinalIntField(member.getFirstChild())) { final DetailAST modifiers = member.getFirstChild().findFirstToken(TokenTypes.MODIFIERS); final String firstJavadocSentence = getFirstJavadocSentence(modifiers); if (firstJavadocSentence != null) { consumer.accept(getName(member.getFirstChild()) + "=" + firstJavadocSentence.trim()); } } } }</code><technical_language>changes in this file. Please revert</technical_language>

Target:
private static void iteratePublicStaticIntFields(DetailAST objBlock, Consumer<String> consumer) throws CheckstyleException { for (DetailAST member = objBlock.getFirstChild(); member != null; member = member.getNextSibling()) { final boolean isVariables = member.getType() == TokenTypes.VARIABLES; if (isVariables && isPublicStaticFinalIntField(member.getFirstChild())) { final DetailAST modifiers = member.getFirstChild().findFirstToken(TokenTypes.MODIFIERS); DetailAST variableDef = member.getFirstChild(); while (variableDef.getNextSibling() != null) { final String firstJavadocSentence = getFirstJavadocSentence(modifiers); if (firstJavadocSentence != null) { consumer.accept(getName(variableDef) + "=" + firstJavadocSentence.trim()); } variableDef = variableDef.getNextSibling(); if (variableDef.getType() == TokenTypes.COMMA) { variableDef = variableDef.getNextSibling(); } } } } }
Source:
<code>public static void createFromResourceUrl(Context context, final URL resourceUrl, final AuthenticationParamCallback callback) { if (callback == null) { throw new IllegalArgumentException("callback"); } Logger.v(TAG, "createFromResourceUrl"); final Handler handler = new Handler(context.getMainLooper()); sThreadExecutor.submit(new Runnable() { @Override public void run() { <START> HashMap<String, String> headers = new HashMap<>(); <END> headers.put(WebRequestHandler.HEADER_ACCEPT, WebRequestHandler.HEADER_ACCEPT_JSON); final HttpWebResponse webResponse; try { webResponse = sWebRequest.sendGet(resourceUrl, headers); try { onCompleted(null, parseResponse(webResponse)); } catch (ResourceAuthenticationChallengeException exc) { onCompleted(exc, null); } } catch (IOException e) { onCompleted(e, null); } } void onCompleted(final Exception exception, final AuthenticationParameters param) { handler.post(new Runnable() { @Override public void run() { callback.onCompleted(exception, param); } }); } }); }</code><technical_language>Map<String, String> headers = new HashMap</technical_language>

Target:
public static void createFromResourceUrl(Context context, final URL resourceUrl, final AuthenticationParamCallback callback) { if (callback == null) { throw new IllegalArgumentException("callback"); } Logger.v(TAG, "createFromResourceUrl"); final Handler handler = new Handler(context.getMainLooper()); sThreadExecutor.submit(new Runnable() { @Override public void run() { final Map<String, String> headers = new HashMap<>(); headers.put(WebRequestHandler.HEADER_ACCEPT, WebRequestHandler.HEADER_ACCEPT_JSON); final HttpWebResponse webResponse; try { webResponse = sWebRequest.sendGet(resourceUrl, headers); try { onCompleted(null, parseResponse(webResponse)); } catch (ResourceAuthenticationChallengeException exc) { onCompleted(exc, null); } } catch (IOException e) { onCompleted(e, null); } } void onCompleted(final Exception exception, final AuthenticationParameters param) { handler.post(new Runnable() { @Override public void run() { callback.onCompleted(exception, param); } }); } }); }
Source:
<code><START> private Guid getDisksStorageDomainId() { <END> Disk disk = getVm().getDiskMap().values().iterator().next(); if (disk.getDiskStorageType() == DiskStorageType.IMAGE) { return ((DiskImage) disk).getstorage_ids().get(0); } else { return Guid.Empty; } }</code><technical_language>This is relevant Images. if hadnling a LUN disk</technical_language>

Target:
private Guid getDisksStorageDomainId() { for (Disk disk : getVm().getDiskMap().values()) { if (disk.getDiskStorageType() == DiskStorageType.IMAGE) { return ((DiskImage) disk).getstorage_ids().get(0); } } return Guid.Empty; }
Source:
<code>private Object lookupAttribute(long deviceId, String attributeName, boolean lookupServer, boolean lookupConfig) { Object result = null; Device device = getById(deviceId); if (device != null) { result = device.getAttributes().get(attributeName); if (result == null && lookupGroupsAttribute) { long groupId = device.getGroupId(); while (groupId != 0) { Group group = Context.getGroupsManager().getById(groupId); if (group != null) { result = group.getAttributes().get(attributeName); if (result != null) { break; } groupId = group.getGroupId(); } else { groupId = 0; } } } if (result == null) { if (lookupConfig) { result = Context.getConfig().getString(attributeName); <START> } else if (lookupServer) { <END> Server server = Context.getPermissionsManager().getServer(); result = server.getAttributes().get(attributeName); } } } return result; }</code><technical_language>I sense remove else. In future potentially want both</technical_language>

Target:
private Object lookupAttribute(long deviceId, String attributeName, boolean lookupServer, boolean lookupConfig) { Object result = null; Device device = getById(deviceId); if (device != null) { result = device.getAttributes().get(attributeName); if (result == null && lookupGroupsAttribute) { long groupId = device.getGroupId(); while (groupId != 0) { Group group = Context.getGroupsManager().getById(groupId); if (group != null) { result = group.getAttributes().get(attributeName); if (result != null) { break; } groupId = group.getGroupId(); } else { groupId = 0; } } } if (result == null && lookupServer) { Server server = Context.getPermissionsManager().getServer(); result = server.getAttributes().get(attributeName); } if (result == null && lookupConfig) { result = Context.getConfig().getString(attributeName); } } return result; }
Source:
<code>public String visitAndExpression(AndFilterExpression expression) { <START> FilterExpression left = expression.getLeft(); <END> FilterExpression right = expression.getRight(); boolean skipLeft = cannotEvaluate(left); boolean skipRight = cannotEvaluate(right); if (skipLeft && skipRight) { throw new IllegalStateException(TWO_NON_FILTERING_EXPRESSIONS); } else if (skipLeft) { return right.accept(this); } else if (skipRight) { return left.accept(this); } return "(" + left.accept(this) + " AND " + right.accept(this) + ")"; }</code><technical_language>DataStore transactions receive FilterExpressions a FALSE_USER_CHECK_EXPRESSION a NO_EVALUATION_EXPRESSION. separation of concerns</technical_language>

Target:
public String visitAndExpression(AndFilterExpression expression) { FilterExpression left = expression.getLeft(); FilterExpression right = expression.getRight(); return "(" + left.accept(this) + " AND " + right.accept(this) + ")"; }
Source:
<code>public Image getColumnImage(Object element, int columnIndex) { if (columnIndex == 1 && element instanceof CounterTreeViewerEntry && fCheckboxTree.getChecked(element)) { <START> int imageWidth = getTreeViewer().getTree().getColumn(columnIndex).getWidth(); <END> int imageHeight = getTreeViewer().getTree().getItemHeight(); Image image = new Image(Display.getDefault(), imageWidth, imageHeight); GC gc = new GC(image); gc.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); gc.fillRectangle(0, 0, imageWidth, imageHeight); String seriesName = ((CounterTreeViewerEntry) element).getFullPath(); IYAppearance appearance = fCounterChartViewer.getAppearance(Objects.requireNonNull(seriesName)); RGBColor rgb = appearance.getColor(); Color lineColor = new Color(Display.getDefault(), rgb.getRed(), rgb.getGreen(), rgb.getBlue()); gc.setForeground(lineColor); gc.setLineWidth(LINE_WIDTH); gc.setLineStyle(LineStyle.valueOf(appearance.getStyle()).ordinal()); gc.drawLine(0, imageHeight / 2, imageWidth, imageHeight / 2); gc.dispose(); lineColor.dispose(); return image; } return null; }</code><technical_language>width of column time item is checked for time. column is resized item is toggled, update width. tree/tree item needs layed out again. a shorter width change instead. I some success calling pack() column width</technical_language>

Target:
public Image getColumnImage(Object element, int columnIndex) { if (columnIndex == 1 && element instanceof CounterTreeViewerEntry && fCheckboxTree.getChecked(element)) { int imageWidth = getTreeViewer().getTree().getColumn(columnIndex).getWidth(); int imageHeight = getTreeViewer().getTree().getItemHeight(); Image image = new Image(Display.getDefault(), imageWidth, imageHeight); GC gc = new GC(image); gc.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); gc.fillRectangle(0, 0, imageWidth, imageHeight); String seriesName = ((CounterTreeViewerEntry) element).getFullPath(); IYAppearance appearance = fCounterChartViewer.getAppearance(Objects.requireNonNull(seriesName)); RGBColor rgb = appearance.getColor(); Color lineColor = new Color(Display.getDefault(), rgb.getRed(), rgb.getGreen(), rgb.getBlue()); gc.setForeground(lineColor); gc.setLineWidth(appearance.getWidth()); gc.setLineStyle(LineStyle.valueOf(appearance.getStyle()).ordinal()); gc.drawLine(0, imageHeight / 2, imageWidth, imageHeight / 2); gc.dispose(); lineColor.dispose(); return image; } return null; }
Source:
<code>private static final void addConnectorOptions(ConfigDef config) { int orderInGroup = 0; config.define( TABLE_TYPE_CONFIG, Type.LIST, TABLE_TYPE_DEFAULT, Importance.LOW, TABLE_TYPE_DOC, CONNECTOR_GROUP, ++orderInGroup, Width.MEDIUM, TABLE_TYPE_DISPLAY ).define( POLL_INTERVAL_MS_CONFIG, Type.INT, POLL_INTERVAL_MS_DEFAULT, Importance.HIGH, POLL_INTERVAL_MS_DOC, CONNECTOR_GROUP, ++orderInGroup, Width.SHORT, POLL_INTERVAL_MS_DISPLAY ).define( BATCH_MAX_ROWS_CONFIG, Type.INT, BATCH_MAX_ROWS_DEFAULT, Importance.LOW, BATCH_MAX_ROWS_DOC, CONNECTOR_GROUP, ++orderInGroup, Width.SHORT, BATCH_MAX_ROWS_DISPLAY ).define( TABLE_POLL_INTERVAL_MS_CONFIG, Type.LONG, TABLE_POLL_INTERVAL_MS_DEFAULT, Importance.LOW, TABLE_POLL_INTERVAL_MS_DOC, CONNECTOR_GROUP, ++orderInGroup, Width.SHORT, TABLE_POLL_INTERVAL_MS_DISPLAY ).define( TOPIC_PREFIX_CONFIG, Type.STRING, Importance.HIGH, TOPIC_PREFIX_DOC, CONNECTOR_GROUP, ++orderInGroup, Width.MEDIUM, TOPIC_PREFIX_DISPLAY ).define( TIMESTAMP_DELAY_INTERVAL_MS_CONFIG, Type.LONG, TIMESTAMP_DELAY_INTERVAL_MS_DEFAULT, Importance.HIGH, TIMESTAMP_DELAY_INTERVAL_MS_DOC, CONNECTOR_GROUP, ++orderInGroup, Width.MEDIUM, TIMESTAMP_DELAY_INTERVAL_MS_DISPLAY ).define( DB_TIMEZONE_CONFIG, Type.STRING, DB_TIMEZONE_DEFAULT, Importance.HIGH, DB_TIMEZONE_CONFIG_DOC, CONNECTOR_GROUP, ++orderInGroup, Width.MEDIUM, <START> DB_TIMEZONE_CONFIG_DISPLAY); <END> }</code><technical_language>Need a validator hear, mentioned for JdbcSinkConnectorConfig</technical_language>

Target:
private static final void addConnectorOptions(ConfigDef config) { int orderInGroup = 0; config.define( TABLE_TYPE_CONFIG, Type.LIST, TABLE_TYPE_DEFAULT, Importance.LOW, TABLE_TYPE_DOC, CONNECTOR_GROUP, ++orderInGroup, Width.MEDIUM, TABLE_TYPE_DISPLAY ).define( POLL_INTERVAL_MS_CONFIG, Type.INT, POLL_INTERVAL_MS_DEFAULT, Importance.HIGH, POLL_INTERVAL_MS_DOC, CONNECTOR_GROUP, ++orderInGroup, Width.SHORT, POLL_INTERVAL_MS_DISPLAY ).define( BATCH_MAX_ROWS_CONFIG, Type.INT, BATCH_MAX_ROWS_DEFAULT, Importance.LOW, BATCH_MAX_ROWS_DOC, CONNECTOR_GROUP, ++orderInGroup, Width.SHORT, BATCH_MAX_ROWS_DISPLAY ).define( TABLE_POLL_INTERVAL_MS_CONFIG, Type.LONG, TABLE_POLL_INTERVAL_MS_DEFAULT, Importance.LOW, TABLE_POLL_INTERVAL_MS_DOC, CONNECTOR_GROUP, ++orderInGroup, Width.SHORT, TABLE_POLL_INTERVAL_MS_DISPLAY ).define( TOPIC_PREFIX_CONFIG, Type.STRING, Importance.HIGH, TOPIC_PREFIX_DOC, CONNECTOR_GROUP, ++orderInGroup, Width.MEDIUM, TOPIC_PREFIX_DISPLAY ).define( TIMESTAMP_DELAY_INTERVAL_MS_CONFIG, Type.LONG, TIMESTAMP_DELAY_INTERVAL_MS_DEFAULT, Importance.HIGH, TIMESTAMP_DELAY_INTERVAL_MS_DOC, CONNECTOR_GROUP, ++orderInGroup, Width.MEDIUM, TIMESTAMP_DELAY_INTERVAL_MS_DISPLAY ).define( DB_TIMEZONE_CONFIG, Type.STRING, DB_TIMEZONE_DEFAULT, TimeZoneValidator.INSTANCE, Importance.MEDIUM, DB_TIMEZONE_CONFIG_DOC, CONNECTOR_GROUP, ++orderInGroup, Width.MEDIUM, DB_TIMEZONE_CONFIG_DISPLAY); }
Source:
<code>public List<Type> getTypes() { <START> return (List<Type>) localExchangeFactory.getTypes(); <END> }</code><technical_language>Change getter need cast</technical_language>

Target:
public List<Type> getTypes() { return localExchangeFactory.getTypes(); }
Source:
<code>public Object visitEntrySetCommand(InvocationContext ctx, EntrySetCommand command) throws Throwable { Object entrySet = super.visitEntrySetCommand(ctx, command); if (enabled && !shouldSkipCacheLoader(command)) { final ConcurrentHashSet<InternalCacheEntry> union = new ConcurrentHashSet<InternalCacheEntry>(); final ConcurrentHashSet<Object> processedKeys = new ConcurrentHashSet<Object>(); for (InternalCacheEntry ice : (Set<InternalCacheEntry>)entrySet) <START> processedKeys.add(ice.getKey()); <END> persistenceManager.processOnAllStores(new CollectionKeyFilter(processedKeys), new AdvancedCacheLoader.CacheLoaderTask() { @Override public void processEntry(MarshalledEntry marshalledEntry, AdvancedCacheLoader.TaskContext taskContext) throws InterruptedException { processedKeys.add(marshalledEntry.getKey()); union.add(iceFactory.create(marshalledEntry.getKey(), marshalledEntry.getValue(), marshalledEntry.getMetadata())); } }, true, true); union.addAll((Set<InternalCacheEntry>)entrySet); return Collections.unmodifiableSet(union); } return entrySet; }</code><technical_language>Ah yeah is a set of ICE :)</technical_language>

Target:
public Object visitEntrySetCommand(InvocationContext ctx, EntrySetCommand command) throws Throwable { Object entrySet = super.visitEntrySetCommand(ctx, command); if (enabled && !shouldSkipCacheLoader(command)) { final ConcurrentHashSet<InternalCacheEntry> union = new ConcurrentHashSet<InternalCacheEntry>(); final ConcurrentHashSet<Object> processedKeys = new ConcurrentHashSet<Object>(); for (InternalCacheEntry ice : (Set<InternalCacheEntry>)entrySet) processedKeys.add(ice.getKey()); persistenceManager.processOnAllStores(new CollectionKeyFilter(processedKeys), new AdvancedCacheLoader.CacheLoaderTask() { @Override public void processEntry(MarshalledEntry marshalledEntry, AdvancedCacheLoader.TaskContext taskContext) throws InterruptedException { union.add(iceFactory.create(marshalledEntry.getKey(), marshalledEntry.getValue(), marshalledEntry.getMetadata())); } }, true, true); for (InternalCacheEntry ice : (Set<InternalCacheEntry>) entrySet) union.add(ice); return Collections.unmodifiableSet(union); } return entrySet; }
Source:
<code>static UriSource from(final URI uri) { <START> Preconditions.notNull(uri, "uri must not be null"); <END> try { URI pathBasedUri = uri; String query = pathBasedUri.getQuery(); if (StringUtils.isNotBlank(query)) { String s = pathBasedUri.toString(); pathBasedUri = URI.create(s.substring(0, s.indexOf('?'))); } Path path = Paths.get(pathBasedUri); if (Files.isRegularFile(path)) { return FileSource.from(path.toFile(), FilePosition.fromQuery(query).orElse(null)); } if (Files.isDirectory(path)) { return DirectorySource.from(path.toFile()); } } catch (IllegalArgumentException e) { LoggerFactory.getLogger(UriSource.class).debug(e, () -> "uri not path-based: " + uri); } return new DefaultUriSource(uri); }</code><technical_language>uri ... -> URI ..</technical_language>

Target:
static UriSource from(final URI uri) { Preconditions.notNull(uri, "URI must not be null"); try { URI pathBasedUriWithoutQuery = uri; String query = uri.getQuery(); if (StringUtils.isNotBlank(query)) { String uriAsString = uri.toString(); pathBasedUriWithoutQuery = URI.create(uriAsString.substring(0, uriAsString.indexOf('?'))); } Path path = Paths.get(pathBasedUriWithoutQuery); if (Files.isRegularFile(path)) { return FileSource.from(path.toFile(), FilePosition.fromQuery(query).orElse(null)); } if (Files.isDirectory(path)) { return DirectorySource.from(path.toFile()); } } catch (RuntimeException e) { LoggerFactory.getLogger(UriSource.class).debug(e, () -> String.format( "The supplied URI [%s] is not path-based. Falling back to default UriSource implementation.", uri)); } return new DefaultUriSource(uri); }
Source:
<code>private IntervalFunction validateWaitIntervalFunctionInOpenState() { <START> if (waitIntervalFunctionInOpenStateAlreadySet) { <END> throw new IllegalStateException("You have already the durationInOpenState value from the waitDurationInOpenState method." + "Please don't use waitIntervalFunctionInOpenState with waitDurationInOpenState"); } return waitIntervalFunctionInOpenState; }</code><technical_language>If I set config below, throw exception? java CircuitBreakerConfig.custom() .waitDurationInOpenState(Duration.ofMillis(3333)) .build();</technical_language>

Target:
private IntervalFunction validateWaitIntervalFunctionInOpenState() { if (createWaitIntervalFunctionCounter > 1) { throw new IllegalStateException("The waitIntervalFunction was configured multiple times " + "which could result in an undesired state. Please verify that waitIntervalFunctionInOpenState " + "and waitDurationInOpenState are not used together."); } return waitIntervalFunctionInOpenState; }
Source:
<code>public static List<Map<Integer,TieredBlock>> getConsumableInArrearTieredBlocks(final Usage usage, final String unitType) { <START> <END> Preconditions.checkArgument(usage.getBillingMode() == BillingMode.IN_ARREAR && usage.getUsageType() == UsageType.CONSUMABLE); Preconditions.checkArgument(usage.getTiers().length > 0); final List<Map<Integer,TieredBlock>> result = Lists.newLinkedList(); int tierNum = 0; for (Tier tier : usage.getTiers()) { tierNum++; for (TieredBlock tierBlock : tier.getTieredBlocks()) { if (tierBlock.getUnit().getName().equals(unitType)) { Map<Integer, TieredBlock> tieredBlockWithTierNum = new HashMap<>(); tieredBlockWithTierNum.put(tierNum, tierBlock); result.add(tieredBlockWithTierNum); } } } return result; }</code><technical_language>Do need Map ? rely index of element of list tierNum -- i suppose case this break is if a catalog defined miss some definitions of TieredBlock for a a unit. long detect -- Preconditions, suffice</technical_language>

Target:
public static List<TieredBlock> getConsumableInArrearTieredBlocks(final Usage usage, final String unitType) { Preconditions.checkArgument(usage.getBillingMode() == BillingMode.IN_ARREAR && usage.getUsageType() == UsageType.CONSUMABLE); Preconditions.checkArgument(usage.getTiers().length > 0); final List<TieredBlock> result = Lists.newLinkedList(); for (Tier tier : usage.getTiers()) { for (TieredBlock tierBlock : tier.getTieredBlocks()) { if (tierBlock.getUnit().getName().equals(unitType)) { result.add(tierBlock); } } } return result; }
Source:
<code>public SSymbol getIdentifier() { if (identifier == null) { CompilerDirectives.transferToInterpreterAndInvalidate(); <START> identifier = Symbols.symbolFor(mixinDef.getIdentifier()); <END> } return identifier; }</code><technical_language>Hm, is caching logic in mixin definition</technical_language>

Target:
public SSymbol getIdentifier() { return mixinDef.getIdentifier(); }
Source:
<code>protected boolean chProfileMatchesHints(CHProfile p, HintsMap hintsMap) { Boolean edgeBased = getEdgeBased(hintsMap); Integer uTurnCosts = getUTurnCosts(hintsMap); return (edgeBased == null || p.isEdgeBased() == edgeBased) && <START> (uTurnCosts == null || p.getWeighting().getTurnCostProvider().getName().equals(uTurnCosts.toString())) && <END> (hintsMap.getWeighting().isEmpty() || p.getWeighting().getName().equals(hintsMap.getWeighting())) && (hintsMap.getVehicle().isEmpty() || p.getWeighting().getFlagEncoder().toString().equals(hintsMap.getVehicle())); }</code><technical_language>Yes, accept ProfileResolver is for compatibility? bigger problem is new getTurnCostProvider method, I prefer private. I do how</technical_language>

Target:
protected boolean chProfileMatchesHints(CHProfile p, HintsMap hintsMap) { Boolean edgeBased = getEdgeBased(hintsMap); Integer uTurnCosts = getUTurnCosts(hintsMap); return (edgeBased == null || p.isEdgeBased() == edgeBased) && (uTurnCosts == null || p.isEdgeBased()) && (hintsMap.getWeighting().isEmpty() || p.getWeighting().getName().equals(hintsMap.getWeighting())) && (hintsMap.getVehicle().isEmpty() || p.getWeighting().getFlagEncoder().toString().equals(hintsMap.getVehicle())); }
Source:
<code>public void testAll() throws Exception { testGetStudentForEmail(); testGetStudentForRegistrationKey(); testGetStudentsForGoogleId(); testGetStudentForCourseIdAndGoogleId(); testGetStudentsForCourse(); testGetEncryptedKeyForStudent(); testIsStudentInAnyCourse(); testIsStudentInCourse(); testIsStudentInTeam(); testIsStudentsInSameTeam(); testGetTeamForStudent(); testEnrollStudent(); testAdjustFeedbackResponseForEnrollments(); testValidateSections(); <START> testupdateStudentCascade(); <END> testEnrollLinesChecking(); testEnrollStudents(); testDeleteStudent(); }</code><technical_language>Camel case naming -> testUpdateStudentCascade</technical_language>

Target:
public void testAll() throws Exception { testGetStudentForEmail(); testGetStudentForRegistrationKey(); testGetStudentsForGoogleId(); testGetStudentForCourseIdAndGoogleId(); testGetStudentsForCourse(); testGetEncryptedKeyForStudent(); testIsStudentInAnyCourse(); testIsStudentInCourse(); testIsStudentInTeam(); testIsStudentsInSameTeam(); testGetTeamForStudent(); testEnrollStudent(); testAdjustFeedbackResponseForEnrollments(); testValidateSections(); testUpdateStudentCascade(); testEnrollLinesChecking(); testEnrollStudents(); testDeleteStudent(); }
Source:
<code>public SweepTaskRunner provideSweepTaskRunner(SerializableTransactionManager txm, @Named("kvs") KeyValueService kvs, TransactionService transactionService, SweepStrategyManager sweepStrategyManager, Follower follower) { LongSupplier unreadable = unreadableTs.isPresent() ? unreadableTs.get() : txm::getUnreadableTimestamp; <START> LongSupplier immutable = immutableTs.isPresent() ? immutableTs.get() : txm::getImmutableTimestamp; <END> return new SweepTaskRunner( kvs, unreadable, immutable, transactionService, sweepStrategyManager, new CellsSweeper(txm, kvs, ImmutableList.of(follower))); }</code><technical_language>Nit: simplified LongSupplier unreadable = unreadableTs.or(txn::getUnreadableTimestamp); LongSupplier immutable = immutableableTs.or(txn::getImmutableTimestamp);</technical_language>

Target:
public SweepTaskRunner provideSweepTaskRunner(SerializableTransactionManager txm, @Named("kvs") KeyValueService kvs, TransactionService transactionService, SweepStrategyManager sweepStrategyManager, Follower follower) { LongSupplier unreadable = unreadableTs.or(txm::getUnreadableTimestamp); LongSupplier immutable = immutableTs.or(txm::getImmutableTimestamp); return new SweepTaskRunner( kvs, unreadable, immutable, transactionService, sweepStrategyManager, new CellsSweeper(txm, kvs, ImmutableList.of(follower))); }
Source:
<code><START> public VdcBllMessages providerNetworkUsedValidationMessage(int numberOfNetworks) { <END> boolean singular = numberOfNetworks == 1; return singular ? VdcBllMessages.ACTION_TYPE_FAILED_PROVIDER_NETWORKS_USED_ONCE : VdcBllMessages.ACTION_TYPE_FAILED_PROVIDER_NETWORKS_USED_MULTIPLE_TIMES; }</code><technical_language>1. A method name start a verb (like get...) 2. method public? If yes, shared</technical_language>

Target:
protected VdcBllMessages providerNetworkUsedValidationMessage(int numberOfNetworks) { boolean singular = numberOfNetworks == 1; if (singular) { return VdcBllMessages.ACTION_TYPE_FAILED_PROVIDER_NETWORKS_USED_ONCE; } else { return VdcBllMessages.ACTION_TYPE_FAILED_PROVIDER_NETWORKS_USED_MULTIPLE_TIMES; } }
Source:
<code><START> public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { <END> base.onViewCreated(view, savedInstanceState); super.onViewCreated(view, savedInstanceState); }</code><technical_language>ordered onCreateView()</technical_language>

Target:
@Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { base.onViewCreated(new ViewCreated(view, savedInstanceState)); super.onViewCreated(view, savedInstanceState); }
Source:
<code>public void testNaming() { Random random = new Random(); String baseName = getString(random); MultipleInputTransformation<Long> transformation = new MultipleInputTransformation<>(baseName, unsupportedOperatorFactory(), TypeInformation.of(Long.class), 1); for (int i = 0; i < 10; i++) { transformation.addInput(new SourceTransformation<>(getString(random), new NumberSequenceSource(0, 1), WatermarkStrategy.noWatermarks(), TypeInformation.of(Long.class), 1)); } assertTrue(transformation.getName().contains(baseName)); transformation.getInputs().forEach(input -> assertTrue(transformation.getName().contains(input.getName()))); <START> System.out.println(transformation.getName()); <END> }</code><technical_language>removed</technical_language>

Target:
public void testNaming() { Random random = new Random(); MultipleInputTransformation<Long> transformation = new MultipleInputTransformation<>(getString(random), unsupportedOperatorFactory(), TypeInformation.of(Long.class), 1); for (int i = 0; i < 10; i++) { transformation.addInput(new SourceTransformation<>(getString(random), new NumberSequenceSource(0, 1), WatermarkStrategy.noWatermarks(), TypeInformation.of(Long.class), 1)); } transformation.getInputs().forEach(input -> assertTrue(transformation.getName().contains(input.getName()))); }