auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void writeAllFields(MessageOrBuilder pb) { Map<Descriptors.FieldDescriptor, Object> changedPbFields = pb.getAllFields(); for (Map.Entry<Descriptors.FieldDescriptor, Object> entry : changedPbFields.entrySet()) { Descriptors.FieldDescriptor fieldDescriptor = entry.getKey(); if(fieldDescriptor.isExtension()) { continue; } <START> <END> int fieldIndex = fieldDescriptor.getIndex(); fieldWriters[fieldIndex].writeField(entry.getValue()); } }</code><technical_language>I approach of throwing exception. is easy add support for a special case later. is harder change behavior breaks existing applications. For example in Avro explicitly throw in case of recursive schemas</technical_language>

Target:
private void writeAllFields(MessageOrBuilder pb) { Map<Descriptors.FieldDescriptor, Object> changedPbFields = pb.getAllFields(); for (Map.Entry<Descriptors.FieldDescriptor, Object> entry : changedPbFields.entrySet()) { Descriptors.FieldDescriptor fieldDescriptor = entry.getKey(); if(fieldDescriptor.isExtension()) { throw new UnsupportedOperationException( "Cannot convert Protobuf message with extension field(s)"); } int fieldIndex = fieldDescriptor.getIndex(); fieldWriters[fieldIndex].writeField(entry.getValue()); } }
Source:
<code>public void testFindFirstInet4Addr() throws HeliosDeploymentException { InterfaceAddress ifaceAddr0 = mock(InterfaceAddress.class); InterfaceAddress ifaceAddr1 = mock(InterfaceAddress.class); InterfaceAddress ifaceAddr2 = mock(InterfaceAddress.class); InterfaceAddress ifaceAddr3 = mock(InterfaceAddress.class); InetAddress inetAddr0 = mock(InetAddress.class); InetAddress inetAddr1 = mock(InetAddress.class); InetAddress inetAddr2 = mock(InetAddress.class); InetAddress inetAddr3 = mock(InetAddress.class); when(inetAddr0.toString()).thenReturn("/fe80:0:0:0:0:0:0:1%lo0"); when(inetAddr1.toString()).thenReturn("/0:0:0:0:0:0:0:1"); <START> when(inetAddr2.toString()).thenReturn("/127u0.0.1"); <END> when(inetAddr3.toString()).thenReturn("/10.01.23.45"); when(ifaceAddr0.getAddress()).thenReturn(inetAddr0); when(ifaceAddr1.getAddress()).thenReturn(inetAddr1); when(ifaceAddr2.getAddress()).thenReturn(inetAddr2); when(ifaceAddr3.getAddress()).thenReturn(inetAddr3); List addrs = new ArrayList<InterfaceAddress>(); addrs.add(ifaceAddr0); addrs.add(ifaceAddr1); addrs.add(ifaceAddr2); addrs.add(ifaceAddr3); assertEquals("10.01.23.45", findFirstInet4Addr(addrs)); }</code><technical_language>typo in 127u</technical_language>

Target:
public void testFindFirstInet4Addr() throws HeliosDeploymentException { List addrs = new ArrayList<InetAddress>(); addrs.add(InetAddresses.forString("fe80:0:0:0:0:0:0:1")); addrs.add(InetAddresses.forString("0:0:0:0:0:0:0:1")); addrs.add(InetAddresses.forString("127.0.0.1")); addrs.add(InetAddresses.forString("10.12.34.56")); addrs.add(InetAddresses.forString("10.98.76.54")); assertEquals("10.12.34.56", findFirstInet4Addr(addrs)); }
Source:
<code>public boolean visit(MethodInvocation methodInvocation) { List<?> arguments= methodInvocation.arguments(); if (!arguments.isEmpty()) { IMethodBinding methodBinding= <START> methodInvocation.resolveMethodBinding(); <END> IMethod method = resolveMethodBinding(methodBinding); collectParameterNamesCodeMinings(method, arguments, methodBinding.isVarargs()); } return super.visit(methodInvocation); }</code><technical_language>methodBinding.isVarargs() NPE if line in question resolve bindings. MethodInvocation.resolveMethodBinding() return null, especially if plenty of errors. local resolveMethodBinding() checks that, fine methodBinding.isVarargs() fail</technical_language>

Target:
public boolean visit(MethodInvocation methodInvocation) { List<?> arguments= methodInvocation.arguments(); if (!arguments.isEmpty()) { IMethodBinding methodBinding= methodInvocation.resolveMethodBinding(); if (methodBinding != null) { IMethod method = resolveMethodBinding(methodBinding); collectParameterNamesCodeMinings(method, arguments, methodBinding.isVarargs()); } } return super.visit(methodInvocation); }
Source:
<code>public void should_Set_PWA_Offline_Resources() throws Exception { ClassFinder classFinder = new DefaultClassFinder(new HashSet<>( new ArrayList<>(Arrays.asList(AppShellWithPwa.class)))); Builder builder = new Builder(classFinder, new File(userDir)) .withFlowResourcesFolder( <START> new File(userDir, DEAULT_FLOW_RESOURCES_FOLDER)) <END> .withWebpack(new File(userDir, TARGET + "classes"), WEBPACK_CONFIG, WEBPACK_GENERATED) .enablePackagesUpdate(false).enableImportsUpdate(false) .withEmbeddableWebComponents(false); builder.build().execute(); String webpackGeneratedContent = Files .lines(new File(userDir, WEBPACK_GENERATED).toPath()) .collect(Collectors.joining("\n")); Assert.assertTrue("should contain pwa.js pwa.css offlineResources", webpackGeneratedContent.contains("const offlineResources = " + "[\"pwa.js\",\"pwa.css\"];")); }</code><technical_language>DEAULT_FLOW_RESOURCES_FOLDER (with typo) is deprecated. Please corrected one: DEFAULT_FLOW_RESOURCES_FOLDER instead</technical_language>

Target:
public void should_Set_PWA_Offline_Resources() throws Exception { ClassFinder classFinder = new DefaultClassFinder(new HashSet<>( new ArrayList<>(Arrays.asList(AppShellWithPwa.class)))); Builder builder = new Builder(classFinder, new File(userDir)) .withFlowResourcesFolder( new File(userDir, DEFAULT_FLOW_RESOURCES_FOLDER)) .withWebpack(new File(userDir, TARGET + "classes"), WEBPACK_CONFIG, WEBPACK_GENERATED) .enablePackagesUpdate(false).enableImportsUpdate(false) .withEmbeddableWebComponents(false); builder.build().execute(); String webpackGeneratedContent = Files .lines(new File(userDir, WEBPACK_GENERATED).toPath()) .collect(Collectors.joining("\n")); Assert.assertTrue("should contain pwa.js pwa.css offlineResources", webpackGeneratedContent.contains("const offlineResources = " + "[\"pwa.js\",\"pwa.css\"];")); }
Source:
<code>synchronized private static void init() { if (requiresUserPrivacyConsent()) { OneSignal.Log(LOG_LEVEL.WARN, "OneSignal SDK initialization delayed, user privacy consent is set to required for this application."); delayedInitParams = new DelayedConsentInitializationParameters(appContext, googleProjectNumber, appId, notificationWillShowInForegroundHandler, notificationOpenedHandler); appId = null; return; } if (!isGoogleProjectNumberRemote()) <START> googleProjectNumber = ""; <END> deviceType = osUtils.getDeviceType(); subscribableStatus = osUtils.initializationChecker(appContext, deviceType, appId); if (isSubscriptionStatusUninitializable()) return; if (initDone) { if (notificationOpenedHandler != null) fireCallbackForOpenedNotifications(); return; } saveFilterOtherGCMReceivers(mFilterOtherGCMReceivers); handleActivityLifecycleHandler(appContext); OneSignalStateSynchronizer.initUserState(); handleAmazonPurchase(); handleAppIdChange(); OSPermissionChangedInternalObserver.handleInternalChanges(getCurrentPermissionState(appContext)); doSessionInit(); if (notificationOpenedHandler != null) fireCallbackForOpenedNotifications(); if (TrackGooglePurchase.CanTrack(appContext)) trackGooglePurchase = new TrackGooglePurchase(appContext); if (TrackFirebaseAnalytics.CanTrack()) trackFirebaseAnalytics = new TrackFirebaseAnalytics(appContext); PushRegistratorFCM.disableFirebaseInstanceIdService(appContext); initDone = true; outcomeEventsController.sendSavedOutcomes(); startPendingTasks(); }</code><technical_language>Lets remove 2 lines, need set googleProjectNumber a blank string</technical_language>

Target:
synchronized private static void init() { if (requiresUserPrivacyConsent()) { OneSignal.Log(LOG_LEVEL.WARN, "OneSignal SDK initialization delayed, user privacy consent is set to required for this application."); delayedInitParams = new DelayedConsentInitializationParameters(appContext, googleProjectNumber, appId, notificationWillShowInForegroundHandler, notificationOpenedHandler); appId = null; return; } deviceType = osUtils.getDeviceType(); subscribableStatus = osUtils.initializationChecker(appContext, deviceType, appId); if (isSubscriptionStatusUninitializable()) return; if (initDone) { if (notificationOpenedHandler != null) fireCallbackForOpenedNotifications(); return; } saveFilterOtherGCMReceivers(mFilterOtherGCMReceivers); handleActivityLifecycleHandler(appContext); OneSignalStateSynchronizer.initUserState(); handleAmazonPurchase(); handleAppIdChange(); OSPermissionChangedInternalObserver.handleInternalChanges(getCurrentPermissionState(appContext)); doSessionInit(); if (notificationOpenedHandler != null) fireCallbackForOpenedNotifications(); if (TrackGooglePurchase.CanTrack(appContext)) trackGooglePurchase = new TrackGooglePurchase(appContext); if (TrackFirebaseAnalytics.CanTrack()) trackFirebaseAnalytics = new TrackFirebaseAnalytics(appContext); PushRegistratorFCM.disableFirebaseInstanceIdService(appContext); initDone = true; outcomeEventsController.sendSavedOutcomes(); startPendingTasks(); }
Source:
<code>public void create() { context = new ContextImpl(); context.put(SolApplication.class, this); worldConfig = new WorldConfig(); isMobile = Gdx.app.getType() == Application.ApplicationType.Android || Gdx.app.getType() == Application.ApplicationType.iOS; if (isMobile) { DebugOptions.read(null); } options = new GameOptions(isMobile(), null); logger.info("\n\n ------------------------------------------------------------ \n"); moduleManager.printAvailableModules(); musicManager = new OggMusicManager(options); soundManager = new OggSoundManager(context); inputManager = new SolInputManager(soundManager, context); <START> ; <END> musicManager.playMusic(OggMusicManager.MENU_MUSIC_SET, options); displayDimensions = new DisplayDimensions(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); commonDrawer = new CommonDrawer(); uiDrawer = new UiDrawer(commonDrawer); layouts = new SolLayouts(); menuScreens = new MenuScreens(layouts, isMobile(), options); menuBackgroundManager = new MenuBackgroundManager(displayDimensions); inputManager.setScreen(this, menuScreens.main); }</code><technical_language>thinking:</technical_language>

Target:
public void create() { context = new ContextImpl(); context.put(SolApplication.class, this); worldConfig = new WorldConfig(); isMobile = Gdx.app.getType() == Application.ApplicationType.Android || Gdx.app.getType() == Application.ApplicationType.iOS; if (isMobile) { DebugOptions.read(null); } options = new GameOptions(isMobile(), null); logger.info("\n\n ------------------------------------------------------------ \n"); moduleManager.printAvailableModules(); musicManager = new OggMusicManager(options); soundManager = new OggSoundManager(context); inputManager = new SolInputManager(soundManager, context); musicManager.playMusic(OggMusicManager.MENU_MUSIC_SET, options); displayDimensions = new DisplayDimensions(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); commonDrawer = new CommonDrawer(); uiDrawer = new UiDrawer(commonDrawer); layouts = new SolLayouts(); menuBackgroundManager = new MenuBackgroundManager(displayDimensions); menuScreens = new MenuScreens(layouts, isMobile(), options); inputManager.setScreen(this, menuScreens.main); }
Source:
<code>private static <T> T getService(Class<T> serviceClass) { final Bundle bundle = FrameworkUtil.getBundle(ViewModelMigratorUtil.class); final BundleContext bundleContext = bundle.getBundleContext(); final ServiceReference<T> serviceReference = bundleContext.getServiceReference(serviceClass); if (serviceReference == null) { return null; } <START> final Object service = bundleContext.getService(serviceReference); <END> bundleContext.ungetService(serviceReference); return serviceClass.cast(service); }</code><technical_language>this T cast necessary</technical_language>

Target:
private static <T> T getService(Class<T> serviceClass) { final Bundle bundle = FrameworkUtil.getBundle(ViewModelMigratorUtil.class); final BundleContext bundleContext = bundle.getBundleContext(); final ServiceReference<T> serviceReference = bundleContext.getServiceReference(serviceClass); if (serviceReference == null) { return null; } final T service = bundleContext.getService(serviceReference); bundleContext.ungetService(serviceReference); return service; }
Source:
<code>public void testFunctionsListElements() { onBrickAtPosition(0).checkShowsText(R.string.brick_when_started); onBrickAtPosition(1).checkShowsText(R.string.brick_change_size_by); <START> onBrickAtPosition(1).perform(click()); <END> onView(withText(R.string.formula_editor_functions)).perform(click()); String formulaEditorFunctionString = InstrumentationRegistry.getTargetContext() .getString(formulaEditorFunction); String formulaEditorFunctionParameterString = InstrumentationRegistry.getTargetContext() .getString(formulaEditorFunctionParameter); String editorFunction = formulaEditorFunctionString + formulaEditorFunctionParameterString; String selectedFunctionString = getSelectedFunctionString(formulaEditorFunctionString, formulaEditorFunctionParameterString); onData(allOf(is(instanceOf(String.class)), is(editorFunction))) .inAdapterView(FormulaEditorFunctionListMatchers.isFunctionListView()) .check(matches(isDisplayed())); onView(withText(editorFunction)).perform(click()); onView(withId(R.id.formula_editor_edit_field)).check(matches(withText(selectedFunctionString))); }</code><technical_language>this works accident this brick click location clicking brick luckily is editText is located. please click edit text, else this easily broken layout changes..</technical_language>

Target:
public void testFunctionsListElements() { onBrickAtPosition(whenBrickPosition).checkShowsText(R.string.brick_when_started); onBrickAtPosition(changeSizeBrickPosition).checkShowsText(R.string.brick_change_size_by); onBrickAtPosition(changeSizeBrickPosition).onChildView(withId(R.id.brick_change_size_by_edit_text)) .perform(click()); onView(withText(R.string.formula_editor_functions)).perform(click()); String formulaEditorFunctionString = UiTestUtils.getResourcesString(formulaEditorFunction); String formulaEditorFunctionParameterString = UiTestUtils.getResourcesString(formulaEditorFunctionParameter); String editorFunction = formulaEditorFunctionString + formulaEditorFunctionParameterString; String selectedFunctionString = getSelectedFunctionString(editorFunction); onData(allOf(is(instanceOf(String.class)), is(editorFunction))) .inAdapterView(FormulaEditorFunctionListMatchers.isFunctionListView()) .onChildView(withId(R.id.fragment_formula_editor_list_item)) .check(matches(isDisplayed())) .perform(click()); onView(withId(R.id.formula_editor_edit_field)) .check(matches(withText(selectedFunctionString))); }
Source:
<code>public File gitPrefix() throws IOException { String w; <START> w = readPipe(null, new String[] { "which git" }, END> Charset.defaultCharset().name()); if (w == null) { w = readPipe(null, new String[] { "whence", "git" }, Charset.defaultCharset().name()); } if (w == null) { w = readPipe(userHome, new String[] { "bash", "--login", "-c", "which git" }, Charset.defaultCharset().name()); } if (w == null) return null; File f = new File(w); return f.getParentFile().getParentFile(); }</code><technical_language>If scanPath() above, do need run shell in order find it? scanPath()</technical_language>

Target:
public File gitPrefix() { String osName = SystemReader.getInstance().getProperty("os.name"); if (osName.startsWith("Windows") || osName.startsWith("Mac")) { String w = readPipe(userHome, new String[] { "bash", "--login", "-c", "which git" }, Charset.defaultCharset().name()); File f = new File(w); return f.getParentFile().getParentFile(); } return null; }
Source:
<code>public Operation exec(Prolog engine) throws PrologException { engine.areg2 = arg2; engine.areg3 = arg3; engine.areg4 = arg4; engine.cont = cont; engine.setB0(); Term a1 = arg1.dereference(); if (a1.isVariable()) { throw new PInstantiationException(this, 1); } if (!a1.isSymbol()) { throw new IllegalTypeException(this, 1, "symbol", a1); } PrologEnvironment env = (PrologEnvironment) engine.control; PatchSetInfo psInfo; try { psInfo = getPatchSetInfo(env); } catch (PatchSetInfoNotAvailableException err) { throw new JavaException(this, 1, err); } <START> UserIdentity author = psInfo.getAuthor(); <END> PatchListCache plCache = env.getInjector().getInstance(PatchListCache.class); Change change = StoredValues.CHANGE.get(engine); Project.NameKey projectKey = change.getProject(); ObjectId a = null; ObjectId b = ObjectId.fromString(psInfo.getRevId()); Whitespace ws = Whitespace.IGNORE_NONE; PatchListKey plKey = new PatchListKey(projectKey, a, b, ws); List<PatchListEntry> patches = new ArrayList<PatchListEntry>(); PatchList pl = plCache.get(plKey); for (PatchListEntry entry : pl.getPatches()) { patches.add(entry); } engine.areg1 = arg1; engine.areg5 = new JavaObjectTerm(patches); return commit_delta_4_top; }</code><technical_language>Author necessary here</technical_language>

Target:
public Operation exec(Prolog engine) throws PrologException { engine.cont = cont; engine.setB0(); Term a1 = arg1.dereference(); if (a1.isVariable()) { throw new PInstantiationException(this, 1); } if (!a1.isSymbol()) { throw new IllegalTypeException(this, 1, "symbol", a1); } Pattern regex = Pattern.compile(a1.name()); engine.areg1 = new JavaObjectTerm(regex); engine.areg2 = arg2; engine.areg3 = arg3; engine.areg4 = arg4; PrologEnvironment env = (PrologEnvironment) engine.control; PatchSetInfo psInfo; try { psInfo = getPatchSetInfo(env); } catch (PatchSetInfoNotAvailableException err) { throw new JavaException(this, 1, err); } PatchListCache plCache = env.getInjector().getInstance(PatchListCache.class); Change change = StoredValues.CHANGE.get(engine); Project.NameKey projectKey = change.getProject(); ObjectId a = null; ObjectId b = ObjectId.fromString(psInfo.getRevId()); Whitespace ws = Whitespace.IGNORE_NONE; PatchListKey plKey = new PatchListKey(projectKey, a, b, ws); PatchList pl = plCache.get(plKey); Iterator<PatchListEntry> iter = pl.getPatches().iterator(); engine.areg5 = new JavaObjectTerm(iter); return engine.jtry5(commit_delta_check, commit_delta_next); }
Source:
<code>private static Iterable<TestEngine> validateEngineIds(Iterable<TestEngine> testEngines) { Set<String> ids = new HashSet<>(); for (TestEngine testEngine : testEngines) { if (!validateReservedIds(testEngine)) { <START> logger.warn(() -> String.format("Thou shalt not use an engine ID starting with 'junit-': '%s'", <END> testEngine.getId())); } if (!ids.add(testEngine.getId())) { throw new JUnitException(String.format( "Cannot create Launcher for multiple engines with the same ID '%s'.", testEngine.getId())); } } return testEngines; }</code><technical_language>style is biblical. opt for more like: _Third-party TestEngine implementations forbidden reserved junit- prefix for ID._</technical_language>

Target:
private static Iterable<TestEngine> validateEngineIds(Iterable<TestEngine> testEngines) { Set<String> ids = new HashSet<>(); for (TestEngine testEngine : testEngines) { if (!validateReservedIds(testEngine)) { logger.warn(() -> String.format( "Third-party TestEngine implementations are forbidden to use the reserved 'junit-' prefix for their ID: '%s'", testEngine.getId())); } if (!ids.add(testEngine.getId())) { throw new JUnitException(String.format( "Cannot create Launcher for multiple engines with the same ID '%s'.", testEngine.getId())); } } return testEngines; }
Source:
<code>public TaskLock lock(final Task task, final Interval interval) throws InterruptedException { giant.lock(); try { if(!activeTasks.contains(task.getId())){ <START> throw new IllegalStateException(String.format("Unable to grant lock to inactive Task [%s]", task.getId())); <END> } Optional<TaskLock> taskLock; while (!(taskLock = tryLock(task, interval)).isPresent()) { lockReleaseCondition.await(); } return taskLock.get(); } finally { giant.unlock(); } }</code><technical_language>a discussion point if tasks acquire locks start running. this account for a case? is case valid</technical_language>

Target:
public TaskLock lock(final Task task, final Interval interval) throws InterruptedException { giant.lock(); try { Optional<TaskLock> taskLock; while (!(taskLock = tryLock(task, interval)).isPresent()) { lockReleaseCondition.await(); } return taskLock.get(); } finally { giant.unlock(); } }
Source:
<code>public DataSource dataSource() { DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName("com.arjuna.ats.jdbc.TransactionalDriver"); <START> dataSource.setUrl("jdbc:arjuna:h2:file:target/test.db"); <END> Properties prop = new Properties(); prop.setProperty("DYNAMIC_CLASS", "org.jboss.narayana.quickstart.spring.config.H2DataSource"); dataSource.setConnectionProperties(prop); return dataSource; }</code><technical_language>ataSource.setUrl("jdbc:arjuna:");</technical_language>

Target:
public DataSource dataSource() { DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName("com.arjuna.ats.jdbc.TransactionalDriver"); dataSource.setUrl("jdbc:arjuna:"); Properties prop = new Properties(); prop.setProperty("DYNAMIC_CLASS", "org.jboss.narayana.quickstart.spring.config.H2DataSource"); dataSource.setConnectionProperties(prop); return dataSource; }
Source:
<code>public String getDebugType() { <START> return "DI"; <END> }</code><technical_language>is extract a constant class, trace usage easily</technical_language>

Target:
public EDebugProcessType getDebugType() { return EDebugProcessType.DI; }
Source:
<code>public static MagicSpellCardEvent create(final MagicCardDefinition cdef, final String rule) { if (cdef.hasAbility(MagicAbility.Entwine)) { return Entwine(rule); } if (cdef.hasAbility(MagicAbility.Buyback)) { return Buyback(rule); } if (cdef.hasAbility(MagicAbility.HauntSpell)) { return Haunt(rule); } <START> if (cdef.hasAbility(MagicAbility.Ascend)) { <END> return Ascend(rule); } final MagicSourceEvent sourceEvent = MagicRuleEventAction.create(rule); return new MagicSpellCardEvent() { @Override public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) { return sourceEvent.getEvent(cardOnStack, payedCost); } }; }</code><technical_language>For spells, simpler do Ascent part of effect text, i.e. enum in MagicRuleEventAction a MagicSpellCardEvent. i.e. Ascent is part of spell's effect "Gain 5 life" kind of effect</technical_language>

Target:
public static MagicSpellCardEvent create(final MagicCardDefinition cdef, final String rule) { if (cdef.hasAbility(MagicAbility.Entwine)) { return Entwine(rule); } if (cdef.hasAbility(MagicAbility.Buyback)) { return Buyback(rule); } if (cdef.hasAbility(MagicAbility.HauntSpell)) { return Haunt(rule); } final MagicSourceEvent sourceEvent = MagicRuleEventAction.create(rule); return new MagicSpellCardEvent() { @Override public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) { return sourceEvent.getEvent(cardOnStack, payedCost); } }; }
Source:
<code>public URLParams and(final String key, final int value) { <START> map.put(key, "" + value); <END> return this; }</code><technical_language>I prefer String.valueOf(value)</technical_language>

Target:
public URLParams and(final String key, final int value) { map.put(key, String.valueOf(value)); return this; }
Source:
<code>public JSONObject getAccessToken() { try { <START> return Oauth2JwtClient.builder() END> .withJwsHeaders(jwsHeaders()) .withJwtClaims(jwtClaims()) .signWithX509Key(x509Key(), org.talend.components.common.oauth.X509Key.Algorithm.SHA256withRSA) .fromTokenEndpoint(tokenEndpoint + "/token") .withPlayloadParams(playLoadParams()) .build() .getAccessToken(); } catch (IOException e) { throw new ComponentException(e); } }</code><technical_language>// in end of lines</technical_language>

Target:
public JsonNode getAccessToken() { try { return Oauth2JwtClient.builder() .withJwsHeaders(jwsHeaders()) .withJwtClaims(jwtClaims()) .signWithX509Key(x509Key(), org.talend.components.common.oauth.X509Key.Algorithm.SHA256withRSA) .fromTokenEndpoint(tokenEndpoint + "/token") .withPlayloadParams(playLoadParams()) .build() .getAccessToken(); } catch (IOException e) { throw new ComponentException(e); } }
Source:
<code>@Override public final void put(K key, @Nullable V value) { synchronized (this) { Map<K, V> values = this.values; if (values == null) { values = new LinkedHashMap<>(); if (value != null) values.put(key, value); } else if (equal(value, values.get(key))) { return; } else { values = new LinkedHashMap<>(values); <START> if (value != null) values.put(key, value); <END> } this.values = Collections.unmodifiableMap(values); } }</code><technical_language>I this is missing else values.remove(key). simpler remove != null checks</technical_language>

Target:
@Override public final boolean put(K key, @Nullable V value) { synchronized (this) { Map<K, V> values = this.values; if (values == null) { values = new LinkedHashMap<>(); if (value != null) values.put(key, value); } else if (equal(value, values.get(key))) { return false; } else { values = new LinkedHashMap<>(values); if (value != null) { values.put(key, value); } else { values.remove(key); } } this.values = Collections.unmodifiableMap(values); } return false; }
Source:
<code>public List<com.netflix.appinfo.InstanceInfo> getLatestServerListOrWait() { try { <START> firstBatchLatch.await(FIRST_RESOLVE_TIMEOUT_SEC, TimeUnit.SECONDS); <END> } catch (InterruptedException e) { } return latestServerList.get(); }</code><technical_language>if latch count timeout (i..e. batch is empty)? legacy code do empty list, is a null return exception here</technical_language>

Target:
public List<com.netflix.appinfo.InstanceInfo> getLatestServerListOrWait() { try { firstBatchLatch.await(firstResolveTimeoutMs, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { } return latestServerList.get(); }
Source:
<code>public SinkRuntimeProvider getSinkRuntimeProvider(Context context) { final SerializationSchema<RowData> keySerialization = createSerialization(context, keyEncodingFormat, keyProjection, keyPrefix); final SerializationSchema<RowData> valueSerialization = <START> createSerialization(context, valueEncodingFormat, valueProjection, keyPrefix); <END> final FlinkKafkaProducer<RowData> kafkaProducer = createKafkaProducer(keySerialization, valueSerialization); return SinkFunctionProvider.of(kafkaProducer); }</code><technical_language>null for prefix parameter? IIUC, keyPrefix affects key de/serialization. matter key fields included excluded in fields, shoudn't stripped prefix building de/serialization. For example: sql CREATE TABLE kafka ( key_id BIGINT, user_id BIGINT, key_name STRING, payload STRING ) ( 'connector' = 'kafka', 'key.fields' = 'key_id', 'key.fields-prefix' = 'key', 'value.fields-include' = 'EXCEPT_KEY' ) RowType of format user_id, key_name, payload instead of user_id, name, payload, right</technical_language>

Target:
public SinkRuntimeProvider getSinkRuntimeProvider(Context context) { final SerializationSchema<RowData> keySerialization = createSerialization(context, keyEncodingFormat, keyProjection, keyPrefix); final SerializationSchema<RowData> valueSerialization = createSerialization(context, valueEncodingFormat, valueProjection, null); final FlinkKafkaProducer<RowData> kafkaProducer = createKafkaProducer(keySerialization, valueSerialization); return SinkFunctionProvider.of(kafkaProducer); }
Source:
<code>private void writeOutServiceDefinitionFile(ServiceDefinition serviceDefinition, Path serviceDefinitionFolderPath) throws JAXBException, IOException { final Marshaller marshaller = getJaxbContext().createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); <START> try (BufferedWriter serviceDefinitionXmlFileWriter = newBufferedWriter(Paths.get(serviceDefinitionFolderPath.toAbsolutePath().toString() + "/" + SERVICE_DEFINITION_FILE_NAME), <END> UTF_8);) { marshaller.marshal(serviceDefinition, serviceDefinitionXmlFileWriter); } }</code><technical_language>I this is creating a path? good Paths.get(parent, child) .resolve Path object. a examples of this</technical_language>

Target:
private void writeOutServiceDefinitionFile(ServiceDefinition serviceDefinition, Path serviceDefinitionFolderPath) throws JAXBException, IOException { final Marshaller marshaller = getJaxbContext().createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); try (BufferedWriter serviceDefinitionXmlFileWriter = newBufferedWriter(Paths.get(serviceDefinitionFolderPath.toAbsolutePath().toString(), SERVICE_DEFINITION_FILE_NAME), UTF_8);) { marshaller.marshal(serviceDefinition, serviceDefinitionXmlFileWriter); } }
Source:
<code>protected void onStart() { super.onStart(); if (castManager != null && player != null) { castManager.registerWithOoyalaPlayer(player); } <START> layoutController.getControls().refresh(); <END> }</code><technical_language>Please check for NPE call refresh() method</technical_language>

Target:
protected void onStart() { super.onStart(); if (castManager != null && player != null) { castManager.registerWithOoyalaPlayer(player); } if (layoutController != null) { final OoyalaPlayerControls controls = layoutController.getControls(); if (controls != null) { controls.refresh(); } } }
Source:
<code>public InputInfoBuilder.TableParams clientInfo(ClientInfo clientInfo) { <START> Objects.requireNonNull(clientInfo, "ClientInfo must not be null"); <END> this.clientInfo = clientInfo; return this; }</code><technical_language>java this.clientInfo = Objects.requireNonNull(clientInfo, "ClientInfo null");</technical_language>

Target:
public InputInfoBuilder.TableParams clientInfo(ClientInfo clientInfo) { this.clientInfo = Objects.requireNonNull(clientInfo, "ClientInfo must not be null"); return this; }
Source:
<code><START> public final StateClass<?> stateClass() { <END> return StateClass.of(stateType()); }</code><technical_language>do final class is final</technical_language>

Target:
public StateClass<?> stateClass() { return StateClass.of(stateType()); }
Source:
<code>public Set<List<JavaFileScannerContext.Location>> getFlows() { <START> Stream<Flow> flowsAsStream = flows.stream(); <END> if (flows.stream().anyMatch(Flow::isExceptional) && flows.stream().anyMatch(Flow::isNonExceptional)) { flowsAsStream = flowsAsStream.filter(Flow::isNonExceptional); } return flowsAsStream.map(Flow::elements).collect(Collectors.toSet()); }</code><technical_language>bit more clearer this Set<List<JavaFileScannerContext.Location>> nonExceptionalFlows = flows.stream().filter(Flow::isNonExceptional).map(Flow::elements).collect(Collectors.toSet()); if (!nonExceptionalFlows.isEmpty()) { return nonExceptionalFlows; } return flows.stream().map(Flow::elements).collect(Collectors.toSet()); drop isExceptional method Flow</technical_language>

Target:
public Set<List<JavaFileScannerContext.Location>> getFlows() { Set<List<JavaFileScannerContext.Location>> nonExceptionalFlows = flows.stream().filter(Flow::isNonExceptional).map(Flow::elements).collect(Collectors.toSet()); if (!nonExceptionalFlows.isEmpty()) { return nonExceptionalFlows; } return flows.stream().map(Flow::elements).collect(Collectors.toSet()); }
Source:
<code>protected void getThreadExecutionStateDone(ICPUDMContext cpuContext, ICoreDMContext coreContext, IMIExecutionDMContext execContext, IThreadDMData threadData, IFrameDMData frame, VisualizerExecutionState state, VisualizerModel model, RequestMonitor rm) { int cpuID = Integer.parseInt(cpuContext.getId()); VisualizerCPU cpu = model.getCPU(cpuID); int coreID = Integer.parseInt(coreContext.getId()); VisualizerCore core = cpu.getCore(coreID); if (state == null) { state = VisualizerExecutionState.RUNNING; } IMIProcessDMContext processContext = DMContexts.getAncestorOfType(execContext, IMIProcessDMContext.class); int pid = Integer.parseInt(processContext.getProcId()); int tid; try { tid = Integer.parseInt(execContext.getThreadId()); <START> } catch (NumberFormatException e) { <END> rm.setStatus(new Status(IStatus.ERROR, MulticoreVisualizerUIPlugin.PLUGIN_ID, IStatus.ERROR, "Unxepected thread id format:" + execContext.getThreadId(), e)); rm.done(); return; } String osTIDValue = threadData.getId(); int osTid = (osTIDValue == null) ? tid : Integer.parseInt(osTIDValue); VisualizerThread t = model.getThread(tid); if (t == null) { model.addThread(new VisualizerThread(core, pid, osTid, tid, state, frame)); } else { t.setCore(core); t.setTID(osTid); t.setState(state); t.setLocationInfo(frame); } rm.done(); }</code><technical_language>Add assert eventually catch case a tid string is passed translate int? ex: tid = "1.1". This trigger need adapt code new PIDs</technical_language>

Target:
protected void getThreadExecutionStateDone(ICPUDMContext cpuContext, ICoreDMContext coreContext, IMIExecutionDMContext execContext, IThreadDMData threadData, IFrameDMData frame, VisualizerExecutionState state, VisualizerModel model, RequestMonitor rm) { int cpuID = Integer.parseInt(cpuContext.getId()); VisualizerCPU cpu = model.getCPU(cpuID); int coreID = Integer.parseInt(coreContext.getId()); VisualizerCore core = cpu.getCore(coreID); if (state == null) { state = VisualizerExecutionState.RUNNING; } IMIProcessDMContext processContext = DMContexts.getAncestorOfType(execContext, IMIProcessDMContext.class); int pid = Integer.parseInt(processContext.getProcId()); int tid; try { tid = Integer.parseInt(execContext.getThreadId()); } catch (NumberFormatException e) { rm.setStatus(new Status(IStatus.ERROR, MulticoreVisualizerUIPlugin.PLUGIN_ID, IStatus.ERROR, "Unxepected thread id format:" + execContext.getThreadId(), e)); rm.done(); assert false : THE_THREAD_ID_DOES_NOT_CONVERT_TO_AN_INTEGER + execContext.getThreadId(); return; } String osTIDValue = threadData.getId(); int osTid = (osTIDValue == null) ? tid : Integer.parseInt(osTIDValue); VisualizerThread t = model.getThread(tid); if (t == null) { model.addThread(new VisualizerThread(core, pid, osTid, tid, state, frame)); } else { t.setCore(core); t.setTID(osTid); t.setState(state); t.setLocationInfo(frame); } rm.done(); }
Source:
<code>public char[] getEOSCharacters(String languageCode) { if ("th".equals(languageCode) || "tha".equals(languageCode)) { return thEosCharacters; } else if ("pt".equals(languageCode) || "por".equals(languageCode)) { return ptEosCharacters; <START> } else if ("ja".equals(languageCode) || "jpn".equals(languageCode)) { <END> return jaEosCharacters; } return defaultEosCharacters; }</code><technical_language>letter codes for compatibility changing break it. I suggest remove letter code for Japanese</technical_language>

Target:
public char[] getEOSCharacters(String languageCode) { if ("th".equals(languageCode) || "tha".equals(languageCode)) { return thEosCharacters; } else if ("pt".equals(languageCode) || "por".equals(languageCode)) { return ptEosCharacters; } else if ("jpn".equals(languageCode)) { return jpnEosCharacters; } return defaultEosCharacters; }
Source:
<code>private void ensureAccountNameMatch(Account account, RestRequest restRequest) throws RestServiceException { String accountNameFromHeader = getHeader(restRequest.getArgs(), Headers.TARGET_ACCOUNT_NAME, false); if (accountNameFromHeader != null && !accountNameFromHeader.equals(account.getName())) { <START> throw new RestServiceException("Invalid account for putting blob", RestServiceErrorCode.InvalidAccount); <END> } }</code><technical_language>lets this internal server error</technical_language>

Target:
private void ensureAccountNameMatch(Account account, RestRequest restRequest) throws RestServiceException { String accountNameFromHeader = getHeader(restRequest.getArgs(), Headers.TARGET_ACCOUNT_NAME, false); if (accountNameFromHeader != null && !accountNameFromHeader.equals(account.getName())) { throw new RestServiceException("Error occurs when locating account", RestServiceErrorCode.InternalServerError); } }
Source:
<code><START> public void setDeploymentHandlerFactory(DeploymentHandlerFactory deploymentHandlerFactory) { <END> this.deploymentHandlerFactory = deploymentHandlerFactory; }</code><technical_language>this a fluent setter => returns ProcessEngineConfigurationImpl</technical_language>

Target:
public ProcessEngineConfigurationImpl setDeploymentHandlerFactory(DeploymentHandlerFactory deploymentHandlerFactory) { this.deploymentHandlerFactory = deploymentHandlerFactory; return this; }
Source:
<code><START> private API addSummary(API api) { <END> HashMap<String, Integer> stats = getSystemStatistics(); ApplicationMode appMode = getCurrent().get(ApplicationMode.class); ApiSummary summary = new ApiSummary(); if (appMode != ApplicationMode.GlusterOnly) { summary.setVMs(new VMs()); summary.getVMs().setTotal(get(stats, "total_vms")); summary.getVMs().setActive(get(stats, "active_vms")); } summary.setHosts(new Hosts()); summary.getHosts().setTotal(get(stats, "total_vds")); summary.getHosts().setActive(get(stats, "active_vds")); summary.setUsers(new Users()); summary.getUsers().setTotal(get(stats, "total_users")); summary.getUsers().setActive(get(stats, "active_users")); if (appMode != ApplicationMode.GlusterOnly) { summary.setStorageDomains(new StorageDomains()); summary.getStorageDomains().setTotal(get(stats, "total_storage_domains")); summary.getStorageDomains().setActive(get(stats, "active_storage_domains")); } api.setSummary(summary); return api; }</code><technical_language>prefer addGlusterSummary(API api) calling accordingly</technical_language>

Target:
private API addSummary(API api) { HashMap<String, Integer> stats = getSystemStatistics(); ApiSummary summary = new ApiSummary(); if (appMode != ApplicationMode.GlusterOnly) { summary.setVMs(new VMs()); summary.getVMs().setTotal(get(stats, "total_vms")); summary.getVMs().setActive(get(stats, "active_vms")); } summary.setHosts(new Hosts()); summary.getHosts().setTotal(get(stats, "total_vds")); summary.getHosts().setActive(get(stats, "active_vds")); summary.setUsers(new Users()); summary.getUsers().setTotal(get(stats, "total_users")); summary.getUsers().setActive(get(stats, "active_users")); summary.setStorageDomains(new StorageDomains()); summary.getStorageDomains().setTotal(get(stats, "total_storage_domains")); summary.getStorageDomains().setActive(get(stats, "active_storage_domains")); api.setSummary(summary); return api; }
Source:
<code><START> private static void initMomPoliciesSeverities() { <END> severities.put(AuditLogType.USER_UPDATED_MOM_POLICIES, AuditLogSeverity.NORMAL); }</code><technical_language>This called anywhere? Besides this liner sit host severities for IMHO</technical_language>

Target:
private static void initMomPoliciesSeverities() { severities.put(AuditLogType.USER_UPDATED_MOM_POLICIES, AuditLogSeverity.NORMAL); severities.put(AuditLogType.USER_FAILED_TO_UPDATE_MOM_POLICIES, AuditLogSeverity.WARNING); }
Source:
<code><START> public int openTaskDeactivationDialog(List<IEditorReference> dirtyRefs) { <END> StringBuilder editorsString = new StringBuilder(); for (IEditorReference ref : dirtyRefs) { editorsString.append(ref.getTitle()); editorsString.append('\n'); } return new MessageDialog(WorkbenchUtil.getShell(), "Task Deactivation", null, "The following editors have unsaved changes. Do you still want to deactivate the task?\n\n" + editorsString, MessageDialog.QUESTION, new String[] { "Deactivate Task and Save All", "Deactivate and Save Some...", IDialogConstants.CANCEL_LABEL }, 1).open(); }</code><technical_language>convention, methods (below shouldDeactivateTask)</technical_language>

Target:
public int openTaskDeactivationDialog(List<IEditorReference> dirtyRefs) { Iterable<String> iter = Iterables.transform(dirtyRefs, new Function<IEditorReference, String>() { @Override public String apply(IEditorReference ref) { return ref.getTitle(); } }); Joiner joiner = Joiner.on('\n'); return new MessageDialog(WorkbenchUtil.getShell(), "Task Deactivation", null, "The following editors have unsaved changes. Do you still want to deactivate the task?\n\n" + joiner.join(iter), MessageDialog.QUESTION, new String[] { "Deactivate Task and Save All", "Deactivate and Save Some...", IDialogConstants.CANCEL_LABEL }, 1).open(); }
Source:
<code>private ByteBuf fillHeader(ByteBufAllocator allocator) { <START> buffer.setAllocator(allocator); <END> ByteBuf headerBuf = allocateBuffer(allocator, ID, MESSAGE_HEADER_LENGTH, bufferSize, false); receiverId.writeTo(headerBuf); headerBuf.writeInt(sequenceNumber); headerBuf.writeInt(backlog); headerBuf.writeByte(dataType.ordinal()); headerBuf.writeBoolean(isCompressed); headerBuf.writeInt(buffer.readableBytes()); return headerBuf; }</code><technical_language>is a bit confusing this in a method called fillHeader(). I suggest leave this out of this method</technical_language>

Target:
private ByteBuf fillHeader(ByteBufAllocator allocator) { ByteBuf headerBuf = allocateBuffer(allocator, ID, MESSAGE_HEADER_LENGTH, bufferSize, false); receiverId.writeTo(headerBuf); headerBuf.writeInt(sequenceNumber); headerBuf.writeInt(backlog); headerBuf.writeByte(dataType.ordinal()); headerBuf.writeBoolean(isCompressed); headerBuf.writeInt(buffer.readableBytes()); return headerBuf; }
Source:
<code>public void run() { try { <START> cloudBlockBlob.uploadFromFile(tempFile.toString()); <END> } catch (StorageException | IOException e) { throw new RuntimeException(e); } }</code><technical_language>Cache temp file string</technical_language>

Target:
public void run() { try { cloudBlockBlob.uploadFromFile(TEMP_FILE_PATH); } catch (StorageException | IOException e) { throw new RuntimeException(e); } }
Source:
<code>public void run() { Message message = null; while (!socket.isClosed()) { try { message = MessageUtils.getMessage(socket.getInputStream()); } catch (Exception e) { closeSocket(); break; } <START> if (myThread.isInterrupted()) <END> break; if (message == null || message.getType() == MessageType.BYE) break; if (message.getType() == MessageType.ERROR) { System.out.println(message.getText()); break; } if (nickname == null) if (message.getType() == MessageType.HELLO) nickname = message.getName(); else send(new Message(MessageType.ERROR, "", "Wrong message type")); else if (message.getType() == MessageType.MESSAGE) sendAll(message, true); } listeners.remove(this); System.out.println("user " + nickname + " disconnected"); if (message != null) sendAll(new Message(MessageType.MESSAGE, "server", "user " + message.getName() + " has disconnected"), true); }</code><technical_language>code conventions</technical_language>

Target:
public void run() { Message message = null; while (!socket.isClosed()) { try { message = MessageUtils.getMessage(socket.getInputStream()); } catch (Exception e) { closeSocket(); break; } if (myThread.isInterrupted()) break; if (message == null || message.getType() == MessageType.BYE) break; if (message.getType() == MessageType.ERROR) { System.out.println(message.getText()); break; } if (nickname == null) if (message.getType() == MessageType.HELLO) nickname = message.getName(); else send(new Message(MessageType.ERROR, "", "Wrong message type")); else if (message.getType() == MessageType.MESSAGE) sendAll(message, true); else kill(nickname); } listeners.remove(this); System.out.println("user " + nickname + " disconnected"); if (message != null) sendAll(new Message(MessageType.MESSAGE, "server", "user " + message.getName() + " has disconnected"), true); }
Source:
<code>protected List<?> createOperationSet() { List<?> selection = getSelectedObjects(); if (selection.isEmpty() || !(selection.get(0) instanceof IGraphicalEditPart)) { selection = Collections.EMPTY_LIST; } else { selection = ToolUtilities.getSelectionWithoutDependants(selection); selection = Lists.newArrayList(Iterables.filter(selection, Predicates.not(Predicates.instanceOf(ConnectionEditPart.class)))); if (selection.size() < 3) { selection = Collections.EMPTY_LIST; } else { EditPart parent = ((EditPart) selection.get(0)).getParent(); int sideOfFirstSelection = PositionConstants.NONE; if (selection.get(0) instanceof IBorderItemEditPart) { sideOfFirstSelection = ((IBorderItemEditPart) selection.get(0)).getBorderItemLocator().getCurrentSideOfParent(); if (!isHorizontalAxisAuthorizedForBorderNode(sideOfFirstSelection) && !isVerticalAxisAuthorizedForBorderNode(sideOfFirstSelection)) { selection = Collections.EMPTY_LIST; } } for (int i = 1; i < selection.size(); i++) { EditPart part = (EditPart) selection.get(i); if (part.getParent() != parent) { selection = Collections.EMPTY_LIST; break; } else if (sideOfFirstSelection != PositionConstants.NONE && !isABorderNodeOnSameAxis(part, sideOfFirstSelection)) { selection = Collections.EMPTY_LIST; break; } else { <START> if (!isFreeFormContainerChildrenPresentation(selection)) { <END> selection = Collections.EMPTY_LIST; } break; } } } } return selection; }</code><technical_language>in middle of iteration of selection, pass selection this method</technical_language>

Target:
protected List<?> createOperationSet() { List<?> selection = getSelectedObjects(); if (selection.isEmpty() || !(selection.get(0) instanceof IGraphicalEditPart)) { selection = Collections.EMPTY_LIST; } else { selection = ToolUtilities.getSelectionWithoutDependants(selection); selection = Lists.newArrayList(Iterables.filter(selection, Predicates.not(Predicates.instanceOf(ConnectionEditPart.class)))); if (selection.size() < 3) { selection = Collections.EMPTY_LIST; } else { EditPart parent = ((EditPart) selection.get(0)).getParent(); int sideOfFirstSelection = PositionConstants.NONE; if (selection.get(0) instanceof IBorderItemEditPart) { sideOfFirstSelection = ((IBorderItemEditPart) selection.get(0)).getBorderItemLocator().getCurrentSideOfParent(); if (!isHorizontalAxisAuthorizedForBorderNode(sideOfFirstSelection) && !isVerticalAxisAuthorizedForBorderNode(sideOfFirstSelection)) { selection = Collections.EMPTY_LIST; } } for (int i = 1; i < selection.size(); i++) { EditPart part = (EditPart) selection.get(i); if (part.getParent() != parent) { selection = Collections.EMPTY_LIST; break; } else if (sideOfFirstSelection != PositionConstants.NONE && !isABorderNodeOnSameAxis(part, sideOfFirstSelection)) { selection = Collections.EMPTY_LIST; break; } else if (!isFreeFormContainerChildrenPresentation(part)) { selection = Collections.EMPTY_LIST; } break; } } } return selection; }
Source:
<code>public void cleanUp() { try { FileUtils.deleteDirectory(taskStoreDir); } catch (IOException e) { <START> Assert.fail(); <END> } }</code><technical_language>failing assert in cleanUp? do want do here</technical_language>

Target:
public void cleanUp() { try { FileUtils.deleteDirectory(taskStoreDir); } catch (IOException e) { LOG.error("Deletion of directory: resulted in the exception: {}.", new Object[]{taskStoreDir, e}); Assert.fail(e.getMessage()); } }
Source:
<code>public Aggregator factorize(ColumnSelectorFactory metricFactory) { return new DoubleFirstAggregator( name, metricFactory.makeFloatColumnSelector(fieldName), <START> metricFactory.makeLongColumnSelector(Column.TIME_COLUMN_NAME) <END> ); }</code><technical_language>minor nit: pass time column selector field selector consistent buffered aggregator</technical_language>

Target:
public Aggregator factorize(ColumnSelectorFactory metricFactory) { return new DoubleFirstAggregator( name, metricFactory.makeLongColumnSelector(Column.TIME_COLUMN_NAME), metricFactory.makeFloatColumnSelector(fieldName) ); }
Source:
<code>private PlanNode extract(PlanNode node) { <START> return resolveGroupReferences(node, Lookup.from(planNode -> ImmutableList.of(this.resolve(planNode)).stream())); <END> }</code><technical_language>Stream.of(..)</technical_language>

Target:
private PlanNode extract(PlanNode node) { return resolveGroupReferences(node, Lookup.from(planNode -> Stream.of(this.resolve(planNode)))); }