auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public boolean bufferEntity() { abortIfClosed(); if (bufferedEntity != null) return true; if (streamRead) return false; <START> if (metadata.getFirst(HttpHeaderNames.CONTENT_TYPE) == null) return false; <END> InputStream is = getInputStream(); if (is == null) return false; try { bufferedEntity = ReadFromStream.readFromStream(1024, is); } catch (IOException e) { throw new ProcessingException(e); } finally { try { releaseConnection(); } catch (IOException e) { throw new ProcessingException(e); } } return true; }</code><technical_language>Please remove media type check; is requirement Content-Type header is for bufferEntity work. readEntity(...) work it, for example, readEntity(String.class)</technical_language>

Target:
public boolean bufferEntity() { abortIfClosed(); if (bufferedEntity != null) return true; if (streamRead) return false; InputStream is = getInputStream(); if (is == null) return false; try { bufferedEntity = ReadFromStream.readFromStream(1024, is); } catch (IOException e) { throw new ProcessingException(e); } finally { try { releaseConnection(); } catch (IOException e) { throw new ProcessingException(e); } } return true; }
Source:
<code>public void testGetStreamSpec_Batch() { Map<String, String> config = new HashMap<>(); config.put(ApplicationConfig.APP_MODE, ApplicationConfig.ApplicationMode.BATCH.name()); config.put(ApplicationConfig.APP_RUN_ID, "123"); StreamSpec batchSpec = new StreamSpec("stream-1", "stream-1", "system-1"); StreamEdge edge = new StreamEdge(batchSpec, true, false, new MapConfig(config)); <START> assertEquals(edge.getStreamSpec().getPhysicalName(), batchSpec.getPhysicalName() + "-123"); <END> }</code><technical_language>another test case run.id is applied verify re-applied</technical_language>

Target:
public void testGetStreamSpec_Batch() { Map<String, String> config = new HashMap<>(); config.put(ApplicationConfig.APP_MODE, ApplicationConfig.ApplicationMode.BATCH.name()); config.put(ApplicationConfig.APP_RUN_ID, "123"); StreamSpec batchSpec = new StreamSpec("stream-1", "stream-1", "system-1"); StreamEdge edge = new StreamEdge(batchSpec, true, false, new MapConfig(config)); assertEquals(edge.getStreamSpec().getPhysicalName(), batchSpec.getPhysicalName() + "-123"); edge = new StreamEdge(spec, true, false, new MapConfig(config)); assertEquals(edge.getStreamSpec().getPhysicalName(), spec.getPhysicalName()); }
Source:
<code>public void testMarkerOnLastLineNoNewline_495842() throws Exception { try(BufferedWriter writer = new BufferedWriter(new FileWriter(loadcode("", false)))) { writer.write(getAboveComment().trim()); } <START> PreferenceConstants.getPreferenceStore().setValue(PreferenceConstants.ENSURE_NEWLINE_AT_EOF, true); <END> indexFiles(); PreferenceConstants.getPreferenceStore().setValue(PreferenceConstants.ENSURE_NEWLINE_AT_EOF, false); String result = runQuickFixOneFile(); assertContainedIn("int func() { } }</code><technical_language>setting true indexing</technical_language>

Target:
public void testMarkerOnLastLineNoNewline_495842() throws Exception { try(BufferedWriter writer = new BufferedWriter(new FileWriter(loadcode("", false)))) { writer.write(getAboveComment().trim()); } PreferenceConstants.getPreferenceStore().setValue(PreferenceConstants.ENSURE_NEWLINE_AT_EOF, false); indexFiles(); String result = runQuickFixOneFile(); PreferenceConstants.getPreferenceStore().setValue(PreferenceConstants.ENSURE_NEWLINE_AT_EOF, true); assertContainedIn("int func() { } }
Source:
<code><START> private static void checkoutEntry(final Repository repo, File f, <END> DirCacheEntry entry, ObjectReader or) throws IOException { ObjectLoader ol = or.open(entry.getObjectId()); File parentDir = f.getParentFile(); File tmpFile = File.createTempFile("._" + f.getName(), null, parentDir); FileOutputStream channel = new FileOutputStream(tmpFile); try { ol.copyTo(channel); } finally { channel.close(); } FS fs = repo.getFS(); WorkingTreeOptions opt = repo.getConfig().get(WorkingTreeOptions.KEY); if (opt.isFileMode() && fs.supportsExecute()) { if (FileMode.EXECUTABLE_FILE.equals(entry.getRawMode())) { if (!fs.canExecute(tmpFile)) fs.setExecute(tmpFile, true); } else { if (fs.canExecute(tmpFile)) fs.setExecute(tmpFile, false); } } if (!tmpFile.renameTo(f)) { FileUtils.delete(f); if (!tmpFile.renameTo(f)) { throw new IOException(MessageFormat.format( JGitText.get().couldNotWriteFile, tmpFile.getPath(), f.getPath())); } } entry.setLastModified(f.lastModified()); entry.setLength((int) ol.getSize()); }</code><technical_language>This form public. Callers ObjectReader, expecting created/destroyed fly file. seen, per-file is efficient</technical_language>

Target:
public static void checkoutEntry(final Repository repo, File f, DirCacheEntry entry, ObjectReader or) throws IOException { ObjectLoader ol = or.open(entry.getObjectId()); File parentDir = f.getParentFile(); File tmpFile = File.createTempFile("._" + f.getName(), null, parentDir); FileOutputStream channel = new FileOutputStream(tmpFile); try { ol.copyTo(channel); } finally { channel.close(); } FS fs = repo.getFS(); WorkingTreeOptions opt = repo.getConfig().get(WorkingTreeOptions.KEY); if (opt.isFileMode() && fs.supportsExecute()) { if (FileMode.EXECUTABLE_FILE.equals(entry.getRawMode())) { if (!fs.canExecute(tmpFile)) fs.setExecute(tmpFile, true); } else { if (fs.canExecute(tmpFile)) fs.setExecute(tmpFile, false); } } if (!tmpFile.renameTo(f)) { FileUtils.delete(f); if (!tmpFile.renameTo(f)) { throw new IOException(MessageFormat.format( JGitText.get().couldNotWriteFile, tmpFile.getPath(), f.getPath())); } } entry.setLastModified(f.lastModified()); entry.setLength((int) ol.getSize()); }
Source:
<code>public final synchronized RunT newBuild() throws IOException { try { RunT lastBuild = getBuildClass().getConstructor(asJob().getClass()).newInstance(asJob()); builds.put(lastBuild); lastBuild.getPreviousBuild(); return lastBuild; } catch (InstantiationException e) { throw new Error(e); } catch (IllegalAccessException e) { <START> LOGGER.log(Level.WARNING, String.format("A new build could not be created in job %s", asJob().getFullName()), e); <END> throw new Error(e); } catch (InvocationTargetException e) { throw handleInvocationTargetException(e); } catch (NoSuchMethodException e) { throw new Error(e); } }</code><technical_language>this log message for exceptions no? move this mutlicatch well</technical_language>

Target:
public final synchronized RunT newBuild() throws IOException { try { RunT lastBuild = getBuildClass().getConstructor(asJob().getClass()).newInstance(asJob()); builds.put(lastBuild); lastBuild.getPreviousBuild(); return lastBuild; } catch (InvocationTargetException e) { LOGGER.log(Level.WARNING, String.format("A new build could not be created in job %s", asJob().getFullName()), e); throw handleInvocationTargetException(e); } catch (ReflectiveOperationException | IllegalStateException e) { LOGGER.log(Level.WARNING, String.format("A new build could not be created in job %s", asJob().getFullName()), e); throw new Error(e); } }
Source:
<code>private CompletionStage<Void> awaitQuiescence() { CompletionStage<Void> stage; synchronized (this) { stage = batchFuture; } if (stage == null) { return CompletableFutures.completedNull(); } if (trace) { log.tracef("Must wait until prior batch completes for %s", actual); } <START> return batchFuture.thenCompose(ignore -> awaitQuiescence()); <END> }</code><technical_language>suggestion return stage.thenCompose(ignore -> awaitQuiescence());</technical_language>

Target:
private CompletionStage<Void> awaitQuiescence() { CompletionStage<Void> stage; synchronized (this) { stage = batchFuture; } if (stage == null) { return CompletableFutures.completedNull(); } if (trace) { log.tracef("Must wait until prior batch completes for %s", actual); } return stage.thenCompose(ignore -> awaitQuiescence()); }
Source:
<code>private String getQueryCondition(String filter){ <START> return UtilMethods.isSet(filter) ? String.format("(name like '%%%s%%')", filter) : ""; <END> }</code><technical_language>StringPool.EMPTY instead</technical_language>

Target:
private String getQueryCondition(String filter){ return UtilMethods.isSet(filter) ? String.format("(name like '%%%s%%')", filter) : StringUtils.EMPTY; }
Source:
<code>public Result compute( DefaultMetadata oldMetadata, boolean tokenMapEnabled, InternalDriverContext context) { Map<UUID, Node> oldNodes = oldMetadata.getNodes(); if (oldNodes.containsKey(newNodeInfo.getHostId())) { Node oldNode = oldNodes.get(newNodeInfo.getHostId()); <START> if (oldNode.getEndPoint().equals(newNodeInfo.getEndPoint())) { <END> return new Result(oldMetadata); } } DefaultNode newNode = new DefaultNode(newNodeInfo.getEndPoint(), context); copyInfos(newNodeInfo, newNode, null, context.getSessionName()); Map<UUID, Node> newNodes = new HashMap<>(oldNodes); newNodes.put(newNode.getHostId(), newNode); return new Result( oldMetadata.withNodes(ImmutableMap.copyOf(newNodes), tokenMapEnabled, false, null, context), ImmutableList.of(NodeStateEvent.added(newNode))); }</code><technical_language>initial motivation update metadata if host ID is present in asked add a node, node is present => do nothing. underlying assumption server treats host_id unique node identifier. Based reporter's scenario, I suspect is wrong. get UP, NEW_NODE. I right do is copyInfos new data existing Node instance, emit TopologyEvent.suggestUp instead of NodeStateEvent.added</technical_language>

Target:
public Result compute( DefaultMetadata oldMetadata, boolean tokenMapEnabled, InternalDriverContext context) { Map<UUID, Node> oldNodes = oldMetadata.getNodes(); Node existing = oldNodes.get(newNodeInfo.getHostId()); if (existing == null) { DefaultNode newNode = new DefaultNode(newNodeInfo.getEndPoint(), context); copyInfos(newNodeInfo, newNode, null, context); Map<UUID, Node> newNodes = ImmutableMap.<UUID, Node>builder() .putAll(oldNodes) .put(newNode.getHostId(), newNode) .build(); return new Result( oldMetadata.withNodes(newNodes, tokenMapEnabled, false, null, context), ImmutableList.of(NodeStateEvent.added(newNode))); } else { if (!existing.getEndPoint().equals(newNodeInfo.getEndPoint())) { copyInfos(newNodeInfo, ((DefaultNode) existing), null, context); assert newNodeInfo.getBroadcastRpcAddress().isPresent(); return new Result( oldMetadata, ImmutableList.of(TopologyEvent.suggestUp(newNodeInfo.getBroadcastRpcAddress().get()))); } else { return new Result(oldMetadata); } } }
Source:
<code>public static void main(final String[] args) throws Exception { Properties jobProps = HadoopSecureWrapperUtils.loadAzkabanProps(); props = new Props(null, jobProps); HadoopConfigurationInjector.injectResources(props); if (HadoopSecureWrapperUtils.shouldProxy(jobProps)) { UserGroupInformation proxyUser = HadoopSecureWrapperUtils.setupProxyUser(jobProps, logger); proxyUser.doAs(new PrivilegedExceptionAction<Void>() { @Override public Void run() throws Exception { runPigJob(args); return null; } }); } else { <START> runPigJob(args); <END> } }</code><technical_language>this a behaviour change for pig job ? Initially set proxyUser security enabled remote user do a doAs runPigJob(args), do a doAs for non-security enabled case</technical_language>

Target:
public static void main(final String[] args) throws Exception { Properties jobProps = HadoopSecureWrapperUtils.loadAzkabanProps(); props = new Props(null, jobProps); HadoopConfigurationInjector.injectResources(props); if (HadoopSecureWrapperUtils.shouldProxy(jobProps)) { String tokenFile = System.getenv(HADOOP_TOKEN_FILE_LOCATION); UserGroupInformation proxyUser = HadoopSecureWrapperUtils.setupProxyUser(jobProps, tokenFile, logger); proxyUser.doAs(new PrivilegedExceptionAction<Void>() { @Override public Void run() throws Exception { runPigJob(args); return null; } }); } else { runPigJob(args); } }
Source:
<code>protected void initImportClonedTemplateDisks() { for (DiskImage image : getImages()) { if (Guid.isNullOrEmpty(image.getStoragePoolId())) { image.setStoragePoolId(getStoragePoolId()); } List<StorageDomain> storageDomainList = storageDomainDao.getAllStorageDomainsByImageId(image.getImageId()); <START> if (!validateSourceStorageDomainPerImage(storageDomainList)) { <END> getParameters().setSourceDomainId(storageDomainList.get(0).getId()); } updateDiskSizeByQcowImageInfo(image); if (getParameters().isImportAsNewEntity()) { generateNewDiskId(image); updateManagedDeviceMap(image, getVmTemplate().getManagedDeviceMap()); } else { originalDiskIdMap.put(image.getId(), image.getId()); originalDiskImageIdMap.put(image.getId(), image.getImageId()); } } }</code><technical_language>If validate in instead of validation phase, avoid copying image (in copyImagesToTargetDomain). fail execute... Also, ignore 'getParameters().getSourceDomainId()', i.e., changing behaviour. others this solution</technical_language>

Target:
protected void initImportClonedTemplateDisks() { for (DiskImage image : getImages()) { if (settingMissingStorageIDs(image)) { updateDiskSizeByQcowImageInfo(image); } if (getParameters().isImportAsNewEntity()) { generateNewDiskId(image); updateManagedDeviceMap(image, getVmTemplate().getManagedDeviceMap()); } else { originalDiskIdMap.put(image.getId(), image.getId()); originalDiskImageIdMap.put(image.getId(), image.getImageId()); } } }
Source:
<code>public static void beforeClass() throws CommandFailedException, InterruptedException, TimeoutException, IOException { client.apply(new AddLogCategory.Builder(LOGGER).build()); <START> administration.reloadIfRequired(); <END> client.apply(new AddLogCategory.Builder(LOGGER_TO_BE_REMOVED).build()); administration.reloadIfRequired(); }</code><technical_language>consecutive reloads necessary reload end sufficient</technical_language>

Target:
public static void beforeClass() throws CommandFailedException, InterruptedException, TimeoutException, IOException { AddLogger addLogger = Logging.logger().add(LOGGER).build(); client.apply(addLogger); AddLogger addLoggerTbr = Logging.logger().add(LOGGER).build(); client.apply(addLoggerTbr); administration.reloadIfRequired(); }
Source:
<code>public FilePath createTempDir(final String prefix, final String suffix) throws IOException, InterruptedException { try { return new FilePath(this,act(new SecureFileCallable<String>() { private static final long serialVersionUID = 1L; public String invoke(File dir, VirtualChannel channel) throws IOException { <START> Path tempPath = Files.createTempDirectory(dir.toPath(), prefix, null); <END> return tempPath.toFile().getName(); } })); } catch (IOException e) { throw new IOException("Failed to create a temp directory on "+remote,e); } }</code><technical_language>dir.toPath() throw InvalidPathException. is API method, handled wrapped IOException</technical_language>

Target:
public FilePath createTempDir(final String prefix, final String suffix) throws IOException, InterruptedException { try { String[] s; if (StringUtils.isBlank(suffix)) { s = new String[]{prefix, "tmp"}; } else { s = new String[]{prefix, suffix}; } String name = StringUtils.join(s, "."); return new FilePath(this,act(new SecureFileCallable<String>() { private static final long serialVersionUID = 1L; public String invoke(File dir, VirtualChannel channel) throws IOException { Path tempPath; final boolean isPosix = FileSystems.getDefault().supportedFileAttributeViews().contains("posix"); if (isPosix) { tempPath = Files.createTempDirectory(Util.fileToPath(dir), name, PosixFilePermissions.asFileAttribute(EnumSet.allOf(PosixFilePermission.class))); } else { tempPath = Files.createTempDirectory(Util.fileToPath(dir), name, new FileAttribute<?>[] {}); } if (tempPath.toFile() == null) { throw new IOException("Failed to obtain file from path " + dir + " on " + remote); } return tempPath.toFile().getName(); } })); } catch (IOException e) { throw new IOException("Failed to create a temp directory on "+remote,e); } }
Source:
<code>public static void initPlugins(OsmandApplication app) { OsmandSettings settings = app.getSettings(); Set<String> enabledPlugins = settings.getEnabledPlugins(); allPlugins.add(new OsmandRasterMapsPlugin(app)); allPlugins.add(new OsmandMonitoringPlugin(app)); allPlugins.add(new OsMoPlugin(app)); checkMarketPlugin(app, new SRTMPlugin(app), true, SRTM_PLUGIN_COMPONENT_PAID, SRTM_PLUGIN_COMPONENT); checkMarketPlugin(app, new NauticalMapsPlugin(app), false, NauticalMapsPlugin.COMPONENT, null); checkMarketPlugin(app, new SkiMapsPlugin(app), false, SkiMapsPlugin.COMPONENT, null); allPlugins.add(new AudioVideoNotesPlugin(app)); checkMarketPlugin(app, new ParkingPositionPlugin(app), false, ParkingPositionPlugin.PARKING_PLUGIN_COMPONENT, null); allPlugins.add(new DistanceCalculatorPlugin(app)); allPlugins.add(new AccessibilityPlugin(app)); allPlugins.add(new OsmEditingPlugin(app)); allPlugins.add(new OsmandDevelopmentPlugin(app)); <START> allPlugins.add(new SmartNaviWatchPlugin(app)); <END> activatePlugins(app, enabledPlugins); }</code><technical_language>if(Android.SDK_BUILD >= 19) { static function create class (and full classpath class imports) }</technical_language>

Target:
public static void initPlugins(OsmandApplication app) { OsmandSettings settings = app.getSettings(); Set<String> enabledPlugins = settings.getEnabledPlugins(); allPlugins.add(new OsmandRasterMapsPlugin(app)); allPlugins.add(new OsmandMonitoringPlugin(app)); allPlugins.add(new OsMoPlugin(app)); checkMarketPlugin(app, new SRTMPlugin(app), true, SRTM_PLUGIN_COMPONENT_PAID, SRTM_PLUGIN_COMPONENT); checkMarketPlugin(app, new NauticalMapsPlugin(app), false, NauticalMapsPlugin.COMPONENT, null); checkMarketPlugin(app, new SkiMapsPlugin(app), false, SkiMapsPlugin.COMPONENT, null); allPlugins.add(new AudioVideoNotesPlugin(app)); checkMarketPlugin(app, new ParkingPositionPlugin(app), false, ParkingPositionPlugin.PARKING_PLUGIN_COMPONENT, null); allPlugins.add(new DistanceCalculatorPlugin(app)); allPlugins.add(new AccessibilityPlugin(app)); allPlugins.add(new OsmEditingPlugin(app)); allPlugins.add(new OsmandDevelopmentPlugin(app)); if (android.os.Build.VERSION.SDK_INT >= 19) { allPlugins.add(new net.osmand.plus.smartnaviwatch.SmartNaviWatchPlugin(app)); } activatePlugins(app, enabledPlugins); }
Source:
<code>public void define_set_default_action() { WebService.Action setDefault = controller.action("set_default"); assertThat(setDefault).isNotNull(); assertThat(setDefault.isPost()).isTrue(); <START> assertThat(setDefault.params()).hasSize(4); <END> }</code><technical_language>assertion new param this test succeed if param is replaced another one, purpose mistake, this right imho</technical_language>

Target:
public void define_set_default_action() { WebService.Action setDefault = controller.action("set_default"); assertThat(setDefault).isNotNull(); assertThat(setDefault.isPost()).isTrue(); assertThat(setDefault.params()).hasSize(4); assertThat(setDefault.param("organization").since()).isEqualTo("6.4"); }
Source:
<code>public void validatesComplexXml() throws Exception { <START> final int zero = 0; <END> final int five = 5; final int ten = 10; final int thousand = 1000; final int hundred = 100; final String xsd = StringUtils.join( "<xs:schema xmlns:xs='<LINK_0>' >", "<xs:element name='root'>", "<xs:complexType><xs:sequence>", "<xs:element name='a' type='xs:string' maxOccurs='unbounded' />", "</xs:sequence></xs:complexType>", "</xs:element></xs:schema>" ); final StringBuilder text = new StringBuilder(ten * thousand) .append("<root>"); for (int idx = zero; idx < hundred; ++idx) { text.append("\n<a>\t&lt;&gt;&amp;&quot;&#09;&#x0A;") .append(RandomStringUtils.randomAlphanumeric(ten)) .append("</a>\n\r \t "); } text.append("</root>"); for (int idx = 0; idx < five; ++idx) { MatcherAssert.assertThat( new XSDDocument(xsd).validate( new StreamSource( IOUtils.toInputStream( text.toString(), CharEncoding.UTF_8 ) ) ), Matchers.empty() ); } }</code><technical_language>@tmjee meaningless names</technical_language>

Target:
public void validatesComplexXml() throws Exception { final int loopp = 5; final int size = 10000; final int loop = 100; final int random = 10; final String xsd = StringUtils.join( "<xs:schema xmlns:xs='<LINK_0>' >", "<xs:element name='root'>", "<xs:complexType><xs:sequence>", "<xs:element name='a' type='xs:string' maxOccurs='unbounded' />", "</xs:sequence></xs:complexType>", "</xs:element></xs:schema>" ); final StringBuilder text = new StringBuilder(size) .append("<root>"); for (int idx = 0; idx < loop; ++idx) { text.append("\n<a>\t&lt;&gt;&amp;&quot;&#09;&#x0A;") .append(RandomStringUtils.randomAlphanumeric(random)) .append("</a>\n\r \t "); } text.append("</root>"); for (int idx = 0; idx < loopp; ++idx) { MatcherAssert.assertThat( new XSDDocument(xsd).validate( new StreamSource( IOUtils.toInputStream( text.toString(), CharEncoding.UTF_8 ) ) ), Matchers.empty() ); } }
Source:
<code>public void testNotAllOutputsReferenced() { tester().assertThat(new PruneIndexSourceColumns()) .on(p -> buildProjectedIndexSource(p, symbol -> symbol.getName().equals("orderkey"))) .matches( strictProject( <START> ImmutableMap.of("x", PlanMatchPattern.expression("orderkey")), <END> constrainedIndexSource( "orders", ImmutableMap.of("totalprice", Domain.onlyNull(DOUBLE)), ImmutableMap.of( "orderkey", "orderkey", "totalprice", "totalprice")))); }</code><technical_language>static imort</technical_language>

Target:
public void testNotAllOutputsReferenced() { tester().assertThat(new PruneIndexSourceColumns()) .on(p -> buildProjectedIndexSource(p, symbol -> symbol.getName().equals("orderkey"))) .matches( strictProject( ImmutableMap.of("x", expression("orderkey")), constrainedIndexSource( "orders", ImmutableMap.of("totalprice", Domain.onlyNull(DOUBLE)), ImmutableMap.of( "orderkey", "orderkey", "totalprice", "totalprice")))); }
Source:
<code>public synchronized void deregisterSpecialPathInfo( SpecialPathInfo pathInfo ) { <START> deregisterSpecialPathInfo( pathInfo, PKG_TYPE_MAVEN ); <END> }</code><technical_language>Again, I this evaluate standard special path info, stuff for maven package</technical_language>

Target:
public synchronized void deregisterSpecialPathInfo( SpecialPathInfo pathInfo ) { stdSpecialPaths.remove( pathInfo ); }
Source:
<code>public void finishJob() { try { internalJobStatus = JobStatus.FINISHED; <START> jobManagerRunnerCompletableFuture.get().getResultFuture() <END> .complete(ArchivedExecutionGraph.createFromInitializingJob(getJobID(), "test", JobStatus.FINISHED, null, 1337)); } catch (Throwable e) { fail("Error in test infrastructure"); } }</code><technical_language>CompletableFuture.join() throws unchecked exception this a bit easier here</technical_language>

Target:
public void finishJob() { internalJobStatus = JobStatus.FINISHED; resultFuture.complete( ArchivedExecutionGraph.createFromInitializingJob(getJobID(), "test", JobStatus.FINISHED, null, 1337)); }
Source:
<code>public void registerResource(ResourceHandler handler) { handler.getInvocations().forEach(invocation -> { Set<String> paths = invocation.paths(); paths.forEach(path -> { <START> if (path.startsWith("/")) path = path.substring(1); <END> List<PathItem> p = Arrays.stream(path.split("/")).map(PathItem::fromString).collect(Collectors.toList()); resourceTree.insertPath(invocation, p); }); }); }</code><technical_language>add path.startsWith("/") logic a method registerResource lookupResource. do paths.map(..).forEach()</technical_language>

Target:
public void registerResource(ResourceHandler handler) { handler.getInvocations().forEach(invocation -> { Set<String> paths = invocation.paths(); paths.stream().map(this::removeLeadSlash).forEach(path -> { List<PathItem> p = Arrays.stream(path.split("/")).map(PathItem::fromString).collect(Collectors.toList()); resourceTree.insertPath(invocation, p); }); }); }
Source:
<code>public static <K, V> Function<EventJournalCacheEvent<K, V>, Entry<K, V>> cacheEventToEntry() { <START> return new CacheEventToEntryProjection<>(); <END> }</code><technical_language>Missing types</technical_language>

Target:
public static <K, V> Function<EventJournalCacheEvent<K, V>, Entry<K, V>> cacheEventToEntry() { return new CacheEventToEntryProjection<K, V>(); }
Source:
<code>public void showLoadingTemplates() { templateList.asWidget().setVisible(false); templatesLabel.setVisible(false); <START> loadingCategoriesLabel.setText("Loading templates..."); <END> loadingCategoriesLabel.setVisible(true); }</code><technical_language>move localization</technical_language>

Target:
public void showLoadingTemplates() { templateList.asWidget().setVisible(false); templatesLabel.setVisible(false); loadingCategoriesLabel.setVisible(true); }
Source:
<code>private SortedSet<String> getOutputSet(Context ctx) { JTree siteTree = extension.getView().getSiteTreePanel().getTreeSite(); TreePath rootPath = new TreePath(siteTree.getModel().getRoot()); SortedSet<String> outputSet = new TreeSet<String>(); <START> Enumeration<?> en = (((SiteNode) rootPath.getLastPathComponent()).preorderEnumeration()); <END> while (en.hasMoreElements()) { SiteNode node = (SiteNode) en.nextElement(); if (node.isRoot()) { continue; } HistoryReference nodeHR = node.getHistoryReference(); if (nodeHR != null && !HistoryReference.getTemporaryTypes().contains(nodeHR.getHistoryType())) { if (Model.getSingleton().getSession().getContextsForNode(node).contains(ctx)) { outputSet.add(nodeHR.getURI().toString()); } } } return outputSet; }</code><technical_language>ctx.getNodesInContextFromSiteTree() instead</technical_language>

Target:
private SortedSet<String> getOutputSet(Context ctx) { SortedSet<String> outputSet = new TreeSet<String>(); for (SiteNode node : ctx.getNodesInContextFromSiteTree()) { HistoryReference nodeHR = node.getHistoryReference(); if (nodeHR != null && !HistoryReference.getTemporaryTypes().contains(nodeHR.getHistoryType())) { outputSet.add(nodeHR.getURI().toString()); } } return outputSet; }
Source:
<code><START> public void closesAllParts() throws IOException { <END> RqMultipart.Base multi = null; try { final String body = "RqMultipartTest.closesAllParts"; final RqMultipart request = new RqMultipart.Fake( new RqFake(), new RqGreedy( new RqWithHeaders( new RqFake("", "", body), RqMultipartTest.contentLengthHeader( (long) body.getBytes().length ), RqMultipartTest.contentDispositionHeader( "form-data; name=\"name\"" ) ) ), new RqGreedy( new RqWithHeaders( new RqFake("", "", body), RqMultipartTest.contentLengthHeader(0L), RqMultipartTest.contentDispositionHeader( "form-data; name=\"content\"; filename=\"a.bin\"" ) ) ) ); multi = new RqMultipart.Base(request); multi.part("name").iterator().next().body().read(); multi.part("content").iterator().next().body().read(); multi.body().close(); } catch (final IOException ex) { Assert.fail("An IOException was not expected"); } MatcherAssert.assertThat( multi.part("name").iterator().next(), Matchers.notNullValue() ); try { multi.part("name").iterator().next().body().read(); Assert.fail( "An IOException was expected since the Stream is closed" ); } catch (final IOException ex) { MatcherAssert.assertThat( multi.part("content").iterator().next(), Matchers.notNullValue() ); multi.part("content").iterator().next().body().read(); } }</code><technical_language>@essobedo here, throws Exception</technical_language>

Target:
public void closesAllParts() throws Exception { final String body = "RqMultipartTest.closesAllParts"; final RqMultipart request = new RqMultipart.Fake( new RqFake(), new RqGreedy( new RqWithHeaders( new RqFake("", "", body), RqMultipartTest.contentLengthHeader( (long) body.getBytes().length ), RqMultipartTest.contentDispositionHeader( "form-data; name=\"name\"" ) ) ), new RqGreedy( new RqWithHeaders( new RqFake("", "", body), RqMultipartTest.contentLengthHeader(0L), RqMultipartTest.contentDispositionHeader( "form-data; name=\"content\"; filename=\"a.bin\"" ) ) ) ); final RqMultipart.Base multi = new RqMultipart.Base(request); multi.part("name").iterator().next().body().read(); multi.part("content").iterator().next().body().read(); multi.body().close(); MatcherAssert.assertThat( multi.part("name").iterator().next(), Matchers.notNullValue() ); try { multi.part("name").iterator().next().body().read(); Assert.fail( "An IOException was expected since the Stream is closed" ); } catch (final IOException ex) { MatcherAssert.assertThat( ex.getMessage(), Matchers.containsString("Closed") ); } MatcherAssert.assertThat( multi.part("content").iterator().next(), Matchers.notNullValue() ); try { multi.part("content").iterator().next().body().read(); Assert.fail( "An IOException was expected since the Stream is closed" ); } catch (final IOException ex) { MatcherAssert.assertThat( ex.getMessage(), Matchers.containsString("Closed") ); } }
Source:
<code>public void cwlIncompleteOutput() throws IOException { File file = new File(ResourceHelpers.resourceFilePath("incompleteOutput.cwl")); File json = new File(ResourceHelpers.resourceFilePath("1st-workflow-job.json")); ArrayList<String> args = new ArrayList<String>() {{ add("tool"); add("launch"); add("--local-entry"); add(file.getAbsolutePath()); add("--json"); add(json.getAbsolutePath()); }}; exit.expectSystemExit(); exit.checkAssertionAfterwards( () -> assertTrue("output should include an error message and exit", <START> systemErrRule.getLog().contains(""))); <END> runClientCommand(args, false); }</code><technical_language>This true</technical_language>

Target:
public void cwlIncompleteOutput() throws IOException { File file = new File(ResourceHelpers.resourceFilePath("incompleteOutput.cwl")); File json = new File(ResourceHelpers.resourceFilePath("1st-workflow-job.json")); ArrayList<String> args = new ArrayList<String>() {{ add("tool"); add("launch"); add("--local-entry"); add(file.getAbsolutePath()); add("--json"); add(json.getAbsolutePath()); }}; runClientCommand(args, false); assertTrue("output should include an error message", systemErrRule.getLog().contains("The error was: 'NoneType' object is not iterable")); }
Source:
<code>private void syncUpstreams( ) { <START> Collection<UpstreamInfo> upstreamsInBaragon = lbClient.getUpstreams(); <END> Collection<UpstreamInfo> upstreamsInSingularity = getUpstreamsFromActiveTasks(); upstreamsInBaragon.removeAll(upstreamsInSingularity); for (UpstreamInfo upstream: upstreamsInBaragon){ } }</code><technical_language>While more api calls, do this service a time for a reasons: - want compare upstreams context of service. Right PR is compiling a list of upstreams tasks/requests. host1:port1 is valid for SomethingWeb for SomethingElseWeb (in case remove is longer valid for). need context of request upstream belongs distinction (the request field of Baragon UpstreamInfo points BaragonRequest id, is SingularityRequest id) - Updates happening frequently other Singularity pollers want able lock request currently modifying state of system. examples of runWithRequestLock for lock request id leader. In this way, ensure BaragonState operating is modified another Singularity poller time</technical_language>

Target:
public void syncUpstreams() { for (SingularityRequestWithState singularityRequestWithState: requestManager.getActiveRequests()){ final SingularityRequest singularityRequest = singularityRequestWithState.getRequest(); lock.runWithRequestLock(() -> syncUpstreamsForService(singularityRequest), singularityRequest.getId(), getClass().getSimpleName()); } }
Source:
<code>public void process(KeyFilter keyFilter, CacheLoaderTask cacheLoaderTask, Executor executor, boolean fetchValue, boolean fetchMetadata) { try { Set<Object> keys = loader.loadAllKeys(null); int batchSize = 1000; ExecutorAllCompletionService eacs = new ExecutorAllCompletionService(executor); final TaskContext taskContext = new TaskContextImpl(); Set<Object> entries = new HashSet<Object>(batchSize); for (Object key : keys) { if (keyFilter == null || keyFilter.shouldLoadKey(key)) entries.add(key); if (entries.size() == batchSize) { final Set<Object> batch = entries; entries = new HashSet<Object>(batchSize); submitProcessTask(cacheLoaderTask, eacs, taskContext, batch, fetchValue, fetchMetadata); } } if (!entries.isEmpty()) { submitProcessTask(cacheLoaderTask, eacs, taskContext, entries, fetchValue, fetchMetadata); } eacs.waitUntilAllCompleted(); if (eacs.isExceptionThrown()) { <START> throw newCacheLoaderException(null); <END> } } catch (CacheLoaderException e) { throw newCacheLoaderException(e); } }</code><technical_language>save occurred exception put a exception</technical_language>

Target:
public void process(KeyFilter keyFilter, CacheLoaderTask cacheLoaderTask, Executor executor, boolean fetchValue, boolean fetchMetadata) { try { Set<Object> keys = loader.loadAllKeys(null); int batchSize = 1000; ExecutorAllCompletionService eacs = new ExecutorAllCompletionService(executor); final TaskContext taskContext = new TaskContextImpl(); Set<Object> entries = new HashSet<Object>(batchSize); for (Object key : keys) { if (keyFilter == null || keyFilter.shouldLoadKey(key)) entries.add(key); if (entries.size() == batchSize) { final Set<Object> batch = entries; entries = new HashSet<Object>(batchSize); submitProcessTask(cacheLoaderTask, eacs, taskContext, batch, fetchValue, fetchMetadata); } } if (!entries.isEmpty()) { submitProcessTask(cacheLoaderTask, eacs, taskContext, entries, fetchValue, fetchMetadata); } eacs.waitUntilAllCompleted(); if (eacs.isExceptionThrown()) { throw newCacheLoaderException(eacs.getFirstException()); } } catch (CacheLoaderException e) { throw newCacheLoaderException(e); } }
Source:
<code>public static Object getMinValueForType(FieldType type) throws Exception { switch (type) { case INTEGER: { return Long.MIN_VALUE; } case BOOLEAN: { return false; } case REAL: { return Double.MIN_VALUE; } case DECIMAL: { return BigDecimal.valueOf(Double.MIN_VALUE); } case STRING: { return minStringValue; } default: <START> System.out.println("Invalid field type for index field."); <END> throw new Exception("Invalid field type for index field."); } }</code><technical_language>a standard logger. is default case possible? other fieldtypes? supported fields in indexed files? If default case is possible, helpful output fieldtype name (if available)</technical_language>

Target:
public static Object getMinValueForType(FieldType type) throws Exception { switch (type) { case INTEGER: { return Long.MIN_VALUE; } case BOOLEAN: { return false; } case REAL: { return Double.MIN_VALUE; } case DECIMAL: { return BigDecimal.valueOf(Double.MIN_VALUE); } case STRING: { return minStringValue; } default: throw new Exception("Invalid field type for index field."); } }
Source:
<code>protected void createFieldEditors() { <START> addField(new IntegerFieldEditor(WMS_RESPONSE_TIMEOUT, "WMS response timeout", getFieldEditorParent())); <END> }</code><technical_language>please externalize string properties files well? Users translated usin e.g. Transifex (<LINK_0></technical_language>

Target:
protected void createFieldEditors() { addField(new IntegerFieldEditor(WmsPreferenceConstants.WMS_RESPONSE_TIMEOUT, "WMS response timeout", getFieldEditorParent())); }
Source:
<code>private void queueConsoleCommand(String command) throws Throwable { <START> queueConsoleCommand(command, DEFAULT_TIMEOUT, DEFAULT_TIME_UNIT); <END> }</code><technical_language>TestsPlugin.massageTimeout allow for a tweak of timeout values running slow build machines. e.g. queueConsoleCommand(command, TestsPlugin.massageTimeout(DEFAULT_TIMEOUT), TimeUnit.MILLISECONDS);</technical_language>

Target:
private void queueConsoleCommand(String command) throws Throwable { queueConsoleCommand(command, TestsPlugin.massageTimeout(DEFAULT_TIMEOUT), TimeUnit.MILLISECONDS); }
Source:
<code>public IAtsProgram getProgram(Object artifact) { IAtsProgram program = null; if (artifact instanceof ArtifactReadable) { ArtifactReadable artRead = (ArtifactReadable) artifact; if (artRead.isOfType(AtsArtifactTypes.Program)) { <START> program = new Program(logger, atsServer, (ArtifactReadable) artifact); <END> } } return program; }</code><technical_language>reason artRead instead of casting artifact again</technical_language>

Target:
public IAtsProgram getProgram(Object artifact) { IAtsProgram program = null; if (artifact instanceof ArtifactReadable) { ArtifactReadable artRead = (ArtifactReadable) artifact; if (artRead.isOfType(AtsArtifactTypes.Program)) { program = new Program(logger, atsServer, artRead); } } return program; }
Source:
<code>private static Type createVarcharType(RichColumnDescriptor descriptor) { <START> if (descriptor.getHiveType() != null && descriptor.getHiveType().getTypeInfo().getClass() == VarcharTypeInfo.class) { <END> VarcharTypeInfo typeInfo = (VarcharTypeInfo) descriptor.getHiveType().getTypeInfo(); return VarcharType.createVarcharType(typeInfo.getLength()); } else { return VarcharType.VARCHAR; } }</code><technical_language>instanceof</technical_language>

Target:
private static Type createVarcharType(RichColumnDescriptor descriptor) { if (descriptor.getHiveType().isPresent()) { TypeInfo typeInfo = descriptor.getHiveType().get().getTypeInfo(); if (typeInfo instanceof VarcharTypeInfo) { return VarcharType.createVarcharType(((VarcharTypeInfo) typeInfo).getLength()); } } return VarcharType.VARCHAR; }
Source:
<code>public void verifyPinTypeExist(String pinTypeName){ waitForElementVisibleByElement(mapFrame); driver.switchTo().frame(mapFrame); <START> while(createdPinNames.size()-1!=0){ <END> if(createdPinNames .get(createdPinNames.size()-1) .getText() .contains(pinTypeName) ){ Assertion.assertEquals( pinTypeName, createdPinNames.get(createdPinNames.size()-1).getText()); break; } } driver.switchTo().defaultContent(); }</code><technical_language>I in loop exit if method is called a pinTypeName is in list. Also, please consider getElementByText in BasePageObject class</technical_language>

Target:
public void verifyPinTypeExist(String pinTypeName){ waitForElementVisibleByElement(mapFrame); driver.switchTo().frame(mapFrame); while(createdPinNames.size()-1!=0){ if(createdPinNames .get(createdPinNames.size()-1) .getText() .contains(pinTypeName) ){ Assertion.assertEquals( pinTypeName, createdPinNames.get(createdPinNames.size()-1).getText()); } else { PageObjectLogging.log( "verifyPinTypeExist", "Pin type with name " + pinTypeName + " does not exist", true ); } break; } driver.switchTo().defaultContent(); }
Source:
<code>public StatusDTO setManagerCapabilities(Collection<String> capabilities) { if (capabilities != null) { if (this.capabilities == null) { <START> this.capabilities = new HashSet<String>(); <END> } this.capabilities.clear(); this.capabilities.addAll(capabilities); } else { this.capabilities = null; } return this; }</code><technical_language>else I missed. I important, set type creating new objects more. diamond operator new HashSet<></technical_language>

Target:
public StatusDTO setManagerCapabilities(Collection<String> capabilities) { if (capabilities != null) { if (this.capabilities == null) { this.capabilities = new HashSet<>(); } this.capabilities.clear(); this.capabilities.addAll(capabilities); } else { this.capabilities = null; } return this; }
Source:
<code>public void getBlobTest() throws Exception { MvcResult rtn = mockMvc.perform(get(ENDPOINT)) .andExpect(status().isOk()) .andExpect(header().string(HttpConstants.HEADER_CONTENT_DISPOSITION,"attachment; filename=project.zip")) .andReturn(); <START> assertEquals(getCompareFile(PROFILE, "txt", "TestBlob"), extractZipContent(rtn.getResponse().getContentAsByteArray(), "projectTestBlob.txt")); <END> }</code><technical_language>is a getCompareFile(fileName) method is more here. (fileName = "project/projectTestBlob.txt")</technical_language>

Target:
public void getBlobTest() throws Exception { MvcResult rtn = mockMvc.perform(get(ENDPOINT)) .andExpect(status().isOk()) .andExpect(header().string(HttpConstants.HEADER_CONTENT_DISPOSITION,"attachment; filename=project.zip")) .andReturn(); assertEquals(getCompareFile("project/projectTestBlob.txt"), extractZipContent(rtn.getResponse().getContentAsByteArray(), "projectTestBlob.txt")); }
Source:
<code>public void testInvalidHeaderParam() { String[] preferredIDs = { "P-Asserted-Identity:sip:33296112233@provider.com;user=phone\n", "P-Asserted-Identity: <sip:alice@atlanta.com>, <tel:+1-201-555-0123>;user=phone\n" }; for (String preferredID :preferredIDs) { try { <START> System.out.println("preferredID:"+preferredID); <END> HeaderParser hp = createParser(PAssertedIdentityParser.class, preferredID); hp.parse(); fail("Header:"+ preferredID + " cannot be parse, wrong in pattern"); } catch (java.text.ParseException ex) { } } }</code><technical_language>avoid System.out</technical_language>

Target:
public void testInvalidHeaderParam() { String preferredID = "P-Asserted-Identity:sip:33296112233@provider.com;user=phone\n"; try { HeaderParser hp = createParser(PAssertedIdentityParser.class, preferredID); hp.parse(); fail("Header:"+ preferredID + " cannot be parse, wrong in pattern"); } catch (java.text.ParseException ex) { assertTrue(ex.getMessage().contains("This Header Field cannot has Parameters")); } }
Source:
<code>public void testSingleThread_sync_parallel() throws Exception { Runnable mock = mock(Runnable.class); doAnswer(a -> sleep(500)).when(mock).run(); <START> safeCaller.modified(new HashMap<String, Object>() { <END> private static final long serialVersionUID = 1L; { put("singleThread", "true"); } }); spawn(() -> { assertDurationBetween(50, 450, () -> { safeCaller.create(mock).withTimeout(100).build().run(); }); }); spawn(() -> { assertDurationBelow(20, () -> { safeCaller.create(mock).withTimeout(100).build().run(); }); }); assertDurationBetween(50, 450, () -> { waitForAssert(() -> { verify(mock, times(2)).run(); }); }); }</code><technical_language>configureSingleThread(); here</technical_language>

Target:
public void testSingleThread_sync_parallel() throws Exception { Runnable mock = mock(Runnable.class); doAnswer(a -> sleep(500)).when(mock).run(); configureSingleThread(); spawn(() -> { assertDurationBetween(50, 450, () -> { safeCaller.create(mock).withTimeout(100).build().run(); }); }); spawn(() -> { assertDurationBelow(20, () -> { safeCaller.create(mock).withTimeout(100).build().run(); }); }); assertDurationBetween(50, 450, () -> { waitForAssert(() -> { verify(mock, times(2)).run(); }); }); }
Source:
<code>public void setEditingPattern(final PatternWrapper patternWrapper) { this.patternWrapper = patternWrapper; <START> editingWrapper().setFactField(null); <END> editingWrapper().setFactType(null); editingWrapper().setBoundName(null); editingWrapper().setType(null); fireChangeEvent(patternPage); fireChangeEvent(fieldPage); fireChangeEvent(additionalInfoPage); }</code><technical_language>of Optional "wrappers" nice; need more work creation of real columns set null values Optional is present</technical_language>

Target:
public void setEditingPattern(final PatternWrapper patternWrapper) { this.patternWrapper = patternWrapper; resetField(); fireChangeEvent(patternPage); fireChangeEvent(fieldPage); fireChangeEvent(additionalInfoPage); }
Source:
<code>public void close() { <START> sketch = null; <END> }</code><technical_language>set null values field</technical_language>

Target:
public void close() { sketch = null; values = null; }
Source:
<code>public LabelTypes getLabelTypes() { <START> List<LabelType> r = Lists.newArrayList(); <END> String destBranch = getChange().getDest().get(); for (LabelType l : getProjectControl().getLabelTypes().getLabelTypes()) { List<String> refs = l.getRefPatterns(); if (refs == null) { r.add(l); } else { for (String refPattern : refs) { if (RefConfigSection.isValid(refPattern) && match(destBranch, refPattern)) { r.add(l); break; } } } } return new LabelTypes(r); }</code><technical_language>Nit: newArrayListWithCapacity(getProjectControl().getLabelTypes().getLabelTypes().size()); worth factoring out List<LabelType> var</technical_language>

Target:
public LabelTypes getLabelTypes() { String destBranch = getChange().getDest().get(); List<LabelType> all = getProjectControl().getLabelTypes().getLabelTypes(); List<LabelType> r = Lists.newArrayListWithCapacity(all.size()); for (LabelType l : all) { List<String> refs = l.getRefPatterns(); if (refs == null) { r.add(l); } else { for (String refPattern : refs) { if (RefConfigSection.isValid(refPattern) && match(destBranch, refPattern)) { r.add(l); break; } } } } return new LabelTypes(r); }
Source:
<code>public void setEnvironment() throws Exception { super.init(userMode); <START> storeRestApiBaseUrl = getStoreURLHttps() + "api/am/store/v0.14/"; <END> tokenApiUrl = new URL(getKeyManagerURLHttps() + "oauth2/token"); Map<String, String> dataMap = RESTAPITestUtil.registerOAuthApplication(getKeyManagerURLHttps()); String accessToken = generateOAuthAccessToken(user.getUserName(), user.getPassword(), dataMap.get(RESTAPITestConstants.CONSUMER_KEY), dataMap.get(RESTAPITestConstants.CONSUMER_SECRET)); headers = new HashMap<String, String>(); headers.put("Authorization", "Bearer " + accessToken); headers.put("Content-Type", "application/json"); String url = storeRestApiBaseUrl + "applications"; String payload = "{\n" + " \"throttlingTier\": \"Unlimited\",\n" + " \"description\": \"Application for GIT_1628\",\n" + " \"name\": \"" + applicationName + "_" + user.getUserDomain() + "\",\n" + " \"callbackUrl\": \"<LINK_0>\"\n" + '}'; HttpResponse response = HTTPSClientUtils.doPost(url, headers, payload); if (response.getResponseCode() != 201) { Assert.fail("Application creation failed: Response code is " + response.getResponseCode() + " Response message is '" + response.getData() + '\''); } String json = response.getData(); Gson gson = new Gson(); JsonObject jsonObject = gson.fromJson(json, JsonObject.class); applicationId = jsonObject.get("applicationId").getAsString(); }</code><technical_language>reuse REST_API_VERSION constant dont modify tests</technical_language>

Target:
public void setEnvironment() throws Exception { super.init(userMode); storeRestApiBaseUrl = getStoreURLHttps() + "api/am/store/" + APIMIntegrationConstants.REST_API_VERSION + "/"; tokenApiUrl = new URL(getKeyManagerURLHttps() + "oauth2/token"); Map<String, String> dataMap = RESTAPITestUtil.registerOAuthApplication(getKeyManagerURLHttps()); String accessToken = generateOAuthAccessToken(user.getUserName(), user.getPassword(), dataMap.get(RESTAPITestConstants.CONSUMER_KEY), dataMap.get(RESTAPITestConstants.CONSUMER_SECRET)); headers = new HashMap<String, String>(); headers.put("Authorization", "Bearer " + accessToken); headers.put("Content-Type", "application/json"); String url = storeRestApiBaseUrl + "applications"; String payload = "{\n" + " \"throttlingTier\": \"Unlimited\",\n" + " \"description\": \"Application for GIT_1628\",\n" + " \"name\": \"" + applicationName + "_" + user.getUserDomain() + "\",\n" + " \"callbackUrl\": \"<LINK_0>\"\n" + '}'; HttpResponse response = HTTPSClientUtils.doPost(url, headers, payload); if (response.getResponseCode() != 201) { Assert.fail("Application creation failed: Response code is " + response.getResponseCode() + " Response message is '" + response.getData() + '\''); } String json = response.getData(); Gson gson = new Gson(); JsonObject jsonObject = gson.fromJson(json, JsonObject.class); applicationId = jsonObject.get("applicationId").getAsString(); }
Source:
<code>public void registerResponseOperation( @WebParam(targetNamespace = "<LINK_1>", partName = "parameters", name = "RegisterResponse") org.oasis_open.docs.ws_tx.wscoor._2006._06.RegisterResponseType parameters) { MessageContext ctx = webServiceCtx.getMessageContext(); MAP inboundMap = AddressingHelper.inboundMap(ctx); if (inboundMap.getRelatesTo() != null) { WSCLogger.logger.tracev("RegistrationResponsePortTypeImpl received resposne for messageId {0}", inboundMap.getRelatesTo().getRelatesTo()); AsynchronousRegistrationMapper.getInstance().assignResponse(inboundMap.getRelatesTo().getRelatesTo(), parameters); } else { <START> WSCLogger.logger.error("RegistrationResponsePortTypeImpl message received for unknown messageId"); <END> } }</code><technical_language>warn error messages translated a rule created in <LINK_0> logger method is called here. please change error warn messages defined wscI18NLogger</technical_language>

Target:
public void registerResponseOperation( @WebParam(targetNamespace = "<LINK_1>", partName = "parameters", name = "RegisterResponse") org.oasis_open.docs.ws_tx.wscoor._2006._06.RegisterResponseType parameters) { MessageContext ctx = webServiceCtx.getMessageContext(); MAP inboundMap = AddressingHelper.inboundMap(ctx); if (inboundMap.getRelatesTo() != null) { WSCLogger.logger.tracev("RegistrationResponsePortTypeImpl received response for messageId {0}", inboundMap.getRelatesTo().getRelatesTo()); AsynchronousRegistrationMapper.getInstance().assignResponse(inboundMap.getRelatesTo().getRelatesTo(), parameters); } else { WSCLogger.i18NLogger.error_empty_messageId_received_by_async_endpoint(); } }