auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private String nodeToString(Node node) { StringWriter stringWriter = new StringWriter(); try { Transformer transformer = TransformerFactory.newInstance().newTransformer(); transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); transformer.setOutputProperty(OutputKeys.INDENT, "no"); transformer.transform(new DOMSource(node), new StreamResult(stringWriter)); } catch (TransformerException te) { <START> System.out.println("nodeToString Transformer Exception"); <END> } return stringWriter.toString(); }</code><technical_language>write std out. LOG.warn/error/info/debug, appropriate. Also, do want return empty string in case a TransformerException? exception propagated</technical_language>

Target:
private String nodeToString(Node node) { StringWriter stringWriter = new StringWriter(); try { Transformer transformer = TransformerFactory.newInstance().newTransformer(); transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); transformer.setOutputProperty(OutputKeys.INDENT, "no"); transformer.transform(new DOMSource(node), new StreamResult(stringWriter)); } catch (TransformerException e) { throw new IllegalArgumentException("Cannot convert node to string. Transformer exception ", e); } return stringWriter.toString(); }
Source:
<code>public void buildBasicImage() throws Exception { <START> final TestResponse response = Mockito.mock(TestResponse.class); <END> Mockito.when(response.xpath(Mockito.anyString())) .thenReturn(Arrays.asList("test")); final ButtonRs res = new ButtonRs( new ButtonRs.BuildInfoRetriever() { @Override public TestResponse info(final UriBuilder builder, final String stand) { return response; } } ); res.setUriInfo(new UriInfoMocker().mock()); res.setHttpHeaders(new HttpHeadersMocker().mock()); res.setStand("stand"); res.setRule("rule"); MatcherAssert.assertThat( URLConnection.guessContentTypeFromStream( new ByteArrayInputStream((byte[]) res.button().getEntity()) ), Matchers.equalTo(MediaType.PNG.toString()) ); }</code><technical_language>Instead of mocking I new SimpleXml("<test/>"), easier understand</technical_language>

Target:
public void buildBasicImage() throws Exception { final String rule = "rultor-on-commit"; final ButtonRs res = new ButtonRs( new ButtonRs.Build() { @Override public XmlDocument info(final URI uri, final String stand) { return new SimpleXml( String.format( "<page><widgets><widget class=\"com.rultor.widget.BuildHealth\"><builds><build>" + " <coordinates><rule>%s</rule></coordinates>" + " <duration>1212602</duration>" + " <code>0</code>" + " <health>0.6153846153846154</health>" + "</build></builds></widget></widgets></page>", rule ) ); } } ); res.setUriInfo(new UriInfoMocker().mock()); res.setHttpHeaders(new HttpHeadersMocker().mock()); res.setStand("stand"); res.setRule(rule); MatcherAssert.assertThat( URLConnection.guessContentTypeFromStream( new ByteArrayInputStream((byte[]) res.button().getEntity()) ), Matchers.equalTo(MediaType.PNG.toString()) ); }
Source:
<code>public String toString() { StringBuilder builder = new StringBuilder(); if (_description != null) { builder.append(_description); } if (_exception != null) { <START> builder.append(", StackTrace: "); <END> builder.append(ExceptionUtils.getStackTrace(_exception)); } return builder.toString(); }</code><technical_language>nit: want change this message "Exception StackTrace:"</technical_language>

Target:
public String toString() { StringBuilder builder = new StringBuilder(); if (_description != null) { builder.append(_description); } if (_exception != null) { builder.append(", Exception StackTrace: "); builder.append(ExceptionUtils.getStackTrace(_exception)); } return builder.toString(); }
Source:
<code>private long doSeek(TopicPartition newTp, OffsetAndMetadata committedOffset) { <START> LOG.trace("Seeking offset for topic-partition with and {}", newTp, firstPollOffsetStrategy, committedOffset); <END> if (committedOffset != null) { if (isOffsetCommittedByThisTopology(newTp, committedOffset)) { kafkaConsumer.seek(newTp, committedOffset.offset()); } else { if (firstPollOffsetStrategy.equals(EARLIEST)) { kafkaConsumer.seekToBeginning(Collections.singleton(newTp)); } else if (firstPollOffsetStrategy.equals(LATEST)) { kafkaConsumer.seekToEnd(Collections.singleton(newTp)); } else { kafkaConsumer.seek(newTp, committedOffset.offset()); } } } else { if (firstPollOffsetStrategy.equals(EARLIEST) || firstPollOffsetStrategy.equals(UNCOMMITTED_EARLIEST)) { kafkaConsumer.seekToBeginning(Collections.singleton(newTp)); } else if (firstPollOffsetStrategy.equals(LATEST) || firstPollOffsetStrategy.equals(UNCOMMITTED_LATEST)) { kafkaConsumer.seekToEnd(Collections.singleton(newTp)); } } return kafkaConsumer.position(newTp); }</code><technical_language>Nit: put inserted values matches other logs</technical_language>

Target:
private long doSeek(TopicPartition newTp, OffsetAndMetadata committedOffset) { LOG.trace("Seeking offset for topic-partition with and committed offset [{}]", newTp, firstPollOffsetStrategy, committedOffset); if (committedOffset != null) { if (isOffsetCommittedByThisTopology(newTp, committedOffset)) { kafkaConsumer.seek(newTp, committedOffset.offset()); } else { if (firstPollOffsetStrategy.equals(EARLIEST)) { kafkaConsumer.seekToBeginning(Collections.singleton(newTp)); } else if (firstPollOffsetStrategy.equals(LATEST)) { kafkaConsumer.seekToEnd(Collections.singleton(newTp)); } else { kafkaConsumer.seek(newTp, committedOffset.offset()); } } } else { if (firstPollOffsetStrategy.equals(EARLIEST) || firstPollOffsetStrategy.equals(UNCOMMITTED_EARLIEST)) { kafkaConsumer.seekToBeginning(Collections.singleton(newTp)); } else if (firstPollOffsetStrategy.equals(LATEST) || firstPollOffsetStrategy.equals(UNCOMMITTED_LATEST)) { kafkaConsumer.seekToEnd(Collections.singleton(newTp)); } } return kafkaConsumer.position(newTp); }
Source:
<code>public final void setExtendedExpiresOn(final Date extendedExpiresOn) { <START> this.mExtendedExpiresOn = extendedExpiresOn; <END> }</code><technical_language>this [](start = 8, length = 4) this. please</technical_language>

Target:
public final void setExtendedExpiresOn(final Date extendedExpiresOn) { mExtendedExpiresOn = extendedExpiresOn; }
Source:
<code>public void runTask() { <START> throw new SamzaException("Running StreamTask is not implemented for LocalContainerRunner"); <END> }</code><technical_language>UnsupportedOperationException</technical_language>

Target:
public void runTask() { throw new UnsupportedOperationException("Running StreamTask is not implemented for LocalContainerRunner"); }
Source:
<code>public Serializable execute(TaskResult... results) throws IOException { List<String> filesRelativePathName; FTPClient ftpClient = new FTPClient(); ftpClient.connect(ftpHostname, ftpPort); int reply = ftpClient.getReplyCode(); if (!FTPReply.isPositiveCompletion(reply)) { ftpClient.disconnect(); throw new IOException("Exception in connecting to FTP Server"); } ftpClient.login(ftpUsername, ftpPassword); ftpClient.enterLocalPassiveMode(); getOut().println("Connected"); switch (ftpMode) { case "GET": filesRelativePathName = ftpGet(ftpClient); break; case "PUT": filesRelativePathName = ftpPut(ftpClient); break; default: throw new IllegalArgumentException("FTP MODE can only be PUT or GET."); } ftpClient.logout(); <START> ftpClient.disconnect(); <END> getOut().println("Disconnected"); return (Serializable) filesRelativePathName; }</code><technical_language>If threw this IllegalArgumentException("FTP MODE PUT GET."), logout() disconnect(). I do severe is this. in case can: try { ... } finally { ftpClient.logout(); ftpClient.disconnect(); }</technical_language>

Target:
public Serializable execute(TaskResult... results) throws IOException { List<String> filesRelativePathName; FTPClient ftpClient = new FTPClient(); try { ftpClient.connect(ftpHostname, ftpPort); int reply = ftpClient.getReplyCode(); if (!FTPReply.isPositiveCompletion(reply)) { ftpClient.disconnect(); throw new IOException("Exception in connecting to FTP Server"); } if (!ftpClient.login(ftpUsername, ftpPassword)) { throw new IOException("Logging refused."); } ftpClient.enterLocalPassiveMode(); getOut().println("Connected"); switch (ftpMode) { case "GET": filesRelativePathName = ftpGet(ftpClient); break; case "PUT": filesRelativePathName = ftpPut(ftpClient); break; default: throw new IllegalArgumentException("FTP MODE can only be PUT or GET."); } } catch (IOException e) { throw new IOException("Connection issues. The hostname and/or ftpPort can be wrong."); } finally { ftpClient.logout(); ftpClient.disconnect(); getOut().println("Disconnected"); } return (Serializable) filesRelativePathName; }
Source:
<code>private void init501() { Builder version = forVersion(VersionEnum.V5_0_1); Builder.BuilderWithTableName spidxDate = version.onTable("HFJ_SPIDX_DATE"); spidxDate.addIndex("20200520.1", "IDX_SP_DATE_HASH_LOW").unique(false).withColumns("HASH_IDENTITY", "SP_VALUE_LOW"); spidxDate.addIndex("20200520.2", "IDX_SP_DATE_ORD_DATE_HASH").unique(false).withColumns("HASH_IDENTITY", "SP_VALUE_LOW_DATE_ORDINAL", "SP_VALUE_HIGH_DATE_ORDINAL"); <START> spidxDate.addIndex("20200520.3", "IDX_SP_DATE_ORD_DATE_HASH_LOW").unique(false).withColumns("HASH_IDENTITY", "SP_VALUE_LOW_DATE_ORDINAL"); <END> }</code><technical_language>This higher length limit. James a test enforces this test catch it. I forget length limit is</technical_language>

Target:
private void init501() { Builder version = forVersion(VersionEnum.V5_0_1); Builder.BuilderWithTableName spidxDate = version.onTable("HFJ_SPIDX_DATE"); spidxDate.addIndex("20200514.1", "IDX_SP_DATE_HASH_LOW").unique(false).withColumns("HASH_IDENTITY", "SP_VALUE_LOW"); spidxDate.addIndex("20200514.2", "IDX_SP_DATE_ORD_HASH").unique(false).withColumns("HASH_IDENTITY", "SP_VALUE_LOW_DATE_ORDINAL", "SP_VALUE_HIGH_DATE_ORDINAL"); spidxDate.addIndex("20200514.3", "IDX_SP_DATE_ORD_HASH_LOW").unique(false).withColumns("HASH_IDENTITY", "SP_VALUE_LOW_DATE_ORDINAL"); }
Source:
<code>public static void main(String[] args) throws Exception { Map<String, Object> opts = new Docopt(USAGE) .withVersion(GitRepositoryState.getRepositoryState().describe) .parse(args); String corfuConfigurationString = (String) opts.get("-c"); CorfuRuntime runtime = getRuntimeAndConnect(corfuConfigurationString); CorfuStore corfuStore = new CorfuStore(runtime); <START> String namespace = "aaa"; <END> String tableName = "profile"; corfuStore.openTable(namespace, tableName, Name.class, Car.class, null, TableOptions.builder().build()); corfuStore.tx(namespace) .create(tableName, Name.newBuilder().setFirstName("a").setLastName("x").build(), Car.newBuilder().setColor("red").build(), null) .commit(); CorfuRecord record = corfuStore.query(namespace) .getRecord(tableName, Name.newBuilder().setFirstName("a").setLastName("x").build()); System.out.println("Car = " + record.getPayload()); corfuStore.tx(namespace) .update(tableName, Name.newBuilder().setFirstName("a").setLastName("x").build(), Car.newBuilder().setColor("silver").build(), null) .commit(); record = corfuStore.query(namespace) .getRecord(tableName, Name.newBuilder().setFirstName("a").setLastName("x").build()); System.out.println("Car = " + record.getPayload()); }</code><technical_language>need a more readable name</technical_language>

Target:
public static void main(String[] args) throws Exception { Map<String, Object> opts = new Docopt(USAGE) .withVersion(GitRepositoryState.getRepositoryState().describe) .parse(args); String corfuConfigurationString = (String) opts.get("-c"); CorfuRuntime runtime = getRuntimeAndConnect(corfuConfigurationString); CorfuStore corfuStore = new CorfuStore(runtime); String namespace = "credentials"; String tableName = "profile"; corfuStore.openTable(namespace, tableName, Name.class, Car.class, null, TableOptions.builder().build()); corfuStore.tx(namespace) .create(tableName, Name.newBuilder().setFirstName("a").setLastName("x").build(), Car.newBuilder().setColor("red").build(), null) .commit(); CorfuRecord record = corfuStore.query(namespace) .getRecord(tableName, Name.newBuilder().setFirstName("a").setLastName("x").build()); System.out.println("Car = " + record.getPayload()); corfuStore.tx(namespace) .update(tableName, Name.newBuilder().setFirstName("a").setLastName("x").build(), Car.newBuilder().setColor("silver").build(), null) .commit(); record = corfuStore.query(namespace) .getRecord(tableName, Name.newBuilder().setFirstName("a").setLastName("x").build()); System.out.println("Car = " + record.getPayload()); }
Source:
<code>public void clearBuffer() { if <START> (trimJob != null) { <END> trimJob.setOffset(-1); trimJob.schedule(); } }</code><technical_language>I place set trimJob null. access in other places null check. null job introduce checks, remove check here</technical_language>

Target:
public void clearBuffer() { trimJob.setOffset(-1); trimJob.schedule(); }
Source:
<code>public void addStream(long id, File streamFile) throws CTFReaderException { if (!fStreams.containsKey(id)) { fStreams.put(id, new Stream(this)); } <START> Stream stream = fStreams.get(id); <END> stream.addInput(new StreamInput(stream, streamFile)); }</code><technical_language>minor thing, in case if, a reference "new Stream", do need do a map lookup in case</technical_language>

Target:
public void addStream(long id, File streamFile) throws CTFReaderException { Stream stream = null; if (fStreams.containsKey(id)) { stream = fStreams.get(id); } else { stream = new Stream(this); fStreams.put(id, stream); } stream.addInput(new StreamInput(stream, streamFile)); }
Source:
<code>public void testSynchronousIgnoreLeaversInvocationToNonMembers() throws Exception { UUID randomUuid = UUID.randomUUID(); Address randomAddress = JGroupsAddressCache.fromJGroupsAddress(randomUuid); JGroupsTransport transport = (JGroupsTransport) manager(0).getTransport(); long initialMessages = transport.getChannel().getSentMessages(); <START> ReplicableCommand command = new ClusteredGetCommand("key", CACHE_NAME, TestingUtil.getSegmentForKey("key", cache(0)), 0); <END> CompletableFuture<Map<Address, Response>> future = transport .invokeRemotelyAsync(Collections.singletonList(randomAddress), command, ResponseMode.SYNCHRONOUS_IGNORE_LEAVERS, 1, null, DeliverOrder.NONE, true); assertEquals(CacheNotFoundResponse.INSTANCE, future.get().get(randomAddress)); assertEquals(initialMessages, transport.getChannel().getSentMessages()); }</code><technical_language>segment matter, sending command a cache anyway</technical_language>

Target:
public void testSynchronousIgnoreLeaversInvocationToNonMembers() throws Exception { UUID randomUuid = UUID.randomUUID(); Address randomAddress = JGroupsAddressCache.fromJGroupsAddress(randomUuid); JGroupsTransport transport = (JGroupsTransport) manager(0).getTransport(); long initialMessages = transport.getChannel().getSentMessages(); ReplicableCommand command = new ClusteredGetCommand("key", CACHE_NAME, 0, 0); CompletableFuture<Map<Address, Response>> future = transport .invokeRemotelyAsync(Collections.singletonList(randomAddress), command, ResponseMode.SYNCHRONOUS_IGNORE_LEAVERS, 1, null, DeliverOrder.NONE, true); assertEquals(CacheNotFoundResponse.INSTANCE, future.get().get(randomAddress)); assertEquals(initialMessages, transport.getChannel().getSentMessages()); }
Source:
<code>public SolenoidOff(SolenoidSubsystem system, BooleanSupplier... booleanSuppliers) { <START> super("Turning off " + system.getName(), system, SolenoidState.OFF, booleanSuppliers); <END> }</code><technical_language>link this logic new constructor</technical_language>

Target:
public SolenoidOff(SolenoidSubsystem system, BooleanSupplier... booleanSuppliers) { this("Turning off " + system.getName(), system, booleanSuppliers); }
Source:
<code>public void configure(Binder binder) { Multibinder<SingularityAuthenticator> multibinder = Multibinder.newSetBinder(binder, SingularityAuthenticator.class); for (SingularityAuthenticatorClass clazz : getConfiguration().getAuthConfiguration().getAuthenticators()) { multibinder.addBinding().to(clazz.getAuthenticatorClass()); } binder.bind(SingularityAuthFeature.class); binder.bind(SingularityMultiMethodAuthenticator.class); binder.bind(SingularityAuthDatastore.class).to(getConfiguration().getAuthConfiguration().getDatastore().getAuthDatastoreClass()); binder.bind(SingularityAuthorizationHelper.class).in(Scopes.SINGLETON); <START> getEnvironment().jersey().register(SingularityAuthFeature.class); <END> }</code><technical_language>Do need this? I binding enough</technical_language>

Target:
public void configure(Binder binder) { Multibinder<SingularityAuthenticator> multibinder = Multibinder.newSetBinder(binder, SingularityAuthenticator.class); for (SingularityAuthenticatorClass clazz : getConfiguration().getAuthConfiguration().getAuthenticators()) { multibinder.addBinding().to(clazz.getAuthenticatorClass()); } binder.bind(SingularityAuthFeature.class); binder.bind(SingularityMultiMethodAuthenticator.class); binder.bind(SingularityAuthDatastore.class).to(getConfiguration().getAuthConfiguration().getDatastore().getAuthDatastoreClass()); binder.bind(SingularityAuthorizationHelper.class).in(Scopes.SINGLETON); }
Source:
<code><START> public void onResult(boolean success, @Nullable String errorMessage) { <END> if (success) { if (resetPasswordAlert!=null) { resetPasswordAlert.dismiss(); } showErrorDialog(getString(R.string.success_dialog_title_help), getString(R.string.success_dialog_message_help)); } else if (resetPasswordAlert!=null) { if (errorMessage!=null) { resetPasswordAlert.showError(errorMessage); } else { resetPasswordAlert.dismiss(); } } }</code><technical_language>This function some auto-formatting</technical_language>

Target:
public void onResult(boolean success, @Nullable String errorMessage) { if (success) { if (resetPasswordAlert != null) { resetPasswordAlert.dismiss(); } showAlertDialog(getString(R.string.success_dialog_title_help), getString(R.string.success_dialog_message_help)); } else if (resetPasswordAlert != null) { if (errorMessage != null) { resetPasswordAlert.showError(errorMessage); } else { resetPasswordAlert.dismiss(); } } }
Source:
<code>private static boolean isBinaryFile(String fullPath) { byte[] firstBytes = new byte[8]; try (FileInputStream input = new FileInputStream(fullPath)) { input.read(firstBytes); } catch (IOException e) { Activator.getDefault().logError("Cannot read the file <START> "+fullPath+" due to ", e); <END> } for (byte[] header : BINARY_HEADERS) { if (firstBytes.length >= header.length && startsWith(header, firstBytes)) { return true; } } return false; }</code><technical_language>necessary add "due to"</technical_language>

Target:
private static boolean isBinaryFile(String fullPath) { byte[] firstBytes = new byte[8]; try (FileInputStream input = new FileInputStream(fullPath)) { input.read(firstBytes); } catch (IOException e) { Activator.getDefault().logError("Cannot read the file "+fullPath+" ", e); } for (byte[] header : BINARY_HEADERS) { if (firstBytes.length >= header.length && startsWith(header, firstBytes)) { return true; } } return false; }
Source:
<code>public void generateAll() { <START> for (int i = 0; i < this.activeStages; i++) { <END> QueueProcessor<Long> processor = this.stages.get(i).getProcessor().processor; CubicChunks.LOGGER.info("Stage: {}", processor.getName()); int numProcessed = 0; int round = 0; do { CubicChunks.LOGGER.info("\tround - cubes", ++round, processor.getNumInQueue()); Progress progress = new Progress(processor.getNumInQueue(), 1000); numProcessed = processor.processQueue(progress); advanceCubes(processor, i); CubicChunks.LOGGER.info("\t\tprocessed {}", numProcessed); } while (numProcessed > 0 && processor.getNumInQueue() > 0); } }</code><technical_language>here, stage-->i is pointless</technical_language>

Target:
public void generateAll() { for (GeneratorStage stage : this.stages) { QueueProcessor<Long> processor = stage.getProcessor().processor; CubicChunks.LOGGER.info("Stage: {}", processor.getName()); int numProcessed = 0; int round = 0; do { CubicChunks.LOGGER.info("\tround - cubes", ++round, processor.getNumInQueue()); Progress progress = new Progress(processor.getNumInQueue(), 1000); numProcessed = processor.processQueue(progress); advanceCubes(processor, stage); CubicChunks.LOGGER.info("\t\tprocessed {}", numProcessed); } while (numProcessed > 0 && processor.getNumInQueue() > 0); } }
Source:
<code><START> public ArrayList<String> getTopics() { <END> return topics; }</code><technical_language>interface implementation suggestion public List<String> getTopics() {</technical_language>

Target:
public List<String> getTopics() { return topics; }
Source:
<code>public void open() throws IOException { writer = CompressionFactory.getDoubleSerializer( ioPeon, <START> String.format("%s.double_column", filenameBase), <END> byteOrder, compression ); writer.open(); }</code><technical_language>StringUtils</technical_language>

Target:
public void open() throws IOException { writer = CompressionFactory.getDoubleSerializer( ioPeon, StringUtils.format("%s.double_column", filenameBase), byteOrder, compression ); writer.open(); }
Source:
<code>private void renderMetrics(List<MetricDto> loaded) { MetricRankingProvider.sortMetrics(loaded); summaryPanel.getSessionComparisonPanel().addMetricRecords(loaded); renderMetricPlots(loaded); <START> ((ScrollPanel)summaryPanel.getParent()).scrollToBottom(); <END> }</code><technical_language>please, avoid casting. add scroll panel Trends</technical_language>

Target:
private void renderMetrics(List<MetricDto> loaded) { MetricRankingProvider.sortMetrics(loaded); summaryPanel.getSessionComparisonPanel().addMetricRecords(loaded); renderMetricPlots(loaded); summaryPanelScrollPanel.scrollToBottom(); }
Source:
<code>public Set<T> getRunningJobs() { jobsAccessLock.lock(); <START> Set<T> runningJobs = new HashSet<>(this.runningJobs); <END> jobsAccessLock.unlock(); return runningJobs; }</code><technical_language>return unmodifiable set</technical_language>

Target:
public Set<T> getRunningJobs() { Set<T> runningJobs; try { jobsAccessLock.lock(); runningJobs = Collections.unmodifiableSet(this.runningJobs); } finally { jobsAccessLock.unlock(); } return runningJobs; }
Source:
<code>public void setup(Context.OperatorContext context) { arrivedTopicMessagesToProcess = new ArrayBlockingQueue<BytesXMLMessage>(Integer.parseInt(this.unackedMessageLimit)); this.context = context; super.setConnectRetries(this.connectRetries); <START> super.setReconnectRetries(this.reconnectRetries); <END> super.setReapplySubscriptions(true); super.setup(context); topic = factory.createTopic(topicName); addSubscription(topic); }</code><technical_language>2 set* calls sense other fact call generates a logger.info line. Note connectRetries reconnectRetries defined in AbstractSolaceBaseInputOperator super.setConnectRetries(this.connectRetries) assigns a variable a function call. Need a reason for this code</technical_language>

Target:
public void setup(Context.OperatorContext context) { arrivedTopicMessagesToProcess = new ArrayBlockingQueue<BytesXMLMessage>(this.unackedMessageLimit); super.setReapplySubscriptions(true); super.setup(context); }
Source:
<code>public void shutDown() { <START> IngestEventsListener.disableCentralRepositoryModule(); <END> if (EamDb.isEnabled() == false) { return; } EamDb dbManager; try { dbManager = EamDb.getInstance(); } catch (EamDbException ex) { LOGGER.log(Level.SEVERE, "Error connecting to Central Repository database.", ex); return; } try { dbManager.bulkInsertArtifacts(); } catch (EamDbException ex) { LOGGER.log(Level.SEVERE, "Error doing bulk insert of artifacts.", ex); } try { Long count = dbManager.getCountArtifactInstancesByCaseDataSource(eamCase.getCaseUUID(), eamDataSource.getDeviceID()); LOGGER.log(Level.INFO, "{0} artifacts in db for case: {1} ds:{2}", new Object[]{count, eamCase.getDisplayName(), eamDataSource.getName()}); } catch (EamDbException ex) { LOGGER.log(Level.SEVERE, "Error counting artifacts.", ex); } refCounter.decrementAndGet(jobId); }</code><technical_language>I this method called is enabled check, module run counter increment happened. Note this code in startUp shutDown methods modified Ann myself, this code longer auto merges. need merge in latest code in develop</technical_language>

Target:
public void shutDown() { IngestEventsListener.decrementCorrelationEngineModuleCount(); if ((EamDb.isEnabled() == false) || (eamCase == null) || (eamDataSource == null)) { return; } EamDb dbManager; try { dbManager = EamDb.getInstance(); } catch (EamDbException ex) { LOGGER.log(Level.SEVERE, "Error connecting to Central Repository database.", ex); return; } try { dbManager.bulkInsertArtifacts(); } catch (EamDbException ex) { LOGGER.log(Level.SEVERE, "Error doing bulk insert of artifacts.", ex); } try { Long count = dbManager.getCountArtifactInstancesByCaseDataSource(eamCase.getCaseUUID(), eamDataSource.getDeviceID()); LOGGER.log(Level.INFO, "{0} artifacts in db for case: {1} ds:{2}", new Object[]{count, eamCase.getDisplayName(), eamDataSource.getName()}); } catch (EamDbException ex) { LOGGER.log(Level.SEVERE, "Error counting artifacts.", ex); } refCounter.decrementAndGet(jobId); }
Source:
<code>public void visitNewExpression(NewExpressionTree tree) { ExpressionTree expression = tree.expression(); if (expression.is(Tree.Kind.IDENTIFIER_REFERENCE)) { <START> SyntaxToken token = ((IdentifierTree)expression).identifierToken(); <END> if ("Function".equals(token.text()) && tree.arguments() != null && ! tree.arguments().parameters().isEmpty()) { addIssue(new PreciseIssue(this, new IssueLocation(tree.newKeyword(), tree.expression(), MESSAGE))); } } super.visitNewExpression(tree); }</code><technical_language>@ivandalbosco ((IdentifierTree) expression).name() get string of identifier</technical_language>

Target:
public void visitNewExpression(NewExpressionTree tree) { if (isNonEmptyFunctionConstructor(tree.expression(), tree.arguments())) { addIssue(new PreciseIssue(this, new IssueLocation(tree.newKeyword(), tree.expression(), MESSAGE))); } super.visitNewExpression(tree); }
Source:
<code>public void autonomousMain() throws AutonomousModeOverException, InterruptedException { try { Elevator.setTop.event(); waitUntil(Elevator.atTop); boolean r = Rollers.running.get(); boolean d = Rollers.direction.get(); boolean o = Rollers.open.get(); Rollers.direction.set(true); Rollers.running.set(true); Rollers.open.set(false); waitUntil(crateInPosition); <START> wait(500); <END> Rollers.running.set(r); Rollers.direction.set(d); Rollers.open.set(o); Elevator.setBottom.event(); } finally { running.set(false); } }</code><technical_language>tunable</technical_language>

Target:
public void autonomousMain() throws AutonomousModeOverException, InterruptedException { try { Elevator.setTop.event(); waitUntil(Elevator.atTop); boolean r = Rollers.running.get(); boolean d = Rollers.direction.get(); boolean o = Rollers.open.get(); Rollers.direction.set(true); Rollers.running.set(true); Rollers.open.set(false); waitUntil(crateInPosition); waitForTime(timeout); Rollers.running.set(r); Rollers.direction.set(d); Rollers.open.set(o); Elevator.setBottom.event(); } finally { running.set(false); } }
Source:
<code>public void init() { super.init(); <START> setAttribute(AMBARI_AGENTS, addChild(EntitySpec.create(DynamicCluster.class) <END> .configure(DynamicCluster.INITIAL_SIZE, getRequiredConfig(INITIAL_SIZE)) .configure(DynamicCluster.MEMBER_SPEC, AmbariAgentImpl.createAgentSpec(getParent())) .displayName("All Nodes") )); }</code><technical_language>cluster is a child attribute? Feels a bit roundabout</technical_language>

Target:
public void init() { super.init(); config().set(MEMBER_SPEC, AmbariAgentImpl.createAgentSpec(getParent())); }
Source:
<code>public void handleExceptionsReturnsResponseWhenSuccessful() { <START> ResponseEntity<?> response = resource.handleExceptions(() -> Mono.just(ok("ok"))).block(); <END> assertThat(response.getStatusCode(), is(OK)); assertThat(response.getBody(), is("ok")); }</code><technical_language>static imports</technical_language>

Target:
public void handleExceptionsReturnsResponseWhenSuccessful() { ResponseEntity<?> response = resource.handleExceptions(() -> just(ok("ok"))).block(); assertThat(response.getStatusCode(), is(OK)); assertThat(response.getBody(), is("ok")); }
Source:
<code>LRESULT WM_MENUSELECT (long wParam, long lParam) { int code = OS.HIWORD (wParam); Shell shell = getShell (); OS.KillTimer (this.handle, Menu.ID_TOOLTIP_TIMER); if (menu != null) menu.hideCurrentToolTip (); if (code == 0xFFFF && lParam == 0) { Menu menu = shell.activeMenu; while (menu != null) { display.mnemonicKeyHit = true; menu.sendEvent (SWT.Hide); if (menu.isDisposed ()) break; menu = menu.getParentMenu (); } shell.activeMenu = null; return null; } if ((code & OS.MF_SYSMENU) != 0) return null; if ((code & OS.MF_HILITE) != 0) { MenuItem item = null; Decorations menuShell = menuShell (); if ((code & OS.MF_POPUP) != 0) { int index = OS.LOWORD (wParam); MENUITEMINFO info = new MENUITEMINFO (); info.cbSize = MENUITEMINFO.sizeof; info.fMask = OS.MIIM_SUBMENU; if (OS.GetMenuItemInfo (lParam, index, true, info)) { Menu newMenu = menuShell.findMenu (info.hSubMenu); if (newMenu != null) item = newMenu.cascade; } } else { Menu newMenu = menuShell.findMenu (lParam); if (newMenu != null) { int id = OS.LOWORD (wParam); item = display.getMenuItem (id); } <START> if (item != null) { <END> menu.selectedMenuItem = item; OS.SetTimer (this.handle, Menu.ID_TOOLTIP_TIMER, OS.TTM_GETDELAYTIME, 0); } } if (item != null) item.sendEvent (SWT.Arm); } return null; }</code><technical_language>condition do null check for menu as: if (item != null && menu != null)</technical_language>

Target:
LRESULT WM_MENUSELECT (long wParam, long lParam) { int code = OS.HIWORD (wParam); Shell shell = getShell (); OS.KillTimer (this.handle, Menu.ID_TOOLTIP_TIMER); if (activeMenu != null) activeMenu.hideCurrentToolTip (); if (code == 0xFFFF && lParam == 0) { Menu menu = shell.activeMenu; while (menu != null) { display.mnemonicKeyHit = true; menu.sendEvent (SWT.Hide); if (menu.isDisposed ()) break; menu = menu.getParentMenu (); } shell.activeMenu = null; return null; } if ((code & OS.MF_SYSMENU) != 0) return null; if ((code & OS.MF_HILITE) != 0) { MenuItem item = null; Decorations menuShell = menuShell (); if ((code & OS.MF_POPUP) != 0) { int index = OS.LOWORD (wParam); MENUITEMINFO info = new MENUITEMINFO (); info.cbSize = MENUITEMINFO.sizeof; info.fMask = OS.MIIM_SUBMENU; if (OS.GetMenuItemInfo (lParam, index, true, info)) { Menu newMenu = menuShell.findMenu (info.hSubMenu); if (newMenu != null) item = newMenu.cascade; } } else { Menu newMenu = menuShell.findMenu (lParam); if (newMenu != null) { int id = OS.LOWORD (wParam); item = display.getMenuItem (id); } activeMenu = (menu != null) ? menu : newMenu; if (item != null && activeMenu != null) { activeMenu.selectedMenuItem = item; OS.SetTimer (this.handle, Menu.ID_TOOLTIP_TIMER, OS.TTM_GETDELAYTIME, 0); } } if (item != null) item.sendEvent (SWT.Arm); } return null; }
Source:
<code>public void testBlockUseHostCpuWithPPCArch() { <START> final int osId = 0; <END> prepareVmToPassValidate(); command.initEffectiveCompatibilityVersion(); vm.setClusterArch(ArchitectureType.ppc64le); group.setArchitecture(ArchitectureType.ppc); when(osRepository.getArchitectureFromOS(osId)).thenReturn(ArchitectureType.ppc); vmStatic.setUseHostCpuFlags(true); vmStatic.setMigrationSupport(MigrationSupport.PINNED_TO_HOST); boolean validInput = command.validate(); assertFalse("validate should fail with can't use host CPU.", validInput); assertValidateMessage(EngineMessage.USE_HOST_CPU_REQUESTED_ON_UNSUPPORTED_ARCH); }</code><technical_language>org.ovirt.engine.core.common.businessentities.OsType#Windows</technical_language>

Target:
public void testBlockUseHostCpuWithPPCArch() { prepareVmToPassValidate(); command.initEffectiveCompatibilityVersion(); vm.setClusterArch(ArchitectureType.ppc64le); group.setArchitecture(ArchitectureType.ppc); when(osRepository.getArchitectureFromOS(OsType.Windows.ordinal())).thenReturn(ArchitectureType.ppc); vmStatic.setUseHostCpuFlags(true); vmStatic.setMigrationSupport(MigrationSupport.PINNED_TO_HOST); boolean validInput = command.validate(); assertFalse("validate should fail with can't use host CPU.", validInput); assertValidateMessage(EngineMessage.USE_HOST_CPU_REQUESTED_ON_UNSUPPORTED_ARCH); }
Source:
<code>public BlobProperties getBlobProperties(String blobIdString) throws CoordinatorException { long startTimeInMs = System.currentTimeMillis(); try { logger.trace("getBlobProperties. " + blobIdString); coordinatorMetrics.getBlobPropertiesOperationRate.mark(); BlobId blobId = getBlobIdFromString(blobIdString); GetBlobPropertiesOperation gbpo = new GetBlobPropertiesOperation(datacenterName, connectionPool, requesterPool, getOperationContext(), blobId, <START> operationTimeoutMs, clusterMap, sslEnabledColos); <END> gbpo.execute(); return gbpo.getBlobProperties(); } catch (CoordinatorException e) { logger.trace("getBlobProperties re-throwing CoordinatorException", e); coordinatorMetrics.countError(CoordinatorMetrics.CoordinatorOperationType.GetBlobProperties, e.getErrorCode()); throw e; } finally { coordinatorMetrics.getBlobPropertiesOperationLatencyInMs.update(System.currentTimeMillis() - startTimeInMs); } }</code><technical_language>I suggest put this part of operation context avoid modifying extra args</technical_language>

Target:
public BlobProperties getBlobProperties(String blobIdString) throws CoordinatorException { long startTimeInMs = System.currentTimeMillis(); try { logger.trace("getBlobProperties. " + blobIdString); coordinatorMetrics.getBlobPropertiesOperationRate.mark(); BlobId blobId = getBlobIdFromString(blobIdString); GetBlobPropertiesOperation gbpo = new GetBlobPropertiesOperation(datacenterName, connectionPool, requesterPool, getOperationContext(), blobId, operationTimeoutMs, clusterMap); gbpo.execute(); return gbpo.getBlobProperties(); } catch (CoordinatorException e) { logger.trace("getBlobProperties re-throwing CoordinatorException", e); coordinatorMetrics.countError(CoordinatorMetrics.CoordinatorOperationType.GetBlobProperties, e.getErrorCode()); throw e; } finally { coordinatorMetrics.getBlobPropertiesOperationLatencyInMs.update(System.currentTimeMillis() - startTimeInMs); } }
Source:
<code>public List<String> deprecationWarnings() { if (supportsMultiPathCoverage()) { if (multiPathCoverageUsed()) { return usedLegacyCoveragePaths().map(pathKey -> String.format(SKIPPED_WARNING_TEMPLATE, pathKey)).collect(Collectors.toList()); } else { return usedLegacyCoveragePaths().map(pathKey -> String.format(DEPRECATION_WARNING_TEMPLATE, pathKey)).collect(Collectors.toList()); } } <START> return new ArrayList<>(); <END> }</code><technical_language>@inverno Do sense log warning multiPathCoverageUsed() && !supportsMultiPathCoverage() (using property SQ available)</technical_language>

Target:
public List<String> deprecationWarnings() { if (supportsMultiPathCoverage()) { if (multiPathCoverageUsed()) { return printWarningForUsedLegacyPaths(SKIPPED_WARNING_TEMPLATE); } else { return printWarningForUsedLegacyPaths(DEPRECATION_WARNING_TEMPLATE); } } else if (multiPathCoverageUsed()) { return Collections.singletonList(NOT_YET_SUPPORTED_WARNING); } return new ArrayList<>(); }
Source:
<code>public void createConnectionsUponTopologyChange() { m_distributer.getExecutorService().execute(new Runnable() { @Override public void run() { try{ ClientResponse resp = callProcedure("@SystemInformation", "OVERVIEW"); if (resp.getStatus() == ClientResponse.SUCCESS) { Map<Integer, HostConfig> hosts = buildUnconnectedHostConfigMap(resp.getResults()[0]); for(Map.Entry<Integer, HostConfig> entry : hosts.entrySet()) { HostConfig config = entry.getValue(); try { connectToOneServerWithRetry(config.m_ipAddress,config.getPort(m_useAdminPort)); nofifyClientConnectionCreation(config, ClientResponse.SUCCESS, null); } catch (IOException e) { nofifyClientConnectionCreation(config, ClientResponse.SERVER_UNAVAILABLE, e); } } m_distributer.updateClientAffinityPartitionsUponTopoChange(); } else { nofifyClientConnectionCreation(null, resp.getStatus(), null); } } catch (Exception e) { <START> nofifyClientConnectionCreation(null, ClientResponse.SERVER_UNAVAILABLE, e); <END> } } }); }</code><technical_language>I decide if pass this users this way. Thinking. discuss in person</technical_language>

Target:
public void createConnectionsUponTopologyChange() { m_ex.execute(new CreateConnectionTask(this, connectionTaskCount)); }
Source:
<code><START> public TimestampService createTimestampService(KeyValueService rawKvs, boolean initializeAsync) { <END> AtlasDbVersion.ensureVersionReported(); return PersistentTimestampServiceImpl.create(JdbcTimestampBoundStore.create((JdbcKeyValueService) rawKvs)); }</code><technical_language>Another place note boolean is unused</technical_language>

Target:
public TimestampService createTimestampService(KeyValueService rawKvs, boolean initializeAsync) { if (initializeAsync) { log.warn("Asynchronous initialization not implemented, will initialize synchronousy."); } AtlasDbVersion.ensureVersionReported(); return PersistentTimestampServiceImpl.create(JdbcTimestampBoundStore.create((JdbcKeyValueService) rawKvs)); }
Source:
<code>private void removeNodes(final Collection<RMNodeData> nodes) { if (nodeRecoveryDisabled()) { return; } if (rmdbManagerBuffer.canOperateDatabaseSynchronouslyWithNodes(nodes)) { logger.info("Remove nodes " + Arrays.toString(nodes.toArray()) + " in database"); try { executeReadWriteTransaction(new SessionWork<Void>() { @Override public Void doInTransaction(Session session) { for (RMNodeData rmNodeData : nodes) { session.delete(rmNodeData); } return null; } }); } catch (RuntimeException e) { throw new RuntimeException("Exception occurred while removing nodes", e); } } else { logger.info("Request " + RMDBManagerBuffer.class.getSimpleName() + " to remove nodes " + <START> Arrays.toString(nodes.toArray()) + " in database"); <END> rmdbManagerBuffer.addRemoveNodesToPendingDatabaseOperations(nodes); } }</code><technical_language>I afraid print a list of nodes. print number of nodes in info, print list in debug</technical_language>

Target:
private void removeNodes(final Collection<RMNodeData> nodes) { if (nodeRecoveryDisabled()) { return; } if (rmdbManagerBuffer.canOperateDatabaseSynchronouslyWithNodes(nodes)) { try { logger.info("Remove " + nodes.size() + " nodes" + IN_DATABASE_STRING); if (logger.isDebugEnabled()) { logger.debug("Nodes removed: " + Arrays.toString(nodes.toArray())); } executeReadWriteTransaction(new SessionWork<Void>() { @Override public Void doInTransaction(Session session) { for (RMNodeData rmNodeData : nodes) { session.delete(rmNodeData); } return null; } }); } catch (RuntimeException e) { throw new RuntimeException("Exception occurred while removing nodes", e); } } else { logger.debug(REQUEST_BUFFER_STRING + "remove " + nodes.size() + " nodes" + IN_DATABASE_STRING); rmdbManagerBuffer.addRemoveNodesToPendingDatabaseOperations(nodes); } }
Source:
<code>protected void postProcessReplyProducer(AbstractMessageProducingHandler handler) { if (this.sendTimeout != null) { handler.setSendTimeout(sendTimeout); } if (this.requiresReply != null) { if(handler instanceof AbstractReplyProducingMessageHandler) { ((AbstractReplyProducingMessageHandler) handler).setRequiresReply(this.requiresReply); <START> } <END> } if (!(handler instanceof AbstractMessageSplitter)) { Assert.isNull(this.applySequence, "Cannot set applySequence if the referenced bean is " + "an AbstractReplyProducingMessageHandler, but not an AbstractMessageSplitter"); Assert.isNull(this.delimiters, "Cannot set delimiters if the referenced bean is not an " + "an AbstractReplyProducingMessageHandler, but not an AbstractMessageSplitter"); } else { AbstractMessageSplitter splitter = (AbstractMessageSplitter) handler; if (this.delimiters != null) { Assert.isTrue(splitter instanceof DefaultMessageSplitter, "The 'delimiters' property is only available" + " for a Splitter definition where no 'ref', 'expression', or inner bean has been provided."); ((DefaultMessageSplitter) splitter).setDelimiters(this.delimiters); } if (this.applySequence != null) { splitter.setApplySequence(applySequence); } } }</code><technical_language>if (true == this.requiresReply && logger.isDebugEnabled()) { logger.debug("requires-reply set AbstractReplyProducingMessageHandler subclass, " + handler.getComponentName() + " support it."); }</technical_language>

Target:
protected void postProcessReplyProducer(AbstractMessageProducingHandler handler) { if (this.sendTimeout != null) { handler.setSendTimeout(sendTimeout); } if (this.requiresReply != null) { if(handler instanceof AbstractReplyProducingMessageHandler) { ((AbstractReplyProducingMessageHandler) handler).setRequiresReply(this.requiresReply); } else if (true == this.requiresReply && logger.isDebugEnabled()) { logger.debug("requires-reply can only be set to AbstractReplyProducingMessageHandler or its subclass, " + handler.getComponentName() + " doesn't support it."); } } if (!(handler instanceof AbstractMessageSplitter)) { Assert.isNull(this.applySequence, "Cannot set applySequence if the referenced bean is " + "an AbstractReplyProducingMessageHandler, but not an AbstractMessageSplitter"); Assert.isNull(this.delimiters, "Cannot set delimiters if the referenced bean is not an " + "an AbstractReplyProducingMessageHandler, but not an AbstractMessageSplitter"); } else { AbstractMessageSplitter splitter = (AbstractMessageSplitter) handler; if (this.delimiters != null) { Assert.isTrue(splitter instanceof DefaultMessageSplitter, "The 'delimiters' property is only available" + " for a Splitter definition where no 'ref', 'expression', or inner bean has been provided."); ((DefaultMessageSplitter) splitter).setDelimiters(this.delimiters); } if (this.applySequence != null) { splitter.setApplySequence(applySequence); } } }
Source:
<code>private Configuration getConfigurationWithContext(String pidWithContext) { String pid = null; String configContext = null; if (pidWithContext.contains(ConfigDispatcher.SERVICE_CONTEXT_MARKER)) { pid = pidWithContext.split(ConfigDispatcher.SERVICE_CONTEXT_MARKER)[0]; configContext = pidWithContext.split(ConfigDispatcher.SERVICE_CONTEXT_MARKER)[1]; } else { <START> fail("PID does not have a context"); <END> } Configuration[] configs = null; try { configs = configAdmin.listConfigurations("(&(service.factoryPid=" + pid + ")(" + ConfigDispatcher.SERVICE_CONTEXT + "=" + configContext + "))"); } catch (IOException e) { fail("IOException occured while retrieving configuration for pid " + pidWithContext); } catch (InvalidSyntaxException e) { fail("InvalidSyntaxException occured while retrieving configuration for pid " + pidWithContext); } if (configs == null) { return null; } assertThat(configs.length, is(1)); return configs[0]; }</code><technical_language>java throw new IAE(...) assert subject test a bug in test code itself</technical_language>

Target:
private Configuration getConfigurationWithContext(String pidWithContext) { String pid = null; String configContext = null; if (pidWithContext.contains(ConfigDispatcher.SERVICE_CONTEXT_MARKER)) { pid = pidWithContext.split(ConfigDispatcher.SERVICE_CONTEXT_MARKER)[0]; configContext = pidWithContext.split(ConfigDispatcher.SERVICE_CONTEXT_MARKER)[1]; } else { throw new IllegalArgumentException("PID does not have a context"); } Configuration[] configs = null; try { configs = configAdmin.listConfigurations("(&(service.factoryPid=" + pid + ")(" + ConfigDispatcher.SERVICE_CONTEXT + "=" + configContext + "))"); } catch (IOException e) { throw new IllegalArgumentException( "IOException occured while retrieving configuration for pid " + pidWithContext, e); } catch (InvalidSyntaxException e) { throw new IllegalArgumentException( "InvalidSyntaxException occured while retrieving configuration for pid " + pidWithContext, e); } if (configs == null) { return null; } assertThat(configs.length, is(1)); return configs[0]; }
Source:
<code>private List<SqlNode> permutedOperands(final SqlCall call) { final SqlOperandMetadata operandMetadata = (SqlOperandMetadata) call.getOperator().getOperandTypeChecker(); final List<String> paramNames = operandMetadata.paramNames(); final List<SqlNode> permuted = new ArrayList<>(); final SqlNameMatcher nameMatcher = validator.getCatalogReader().nameMatcher(); for (final String paramName : paramNames) { Pair<String, SqlIdentifier> args = null; for (int j = 0; j < call.getOperandList().size(); j++) { final SqlCall call2 = call.operand(j); assert call2.getKind() == SqlKind.ARGUMENT_ASSIGNMENT; final SqlIdentifier operandID = call2.operand(1); final String operandName = operandID.getSimple(); if (nameMatcher.matches(operandName, paramName)) { permuted.add(call2.operand(0)); break; } else if (args == null && nameMatcher.isCaseSensitive() && operandName.equalsIgnoreCase(paramName)) { args = Pair.of(paramName, operandID); } if (j == call.getOperandList().size() - 1) { if (args != null) { throw SqlUtil.newContextException(args.right.getParserPosition(), RESOURCE.paramNotFoundInFunctionDidYouMean(args.right.getSimple(), call.getOperator().getName(), args.left)); } if (operandMetadata.isFixedParameters()) { <START> permuted.add(createDefaultCall()); <END> } } } } return permuted; }</code><technical_language>this moved of loop</technical_language>

Target:
private List<SqlNode> permutedOperands(final SqlCall call) { final SqlOperandMetadata operandMetadata = (SqlOperandMetadata) call.getOperator().getOperandTypeChecker(); final List<String> paramNames = operandMetadata.paramNames(); final List<SqlNode> permuted = new ArrayList<>(); final SqlNameMatcher nameMatcher = validator.getCatalogReader().nameMatcher(); for (final String paramName : paramNames) { Pair<String, SqlIdentifier> args = null; for (int j = 0; j < call.getOperandList().size(); j++) { final SqlCall call2 = call.operand(j); assert call2.getKind() == SqlKind.ARGUMENT_ASSIGNMENT; final SqlIdentifier operandID = call2.operand(1); final String operandName = operandID.getSimple(); if (nameMatcher.matches(operandName, paramName)) { permuted.add(call2.operand(0)); break; } else if (args == null && nameMatcher.isCaseSensitive() && operandName.equalsIgnoreCase(paramName)) { args = Pair.of(paramName, operandID); } if (j == call.getOperandList().size() - 1) { if (args != null) { throw SqlUtil.newContextException(args.right.getParserPosition(), RESOURCE.paramNotFoundInFunctionDidYouMean(args.right.getSimple(), call.getOperator().getName(), args.left)); } if (operandMetadata.isFixedParameters()) { permuted.add(DefaultCallHolder.DEFAULT_CALL); } } } } return permuted; }
Source:
<code><START> public void run() { final PayaraNotification notification = notificationQueue.peek(); try { if (notification != null && isEnabled()) { notifier.handleNotification(notification); notificationQueue.remove(); } } catch (Exception ex) { LOGGER.log(Level.WARNING, format("Notifier %s failed to handle notification \"%s\".", notifierName, notification), ex); } <END> }</code><technical_language>This run 500ms a loop sending messages start of run. delaying message delivery unnecessarily substantially</technical_language>

Target:
private void run() { assert isEnabled(); try { final PayaraNotification notification = notificationQueue.take(); try { if (notification != null) { notifier.handleNotification(notification); } } catch (final Exception ex) { LOGGER.log(Level.WARNING, format("Notifier %s failed to handle notification \"%s\".", notifierName, notification), ex); } } catch (InterruptedException ex) { LOGGER.log(Level.FINE, format("Cancelled waiting on queue for notifier \"%s\".", notifierName), ex); } }
Source:
<code>public void init(FilterConfig filterConfig) throws ServletException { M_log.debug("Filter Init(): Called"); <START> appExtPropertiesFile = Utils.loadProperties(CCM_PROPERTY_FILE_PATH); <END> appExtSecurePropertiesFile = Utils.loadProperties(CCM_SECURE_PROPERTY_FILE_PATH); getExternalAppProperties(); }</code><technical_language>files, Properties</technical_language>

Target:
public void init(FilterConfig filterConfig) throws ServletException { M_log.debug("Filter Init(): Called"); appExtProperties = Utils.loadProperties(CCM_PROPERTY_FILE_PATH); appExtSecureProperties = Utils.loadProperties(CCM_SECURE_PROPERTY_FILE_PATH); getExternalAppProperties(); }