auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testCreate() throws StripeException { Map<String, Object> params = new HashMap<String, Object>(); params.put("amount", 100); params.put("currency", "usd"); params.put("source", "src_123"); params.put("description", "creating a topup"); params.put("statement_descriptor", "topup"); <START> Topup topup = Topup.create(params); <END> assertNotNull(topup); verifyRequest( APIResource.RequestMethod.POST, "/v1/topups", params ); }</code><technical_language>named resource</technical_language>

Target:
public void testCreate() throws StripeException { final Map<String, Object> params = new HashMap<String, Object>(); params.put("amount", 100); params.put("currency", "usd"); params.put("source", "src_123"); params.put("description", "creating a topup"); params.put("statement_descriptor", "topup"); final Topup topup = Topup.create(params); assertNotNull(topup); verifyRequest( APIResource.RequestMethod.POST, "/v1/topups", params ); }
Source:
<code>public void handleChildChange(String parentPath, List<String> currentChildren) throws Exception { boolean allIn = true; if (currentChildren == null) { LOG.info("Got handleChildChange with null currentChildren"); return; } LOG.info("list of children in the barrier = " + parentPath + ":" + Arrays.toString(currentChildren.toArray())); LOG.info("list of children to compare against = " + parentPath + ":" + Arrays.toString(names.toArray())); <START> for (String name : names) { <END> if (!currentChildren.contains(name)) { LOG.info("node " + name + " is still not in the list "); allIn = false; break; } } if (allIn) { LOG.info("ALl nodes reached the barrier"); final String barrierPath = String.format("%s/barrier_%s", barrierPrefix, version); final String barrierDonePath = String.format("%s/barrier_done", barrierPath); LOG.info("Writing BARRIER DONE to " + barrierDonePath); zkUtils.getZkClient().writeData(barrierDonePath, BARRIER_DONE); } }</code><technical_language>consider Apache CollectionUtil.containsAll(currentChildren, names) for allIn</technical_language>

Target:
public void handleChildChange(String parentPath, List<String> currentChildren) throws Exception { if (currentChildren == null) { LOG.info("Got handleChildChange with null currentChildren"); return; } LOG.info("list of children in the barrier = " + parentPath + ":" + Arrays.toString(currentChildren.toArray())); LOG.info("list of children to compare against = " + parentPath + ":" + Arrays.toString(names.toArray())); if (CollectionUtils.containsAll(names, currentChildren)) { LOG.info("ALl nodes reached the barrier"); final String barrierPath = String.format("%s/barrier_%s", barrierPrefix, version); final String barrierDonePath = String.format("%s/barrier_done", barrierPath); LOG.info("Writing BARRIER DONE to " + barrierDonePath); zkUtils.getZkClient().writeData(barrierDonePath, BARRIER_DONE); } }
Source:
<code>public void customContinuationTokenSnippet() { class ContinuationState<C> { private C lastContinuationToken; private boolean isDone; ContinuationState(C token) { this.lastContinuationToken = token; } void setLastContinuationToken(C token) { <START> this.isDone = token == null ? true : false; <END> this.lastContinuationToken = token; } C getLastContinuationToken() { return this.lastContinuationToken; } boolean isDone() { return this.isDone; } } class FileContinuationToken { public int getNextLinkId() { return 0; } } class File { } class FilePage implements ContinuablePage<FileContinuationToken, File> { @Override public IterableStream<File> getElements() { return null; } @Override public FileContinuationToken getContinuationToken() { return null; } } class FileShareServiceClient { Flux<FilePage> getFilePages(FileContinuationToken token) { return null; } } FileShareServiceClient client = null; Supplier<PageRetriever<FileContinuationToken, FilePage>> pageRetrieverProvider = new Supplier<>() { @Override public PageRetriever<FileContinuationToken, FilePage> get() { return (continuationToken, pageSize) -> client.getFilePages(continuationToken); } }; class FilePagedFlux extends ContinuablePagedFluxCore<FileContinuationToken, File, FilePage> { FilePagedFlux(Supplier<PageRetriever<FileContinuationToken, FilePage>> pageRetrieverProvider) { super(pageRetrieverProvider); } } FilePagedFlux filePagedFlux = new FilePagedFlux(pageRetrieverProvider); END: com.azure.core.util.paging.pagedfluxcore.continuationtoken }</code><technical_language>This simplified to: this.isDone = token == null;</technical_language>

Target:
public void customContinuationTokenSnippet() { class ContinuationState<C> { private C lastContinuationToken; private boolean isDone; ContinuationState(C token) { this.lastContinuationToken = token; } void setLastContinuationToken(C token) { this.isDone = token == null; this.lastContinuationToken = token; } C getLastContinuationToken() { return this.lastContinuationToken; } boolean isDone() { return this.isDone; } } class FileContinuationToken { public int getNextLinkId() { return 0; } } class File { } class FilePage implements ContinuablePage<FileContinuationToken, File> { @Override public IterableStream<File> getElements() { return null; } @Override public FileContinuationToken getContinuationToken() { return null; } } class FileShareServiceClient { Flux<FilePage> getFilePages(FileContinuationToken token) { return null; } } FileShareServiceClient client = null; Supplier<PageRetriever<FileContinuationToken, FilePage>> pageRetrieverProvider = new Supplier<PageRetriever<FileContinuationToken, FilePage>>() { @Override public PageRetriever<FileContinuationToken, FilePage> get() { return (continuationToken, pageSize) -> client.getFilePages(continuationToken); } }; class FilePagedFlux extends ContinuablePagedFluxCore<FileContinuationToken, File, FilePage> { FilePagedFlux(Supplier<PageRetriever<FileContinuationToken, FilePage>> pageRetrieverProvider) { super(pageRetrieverProvider); } } FilePagedFlux filePagedFlux = new FilePagedFlux(pageRetrieverProvider); END: com.azure.core.util.paging.pagedfluxcore.continuationtoken }
Source:
<code>private void interceptOnTouchListener() { this.setOnTouchListener((v, event) -> { boolean isSwipe = false; float deltaX = 0.0f; Log.e("#SwipableCardView#", event.getAction() + ""); switch (event.getAction()) { case MotionEvent.ACTION_DOWN: x1 = event.getX(); break; case MotionEvent.ACTION_UP: <START> v.performClick(); <END> x2 = event.getX(); deltaX = x2 - x1; if (deltaX < 0) { isSwipe = true; } else if (deltaX > 0) { isSwipe = true; } break; } if (isSwipe && (pixelToDp(Math.abs(deltaX)) > MINIMUM_THRESHOLD_FOR_SWIPE)) { return onSwipe(v); } return false; }); }</code><technical_language>this added</technical_language>

Target:
private void interceptOnTouchListener() { this.setOnTouchListener((v, event) -> { boolean isSwipe = false; float deltaX = 0.0f; Log.e("#SwipableCardView#", event.getAction() + ""); switch (event.getAction()) { case MotionEvent.ACTION_DOWN: x1 = event.getX(); break; case MotionEvent.ACTION_UP: x2 = event.getX(); deltaX = x2 - x1; if (deltaX < 0) { isSwipe = true; } else if (deltaX > 0) { isSwipe = true; } break; } if (isSwipe && (pixelToDp(Math.abs(deltaX)) > MINIMUM_THRESHOLD_FOR_SWIPE)) { return onSwipe(v); } return false; }); }
Source:
<code>public TmfEventField[] extractItemFields(ITmfEvent event) { if (event instanceof BtfEvent) { BtfEvent btfEvent = (BtfEvent) event; TmfEventField[] fields = new TmfEventField[8]; <START> fields[0] = new TmfEventField(TIMESTAMP_COLUMN, <END> event.getTimestamp(), null); fields[1] = new TmfEventField(SOURCE_COLUMN, event.getSource(), null); final ITmfEventField content = btfEvent.getContent(); List<String> fieldNames = new ArrayList<>(content.getFieldNames()); fields[2] = (TmfEventField) content.getField(fieldNames.get(1)); fields[3] = new TmfEventField(TYPE_COLUMN, btfEvent.getType() .getName(), null); fields[4] = new TmfEventField(TARGET_COLUMN, event.getReference(), null); fields[5] = (TmfEventField) content.getField(fieldNames.get(2)); fields[6] = (TmfEventField) content.getField(fieldNames.get(0)); fields[7] = (TmfEventField) ((fieldNames.size() > 3 && content.getField(fieldNames.get(3)) != null) ? content .getField(fieldNames.get(3)) : NULL_NOTE_FIELD); return fields; } return new TmfEventField[0]; }</code><technical_language>Patch <LINK_0> pushed in time. Easiest rebase this top of it. simplify code in here</technical_language>

Target:
public TmfEventField[] extractItemFields(ITmfEvent event) { if (event instanceof BtfEvent) { BtfEvent btfEvent = (BtfEvent) event; TmfEventField[] fields = new TmfEventField[8]; fields[0] = new TmfEventField(BtfColumnNames.TIMESTAMP.toString(), event.getTimestamp(), null); fields[1] = new TmfEventField(BtfColumnNames.SOURCE.toString(), event.getSource(), null); final ITmfEventField content = btfEvent.getContent(); ITmfEventField notesField = content.getField(BtfColumnNames.NOTES.toString()); fields[2] = (TmfEventField) content.getField(BtfColumnNames.SOURCE_INSTANCE.toString()); fields[3] = new TmfEventField(BtfColumnNames.EVENT_TYPE.toString(), btfEvent.getType().getName(), null); fields[4] = new TmfEventField(BtfColumnNames.TARGET.toString(), event.getReference(), null); fields[5] = (TmfEventField) content.getField(BtfColumnNames.TARGET_INSTANCE.toString()); fields[6] = (TmfEventField) content.getField(BtfColumnNames.EVENT.toString()); fields[7] = (TmfEventField) ((notesField != null) ? notesField : NULL_NOTE_FIELD); return fields; } return new TmfEventField[0]; }
Source:
<code>public void onCatch(Throwable caught) { if (Utils.throwableContainsSpecificType(caught, SSLException.class) && WikipediaApp.getInstance().incSslFailCount() < 2) { WikipediaApp.getInstance().setSslFallback(true); <START> NetworkUtils.toastNetworkFail(); <END> cancel(); return; } throw new RuntimeException(caught); }</code><technical_language>try show a toast other UI work activity alive kicking</technical_language>

Target:
public void onCatch(Throwable caught) { if (Utils.throwableContainsSpecificType(caught, SSLException.class) && WikipediaApp.getInstance().incSslFailCount() < 2) { WikipediaApp.getInstance().setSslFallback(true); if (!isCancelled()) { NetworkUtils.toastNetworkFail(); } cancel(); return; } throw new RuntimeException(caught); }
Source:
<code>public List<PackageRoots[]> isConsistentClassSpace(PackageRoots exportingRoots, ResolverBundle exporter, List<PackageRoots> visited, List<PackageRoots[]> results) { if (roots == null) return results; int size = roots.length; <START> for (int i = 0; i < size; i++) { <END> ResolverExport root = roots[i]; String[] uses = root.getUsesDirective(); if (uses == null) continue; if (visited == null) visited = new ArrayList<>(1); if (visited.contains(this)) return results; visited.add(this); for (String use : uses) { if (use.equals(root.getName()) || !use.equals(exportingRoots.name)) { continue; } PackageRoots thisUsedRoots = getPackageRoots(root.getExporter(), use, null); PackageRoots exportingUsedRoots = getPackageRoots(exporter, use, null); if (thisUsedRoots == exportingRoots) return results; if (thisUsedRoots != nullPackageRoots && exportingUsedRoots != nullPackageRoots) if (!(subSet(thisUsedRoots.roots, exportingUsedRoots.roots) || subSet(exportingUsedRoots.roots, thisUsedRoots.roots))) { if (results == null) results = new ArrayList<>(1); results.add(new PackageRoots[] {this, exportingUsedRoots}); } results = thisUsedRoots.isConsistentClassSpace(exportingRoots, exporter, visited, results); } } return results; }</code><technical_language>miss a loop here, is i needed somewhere</technical_language>

Target:
public List<PackageRoots[]> isConsistentClassSpace(PackageRoots exportingRoots, ResolverBundle exporter, List<PackageRoots> visited, List<PackageRoots[]> results) { if (roots == null) return results; for (ResolverExport root : roots) { String[] uses = root.getUsesDirective(); if (uses == null) continue; if (visited == null) visited = new ArrayList<>(1); if (visited.contains(this)) return results; visited.add(this); for (String use : uses) { if (use.equals(root.getName()) || !use.equals(exportingRoots.name)) { continue; } PackageRoots thisUsedRoots = getPackageRoots(root.getExporter(), use, null); PackageRoots exportingUsedRoots = getPackageRoots(exporter, use, null); if (thisUsedRoots == exportingRoots) return results; if (thisUsedRoots != nullPackageRoots && exportingUsedRoots != nullPackageRoots) if (!(subSet(thisUsedRoots.roots, exportingUsedRoots.roots) || subSet(exportingUsedRoots.roots, thisUsedRoots.roots))) { if (results == null) results = new ArrayList<>(1); results.add(new PackageRoots[] {this, exportingUsedRoots}); } results = thisUsedRoots.isConsistentClassSpace(exportingRoots, exporter, visited, results); } } return results; }
Source:
<code>public URI resolve() throws Exception { if (value == null) { <START> value = location.accept(new URIVisitor(), environment); <END> } return value; }</code><technical_language>Hoist visitor private static constant</technical_language>

Target:
public URI resolve() throws Exception { if (evaluatedURI == null) { evaluatedURI = location.accept(VISITOR, environment); } return evaluatedURI; }
Source:
<code>protected String createPassFile(String value) throws IOException { File temp = File.createTempFile("ovirt", ".tmp"); String fileName = temp.getName(); BufferedWriter out = new BufferedWriter(new FileWriter(temp)); out.write(value); out.close(); <START> return fileName; <END> }</code><technical_language>I is if return File object instead of String, caller "getAbsolutePath()" avoid problems if path is absolute. Also, this create a world readable file? default. In java 6 forced Runtime.getRuntime().exec("/usr/bin/chmod", ...) do it. In Java 7 java.nio.file.Files.createTempFile(...)</technical_language>

Target:
protected String createPassFile(String value) throws IOException { File temp = File.createTempFile("ovirt", ".tmp"); String filePath = temp.getAbsolutePath(); BufferedWriter out = new BufferedWriter(new FileWriter(temp)); out.write(value); out.close(); if (new File("/usr/bin/chmod").exists()) { Runtime.getRuntime().exec("/usr/bin/chmod " + filePath); } return filePath; }
Source:
<code><START> public Set<String> getX86IrqVectorsEntry() { <END> return fIpiEntrySet; }</code><technical_language>return a Collection<String> for return value, top-most interface (to restrict is exposed). Iterable Collection is debatable</technical_language>

Target:
public Collection<String> getX86IrqVectorsEntry() { return IPI_ENTRY_SET; }
Source:
<code>private void addOtherMasterLogs(Container result) { final Jenkins jenkins = Jenkins.getInstance(); if (jenkins == null) { LOGGER.log(Level.WARNING, "Cannot add master logs to the bundle. Jenkins instance is not ready"); return; } File[] files = jenkins.getRootDir().listFiles(ROTATED_LOGFILE_FILTER); if (files != null) { for (File f : files) { result.add(new FileContent("other-logs/" + f.getName(), f)); } } File logs = new File(jenkins.getRootDir(), "logs"); if (logs.isDirectory()) { files = logs.listFiles(ROTATED_LOGFILE_FILTER); if (files != null) { for (File f : files) { result.add(new FileContent("other-logs/" + f.getName(), f)); } } } File taskLogs = new File(logs, "tasks"); <START> if (taskLogs.exists() && taskLogs.isDirectory()) { <END> files = taskLogs.listFiles(ROTATED_LOGFILE_FILTER); if (files != null) { for (File f : files) { result.add(new FileContent("other-logs/" + f.getName(), f)); } } } }</code><technical_language>Redundant-isDirectory covers relevant cases. is necessary check here, in logs block above: if directory exist, listFiles return null, checking for</technical_language>

Target:
private void addOtherMasterLogs(Container result) { final Jenkins jenkins = Jenkins.getInstance(); if (jenkins == null) { LOGGER.log(Level.WARNING, "Cannot add master logs to the bundle. Jenkins instance is not ready"); return; } File[] files = jenkins.getRootDir().listFiles(ROTATED_LOGFILE_FILTER); if (files != null) { for (File f : files) { result.add(new FileContent("other-logs/" + f.getName(), f)); } } File logs = new File(jenkins.getRootDir(), "logs"); files = logs.listFiles(ROTATED_LOGFILE_FILTER); if (files != null) { for (File f : files) { result.add(new FileContent("other-logs/" + f.getName(), f)); } } File taskLogs = new File(logs, "tasks"); files = taskLogs.listFiles(ROTATED_LOGFILE_FILTER); if (files != null) { for (File f : files) { result.add(new FileContent("other-logs/" + f.getName(), f)); } } }
Source:
<code>private void buildAspects() { for( IGrinderEntry recipe : AEAspectRegister.this.GRINDER_RECIPES ) { try { ItemStack recipeOutput = recipe.getOutput(); if( recipeOutput == null || recipeOutput.getItem() == null ) { continue; } if( this.areStacksEqualIgnoreAmount( recipeOutput, this.itemStack ) ) { if( this.isRecipeUsable( recipe ) ) { return; } } } catch( Exception e ) { } } <START> for( InscriberRecipe recipe : Inscribe.RECIPIES ) <END> { try { ItemStack recipeOutput = recipe.output; if( recipeOutput == null || recipeOutput.getItem() == null ) { continue; } if( this.areStacksEqualIgnoreAmount( recipeOutput, this.itemStack ) ) { if( this.isRecipeUsable( recipe ) ) { return; } } } catch( Exception e ) { } } for( IRecipe recipe : AEAspectRegister.this.NORMAL_RECIPES ) { try { ItemStack recipeOutput = recipe.getRecipeOutput(); if( recipeOutput == null || recipeOutput.getItem() == null ) { continue; } if( !this.areStacksEqualIgnoreAmount( recipeOutput, this.itemStack ) ) { continue; } if( this.isRecipeUsable( recipe ) ) { return; } } catch( Exception e ) { } } }</code><technical_language>RECIPES, correct typo</technical_language>

Target:
private void buildAspects() { for( IGrinderEntry recipe : AEAspectRegister.this.GRINDER_RECIPES ) { try { ItemStack recipeOutput = recipe.getOutput(); if( recipeOutput == null || recipeOutput.getItem() == null ) { continue; } if( this.areStacksEqualIgnoreAmount( recipeOutput, this.itemStack ) ) { if( this.isRecipeUsable( recipe ) ) { return; } } } catch( Exception e ) { } } for( InscriberRecipe recipe : Inscribe.RECIPES ) { try { ItemStack recipeOutput = recipe.output; if( recipeOutput == null || recipeOutput.getItem() == null ) { continue; } if( this.areStacksEqualIgnoreAmount( recipeOutput, this.itemStack ) ) { if( this.isRecipeUsable( recipe ) ) { return; } } } catch( Exception e ) { } } for( IRecipe recipe : AEAspectRegister.this.NORMAL_RECIPES ) { try { ItemStack recipeOutput = recipe.getRecipeOutput(); if( recipeOutput == null || recipeOutput.getItem() == null ) { continue; } if( !this.areStacksEqualIgnoreAmount( recipeOutput, this.itemStack ) ) { continue; } if( this.isRecipeUsable( recipe ) ) { return; } } catch( Exception e ) { } } }
Source:
<code>private void initializeFavoriteCheck() { if (ConnectorFactory.getConnector(cache).supportsAddToFavorite(cache, typeSelected)) { if (premFavPoints > 0) { favCheck.setVisibility(View.VISIBLE); <START> favCheck.setText(res.getQuantityString(R.string.fav_points_remaining, premFavPoints, premFavPoints)); <END> } } else { favCheck.setVisibility(View.GONE); } }</code><technical_language>I instead of R.string in needs R.plurals</technical_language>

Target:
private void initializeFavoriteCheck() { if (ConnectorFactory.getConnector(cache).supportsAddToFavorite(cache, typeSelected)) { if (premFavPoints > 0) { favCheck.setVisibility(View.VISIBLE); favCheck.setText(res.getQuantityString(R.plurals.fav_points_remaining, premFavPoints, premFavPoints)); } } else { favCheck.setVisibility(View.GONE); } }
Source:
<code>public K8SWatchService(K8SFileSystem fs) { this.fs = fs; this.ccf = (CloudClientFactory) fs.provider(); <START> Executors.newSingleThreadExecutor().execute(() -> <END> ccf.executeCloudFunction(this::triageEvents, KubernetesClient.class)); }</code><technical_language>Please DescriptiveRunnable class here, if problems threads is impossible follow if a proper name</technical_language>

Target:
public K8SWatchService(K8SFileSystem fs) { this.fs = fs; this.ccf = (CloudClientFactory) fs.provider(); Executors.newSingleThreadExecutor(new ThreadFactoryBuilder().setNameFormat("k8sfs-cm-watcher-thread-%d").build()).execute(() -> ccf.executeCloudFunction(this::triageEvents, KubernetesClient.class)); }
Source:
<code>private void renderDiffBaseListBox(ChangeInfo info) { JsArray<RevisionInfo> list = info.revisions().values(); RevisionInfo.sortRevisionInfoByNumber(list); int selectedIdx = -1; for (int i = list.length() - 1; i >= 0; i--) { RevisionInfo r = list.get(i); diffBase.addItem( r._number() + ": " + r.name().substring(0, 6), r.name()); if (r.name().equals(revision)) { SelectElement.as(diffBase.getElement()).getOptions() .getItem(diffBase.getItemCount() - 1).setDisabled(true); } if (base != null) { if (base.equals(String.valueOf(r._number()))) { selectedIdx = i; } } } RevisionInfo rev = info.revisions().get(revision); JsArray<CommitInfo> parents = rev.commit().parents(); diffBase.addItem( parents.length() > 1 ? Util.C.autoMerge() : Util.C.baseDiffItem(), ""); <START> diffBase.setSelectedIndex(selectedIdx == -1 ? diffBase.getItemCount() - 1 : selectedIdx - 1); <END> }</code><technical_language>computation of correct item selected incorrect in some cases. E.g. a change 6 patch sets, if I select patch set 5, goto a file navigate change patch set 3 is selected</technical_language>

Target:
private void renderDiffBaseListBox(ChangeInfo info) { JsArray<RevisionInfo> list = info.revisions().values(); RevisionInfo.sortRevisionInfoByNumber(list); int selectedIdx = list.length(); for (int i = list.length() - 1; i >= 0; i--) { RevisionInfo r = list.get(i); diffBase.addItem( r._number() + ": " + r.name().substring(0, 6), r.name()); if (r.name().equals(revision)) { SelectElement.as(diffBase.getElement()).getOptions() .getItem(diffBase.getItemCount() - 1).setDisabled(true); } if (base != null) { if (base.equals(String.valueOf(r._number()))) { selectedIdx = list.length() - i - 1; } } } RevisionInfo rev = info.revisions().get(revision); JsArray<CommitInfo> parents = rev.commit().parents(); diffBase.addItem( parents.length() > 1 ? Util.C.autoMerge() : Util.C.baseDiffItem(), ""); diffBase.setSelectedIndex(selectedIdx); }
Source:
<code><START> @Override public void syntaxError(String s, String s1, List<String> list, String s2, Integer integer) { <END> }</code><technical_language>@Override line above. Checkstyle/formatter config</technical_language>

Target:
public void syntaxError(String s, String s1, List<String> list, String s2, Integer integer)
Source:
<code>protected void onStop() { super.onStop(); Log.d(TAG, "Player Activity Stopped"); if (null != player) { player.suspend(); } <START> if(TAG.toString().equalsIgnoreCase("class com.ooyala.sample.players.InsertAdPlayerActivity")) <END> { Log.d(PERFORMANCE_MONITOR_TAG, performanceMonitor.buildStatisticsSnapshot().generateReport()); performanceMonitor.destroy(); } }</code><technical_language>Remove .toString()</technical_language>

Target:
protected void onStop() { super.onStop(); Log.d(TAG, "Player Activity Stopped"); if (null != player) { player.suspend(); } if(TAG.equalsIgnoreCase("class com.ooyala.sample.players.InsertAdPlayerActivity")) { Log.d(PERFORMANCE_MONITOR_TAG, performanceMonitor.buildStatisticsSnapshot().generateReport()); performanceMonitor.destroy(); } }
Source:
<code>public void testCompareWithCommit() throws Exception { String compareWithCommitMenuText = util .getPluginLocalizedValue("CompareWithCommitAction.label"); <START> Thread.sleep(5000); <END> String dialogTitle = UIText.CommitSelectionDialog_WindowTitle; SWTBotShell dialog = openCompareWithDialog(compareWithCommitMenuText, dialogTitle); assertEquals(3, dialog.bot().table().rowCount()); dialog.bot().table().select(0); dialog.bot().button(IDialogConstants.OK_LABEL).click(); waitUntilCompareTreeViewShows(); assertEquals(0, bot.viewById(CompareTreeView.ID).bot().tree() .getAllItems().length); dialog = openCompareWithDialog(compareWithCommitMenuText, dialogTitle); dialog.bot().table().select(1); dialog.bot().button(IDialogConstants.OK_LABEL).click(); waitUntilCompareTreeViewTreeHasNodeCount(1); }</code><technical_language>Sleeping 5 seconds for a single test is waisting a lot of time in test run. I Mac this necessary</technical_language>

Target:
public void testCompareWithCommit() throws Exception { String compareWithCommitMenuText = util .getPluginLocalizedValue("CompareWithCommitAction.label"); String dialogTitle = UIText.CommitSelectionDialog_WindowTitle; SWTBotShell dialog = openCompareWithDialog(compareWithCommitMenuText, dialogTitle); assertEquals(3, dialog.bot().table().rowCount()); dialog.bot().table().select(0); dialog.bot().button(IDialogConstants.OK_LABEL).click(); waitUntilCompareTreeViewShows(); assertEquals(0, bot.viewById(CompareTreeView.ID).bot().tree() .getAllItems().length); dialog = openCompareWithDialog(compareWithCommitMenuText, dialogTitle); dialog.bot().table().select(1); dialog.bot().button(IDialogConstants.OK_LABEL).click(); waitUntilCompareTreeViewTreeHasNodeCount(1); }
Source:
<code>public InventoryArchetype build(String id, String name) { <START> return new CompositeInventoryArchetype(id, name, types, properties, containerProvider); <END> }</code><technical_language>this</technical_language>

Target:
public InventoryArchetype build(String id, String name) { return new CompositeInventoryArchetype(id, name, this.types, this.properties, this.containerProvider); }
Source:
<code>public void resourceChanged(IResourceChangeEvent event) { for (IMarkerDelta delta : event.findMarkerDeltas(IMarker.BOOKMARK, false)) { for (TimeChartDecorationProvider provider : fDecorationProviders.values()) { if (delta.getResource().equals(provider.getBookmarksFile())) { <START> System.out.println(delta.getAttributes()); <END> if (delta.getKind() == IResourceDelta.REMOVED || delta.getMarker().getAttribute(IMarker.LOCATION, -1) != -1 || delta.getMarker().getAttribute(ITmfMarker.MARKER_RANK, (String) null) != null) { provider.refreshBookmarks(); } } } } redecorate(); }</code><technical_language>remove</technical_language>

Target:
public void resourceChanged(IResourceChangeEvent event) { for (IMarkerDelta delta : event.findMarkerDeltas(IMarker.BOOKMARK, false)) { for (TimeChartDecorationProvider provider : fDecorationProviders.values()) { if (delta.getResource().equals(provider.getBookmarksFile())) { if (delta.getKind() == IResourceDelta.REMOVED || delta.getMarker().getAttribute(IMarker.LOCATION, -1) != -1 || delta.getMarker().getAttribute(ITmfMarker.MARKER_RANK, (String) null) != null) { provider.refreshBookmarks(); } } } } redecorate(); }
Source:
<code>private void invokeOnSelection() { try { INVOKE_COUNT.incrementAndGet(this); if (!urgent) { invocationService.checkInvocationAllowed(); } if (isBindToSingleConnection()) { boolean invoked = invocationService.invokeOnConnection(this, (ClientConnection) connection); if (!invoked) { notifyException(new IOException("Could not invoke on connection " + connection)); } return; } boolean invoked; if (isSmartRoutingEnabled) { if (partitionId != -1) { invoked = invocationService.invokeOnPartitionOwner(this, partitionId); } else if (uuid != null) { invoked = invocationService.invokeOnTarget(this, uuid); } else { invoked = invocationService.invokeOnRandomTarget(this); } if (allowRetryOnRandom && !invoked) { invoked = invocationService.invokeOnRandomTarget(this); } } else { <START> invoked = invocationService.invokeOnRandomTarget(this); <END> } if (!invoked) { notifyException(new IOException("No connection found to invoke")); } } catch (Throwable e) { notifyException(e); } }</code><technical_language>for smart, is concept of random, hence, name is misleading this is a major issue</technical_language>

Target:
private void invokeOnSelection() { try { INVOKE_COUNT.incrementAndGet(this); if (!urgent) { invocationService.checkInvocationAllowed(); } if (isBindToSingleConnection()) { boolean invoked = invocationService.invokeOnConnection(this, (ClientConnection) connection); if (!invoked) { notifyException(new IOException("Could not invoke on connection " + connection)); } return; } boolean invoked; if (isSmartRoutingEnabled) { if (partitionId != -1) { invoked = invocationService.invokeOnPartitionOwner(this, partitionId); } else if (uuid != null) { invoked = invocationService.invokeOnTarget(this, uuid); } else { invoked = invocationService.invoke(this); } if (allowRetryOnRandom && !invoked) { invoked = invocationService.invoke(this); } } else { invoked = invocationService.invoke(this); } if (!invoked) { notifyException(new IOException("No connection found to invoke")); } } catch (Throwable e) { notifyException(e); } }
Source:
<code>public void setNode(Node givenNode) { setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); if (tvc != null) { tvc.cancelLoadingThumbnails(); } try { if (givenNode != null) { if (givenNode instanceof TableFilterNode){ tfn = (TableFilterNode) givenNode; <START> } <END> tvc = new ThumbnailViewChildren(givenNode,thumbSize); final Node root = new AbstractNode(tvc); pageUpdater.setRoot(root); root.addNodeListener(pageUpdater); em.setRootContext(root); } else { tfn = null; tvc = null; Node emptyNode = new AbstractNode(Children.LEAF); em.setRootContext(emptyNode); iconView.setBackground(Color.BLACK); } } finally { this.setCursor(null); } }</code><technical_language>this relates artifacts content cleanup. nodes pushed results view tree view expected wrapped TableFilterNode decorators, a bad cast exception is a good draw attention a programming error. encounter error here</technical_language>

Target:
public void setNode(Node givenNode) { setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); if (tvc != null) { tvc.cancelLoadingThumbnails(); } try { if (givenNode != null) { tfn = (TableFilterNode) givenNode; tvc = new ThumbnailViewChildren(givenNode,thumbSize); final Node root = new AbstractNode(tvc); pageUpdater.setRoot(root); root.addNodeListener(pageUpdater); em.setRootContext(root); } else { tfn = null; tvc = null; Node emptyNode = new AbstractNode(Children.LEAF); em.setRootContext(emptyNode); iconView.setBackground(Color.BLACK); } } finally { this.setCursor(null); } }
Source:
<code>public Key (String tenantId, String schemaName, String tableName) { this.tenantId = tenantId; <START> this.schemaName = schemaName; <END> this.tableName = tableName; }</code><technical_language>Check for Preconditions reduce member variables canonical form expected in rest of code if preconditions met. Applies other constructors of Key</technical_language>

Target:
public Key (String tenantId, String schemaName, String tableName) throws IllegalArgumentException { if (tableName == null) { throw new IllegalArgumentException(); } serializedValue = (tenantId != null ? tenantId + "," : ",") + (schemaName != null ? schemaName + "," : ",") + tableName; }
Source:
<code>private void collectVmPrestartFailureReasons(Map<String, Integer> failureReasons, List<String> messages) { <START> String reason = String.join(", ", messages); <END> Integer count = failureReasons.get(reason); failureReasons.put(reason, count == null ? 1 : count + 1); }</code><technical_language>please do join if variable replacements treat messages</technical_language>

Target:
private void collectVmPrestartFailureReasons(Map<String, Integer> failureReasons, List<String> messages) { if (log.isInfoEnabled()) { String reason = messages.stream() .filter(ErrorMessageUtils::isMessage) .collect(Collectors.joining(", ")); Integer count = failureReasons.get(reason); failureReasons.put(reason, count == null ? 1 : count + 1); } }
Source:
<code>default String toJSON() { ObjectMapper mapper = new ObjectMapper(); try { return mapper.writeValueAsString(this); } catch (JsonProcessingException e) { LoggerFactory.getLogger(JSONable.class).log(Level.WARNING, "failed to convert object of class {0} to JSON: {1}", <START> new Object[]{this.getClass().toString(), this}); <END> return ""; } }</code><technical_language>logging exception</technical_language>

Target:
default String toJSON() { ObjectMapper mapper = new ObjectMapper(); try { return mapper.writeValueAsString(this); } catch (JsonProcessingException e) { LoggerFactory.getLogger(JSONable.class).log(Level.WARNING, String.format("failed to convert object of class %s to JSON: %s", this.getClass().toString(), this), e); return EMPTY; } }
Source:
<code>private void showErrorsAndCleanupState(FactModelTuple factModelTuple) { StringBuilder builder = new StringBuilder(); boolean showError = false; if (factModelTuple.getTopLevelCollectionError().size() > 0) { showError = true; <START> builder.append("Top level collections are not supported:<br/>"); <END> factModelTuple.getTopLevelCollectionError().forEach(error -> builder.append("<b>"+ error + "</b><br/>")); builder.append("<br/>"); } if (factModelTuple.getMultipleNestedCollectionError().size() > 0) { showError = true; builder.append("Multiple collections nested are not supported:<br/>"); factModelTuple.getMultipleNestedCollectionError().forEach(error -> builder.append("<b>"+ error + "</b><br/>")); builder.append("<br/>"); } if (factModelTuple.getMultipleNestedObjectError().size() > 0) { showError = true; builder.append("Multiple nested objects inside a collection are not supported:<br/>"); factModelTuple.getMultipleNestedObjectError().forEach(error -> builder.append("<b>"+ error + "</b><br/>")); } if (showError) { factModelTuple.getTopLevelCollectionError().clear(); factModelTuple.getMultipleNestedCollectionError().clear(); factModelTuple.getMultipleNestedObjectError().clear(); eventBus.fireEvent(new UnsupportedDMNEvent(builder.toString())); } }</code><technical_language>Change to: > Top-level collections supported! Violated by:</technical_language>

Target:
private void showErrorsAndCleanupState(FactModelTuple factModelTuple) { StringBuilder builder = new StringBuilder(); boolean showError = false; if (factModelTuple.getTopLevelCollectionError().size() > 0) { showError = true; builder.append("Top-level collections are not supported! Violated by:<br/>"); factModelTuple.getTopLevelCollectionError().forEach(error -> builder.append("<b>"+ error + "</b><br/>")); builder.append("<br/>"); } if (factModelTuple.getMultipleNestedCollectionError().size() > 0) { showError = true; builder.append("Nested collections are not supported! Violated by:<br/>"); factModelTuple.getMultipleNestedCollectionError().forEach(error -> builder.append("<b>"+ error + "</b><br/>")); builder.append("<br/>"); } if (factModelTuple.getMultipleNestedObjectError().size() > 0) { showError = true; builder.append("Complex nested objects inside a collection are not supported! Violated by:<br/>"); factModelTuple.getMultipleNestedObjectError().forEach(error -> builder.append("<b>"+ error + "</b><br/>")); } if (showError) { factModelTuple.getTopLevelCollectionError().clear(); factModelTuple.getMultipleNestedCollectionError().clear(); factModelTuple.getMultipleNestedObjectError().clear(); eventBus.fireEvent(new UnsupportedDMNEvent(builder.toString())); } }
Source:
<code>private CassandraNodeHealthCheckDetails performHealthCheck(@NotNull final CassandraNodeHealthCheckTask healthCheckTask) { CassandraNodeHealthCheckDetails.Builder builder = CassandraNodeHealthCheckDetails.newBuilder(); <START> try (JmxConnect jmx = new JmxConnect(getHostAddress(), (int) healthCheckTask.getJmxPort() & 0xffff)) { <END> CassandraNodeInfo info = buildInfo(jmx); builder.setHealthy(true) .setInfo(info); LOGGER.info("Healthcheck succeeded: operationMode:{} joined:{} gossip:{} native:{} rpc:{} uptime:{}s endpoint:{}, dc:{}, rack:{}, hostId:{}, version:{}", info.getOperationMode(), info.getJoined(), info.getGossipRunning(), info.getNativeTransportRunning(), info.getRpcServerRunning(), info.getUptimeSeconds(), info.getEndpoint(), info.getDataCenter(), info.getRack(), info.getHostId(), info.getVersion()); } catch (Exception e) { LOGGER.warn("Healthcheck failed.", e); builder.setMsg(e.toString()); } return builder.build(); }</code><technical_language>I assume 0xffff is deal casting long int making a valid positive value</technical_language>

Target:
private CassandraNodeHealthCheckDetails performHealthCheck(@NotNull final CassandraNodeHealthCheckTask healthCheckTask) { CassandraNodeHealthCheckDetails.Builder builder = CassandraNodeHealthCheckDetails.newBuilder(); try (JmxConnect jmx = new JmxConnect(getHostAddress(), (int) healthCheckTask.getJmxPort() & 0xffff)) { CassandraNodeInfo info = buildInfo(jmx); builder.setHealthy(true); LOGGER.info("Healthcheck succeeded: operationMode:{} joined:{} gossip:{} native:{} rpc:{} uptime:{}s endpoint:{}, dc:{}, rack:{}, hostId:{}, version:{}", info.getOperationMode(), info.getJoined(), info.getGossipRunning(), info.getNativeTransportRunning(), info.getRpcServerRunning(), info.getUptimeMillis() / 1000, info.getEndpoint(), info.getDataCenter(), info.getRack(), info.getHostId(), info.getVersion()); } catch (Exception e) { LOGGER.warn("Healthcheck failed.", e); builder.setHealthy(true) .setMsg(e.toString()); } return builder.build(); }
Source:
<code>NestedClassSelector(List<String> enclosingClassNames, String nestedClassName) { <START> this.enclosingClassSelectors = enclosingClassNames.stream().map(ClassSelector::new).collect( Collectors.toList()); <END> this.nestedClassSelector = new ClassSelector(nestedClassName); }</code><technical_language>interesting trick</technical_language>

Target:
NestedClassSelector(List<String> enclosingClassNames, String nestedClassName) { this.enclosingClassSelectors = enclosingClassNames.stream().map(ClassSelector::new).collect(toList()); this.nestedClassSelector = new ClassSelector(nestedClassName); }
Source:
<code>public RequestSendFailedException(final Throwable cause) { <START> super(throwableToException(cause)); <END> }</code><technical_language>I this method return "null" is Exception, call initCause() below</technical_language>

Target:
public RequestSendFailedException(final Throwable cause) { super(); initCause(cause); }
Source:
<code>void checkInConnection(String connectionId) { <START> availableConnections.add(connectionId); <END> availableCount++; }</code><technical_language>check if connectionId belongs this <host, port> pair? possibly error cases connections <host1, port1> checked <host2, port2></technical_language>

Target:
void checkInConnection(String connectionId) { availableConnections.add(connectionId); }
Source:
<code>public String toString() { readLock.lock(); try { <START> return "FileListCacheValue{fileNames=" + getFileNames() + "}"; <END> } finally { readLock.unlock(); } }</code><technical_language>This change I requested supposed remove need for a read lock</technical_language>

Target:
public String toString() { return "FileListCacheValue{fileNames=" + getFileNames() + "}"; }
Source:
<code>public Market <START> getM() <END> { return currentMarket; }</code><technical_language>getCurrentMarket() a name</technical_language>

Target:
private Market getM() { return currentMarket; }
Source:
<code>private boolean canReuseWorkspace(FilePath repo, boolean jobShouldUseSharing, AbstractBuild<?,?> build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException { if (!new FilePath(repo, ".hg/hgrc").exists()) { return false; } boolean jobUsesSharing = new FilePath(repo, ".hg/sharedpath").exists(); if (jobShouldUseSharing != jobUsesSharing) { return false; } EnvVars env = build.getEnvironment(listener); HgExe hg = new HgExe(this,launcher,build,listener); String upstream = hg.config(repo, "paths.default"); if (upstream == null) { return false; } if (HgExe.pathEquals(getSource( env ), upstream)) { return true; } listener.error( "Workspace reports paths.default as " + upstream + <START> "\nwhich looks different than " + getSource( env ) + <END> "\nso falling back to fresh clone rather than incremental update"); return false; }</code><technical_language>introduce local variable</technical_language>

Target:
private boolean canReuseWorkspace(FilePath repo, boolean jobShouldUseSharing, AbstractBuild<?,?> build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException { if (!new FilePath(repo, ".hg/hgrc").exists()) { return false; } boolean jobUsesSharing = new FilePath(repo, ".hg/sharedpath").exists(); if (jobShouldUseSharing != jobUsesSharing) { return false; } EnvVars env = build.getEnvironment(listener); HgExe hg = new HgExe(this,launcher,build,listener); String upstream = hg.config(repo, "paths.default"); if (upstream == null) { return false; } String source = getSource( env ); if (HgExe.pathEquals(source, upstream)) { return true; } listener.error( "Workspace reports paths.default as " + upstream + "\nwhich looks different than " + source + "\nso falling back to fresh clone rather than incremental update"); return false; }
Source:
<code>public AbstractSideTabWithDetailsView( SearchableTableModelProvider<T, M> modelProvider, <START> ApplicationResources applicationResources, final ClientStorage clientStorage) { <END> this.modelProvider = modelProvider; this.table = createActionTable(); this.table.showRefreshButton(); this.clientStorage = clientStorage; applicationResources.sideTabWithDetailsViewStyle().ensureInjected(); subTabPanelContainer.setStyleName(applicationResources.sideTabWithDetailsViewStyle().detailsContentPanel()); splitPanel = new ExtendedViewSplitLayoutPanel(applicationResources.extendedViewSplitterSnap()) { @Override public void onResize() { super.onResize(); if (subTabPanelVisible) { clientStorage.setLocalItem(SubTabHelper.SUB_TAB_HEIGHT_KEY, String.valueOf(subTabPanelContainer.getOffsetHeight())); } } }; initWidget(splitPanel); initSplitPanel(); }</code><technical_language>need for final :-)</technical_language>

Target:
public AbstractSideTabWithDetailsView( SearchableTableModelProvider<T, M> modelProvider, ApplicationResources applicationResources, final ClientStorage clientStorage) { this.modelProvider = modelProvider; this.table = createActionTable(); this.table.showRefreshButton(); this.clientStorage = clientStorage; applicationResources.sideTabWithDetailsViewStyle().ensureInjected(); subTabPanelContainer.setStyleName(applicationResources.sideTabWithDetailsViewStyle().detailsContentPanel()); splitPanel = new ExtendedViewSplitLayoutPanel(applicationResources.extendedViewSplitterSnap()) { @Override public void onResize() { super.onResize(); if (subTabPanelVisible) { SubTabHelper.storeSubTabHeight(clientStorage, subTabPanelContainer); } } }; initWidget(splitPanel); initSplitPanel(); }
Source:
<code>protected void showDismissDialog() { <START> new AlertDialog.Builder(getContext()) <END> .setMessage(R.string.username_changer_dismiss_message) .setPositiveButton(R.string.username_changer_dismiss_button_positive, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { mDialogController.dismiss(); } }) .setNegativeButton(android.R.string.cancel, null) .show(); }</code><technical_language>This alert dialog survive rotation. super important survive leave assess if this needs addressed. Thanks</technical_language>

Target:
protected void showDismissDialog() { mIsShowingDismissDialog = true; new AlertDialog.Builder(getContext()) .setMessage(R.string.username_changer_dismiss_message) .setPositiveButton(R.string.username_changer_dismiss_button_positive, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { mDialogController.dismiss(); } }) .setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { mIsShowingDismissDialog = false; } }) .show(); }
Source:
<code>public boolean applySchemaPatch(QuerySchemaPatch patch) { synchronized (schemaMux) { boolean res = schema.applyPatch(patch); <START> Optional<SchemaAbstractOperation> op = patch.getPatchOperations().stream() <END> .filter(o -> o instanceof SchemaAddQueryEntityOperation).findFirst(); if (res && op.isPresent()) cacheCfg = GridCacheUtils.patchCacheConfiguration(cacheCfg, (SchemaAddQueryEntityOperation)op.get()); return res; } }</code><technical_language>filter+forEach instead of findFirst isPresent. if (res) { patch.getPatchOperations().stream() .filter(op -> op instanceof SchemaAddQueryEntityOperation) .forEach(op -> cacheCfg = patchCacheConfiguration(cacheCfg, (SchemaAddQueryEntityOperation)op)); }</technical_language>

Target:
public boolean applySchemaPatch(QuerySchemaPatch patch) { synchronized (schemaMux) { boolean res = schema.applyPatch(patch); if (res) { for (SchemaAbstractOperation op: patch.getPatchOperations()) { if (op instanceof SchemaAddQueryEntityOperation) cacheCfg = GridCacheUtils.patchCacheConfiguration(cacheCfg, (SchemaAddQueryEntityOperation)op); } } return res; } }
Source:
<code>public static String formatVCFDouble(final double d) { final int numSignificant = 5; final double lowerLimit = Math.pow(10, -numSignificant); if (d == 0.0) { return "0.0"; <START> } <END> else if (d == Double.POSITIVE_INFINITY || d == Double.NEGATIVE_INFINITY || Double.isNaN(d)) { return String.format("%f", d); } else if (d >= 0.1) { final DecimalFormat df = new DecimalFormat("0.0" + String.join("", Collections.nCopies(numSignificant-1, "#"))); return df.format(round(d, numSignificant)); } else { int denominator = 1; int denominatorCount = 0; while (d * denominator < 1.0) { denominator *= 10; denominatorCount++; } final double roundedValue = round(d * denominator, numSignificant); final double finalValue = roundedValue / denominator; if (roundedValue == (double)(int)roundedValue && finalValue >= lowerLimit) { return String.format("%." + denominatorCount + "f", finalValue); } else { return String.format("%." + numSignificant + "e", finalValue); } } }</code><technical_language>} else {</technical_language>

Target:
public static String formatVCFDouble(final double d) { final int numSignificant = 4; final double lowerLimit = Math.pow(10, -numSignificant); if (d == 0.0) { return "0.0"; } else if (d == Double.POSITIVE_INFINITY || d == Double.NEGATIVE_INFINITY || Double.isNaN(d)) { return String.format("%f", d); } else if (d >= 0.1) { final DecimalFormat df = new DecimalFormat("0.0" + String.join("", Collections.nCopies(numSignificant - 1, "#"))); return df.format(round(d, numSignificant)); } else { final int denominatorCount = -(int) Math.floor(Math.log10(d)); final double denominator = Math.pow(10, -denominatorCount); final double roundedValue = round(d / denominator, numSignificant); final double finalValue = roundedValue * denominator; final String string1 = String.format("%." + (numSignificant+denominatorCount) + "f", finalValue); final String string2 = String.format("%." + numSignificant + "e", finalValue); return string1.length() <= string2.length() ? string1 : string2; } }
Source:
<code>public static byte[] encodeBase64URLSafe(byte[] binaryData) { if(binaryData == null){ return null; } <START> <END> return com.google.common.io.BaseEncoding.base64Url().omitPadding().encode(binaryData).getBytes(); }</code><technical_language>nit: delete newline</technical_language>

Target:
public static byte[] encodeBase64URLSafe(byte[] binaryData) { if (binaryData == null) { return null; } return BaseEncoding.base64Url().omitPadding().encode(binaryData).getBytes(); }
Source:
<code>public WakeupResponse wakeup(@ApiParam("Internal id for workflow instance") @PathParam("id") int id, @Valid @ApiParam("Expected states") WakeupRequest req) { WakeupResponse response = new WakeupResponse(); <START> List<String> expectedStates = req.expectedStates != null ? req.expectedStates : emptyList(); <END> response.wakeupSuccess = workflowInstances.wakeupWorkflowInstance(id, expectedStates); return response; }</code><technical_language>suggestion List<String> expectedStates = Optional.ofNullable(req.expectedStates).orElseGet(Collections::emptyList);</technical_language>

Target:
public WakeupResponse wakeup(@ApiParam("Internal id for workflow instance") @PathParam("id") int id, @Valid @ApiParam("Expected states") WakeupRequest req) { WakeupResponse response = new WakeupResponse(); List<String> expectedStates = ofNullable(req.expectedStates).orElseGet(Collections::emptyList); response.wakeupSuccess = workflowInstances.wakeupWorkflowInstance(id, expectedStates); return response; }
Source:
<code>private String resolveProjectName(final Path resourcePath) { KieModule kieModule = moduleService.resolveModule(resourcePath); if (kieModule == null) { <START> throw new IllegalStateException("Failed to resolve KieProject (" + kieModule + ")."); <END> } return kieModule.getModuleName(); }</code><technical_language>Please update exception message KieModule too</technical_language>

Target:
private String resolveProjectName(final Path resourcePath) { KieModule kieModule = moduleService.resolveModule(resourcePath); if (kieModule == null) { throw new IllegalStateException("Failed to resolve KieModule (" + kieModule + ")."); } return kieModule.getModuleName(); }