auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public ReportPoint apply(@Nullable ReportPoint reportPoint) { if (reportPoint == null) return null; long startNanos = ruleMetrics.ruleStart(); if (!v2Predicate.test(reportPoint)) return reportPoint; <START> <END> reportPoint.getAnnotations().put(tag, PreprocessorUtil.expandPlaceholders(value, reportPoint)); ruleMetrics.incrementRuleAppliedCounter(); ruleMetrics.ruleEnd(startNanos); return reportPoint; }</code><technical_language>Include v2 predicate tests in rule timings, rules follow try ... finally pattern yet</technical_language>

Target:
public ReportPoint apply(@Nullable ReportPoint reportPoint) { if (reportPoint == null) return null; long startNanos = ruleMetrics.ruleStart(); try { if (!v2Predicate.test(reportPoint)) return reportPoint; reportPoint.getAnnotations().put(tag, PreprocessorUtil.expandPlaceholders(value, reportPoint)); ruleMetrics.incrementRuleAppliedCounter(); return reportPoint; } finally { ruleMetrics.ruleEnd(startNanos); } }
Source:
<code>private MultiValueMap<String, String> filterSubscriptions( MultiValueMap<String, String> allMatches, Message<?> message) { if (!this.selectorHeaderInUse) { return allMatches; } MultiValueMap<String, String> result = new LinkedMultiValueMap<>(allMatches.size()); allMatches.forEach((sessionId, subIds) -> { SessionSubscriptionInfo subscriptions = this.subscriptionRegistry.getSubscriptions(sessionId); if (subscriptions != null) { <START> subIds.stream() <END> .map(subscriptions::getSubscription) .filter(Objects::nonNull) .filter(subscriptionDetail -> evaluateExpression(subscriptionDetail.getSelectorExpression(), message)) .forEach(subscriptionDetail -> result.add(sessionId, subscriptionDetail.getId())); } }); return result; }</code><technical_language>in (especially JDK8) java.util.Steam hot code paths hinders performance. change this block accordingly</technical_language>

Target:
private MultiValueMap<String, String> filterSubscriptions( MultiValueMap<String, String> allMatches, Message<?> message) { if (!this.selectorHeaderInUse) { return allMatches; } MultiValueMap<String, String> result = new LinkedMultiValueMap<>(allMatches.size()); allMatches.forEach((sessionId, subscriptionsIds) -> { SessionSubscriptionInfo subscriptions = this.subscriptionRegistry.getSubscriptions(sessionId); if (subscriptions != null) { for (String subscriptionId : subscriptionsIds) { Subscription subscription = subscriptions.getSubscription(subscriptionId); if (subscription != null && evaluateExpression(subscription.getSelectorExpression(), message)) { result.add(sessionId, subscription.getId()); } } } }); return result; }
Source:
<code>public boolean updateFiles() throws Exception { List<IFileSpec> syncFiles; String path = iclient.getRoot() + "/..."; syncFiles = FileSpecBuilder.makeFileSpecList(path); SyncOptions syncOpts = new SyncOptions(); <START> List<IFileSpec> syncMsg = iclient.sync(syncFiles, syncOpts); <END> for (IFileSpec fileSpec : syncMsg) { if (fileSpec.getOpStatus() != FileSpecOpStatus.VALID) { String msg = fileSpec.getStatusMessage(); if (msg.contains("file(s) up-to-date.")) { return false; } } } return true; }</code><technical_language>remove sync '-n' flag? This is run a preview sync if workspace is up-to-date</technical_language>

Target:
public boolean updateFiles() throws Exception { List<IFileSpec> syncFiles; String path = iclient.getRoot() + "/..."; syncFiles = FileSpecBuilder.makeFileSpecList(path); SyncOptions syncOpts = new SyncOptions(); syncOpts.setNoUpdate(true); List<IFileSpec> syncMsg = iclient.sync(syncFiles, syncOpts); for (IFileSpec fileSpec : syncMsg) { if (fileSpec.getOpStatus() != FileSpecOpStatus.VALID) { String msg = fileSpec.getStatusMessage(); if (msg.contains("file(s) up-to-date.")) { return false; } } } return true; }
Source:
<code>protected File getOutputDirectory( Bundle blueprintBundle ) { File managedResourcesFolder = managedResourceProvider.getManagedResourceFolder(); File to = <START> new File( managedResourcesFolder.getAbsolutePath() + "/" + blueprintBundle.getSymbolicName() ); <END> if ( !to.exists() ) { to.mkdirs(); } return to; }</code><technical_language>File.separator here, Paths.get(....)</technical_language>

Target:
protected File getOutputDirectory( Bundle blueprintBundle ) { File managedResourcesFolder = managedResourceProvider.getManagedResourceFolder(); File to = Paths.get( managedResourcesFolder.getAbsolutePath(), blueprintBundle.getSymbolicName() ).toFile(); if ( !to.exists() ) { to.mkdirs(); } return to; }
Source:
<code>public void setup() { this.batch = new Batch(); this.batch.setProtocol(Protocol.VERSION_2); Map map1 = new HashMap<String, String>(); map1.put("line", "My super event log"); map1.put("from", "beats"); this.message1 = new Message(1, map1); this.batch.addMessage(this.message1); for(int i = 0; i < numberOfMessage; i++) { Map map2 = new HashMap<String, String>(); map2.put("line", "Another world"); map2.put("from", "Little big Adventure"); <START> this.message2 = new Message(i + 1, map2); <END> this.batch.addMessage(this.message2); } }</code><technical_language>do loop, overwrite message2? intended? if so, feels hard read :-)</technical_language>

Target:
public void setup() { this.batch = new Batch(); this.batch.setProtocol(Protocol.VERSION_2); for(int i = 0; i < numberOfMessage; i++) { Map map = new HashMap<String, String>(); map.put("line", "Another world"); map.put("from", "Little big Adventure"); Message message = new Message(i + 1, map); this.batch.addMessage(message); } }
Source:
<code>private void addDnsConfiguration(ReportedConfigurations result) { <START> if (!this.isManagementNetwork) { <END> return; } List<NameServer> nameServersOfNetworkAttachment = getNameServers(networkAttachment.getDnsResolverConfiguration()); List<NameServer> nameServersOfNetwork = getNameServers(network.getDnsResolverConfiguration()); List<NameServer> nameServersOfHost = getNameServers(vds.getDnsResolverConfiguration()); boolean engineDoesNotContainDnsConfiguration = nameServersOfNetworkAttachment == null && nameServersOfNetwork == null; List<NameServer> expectedNameServers = nameServersOfNetworkAttachment != null ? nameServersOfNetworkAttachment : nameServersOfNetwork; boolean inSync = isDhcpUsed(networkAttachment) || engineDoesNotContainDnsConfiguration || Objects.equals(nameServersOfHost, expectedNameServers); result.add(DNS_CONFIGURATION, addressesAsString(nameServersOfHost), addressesAsString(expectedNameServers), inSync); }</code><technical_language>This bad of: <LINK_0> user override default route. get nameserver values than. simplest solution assume network is out of sync anyway</technical_language>

Target:
private void addDnsConfiguration(ReportedConfigurations result) { if (!hasDnsConfigurationData()) { return; } List<NameServer> nameServersOfNetworkAttachment = getNameServers(networkAttachment.getDnsResolverConfiguration()); List<NameServer> nameServersOfNetwork = getNameServers(network.getDnsResolverConfiguration()); List<NameServer> nameServersOfHost = getNameServers(vds.getDnsResolverConfiguration()); boolean engineDoesNotContainDnsConfiguration = nameServersOfNetworkAttachment == null && nameServersOfNetwork == null; List<NameServer> expectedNameServers = nameServersOfNetworkAttachment != null ? nameServersOfNetworkAttachment : nameServersOfNetwork; boolean inSync = isDhcpUsed(networkAttachment) || engineDoesNotContainDnsConfiguration || Objects.equals(nameServersOfHost, expectedNameServers); result.add(DNS_CONFIGURATION, addressesAsString(nameServersOfHost), addressesAsString(expectedNameServers), inSync); }
Source:
<code>public String createPCJ(final String ryaInstanceName, final String sparql, final Set<ExportStrategy> strategies) throws InstanceDoesNotExistException, RyaClientException { requireNonNull(ryaInstanceName); requireNonNull(sparql); if (!instanceExists.exists(ryaInstanceName)) { throw new InstanceDoesNotExistException(String.format("There is no Rya instance named '%s'.", ryaInstanceName)); } final Optional<String> username = connectionDetails.getUsername(); final MongoCredential cred; final MongoClient client; <START> final ServerAddress addr = new ServerAddress(connectionDetails.getHostname(), connectionDetails.getPort()); <END> if(username.isPresent()) { cred = MongoCredential.createCredential(username.get(), ryaInstanceName, connectionDetails.getPassword().get()); client = new MongoClient(addr, Lists.newArrayList(cred)); } else { client = new MongoClient(addr); } @SuppressWarnings("resource") final MongoPcjStorage pcjStore = new MongoPcjStorage(client, ryaInstanceName); try { return pcjStore.createPcj(sparql); } catch (final PCJStorageException e) { throw new RyaClientException("Unable to create PCJ for: " + sparql, e); } finally { client.close(); } }</code><technical_language>mongo client this provided interactor instead of create a new one. If creating client is connection details for, remove constructor replace a MongoClient</technical_language>

Target:
public String createPCJ(final String ryaInstanceName, final String sparql, final Set<ExportStrategy> strategies) throws InstanceDoesNotExistException, RyaClientException { requireNonNull(ryaInstanceName); requireNonNull(sparql); if (!instanceExists.exists(ryaInstanceName)) { throw new InstanceDoesNotExistException(String.format("There is no Rya instance named '%s'.", ryaInstanceName)); } try(final MongoPcjStorage pcjStore = new MongoPcjStorage(mongoClient, ryaInstanceName)) { return pcjStore.createPcj(sparql); } catch (final PCJStorageException e) { throw new RyaClientException("Unable to create PCJ for: " + sparql, e); } }
Source:
<code>public void visit(NodeTraversal t, Node n, Node parent) { if (n.isExprResult()) { ClassMemberDeclaration declaration = ClassMemberDeclaration.newDeclarationOnThis(n); if (declaration == null || declarationHasBeenAdded(declaration)) { return; } Node fnNode = NodeUtil.getEnclosingFunction(n); String fnName = getEnclosingFunctionName(fnNode); if ("constructor".equals(fnName) && declaration.jsDoc != null && declaration.rhsEqualToField()) { JSTypeExpression declarationType = declaration.jsDoc.getType(); Node params = fnNode.getSecondChild(); @Nullable JSDocInfo constructorJsDoc = NodeUtil.getBestJSDocInfo(fnNode); for (Node param : params.children()) { Node nodeAfterDefault = param.isDefaultValue() ? param.getFirstChild() : param; if (!nodeAfterDefault.isName()) { continue; } String paramName = nodeAfterDefault.getString(); @Nullable JSTypeExpression paramType = <START> constructorJsDoc == null ? null : constructorJsDoc.getParameterType(paramName); <END> if (declaration.memberName.equals(paramName) && (declarationType == null || declarationType.equals(paramType))) { moveAccessModifier(declaration, param); markAsConst(declaration, param); compiler.reportChangeToEnclosingScope(n); n.detach(); return; } } } moveFieldsIntoClasses(declaration); registerDeclaration(declaration); } }</code><technical_language>Thanks, for cleaning TODOs</technical_language>

Target:
public void visit(NodeTraversal t, Node n, Node parent) { if (n.isExprResult()) { ClassMemberDeclaration declaration = ClassMemberDeclaration.newDeclarationOnThis(n); if (declaration == null || declarationHasBeenAdded(declaration)) { return; } Node fnNode = NodeUtil.getEnclosingFunction(n); String fnName = getEnclosingFunctionName(fnNode); if ("constructor".equals(fnName) && declaration.jsDoc != null && declaration.rhsEqualToField()) { JSTypeExpression declarationType = declaration.jsDoc.getType(); Node params = fnNode.getSecondChild(); @Nullable JSDocInfo constructorJsDoc = NodeUtil.getBestJSDocInfo(fnNode); for (Node param : params.children()) { Node nodeAfterDefault = param.isDefaultValue() ? param.getFirstChild() : param; if (!nodeAfterDefault.isName()) { continue; } String paramName = nodeAfterDefault.getString(); @Nullable JSTypeExpression paramType = constructorJsDoc == null ? null : constructorJsDoc.getParameterType(paramName); if (param.isDefaultValue() && Token.EQUALS.equals(paramType.getRoot().getToken())) { paramType = new JSTypeExpression( paramType.getRoot().getFirstChild(), paramType.getSourceName()); } if (declaration.memberName.equals(paramName) && (declarationType == null || declarationType.equals(paramType))) { moveAccessModifier(declaration, param); markAsConst(declaration, param); compiler.reportChangeToEnclosingScope(n); n.detach(); return; } } } moveFieldsIntoClasses(declaration); registerDeclaration(declaration); } }
Source:
<code>public void prepareRun(BatchSinkContext context) throws Exception { Configuration conf = new Configuration(); String path = conf.get( "mapreduce.task.tmp.dir", conf.get( "mapred.child.tmp", <START> conf.get("hadoop.tmp.dir", "/tmp"))) + "/" + UUID.randomUUID().toString(); <END> context.addOutput(Output.of(config.referenceName, new MongoDBOutputFormatProvider(config, path))); }</code><technical_language>/tmp hardcoded. System.getProperty("java.io.tmpdir") instead. set local container directory</technical_language>

Target:
public void prepareRun(BatchSinkContext context) throws Exception { Configuration conf = new Configuration(); String path = conf.get( "mapreduce.task.tmp.dir", conf.get( "mapred.child.tmp", conf.get("hadoop.tmp.dir", System.getProperty("java.io.tmpdir")))) + "/" + UUID.randomUUID().toString(); context.addOutput(Output.of(config.referenceName, new MongoDBOutputFormatProvider(config, path))); }
Source:
<code>public <T extends LwM2mResponse> T send(final Registration destination, DownlinkRequest<T> request, long timeout) throws InterruptedException { if (!presenceService.isClientAwake(destination)) { LOG.info("The destination client is sleeping, request couldn't been sent."); return null; } ResponseCallbackQueueModeSynchronous<T> synchronousResponseCallback = new ResponseCallbackQueueModeSynchronous<T>( <START> presenceService, destination); <END> delegatedSender.send(destination, request, timeout, synchronousResponseCallback, synchronousResponseCallback); return synchronousResponseCallback.waitForResponse(timeout); }</code><technical_language>delegatedSender synchronous API ? (I remember try explain I miss-understood)</technical_language>

Target:
public <T extends LwM2mResponse> T send(final Registration destination, DownlinkRequest<T> request, long timeout) throws InterruptedException { if (!destination.usesQueueMode()) { return delegatedSender.send(destination, request, timeout); } if (!presenceService.isClientAwake(destination)) { LOG.info("The destination client is sleeping, request couldn't been sent."); return null; } T response = delegatedSender.send(destination, request, timeout); if (response != null) { presenceService.setAwake(destination); } else { presenceService.clientNotResponding(destination); } return response; }
Source:
<code>public void testMDirectMenuItem_Check_Bug547050() { MWindow window = ems.createModelElement(MWindow.class); MMenu mainMenu = ems.createModelElement(MMenu.class); MMenu fileMenu = ems.createModelElement(MMenu.class); fileMenu.setElementId("file"); fileMenu.setLabel("File"); mainMenu.getChildren().add(fileMenu); MMenuItem menuItem = ems.createModelElement(MDirectMenuItem.class); fileMenu.getChildren().add(menuItem); window.setMainMenu(mainMenu); application.getChildren().add(window); contextRule.createAndRunWorkbench(window); MenuManagerRenderer renderer = getRenderer(appContext, mainMenu); MenuManager manager = renderer.getManager(mainMenu); assertNotNull("failed to create menu bar manager", manager); manager.updateAll(true); assertEquals(1, manager.getSize()); MenuManager fileManager = renderer.getManager(fileMenu); <START> MenuManagerRendererFilter.updateElementVisibility(fileMenu, renderer, fileManager, appContext, 2, true); <END> Object widget1 = menuItem.getWidget(); assertNotNull(widget1); assertTrue(widget1 instanceof MenuItem); MenuItem menuItemWidget = (MenuItem) widget1; assertFalse(menuItemWidget.isEnabled()); }</code><technical_language>I this function triggered simulating a mouse click main menu instead of calling function directly. If I correct, like: mainMenuWidget.notifyListeners(SWT.Selection, new Event());</technical_language>

Target:
public void testMDirectMenuItem_Check_Bug547050() { MWindow window = ems.createModelElement(MWindow.class); MMenu mainMenu = ems.createModelElement(MMenu.class); MMenu fileMenu = ems.createModelElement(MMenu.class); fileMenu.setElementId("file"); fileMenu.setLabel("File"); mainMenu.getChildren().add(fileMenu); MMenuItem menuItem = ems.createModelElement(MDirectMenuItem.class); fileMenu.getChildren().add(menuItem); window.setMainMenu(mainMenu); application.getChildren().add(window); contextRule.createAndRunWorkbench(window); MenuManager fileMenuManager = getRenderer(appContext, fileMenu).getManager(fileMenu); Menu fileMenuWidget = fileMenuManager.getMenu(); fileMenuWidget.notifyListeners(SWT.Show, null); Object widget1 = menuItem.getWidget(); assertNotNull(widget1); assertTrue(widget1 instanceof MenuItem); MenuItem menuItemWidget = (MenuItem) widget1; assertFalse(menuItemWidget.isEnabled()); }
Source:
<code>public String[] getMessageParameters() { <START> return new String[] {versionFound.toString(), minimumVersion.toString()}; <END> }</code><technical_language>I this method. magic in call site</technical_language>

Target:
public String[] getMessageParameters() { return new String[] {versionFound.toString(), minimumVersion.toString(), minimalVersionNickname}; }
Source:
<code>public final void request(long n) { if (n == 0) { return; } boolean mayDrain; long r; long u; do { <START> r = requestedCount.get(); <END> mayDrain = r == 0; if (r == Long.MAX_VALUE) { break; } if (n == Long.MAX_VALUE) { u = n; mayDrain = true; } else { if (r > Long.MAX_VALUE - n) { u = Long.MAX_VALUE; } else { u = r + n; } } } while (!requestedCount.compareAndSet(r, u)); if (mayDrain) { drain(); } }</code><technical_language>If inlined, requestedCount reference read a local variable loop</technical_language>

Target:
public final void request(long n) { if (n == 0) { return; } boolean mayDrain; long r; long u; do { r = get(); mayDrain = r == 0; if (r == Long.MAX_VALUE) { break; } if (n == Long.MAX_VALUE) { u = n; mayDrain = true; } else { if (r > Long.MAX_VALUE - n) { u = Long.MAX_VALUE; } else { u = r + n; } } } while (!compareAndSet(r, u)); if (mayDrain) { drain(); } }
Source:
<code>public final void commit(DataContainer container) { <START> realCommit(-1, container); <END> }</code><technical_language>Instead of manually typing -1, SegmentSpecificCommand.UNKOWN_SEGMENT</technical_language>

Target:
public final void commit(DataContainer container) { realCommit(SegmentSpecificCommand.UNKNOWN_SEGMENT, container); }
Source:
<code>public void testConvertListOffsetResponseToSaslHandshakeResponse() { ListOffsetResponse response = new ListOffsetResponse(0, Collections.singletonMap(new TopicPartition("topic", 0), new ListOffsetResponse.PartitionData(Errors.NONE, 0, 0, Optional.empty()))); ByteBuffer buffer = response.serialize(ApiKeys.LIST_OFFSETS, LIST_OFFSETS.latestVersion(), 0); RequestHeader header = new RequestHeader(LIST_OFFSETS, LIST_OFFSETS.latestVersion(), "id", SaslClientAuthenticator.MIN_RESERVED_CORRELATION_ID); try { <START> NetworkClient.parseResponse(buffer.duplicate(), header); <END> fail("parsing non-Sasl response should produce SchemaException"); } catch (SchemaException e) { } header = new RequestHeader(LIST_OFFSETS, LIST_OFFSETS.latestVersion(), "id", 1); try { NetworkClient.parseResponse(buffer.duplicate(), header); fail("the mismatched correlation id of request is NOT reserved so it should throw IllegalStateException"); } catch (IllegalStateException e) { } }</code><technical_language>assertThrows here</technical_language>

Target:
public void testConvertListOffsetResponseToSaslHandshakeResponse() { ListOffsetResponse response = new ListOffsetResponse(0, Collections.singletonMap(new TopicPartition("topic", 0), new ListOffsetResponse.PartitionData(Errors.NONE, 0, 0, Optional.empty()))); ByteBuffer buffer = response.serialize(ApiKeys.LIST_OFFSETS, LIST_OFFSETS.latestVersion(), 0); final RequestHeader header0 = new RequestHeader(LIST_OFFSETS, LIST_OFFSETS.latestVersion(), "id", SaslClientAuthenticator.MIN_RESERVED_CORRELATION_ID); Assert.assertThrows(SchemaException.class, () -> NetworkClient.parseResponse(buffer.duplicate(), header0)); final RequestHeader header1 = new RequestHeader(LIST_OFFSETS, LIST_OFFSETS.latestVersion(), "id", 1); Assert.assertThrows(IllegalStateException.class, () -> NetworkClient.parseResponse(buffer.duplicate(), header1)); }
Source:
<code>public void testDecodeAllTheLetters() { AffineCipher affineCipher = new AffineCipher(); <START> assertEquals("thequickbrownfoxjumpsoverthelazydog", affineCipher.decode("swxtj npvyk lruol iejdc blaxk swxmh qzglf", 17, 33)); <END> }</code><technical_language>This line is a bit long, break lines</technical_language>

Target:
public void testDecodeAllTheLetters() { assertEquals("thequickbrownfoxjumpsoverthelazydog", affineCipher.decode("swxtj npvyk lruol iejdc blaxk swxmh qzglf", 17, 33)); }
Source:
<code><START> private static void escape(String[] chars) { <END> for (int i = 0; i < chars.length; i++) { if (chars[i].equals("<")) { chars[i] = "&lt;"; } else if (chars[i].equals(">")) { chars[i] = "&gt;"; } else if (chars[i].equals("&")) { chars[i] = "&amp;"; } } }</code><technical_language>is some escape method/utility/lib a if this reused</technical_language>

Target:
private static void escape(String[] chars) { for (int i = 0; i < chars.length; i++) { chars[i] = StringEscapeUtils.escapeHtml(chars[i]); } }
Source:
<code>public void canBeConstructedFromBytes() throws UnsupportedEncodingException { final String test = "Bye 同時に Пока"; final Utf8String str = new Utf8String( test.getBytes(Utf8StringTest.ENCODING) ); <START> MatcherAssert.assertThat(str.asString(), Matchers.equalTo(test)); <END> MatcherAssert.assertThat( str.asBytes(), Matchers.equalTo(test.getBytes(Utf8StringTest.ENCODING)) ); }</code><technical_language>@Iprogrammerr above, new IsEqual assertions</technical_language>

Target:
public void canBeConstructedFromBytes() throws UnsupportedEncodingException { final String test = "Bye 同時に Пока"; final Utf8String str = new Utf8String( test.getBytes(Utf8StringTest.ENCODING) ); MatcherAssert.assertThat(str.asString(), new IsEqual<>(test)); MatcherAssert.assertThat( str.asBytes(), new IsEqual<>(test.getBytes(Utf8StringTest.ENCODING)) ); }
Source:
<code>protected CommandStack getCommandStack(IWorkbenchPart part, Object input) { <START> Object helper <END> = getInputType(input); if (null != helper) { return SystemManager.INSTANCE.getCommandStack(((Resource) helper).getAutomationSystem()); } return null; }</code><technical_language>this scan allready Resouce, cast line</technical_language>

Target:
protected CommandStack getCommandStack(IWorkbenchPart part, Object input) { Resource helper = getInputType(input); if (null != helper) { return SystemManager.INSTANCE.getCommandStack(helper.getAutomationSystem()); } return null; }
Source:
<code>private static Properties processProperties(final String propertyFileName) throws IOException { final File propertyFile = new File(propertyFileName); final Properties properties = new Properties(); try (InputStream is = new <START> FileInputStream(propertyFile)) <END> { properties.load(is); } return properties; }</code><technical_language>Files.newInputStream() instead of creating a FileInputStream directly. This delegates creation of FileInputStream Java NIO, is a bit more efficient. In particular, finalizer</technical_language>

Target:
private static Properties processProperties(final String propertyFileName) throws IOException { final Path propertyFile = Paths.get(propertyFileName); final Properties properties = new Properties(); try (InputStream is = Files.newInputStream(propertyFile)) { properties.load(is); } return properties; }
Source:
<code>public double getStarDistanceToJumpPoint() { if( null == spectralClass || null == subtype ) { <START> return StarUtil.getDistanceToJumpPoint(42); <END> } return StarUtil.getDistanceToJumpPoint(spectralClass, subtype); }</code><technical_language>Is a reference for this constant</technical_language>

Target:
public double getStarDistanceToJumpPoint() { if( null == spectralClass || null == subtype ) { return StarUtil.getDistanceToJumpPoint(40); } return StarUtil.getDistanceToJumpPoint(spectralClass, subtype); }
Source:
<code>ContributionsListAdapter(final Callback callback, final MediaClient mediaClient) { super(DIFF_CALLBACK); this.callback = callback; this.mediaClient = mediaClient; <START> setHasStableIds(false); <END> }</code><technical_language>this is default omitted</technical_language>

Target:
ContributionsListAdapter(final Callback callback, final MediaClient mediaClient) { super(DIFF_CALLBACK); this.callback = callback; this.mediaClient = mediaClient; }
Source:
<code>public void shouldNotLogPassword() throws Exception { GraphDatabaseFacade database = (GraphDatabaseFacade) databaseBuilder .setConfig( GraphDatabaseSettings.log_queries, Settings.TRUE ) .setConfig( GraphDatabaseSettings.logs_directory, logsDirectory.getPath() ) .setConfig( GraphDatabaseSettings.auth_enabled, Settings.TRUE ) .newGraphDatabase(); EnterpriseAuthManager authManager = database.getDependencyResolver().resolveDependency( EnterpriseAuthManager.class ); EnterpriseSecurityContext neo = authManager.login( AuthToken.newBasicAuthToken( "neo4j", "neo4j" ) ); String query = "CALL dbms.security.changePassword('abc123')"; try ( InternalTransaction tx = database .beginTransaction( KernelTransaction.Type.explicit, neo ) ) { Result res = database.execute( tx, query, Collections.emptyMap() ); res.close(); tx.success(); } finally { database.shutdown(); } List<String> logLines = readAllLines( logFilename ); assertEquals( 1, logLines.size() ); assertThat( logLines.get( 0 ), containsString( "CALL dbms.security.changePassword(******)") ) ; <START> assertThat( logLines.get( 0 ), containsString( neo.subject().username() ) ); <END> }</code><technical_language>Missing assert new password is there! for other tests</technical_language>

Target:
public void shouldNotLogPassword() throws Exception { GraphDatabaseFacade database = (GraphDatabaseFacade) databaseBuilder .setConfig( GraphDatabaseSettings.log_queries, Settings.TRUE ) .setConfig( GraphDatabaseSettings.logs_directory, logsDirectory.getPath() ) .setConfig( GraphDatabaseSettings.auth_enabled, Settings.TRUE ) .newGraphDatabase(); EnterpriseAuthManager authManager = database.getDependencyResolver().resolveDependency( EnterpriseAuthManager.class ); EnterpriseSecurityContext neo = authManager.login( AuthToken.newBasicAuthToken( "neo4j", "neo4j" ) ); String query = "CALL dbms.security.changePassword('abc123')"; try ( InternalTransaction tx = database .beginTransaction( KernelTransaction.Type.explicit, neo ) ) { Result res = database.execute( tx, query, Collections.emptyMap() ); res.close(); tx.success(); } finally { database.shutdown(); } List<String> logLines = readAllLines( logFilename ); assertEquals( 1, logLines.size() ); assertThat( logLines.get( 0 ), containsString( "CALL dbms.security.changePassword(******)") ) ; assertThat( logLines.get( 0 ),not( containsString( "abc123" ) ) ); assertThat( logLines.get( 0 ), containsString( neo.subject().username() ) ); }
Source:
<code>void receive(final String requestId, final IEvents events) { List<IEvents> eventsList = getObjectToBeDispatched(requestId); if (eventsList == null) { eventsList = new ArrayList<>(); } eventsList.add(events); getObjectsToBeDispatched().put(requestId, eventsList); <START> flush(); <END> }</code><technical_language>flush() [](start = 4, length = 11) flush? #Closed</technical_language>

Target:
void receive(final String requestId, final IEvents events) { List<IEvents> eventsList = getObjectsToBeDispatched().get(requestId); if (eventsList == null) { eventsList = new ArrayList<>(); } eventsList.add(events); getObjectsToBeDispatched().put(requestId, eventsList); }
Source:
<code>public AnnotationMirror leastUpperBound( final AnnotationMirror a1, final AnnotationMirror a2) { if (AnnotationUtils.areSame(a1, BOTTOM)) { return a2; } else if (AnnotationUtils.areSame(a2, BOTTOM)) { return a1; } if (!AnnotationUtils.hasElementValue(a1, "value")) { return a1; } if (!AnnotationUtils.hasElementValue(a2, "value")) { return a2; } if (isAccumulatorAnnotation(a1) && isAccumulatorAnnotation(a2)) { Set<String> a1Val = new LinkedHashSet<>( ValueCheckerUtils.getValueOfAnnotationWithStringArgument(a1)); Set<String> a2Val = <START> new LinkedHashSet<>( <END> ValueCheckerUtils.getValueOfAnnotationWithStringArgument(a2)); a1Val.retainAll(a2Val); return createAccumulatorAnnotation(a1Val.toArray(new String[0])); } else { return TOP; } }</code><technical_language>This a LinkedHashSet. A HashSet give results. a LinkedHashSet (or a LinkedList for variables is more efficient), do O(n) instead of O(n log n) pass remove duplicates, call a createAccumulatorAnnotationFromSorted routine avoid subsequent calls sort. (More generally, code is retain order reduce need for sorting, advantage of (except sort run faster a partially-sorted array)</technical_language>

Target:
public AnnotationMirror leastUpperBound( final AnnotationMirror a1, final AnnotationMirror a2) { if (AnnotationUtils.areSame(a1, bottom)) { return a2; } else if (AnnotationUtils.areSame(a2, bottom)) { return a1; } List<String> a1Val = getAccumulatedValues(a1); List<String> a2Val = getAccumulatedValues(a2); if (a1Val.containsAll(a2Val)) { return a2; } if (a2Val.containsAll(a1Val)) { return a1; } a1Val.retainAll(a2Val); return createAccumulatorAnnotation(a1Val); }
Source:
<code>public void deletePermanentGroupUnprocessableTest() throws Exception { context.turnOffAuthorisationSystem(); GroupService groupService = EPersonServiceFactory.getInstance().getGroupService(); final Group group = groupService.findByName(context, Group.ANONYMOUS); <START> context.restoreAuthSystemState(); <END> String authToken = getAuthToken(admin.getEmail(), password); getClient(authToken).perform( get("/api/eperson/groups/" + group.getID()) ).andExpect(status().isOk()); getClient(authToken).perform( delete("/api/eperson/groups/" + group.getID()) ).andExpect(status().isUnprocessableEntity()); getClient(authToken).perform( get("/api/eperson/groups/" + group.getID()) ).andExpect(status().isOk()); }</code><technical_language>need context.turnOffAuthorisationSystem() context.restoreAuthSystemState() lines here. creating test content, searching for ANONYMOUS group</technical_language>

Target:
public void deletePermanentGroupUnprocessableTest() throws Exception { GroupService groupService = EPersonServiceFactory.getInstance().getGroupService(); final Group group = groupService.findByName(context, Group.ANONYMOUS); String authToken = getAuthToken(admin.getEmail(), password); getClient(authToken).perform( get("/api/eperson/groups/" + group.getID()) ).andExpect(status().isOk()); getClient(authToken).perform( delete("/api/eperson/groups/" + group.getID()) ).andExpect(status().isUnprocessableEntity()); getClient(authToken).perform( get("/api/eperson/groups/" + group.getID()) ).andExpect(status().isOk()); }
Source:
<code>public void testSQLWithAPI() throws ClassNotFoundException, IOException { LogicalPlan dag = new LogicalPlan(); String schema = "{\"separator\":\",\",\"quoteChar\":\"\\\"\",\"fields\":[" + "{\"name\":\"RowTime\",\"type\":\"Date\",\"constraints\":{\"format\":\"dd/MM/yyyy hh:mm:ss Z\"}}," + "{\"name\":\"id\",\"type\":\"Integer\"},{\"name\":\"Product\",\"type\":\"String\"}," + "{\"name\":\"units\",\"type\":\"Integer\"}]}"; <START> Endpoint endpoint = new FileEndpoint("/tmp/test", new CSVMessageFormat(schema)); <END> SQLExecEnvironment.getEnvironment() .registerTable("ORDERS", endpoint) .executeSQL(dag, "SELECT STREAM FLOOR(ROWTIME TO HOUR), SUBSTRING(PRODUCT, 0, 5) FROM ORDERS WHERE id > 3"); dag.validate(); }</code><technical_language>createTempFile</technical_language>

Target:
public void testSQLWithAPI() throws ClassNotFoundException, IOException { LogicalPlan dag = new LogicalPlan(); String schema = "{\"separator\":\",\",\"quoteChar\":\"\\\"\",\"fields\":[" + "{\"name\":\"RowTime\",\"type\":\"Date\",\"constraints\":{\"format\":\"dd/MM/yyyy hh:mm:ss Z\"}}," + "{\"name\":\"id\",\"type\":\"Integer\"},{\"name\":\"Product\",\"type\":\"String\"}," + "{\"name\":\"units\",\"type\":\"Integer\"}]}"; Endpoint endpoint = new FileEndpoint("dummyFilePath", new CSVMessageFormat(schema)); SQLExecEnvironment.getEnvironment() .registerTable("ORDERS", endpoint) .executeSQL(dag, "SELECT STREAM FLOOR(ROWTIME TO HOUR), SUBSTRING(PRODUCT, 0, 5) FROM ORDERS WHERE id > 3"); dag.validate(); }
Source:
<code>public ResponsePayload uninstallApplication(ApplicationWrapper applicationWrapper, @PathParam("tenantDomain") String tenantDomain) throws MDMAPIException { ResponsePayload responseMsg = new ResponsePayload(); ApplicationManager appManagerConnector; org.wso2.carbon.device.mgt.common.operation.mgt.Operation operation = null; ArrayList<DeviceIdentifier> deviceIdentifiers; try { appManagerConnector = MDMAPIUtils.getAppManagementService(); MobileApp mobileApp = applicationWrapper.getApplication(); if (applicationWrapper.getDeviceIdentifiers() != null) { for (DeviceIdentifier deviceIdentifier : applicationWrapper.getDeviceIdentifiers()) { deviceIdentifiers = new ArrayList<DeviceIdentifier>(); if (deviceIdentifier.getType().equals(Platform.android.toString())) { operation = MDMAndroidOperationUtil.createAppUninstallOperation(mobileApp); } else if (deviceIdentifier.getType().equals(Platform.ios.toString())) { operation = MDMIOSOperationUtil.createAppUninstallOperation(mobileApp); } deviceIdentifiers.add(deviceIdentifier); } appManagerConnector.installApplicationForDevices(operation, applicationWrapper.getDeviceIdentifiers()); } Response.status(HttpStatus.SC_CREATED); <START> responseMsg.setMessageFromServer("Application has uninstalled successfully."); <END> return responseMsg; } catch (ApplicationManagementException e) { String msg = "Error occurred while saving the operation"; log.error(msg, e); throw new MDMAPIException(msg, e); } }</code><technical_language>Wrong grammar in message used. Please fix</technical_language>

Target:
public ResponsePayload uninstallApplication(ApplicationWrapper applicationWrapper, @PathParam("tenantDomain") String tenantDomain) throws MDMAPIException { ResponsePayload responseMsg = new ResponsePayload(); ApplicationManager appManagerConnector; org.wso2.carbon.device.mgt.common.operation.mgt.Operation operation = null; ArrayList<DeviceIdentifier> deviceIdentifiers; try { appManagerConnector = MDMAPIUtils.getAppManagementService(); MobileApp mobileApp = applicationWrapper.getApplication(); if (applicationWrapper.getDeviceIdentifiers() != null) { for (DeviceIdentifier deviceIdentifier : applicationWrapper.getDeviceIdentifiers()) { deviceIdentifiers = new ArrayList<DeviceIdentifier>(); if (deviceIdentifier.getType().equals(Platform.android.toString())) { operation = MDMAndroidOperationUtil.createAppUninstallOperation(mobileApp); } else if (deviceIdentifier.getType().equals(Platform.ios.toString())) { operation = MDMIOSOperationUtil.createAppUninstallOperation(mobileApp); } deviceIdentifiers.add(deviceIdentifier); } appManagerConnector.installApplicationForDevices(operation, applicationWrapper.getDeviceIdentifiers()); } Response.status(HttpStatus.SC_CREATED); responseMsg.setMessageFromServer("Application removal request has been sent to the device."); return responseMsg; } catch (ApplicationManagementException e) { String msg = "Error occurred while saving the operation"; log.error(msg, e); throw new MDMAPIException(msg, e); } }
Source:
<code>Table<K, V, M> getTable(String namespace, String tableName) { String fullyQualifiedTableName = getFullyQualifiedTableName(namespace, tableName); if (!tableMap.containsKey(fullyQualifiedTableName)) { UUID tableStreamId = CorfuRuntime.getStreamID(fullyQualifiedTableName); long tableStreamTail = runtime.getSequencerView().query(tableStreamId); <START> if (tableStreamTail != Address.NON_EXIST) { <END> throw new IllegalArgumentException("Insufficient parameters to re-open existing table " + tableName + " in namespace " + namespace); } else { throw new NoSuchElementException( String.format("No such table found: namespace: %s, tableName: %s", namespace, tableName)); } } return (Table<K, V, M>) tableMap.get(fullyQualifiedTableName); }</code><technical_language>checkpointer bump tail if table is empty, if this check is reliable</technical_language>

Target:
Table<K, V, M> getTable(String namespace, String tableName) { String fullyQualifiedTableName = getFullyQualifiedTableName(namespace, tableName); if (!tableMap.containsKey(fullyQualifiedTableName)) { if (registryTable.containsKey( TableName.newBuilder() .setNamespace(namespace) .setTableName(tableName) .build()) ) { throw new IllegalArgumentException("Please provide Key, Value & Metadata schemas to re-open" + " this existing table " + tableName + " in namespace " + namespace); } else { throw new NoSuchElementException( String.format("No such table found: namespace: %s, tableName: %s", namespace, tableName)); } } return (Table<K, V, M>) tableMap.get(fullyQualifiedTableName); }
Source:
<code>protected void onPostExecuteInternal(final Boolean result) { if (activity != null) { final Context nonNullActivity = activity; if (result) { ActivityMixin.showToast(activity, uploadFailed == 0 ? nonNullActivity.getString(R.string.export_modifiedcoords_success) : nonNullActivity.getString(R.string.export_modifiedcoords_result, uploadFailed, uploadOk)); } else { ActivityMixin.showToast(activity, nonNullActivity.getString(R.string.export_modifiedcoords_error)); } <START> Log.e("upload finished: ok=" + uploadOk + " / failed=" + uploadFailed + " / total=" + uploadProgress); <END> } }</code><technical_language>I stumbled this line basic knowledge: do call log.e instead of log.d? AFAIR log.e stop app in case debug mode is active. for this informative logging log.dshould right choice...I totally wrong though</technical_language>

Target:
protected void onPostExecuteInternal(final Boolean result) { if (activity != null) { final Context nonNullActivity = activity; if (result) { ActivityMixin.showToast(activity, uploadFailed == 0 ? nonNullActivity.getString(R.string.export_modifiedcoords_success) : nonNullActivity.getString(R.string.export_modifiedcoords_result, uploadFailed, uploadOk)); } else { ActivityMixin.showToast(activity, nonNullActivity.getString(R.string.export_modifiedcoords_error)); } Log.d("upload finished: ok=" + uploadOk + " / failed=" + uploadFailed + " / total=" + uploadProgress); } }
Source:
<code>public Folder createFolders(String path, Host host, User user, boolean respectFrontEndPermissions) throws DotHibernateException, DotSecurityException, DotDataException { StringTokenizer st = new StringTokenizer(path, ROOT_PATH); StringBuffer sb = new StringBuffer(ROOT_PATH); Folder parent = null; while (st.hasMoreTokens()) { String name = st.nextToken(); sb.append(name + ROOT_PATH); <START> Folder f = findFolderByPath(sb.toString(), host, user, respectFrontEndPermissions); <END> if (f == null || !InodeUtils.isSet(f.getInode())) { f= new Folder(); f.setName(name); f.setTitle(name); f.setShowOnMenu(false); f.setSortOrder(0); f.setFilesMasks(""); f.setHostId(host.getIdentifier()); f.setDefaultFileType(CacheLocator.getContentTypeCache().getStructureByVelocityVarName(APILocator.getFileAssetAPI().DEFAULT_FILE_ASSET_STRUCTURE_VELOCITY_VAR_NAME).getInode()); Identifier newIdentifier = new Identifier(); if(!UtilMethods.isSet(parent)){ newIdentifier = APILocator.getIdentifierAPI().createNew(f, host); }else{ newIdentifier = APILocator.getIdentifierAPI().createNew(f, parent); } f.setIdentifier(newIdentifier.getId()); save(f, user, respectFrontEndPermissions); } parent = f; } return parent; }</code><technical_language>rename folder</technical_language>

Target:
public Folder createFolders(String path, Host host, User user, boolean respectFrontEndPermissions) throws DotHibernateException, DotSecurityException, DotDataException { StringTokenizer st = new StringTokenizer(path, ROOT_PATH); StringBuffer sb = new StringBuffer(ROOT_PATH); Folder parent = null; while (st.hasMoreTokens()) { String name = st.nextToken(); sb.append(name + ROOT_PATH); Folder folder = findFolderByPath(sb.toString(), host, user, respectFrontEndPermissions); if (folder == null || !InodeUtils.isSet(folder.getInode())) { folder = new Folder(); folder.setName(name); folder.setTitle(name); folder.setShowOnMenu(false); folder.setSortOrder(0); folder.setFilesMasks(""); folder.setHostId(host.getIdentifier()); folder.setDefaultFileType(CacheLocator.getContentTypeCache().getStructureByVelocityVarName(APILocator.getFileAssetAPI().DEFAULT_FILE_ASSET_STRUCTURE_VELOCITY_VAR_NAME).getInode()); Identifier newIdentifier = new Identifier(); if(!UtilMethods.isSet(parent)){ newIdentifier = APILocator.getIdentifierAPI().createNew(folder, host); }else{ newIdentifier = APILocator.getIdentifierAPI().createNew(folder, parent); } folder.setIdentifier(newIdentifier.getId()); save(folder, user, respectFrontEndPermissions); } parent = folder; } return parent; }
Source:
<code>public boolean isPage200(HttpMessage msg) { if (isCustomPage(msg, CustomPage.Type.NOTFOUND_404) || isCustomPage(msg, CustomPage.Type.ERROR_500)) { <START> return false; <END> } return isCustomPage(msg, CustomPage.Type.OK_200) ? true : msg.getResponseHeader().getStatusCode() == HttpStatusCode.OK; }</code><technical_language>covered</technical_language>

Target:
public boolean isPage200(HttpMessage msg) { if (isCustomPage(msg, CustomPage.Type.NOTFOUND_404) || isCustomPage(msg, CustomPage.Type.ERROR_500)) { return false; } if (isCustomPage(msg, CustomPage.Type.OK_200)) { return true; } return msg.getResponseHeader().getStatusCode() == HttpStatusCode.OK; }
Source:
<code>public MergeCommand include(String name, AnyObjectId commit) { checkCallable(); <START> this.commits.put(name, commit); <END> return this; }</code><technical_language>This needs commit.copy(). AnyObjectId a MutableObjectId, change after-the-fact. copy() returns ObjectId mutated. If input immutable ObjectId, copy() returns object</technical_language>

Target:
public MergeCommand include(String name, AnyObjectId commit) { return include(new ObjectIdRef.Unpeeled(Storage.LOOSE, name, commit.copy())); }
Source:
<code>private void registerHandlers() { <START> for (MessageHandlerMetrics source : handlers) { <END> MessageHandlerMetrics monitor = enhanceHandlerMonitor(source); String name = monitor.getManagedName(); this.allHandlersByName.put(name, monitor); if (!PatternMatchUtils.simpleMatch(this.componentNamePatterns, name)) { continue; } if (!handlersByName.containsKey(name)) { String beanKey = getHandlerBeanKey(monitor); if (name != null) { handlersByName.put(name, monitor); } Boolean enabled = enabled(this.enabledCountsPatterns, name); if (enabled != null) { monitor.enableCounts(enabled); } enabled = enabled(this.enabledStatsPatterns, name); if (enabled != null) { monitor.enableStats(enabled); } registerBeanNameOrInstance(monitor, beanKey); } } }</code><technical_language>s/source/handler</technical_language>

Target:
private void registerHandlers() { for (MessageHandlerMetrics handler : handlers) { MessageHandlerMetrics monitor = enhanceHandlerMonitor(handler); String name = monitor.getManagedName(); this.allHandlersByName.put(name, monitor); if (!matches(this.componentNamePatterns, name)) { continue; } if (!handlersByName.containsKey(name)) { String beanKey = getHandlerBeanKey(monitor); if (name != null) { handlersByName.put(name, monitor); } Boolean enabled = smartMatch(this.enabledCountsPatterns, name); if (enabled != null) { monitor.enableCounts(enabled); } enabled = smartMatch(this.enabledStatsPatterns, name); if (enabled != null) { monitor.enableStats(enabled); } registerBeanNameOrInstance(monitor, beanKey); } } }
Source:
<code>private ITimeGraphState createTimeGraphState(ITmfStateInterval interval, ITmfStateSystem ss) throws StateSystemDisposedException { long startTime = interval.getStartTime(); long endTime = interval.getEndTime(); long duration = endTime - startTime + 1; Object statusObj = interval.getValue(); Type type = fEntryModelTypes.get(interval.getAttribute()); if (statusObj instanceof Integer) { int status = (int) statusObj; if (type == Type.CPU) { if (status == StateValues.CPU_STATUS_RUN_USERMODE || status == StateValues.CPU_STATUS_RUN_SYSCALL) { return fTimeEventNames.getUnchecked(interval); } } else if (type == Type.CURRENT_THREAD) { Object processName = null; if (fExecNamesCache.containsEntry(status, interval)) { processName = fExecNamesCache.get(status).first().getValue(); } else { int quark = ss.optQuarkAbsolute(Attributes.THREADS, Integer.toString(status), Attributes.EXEC_NAME); if (quark != ITmfStateSystem.INVALID_ATTRIBUTE) { ITmfStateInterval namedInterval = ss.querySingleState(endTime, quark); fExecNamesCache.put(status, namedInterval); processName = namedInterval.getValue(); } } if (processName instanceof String) { return new TimeGraphState(startTime, duration, status, (String) processName + <START> '/' + status); <END> } } return new TimeGraphState(startTime, duration, status); } return new TimeGraphState(startTime, duration, Integer.MIN_VALUE); }</code><technical_language>I want disagree genevieve here, argue in favor of duplicating pid, easier access exact name in tool tip. if want label display exec_name (tid), composed in presentation provider</technical_language>

Target:
private ITimeGraphState createTimeGraphState(ITmfStateInterval interval, ITmfStateSystem ss) throws StateSystemDisposedException { long startTime = interval.getStartTime(); long endTime = interval.getEndTime(); long duration = endTime - startTime + 1; Object statusObj = interval.getValue(); Type type = fEntryModelTypes.get(interval.getAttribute()); if (statusObj instanceof Integer) { int status = (int) statusObj; if (type == Type.CPU) { if (status == StateValues.CPU_STATUS_RUN_USERMODE || status == StateValues.CPU_STATUS_RUN_SYSCALL) { return fTimeEventNames.getUnchecked(interval); } } else if (type == Type.CURRENT_THREAD) { Object processName = null; if (fExecNamesCache.containsEntry(status, interval)) { processName = fExecNamesCache.get(status).first().getValue(); } else { int quark = ss.optQuarkAbsolute(Attributes.THREADS, Integer.toString(status), Attributes.EXEC_NAME); if (quark != ITmfStateSystem.INVALID_ATTRIBUTE) { ITmfStateInterval namedInterval = ss.querySingleState(endTime, quark); fExecNamesCache.put(status, namedInterval); processName = namedInterval.getValue(); } } if (processName instanceof String) { return new TimeGraphState(startTime, duration, status, (String) processName); } } return new TimeGraphState(startTime, duration, status); } return new TimeGraphState(startTime, duration, Integer.MIN_VALUE); }
Source:
<code>protected void revertTask() { getEnclosingCommand().getParameters().getDiskImage().setImageStatus(ImageStatus.ILLEGAL); ImagesHandler.updateImageStatus( <START> getEnclosingCommand().getParameters().getDestinationImageId(), ImageStatus.ILLEGAL); <END> }</code><technical_language>please perform update explicitly image modified in line (add .getId)</technical_language>

Target:
protected void revertTask() { }
Source:
<code>public JobManagerRunner createJobManagerRunner( JobGraph jobGraph, Configuration configuration, RpcService rpcService, HighAvailabilityServices highAvailabilityServices, HeartbeatServices heartbeatServices, JobManagerSharedServices jobManagerSharedServices, JobManagerJobMetricGroupFactory jobManagerJobMetricGroupFactory, FatalErrorHandler fatalErrorHandler) throws Exception { assertEquals(expectedJobId, jobGraph.getJobID()); createdJobManagerRunnerLatch.countDown(); JobManagerRunner jobManagerRunner = DefaultJobManagerRunnerFactory.INSTANCE.createJobManagerRunner( jobGraph, configuration, rpcService, highAvailabilityServices, heartbeatServices, jobManagerSharedServices, jobManagerJobMetricGroupFactory, fatalErrorHandler); <START> return jobManagerRunner; <END> }</code><technical_language>nit: this reverted</technical_language>

Target:
public JobManagerRunner createJobManagerRunner( JobGraph jobGraph, Configuration configuration, RpcService rpcService, HighAvailabilityServices highAvailabilityServices, HeartbeatServices heartbeatServices, JobManagerSharedServices jobManagerSharedServices, JobManagerJobMetricGroupFactory jobManagerJobMetricGroupFactory, FatalErrorHandler fatalErrorHandler) throws Exception { assertEquals(expectedJobId, jobGraph.getJobID()); createdJobManagerRunnerLatch.countDown(); return DefaultJobManagerRunnerFactory.INSTANCE.createJobManagerRunner( jobGraph, configuration, rpcService, highAvailabilityServices, heartbeatServices, jobManagerSharedServices, jobManagerJobMetricGroupFactory, fatalErrorHandler); }