auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public static void reopenTraceFromElement(final TmfCommonProjectElement traceElement, final IReusableEditor editor) { final IFile file; try { file = traceElement.createBookmarksFile(); } catch (final CoreException e) { Activator.getDefault().logError(Messages.TmfOpenTraceHelper_ErrorOpeningTrace + ' ' + traceElement.getName()); <START> TraceUtils.displayErrorMsg(Messages.TmfOpenTraceHelper_OpenTrace, Messages.TmfOpenTraceHelper_ErrorTrace + ENDL + ENDL + e.getMessage()); <END> return; } Thread thread = new Thread() { @Override public void run() { final ITmfTrace trace = openProjectElement(traceElement, file); if (trace == null) { return; } final IEditorInput editorInput = new TmfEditorInput(file, trace); Display.getDefault().asyncExec(new Runnable() { @Override public void run() { final IWorkbench wb = PlatformUI.getWorkbench(); final IWorkbenchPage activePage = wb.getActiveWorkbenchWindow().getActivePage(); activePage.reuseEditor(editor, editorInput); activePage.activate(editor); } }); } }; thread.start(); }</code><technical_language>For experiment experiment error messages trace error messages (e.g. Messages.TmfOpenTraceHelper_ErrorOpeningExperiment)</technical_language>

Target:
public static void reopenTraceFromElement(final TmfCommonProjectElement traceElement, final IReusableEditor editor) { final IFile file; try { file = traceElement.createBookmarksFile(); } catch (final CoreException e) { Activator.getDefault().logError(NLS.bind(Messages.TmfOpenTraceHelper_ErrorOpeningElement, traceElement.getTypeName()) + ' ' + traceElement.getName()); TraceUtils.displayErrorMsg(NLS.bind(Messages.TmfOpenTraceHelper_OpenElement, traceElement.getTypeName()), NLS.bind(Messages.TmfOpenTraceHelper_ErrorElement, traceElement.getTypeName()) + ENDL + ENDL + e.getMessage()); return; } Thread thread = new Thread() { @Override public void run() { final ITmfTrace trace = openProjectElement(traceElement, file); if (trace == null) { return; } final IEditorInput editorInput = new TmfEditorInput(file, trace); Display.getDefault().asyncExec(new Runnable() { @Override public void run() { final IWorkbench wb = PlatformUI.getWorkbench(); final IWorkbenchPage activePage = wb.getActiveWorkbenchWindow().getActivePage(); activePage.reuseEditor(editor, editorInput); activePage.activate(editor); } }); } }; thread.start(); }
Source:
<code>AddImageTask(ImageDetails imageDetails, DataSourceProcessorProgressMonitor progressMonitor, AddDataSourceCallbacks addDataSourceCallbacks, AddImageTaskCallback addImageTaskCallback) { this.deviceId = imageDetails.deviceId; this.imagePath = imageDetails.imagePath; this.sectorSize = imageDetails.sectorSize; this.timeZone = imageDetails.timeZone; this.ignoreFatOrphanFiles = imageDetails.ignoreFatOrphanFiles; this.md5 = imageDetails.md5; this.sha1 = imageDetails.sha1; this.sha256 = imageDetails.sha256; this.imageWriterSettings = imageDetails.imageWriterSettings; this.addDataSourceCallbacks = addDataSourceCallbacks; <START> this.addImageTaskCallback = addImageTaskCallback; <END> this.progressMonitor = progressMonitor; tskAddImageProcessLock = new Object(); }</code><technical_language>ImageDetails instance variable instead of duplicating ImageDetails class AddImageTask class</technical_language>

Target:
AddImageTask(ImageDetails imageDetails, DataSourceProcessorProgressMonitor progressMonitor, AddDataSourceCallbacks addDataSourceCallbacks, AddImageTaskCallback addImageTaskCallback) { this.imageDetails = imageDetails; this.addDataSourceCallbacks = addDataSourceCallbacks; this.addImageTaskCallback = addImageTaskCallback; this.progressMonitor = progressMonitor; tskAddImageProcessLock = new Object(); }
Source:
<code>public int hashCode() { <START> return definition.hashCode(); <END> }</code><technical_language>I HashUtil.combineHashCodes(definition.hashCode()), WDYT</technical_language>

Target:
public int hashCode() { return HashUtil.combineHashCodes(definition == null ? 0 : definition.hashCode()); }
Source:
<code>public void makeClass(IntCharSet set, boolean caseless) { if (caseless) set = set.getCaseless(scanner.getUnicodeProperties()); int oldSize = classes.size(); for (int i = 0; i < oldSize; i++) { <START> IntCharSet x = classes.get(i); <END> if (x.equals(set)) return; IntCharSet and = x.and(set); if (and.containsElements()) { if (x.equals(and)) { set.sub(and); continue; } else if (set.equals(and)) { x.sub(and); classes.add(and); return; } set.sub(and); x.sub(and); classes.add(and); } } }</code><technical_language>remove DEBUG, dead unused, a static DEBUG option I get a trace of in algorithmic part. slightly horrible println debugging, IDE debugging takes long set for this. Ok for DEBUG remain static, for developing</technical_language>

Target:
public void makeClass(IntCharSet set, boolean caseless) { if (caseless) set = set.getCaseless(scanner.getUnicodeProperties()); if (DEBUG) { Out.debug("makeClass(" + set + ")"); debugDump(); } int oldSize = classes.size(); for (int i = 0; i < oldSize; i++) { IntCharSet x = classes.get(i); if (Objects.equals(x, set)) return; IntCharSet and = x.and(set); if (and.containsElements()) { if (Objects.equals(x, and)) { set.sub(and); continue; } else if (Objects.equals(set, and)) { x.sub(and); classes.add(and); if (DEBUG) { Out.debug("makeClass(..) finished"); debugDump(); } return; } set.sub(and); x.sub(and); classes.add(and); } } if (DEBUG) { Out.debug("makeClass(..) finished"); debugDump(); } }
Source:
<code>public Tool getToolFromNamespaceAndRepo(String namespace, String repository) { try { String name = namespace + "/" + repository; QuayRepo repo = repositoryApi.getRepo(name, true); Tool tool = new Tool(); tool.setName(repo.getName()); tool.setNamespace(repo.getNamespace()); tool.setRegistry(Registry.QUAY_IO.toString()); tool.setMode(ToolMode.AUTO_DETECT_QUAY_TAGS_AUTOMATED_BUILDS); return tool; } catch (ApiException ex) { <START> LOG.warn(quayToken.getUsername() + " Exception: {}", ex); <END> throw new CustomWebApplicationException("Could not get repository from Quay.io", HttpStatus.SC_BAD_REQUEST); } }</code><technical_language>LOG.error? Is this a normal situation</technical_language>

Target:
public Tool getToolFromNamespaceAndRepo(String namespace, String repository) { try { String name = namespace + "/" + repository; QuayRepo repo = repositoryApi.getRepo(name, true); Tool tool = new Tool(); tool.setName(repo.getName()); tool.setNamespace(repo.getNamespace()); tool.setRegistry(Registry.QUAY_IO.getDockerPath()); tool.setMode(ToolMode.AUTO_DETECT_QUAY_TAGS_AUTOMATED_BUILDS); return tool; } catch (ApiException ex) { LOG.warn(quayToken.getUsername() + " Exception: {}", ex); throw new CustomWebApplicationException("Could not get repository from Quay.io", HttpStatus.SC_BAD_REQUEST); } }
Source:
<code>public NetSocketImpl(VertxInternal vertx, ChannelHandlerContext channel, SocketAddress remoteAddress, ContextInternal context, SSLHelper helper, TCPMetrics metrics) { super(vertx, channel, context); this.helper = helper; <START> this.writeHandlerID = EventbusAddresses.generateInternal("net"); <END> this.remoteAddress = remoteAddress; this.metrics = metrics; }</code><technical_language>do "__vertx.reply" + UUID.randomUUID().toString()</technical_language>

Target:
public NetSocketImpl(VertxInternal vertx, ChannelHandlerContext channel, SocketAddress remoteAddress, ContextInternal context, SSLHelper helper, TCPMetrics metrics) { super(vertx, channel, context); this.helper = helper; this.writeHandlerID = "__vertx.net." + UUID.randomUUID().toString(); this.remoteAddress = remoteAddress; this.metrics = metrics; }
Source:
<code><START> public IPinUpdater<? extends ActivityNode> instantiate(ActivityNode node){ <END> IPinUpdater<? extends ActivityNode> updater = null; if(node instanceof CallBehaviorAction){ updater = new CallBehaviorActionPinUpdater(); }else if(node instanceof CallOperationAction){ updater = new CallOperationActionPinUpdater(); }else if(node instanceof SendSignalAction){ updater = new SendSignalActionPinUpdater(); } return updater; }</code><technical_language>avoid accidental class casts, signature: public <T extends ActivityNode> IPinUpdater<T> instantiate(T node) unchecked casts regrouped this method (Rather in Clients)</technical_language>

Target:
public <T extends ActivityNode> IPinUpdater<T> instantiate(ActivityNode node) { IPinUpdater<T> updater = null; if (node instanceof CallBehaviorAction) { updater = (IPinUpdater<T>) new CallBehaviorActionPinUpdater(); } else if (node instanceof CallOperationAction) { updater = (IPinUpdater<T>) new CallOperationActionPinUpdater(); } else if (node instanceof SendSignalAction) { updater = (IPinUpdater<T>) new SendSignalActionPinUpdater(); } return updater; }
Source:
<code>void updateRefreshInterval() { interval = getRefreshIndexInterval(); setReschedule(interval > 0); if (doReschedule) { cancel(); schedule(interval); <START> } <END> }</code><technical_language>If shouldSchedule() shouldRun() overridden, if is necessary here</technical_language>

Target:
private void updateRefreshInterval() { interval = getRefreshIndexInterval(); setReschedule(interval > 0); cancel(); schedule(interval); }
Source:
<code>private void layoutPreview() { <START> if (contents.getExtract().length() > 0) { <END> extractText.setText(contents.getExtract()); } int placeholderResId = Utils.getThemedAttributeId(getContext(), R.attr.lead_image_drawable); if (!TextUtils.isEmpty(contents.getTitle().getThumbUrl()) && WikipediaApp.getInstance().isImageDownloadEnabled()) { String imageUrl = WikipediaApp.getInstance().getNetworkProtocol() + ":" + contents.getTitle().getThumbUrl(); Picasso.with(getActivity()) .load(imageUrl) .placeholder(placeholderResId) .error(placeholderResId) .into(leadImage); } else { Picasso.with(getActivity()) .load(placeholderResId) .into(leadImage); } }</code><technical_language>!contents.getExtract().isEmpty()</technical_language>

Target:
private void layoutPreview() { if (!TextUtils.isEmpty(contents.getExtract())) { extractText.setText(contents.getExtract()); } int placeholderResId = ResourceUtil.getThemedAttributeId(getContext(), R.attr.lead_image_drawable); if (shouldDownloadLeadImage()) { Picasso.with(getActivity()) .load(contents.getTitle().getThumbUrl()) .placeholder(placeholderResId) .error(placeholderResId) .into(leadImage); } else { Picasso.with(getActivity()) .load(placeholderResId) .into(leadImage); } }
Source:
<code><START> private String updateSchemeIdsForActions() { <END> if (DbConnectionFactory.isMySql()) { return MYSQL_UPDATE_SCHEME_IDS_FOR_ACTIONS; } else if (DbConnectionFactory.isPostgres()) { return POSTGRES_UPDATE_SCHEME_IDS_FOR_ACTIONS; } else if (DbConnectionFactory.isMsSql()) { return MSSQL_UPDATE_SCHEME_IDS_FOR_ACTIONS; } else if (DbConnectionFactory.isOracle()) { return ORACLE_UPDATE_SCHEME_IDS_FOR_ACTIONS; } else { return null; } }</code><technical_language>![MAJOR](<LINK_0> 'Severity: MAJOR') Reduce number of returns of this method 5, maximum allowed 3. [![rule](<LINK_1>](<LINK_2></technical_language>

Target:
private String updateSchemeIdsForActions() { String sql = null; if (DbConnectionFactory.isMySql()) { sql = MYSQL_UPDATE_SCHEME_IDS_FOR_ACTIONS; } else if (DbConnectionFactory.isPostgres()) { sql = POSTGRES_UPDATE_SCHEME_IDS_FOR_ACTIONS; } else if (DbConnectionFactory.isMsSql()) { sql = MSSQL_UPDATE_SCHEME_IDS_FOR_ACTIONS; } else if (DbConnectionFactory.isOracle()) { sql = ORACLE_UPDATE_SCHEME_IDS_FOR_ACTIONS; } return sql; }
Source:
<code>public Pixmap getPixmap(Format format, Color color) { int width = getWidth(); ByteBuffer src = getBuffer(); Pixmap pixmap; if (color == Color.WHITE) { pixmap = new Pixmap(width, getRows(), Format.Alpha); BufferUtils.copy(src, pixmap.getPixels(), pixmap.getPixels().capacity()); } else { pixmap = new Pixmap(width, getRows(), Format.RGBA8888); int srcPitch = getPitch(); int srcRGBA = Color.rgba8888(color); IntBuffer dst = pixmap.getPixels().asIntBuffer(); for (int y = 0; y < getRows(); y++) { int ySrcPitch = y * srcPitch; int yWidth = y * width; for (int x = 0; x < width; x++) { byte alpha = src.get(ySrcPitch + x); dst.put(yWidth + x, (srcRGBA & 0xffffff00) | (int)((srcRGBA & 0xff) * (alpha & 0xff)/255f)); } } } Pixmap converted = pixmap; <START> if (format != Format.RGBA8888) { <END> converted = new Pixmap(pixmap.getWidth(), pixmap.getHeight(), format); Blending blending = Pixmap.getBlending(); Pixmap.setBlending(Blending.None); converted.drawPixmap(pixmap, 0, 0); Pixmap.setBlending(blending); pixmap.dispose(); } return converted; }</code><technical_language>this leave Alpha format Pixmap in case of Color.WHITE a passed in format of RGBA8888? matter</technical_language>

Target:
public Pixmap getPixmap(Format format, Color color) { int width = getWidth(); ByteBuffer src = getBuffer(); Pixmap pixmap; if (color == Color.WHITE) { pixmap = new Pixmap(width, getRows(), Format.Alpha); BufferUtils.copy(src, pixmap.getPixels(), pixmap.getPixels().capacity()); } else { pixmap = new Pixmap(width, getRows(), Format.RGBA8888); int srcPitch = getPitch(); int srcRGBA = Color.rgba8888(color); IntBuffer dst = pixmap.getPixels().asIntBuffer(); for (int y = 0; y < getRows(); y++) { int ySrcPitch = y * srcPitch; int yWidth = y * width; for (int x = 0; x < width; x++) { byte alpha = src.get(ySrcPitch + x); dst.put(yWidth + x, (srcRGBA & 0xffffff00) | (int)((srcRGBA & 0xff) * (alpha & 0xff)/255f)); } } } Pixmap converted = pixmap; if (format != pixmap.getFormat()) { converted = new Pixmap(pixmap.getWidth(), pixmap.getHeight(), format); Blending blending = Pixmap.getBlending(); Pixmap.setBlending(Blending.None); converted.drawPixmap(pixmap, 0, 0); Pixmap.setBlending(blending); pixmap.dispose(); } return converted; }
Source:
<code>public Object apply(RevisionResource rsrc, Input input) throws IOException, <START> NoSuchChangeException, OrmException, PatchSetInfoNotAvailableException { <END> final PatchSet updatedPatchSet = dbProvider.get().patchSets() .atomicUpdate(rsrc.getPatchSet().getId(), new AtomicUpdate<PatchSet>() { @Override public PatchSet update(PatchSet patchset) { patchset.setDraft(false); return patchset; } }); final Change updatedChange = dbProvider.get().changes() .atomicUpdate(rsrc.getChange().getId(), new AtomicUpdate<Change>() { @Override public Change update(Change change) { if (change.getStatus() == Change.Status.DRAFT) { change.setStatus(Change.Status.NEW); ChangeUtil.updated(change); } return change; } }); if (!updatedPatchSet.isDraft() || updatedChange.getStatus() == Change.Status.NEW) { indexer.index(updatedChange); hooks.doDraftPublishedHook(updatedChange, updatedPatchSet, dbProvider.get()); sender.send(rsrc.getChange().getStatus() == Change.Status.DRAFT, rsrc.getUser(), updatedChange, updatedPatchSet, rsrc.getControl().getLabelTypes()); } return Response.none(); }</code><technical_language>NoSuchChangeException PatchSetInfoNotAvailableException converted ResourceNotFoundException caller 404 instead of 500 Internal Server Error</technical_language>

Target:
public Object apply(RevisionResource rsrc, Input input) throws IOException, ResourceNotFoundException, ResourceConflictException, OrmException, AuthException { if (!rsrc.getPatchSet().isDraft()) { throw new ResourceConflictException("Patch set is not a draft"); } if (!rsrc.getControl().canPublish(dbProvider.get())) { throw new AuthException("Cannot publish this draft patch set"); } PatchSet updatedPatchSet = updateDraftPatchSet(rsrc); Change updatedChange = updateDraftChange(rsrc); try { if (!updatedPatchSet.isDraft() || updatedChange.getStatus() == Change.Status.NEW) { indexer.index(updatedChange); hooks.doDraftPublishedHook(updatedChange, updatedPatchSet, dbProvider.get()); sender.send(rsrc.getChange().getStatus() == Change.Status.DRAFT, rsrc.getUser(), updatedChange, updatedPatchSet, rsrc.getControl().getLabelTypes()); } } catch (PatchSetInfoNotAvailableException e) { throw new ResourceNotFoundException(e.getMessage()); } return Response.none(); }
Source:
<code>public void basicRefactoringTest() throws IOException { BugCheckerRefactoringTestHelper testHelper = BugCheckerRefactoringTestHelper .newInstance(new PublicConstructorForAbstractClass(), getClass()); testHelper.addInputLines( "in/Test.java", "public abstract class Test {", <START> " public Test() { }", <END> "}" ).addOutputLines( "out/Test.java", "public abstract class Test {", " protected Test() { }", "}" ).doTest(); }</code><technical_language>two-space indentation in test code</technical_language>

Target:
public void basicRefactoringTest() throws IOException { BugCheckerRefactoringTestHelper testHelper = BugCheckerRefactoringTestHelper .newInstance(new PublicConstructorForAbstractClass(), getClass()); testHelper.addInputLines( "in/Test.java", "public abstract class Test {", " public Test() {", " }", "}" ).addOutputLines( "out/Test.java", "public abstract class Test {", " protected Test() {", " }", "}" ).doTest(); }
Source:
<code>private static @NonNull Set<Long> getActiveThreads(TmfTimeRange winRange, @NonNull ITmfTrace trace) { ThreadStatusDataProvider threadStatusProvider = DataProviderManager.getInstance().getDataProvider(trace, ThreadStatusDataProvider.ID, ThreadStatusDataProvider.class); if (threadStatusProvider == null) { return Collections.emptySet(); } long beginTS = winRange.getStartTime().getValue(); long endTS = winRange.getEndTime().getValue(); TimeQueryFilter filter = new TimeQueryFilter(beginTS, endTS, 2); TmfModelResponse<TmfTreeModel<@NonNull ThreadEntryModel>> response = threadStatusProvider.fetchTree(FetchParametersUtils.timeQueryToMap(filter), null); TmfTreeModel<@NonNull ThreadEntryModel> model = response.getModel(); if (model == null) { return Collections.emptySet(); } return <START> Sets.newHashSet(Iterables.transform(model.getEntries(), ThreadEntryModel::getId)); <END> }</code><technical_language>put hashSet in local variable check for null. Return empty set() if null else set</technical_language>

Target:
private static @NonNull Set<Long> getActiveThreads(TmfTimeRange winRange, @NonNull ITmfTrace trace) { ThreadStatusDataProvider threadStatusProvider = DataProviderManager.getInstance().getDataProvider(trace, ThreadStatusDataProvider.ID, ThreadStatusDataProvider.class); if (threadStatusProvider == null) { return Collections.emptySet(); } long beginTS = winRange.getStartTime().getValue(); long endTS = winRange.getEndTime().getValue(); TimeQueryFilter filter = new TimeQueryFilter(beginTS, endTS, 2); TmfModelResponse<TmfTreeModel<@NonNull ThreadEntryModel>> response = threadStatusProvider.fetchTree(FetchParametersUtils.timeQueryToMap(filter), null); TmfTreeModel<@NonNull ThreadEntryModel> model = response.getModel(); if (model == null) { return Collections.emptySet(); } HashSet<Long> activeThreads = Sets.newHashSet(Iterables.transform(model.getEntries(), ThreadEntryModel::getId)); return activeThreads == null ? Collections.emptySet() : activeThreads; }
Source:
<code><START> public void testUnrecognizedInstallSourceIsParsedCorrectly() { <END> final String unrecognizedInstallerPackageName = "com.unrecognized"; final InstallSource installSource = InstallSource.fromInstallerPackageName(unrecognizedInstallerPackageName); assertTrue(installSource instanceof UnrecognizedInstallSource); assertEquals(unrecognizedInstallerPackageName, installSource.toString()); }</code><technical_language><b>Reporter: </b>PMD<br /><b>Violation: </b><a target="_blank" href="<LINK_0>">JUnitTestContainsTooManyAsserts</a><br /><b>Notes: </b>JUnit tests more 1 assert(s)</technical_language>

Target:
public void testUnrecognizedInstallSourceIsParsedCorrectly() { final String unrecognizedInstallerPackageName = "com.unrecognized"; final InstallSource installSource = InstallSource.fromInstallerPackageName(unrecognizedInstallerPackageName); assertTrue( "Non-null package name is correctly identified as an unrecognized install source", installSource instanceof UnrecognizedInstallSource); assertEquals( "Unrecognized install source returns raw package name as description", unrecognizedInstallerPackageName, installSource.toString()); }
Source:
<code>public Template saveTemplate(final IHTMLPage page, final User user, final PageForm pageForm) throws BadRequestException, DotDataException, DotSecurityException, IOException { try { final Host host = getHost(pageForm.getHostId(), user); final User systemUser = userAPI.getSystemUser(); final Template template = getTemplate(page, systemUser, pageForm); final boolean hasPermission = template.isAnonymous() ? permissionAPI.doesUserHavePermission(page, PermissionLevel.EDIT.getType(), user) : permissionAPI.doesUserHavePermission(template, PermissionLevel.EDIT.getType(), user); if (!hasPermission) { <START> throw new DotSecurityException("The user don't have permission to EDIT"); <END> } template.setDrawed(true); return this.templateAPI.saveTemplate(template, host, user, false); } catch (Exception e) { throw new DotRuntimeException(e); } }</code><technical_language>~don't~ doesn't*</technical_language>

Target:
public Template saveTemplate(final IHTMLPage page, final User user, final PageForm pageForm) throws BadRequestException, DotDataException, DotSecurityException, IOException { try { final Host host = getHost(pageForm.getHostId(), user); final User systemUser = userAPI.getSystemUser(); final Template template = getTemplate(page, systemUser, pageForm); final boolean hasPermission = template.isAnonymous() ? permissionAPI.doesUserHavePermission(page, PermissionLevel.EDIT.getType(), user) : permissionAPI.doesUserHavePermission(template, PermissionLevel.EDIT.getType(), user); if (!hasPermission) { throw new DotSecurityException("The user doesn't have permission to EDIT"); } template.setDrawed(true); return this.templateAPI.saveTemplate(template, host, user, false); } catch (Exception e) { throw new DotRuntimeException(e); } }
Source:
<code>public void close() { this.executor.shutdown(); <START> for (Future<?> future1 : this.expirationFutures.values()) { <END> future1.cancel(false); } for (Future<?> future : this.expirationFutures.values()) { if (! future.isDone()) { try { future.get(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } catch (ExecutionException e) { } } } this.expirationFutures.clear(); }</code><technical_language>Rename "future"</technical_language>

Target:
public void close() { this.executor.shutdown(); for (Future<?> future : this.expirationFutures.values()) { future.cancel(false); } for (Future<?> future : this.expirationFutures.values()) { if (! future.isDone()) { try { future.get(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } catch (ExecutionException e) { } } } this.expirationFutures.clear(); }
Source:
<code>public void test() { connect(); isCheckedButton = jq(".z-button:contains(isChecked)"); JQuery moldLocation = jq(".z-checkbox-mold"); String switchClass = ".z-checkbox-switch"; String toggleClass = ".z-checkbox-toggle"; String offClass = ".z-checkbox-off"; String onClass = ".z-checkbox-on"; verifyClassChange(jq(".z-button:contains(Switch)"), jq(switchClass + offClass)); Assert.assertFalse(jq(".z-checkbox > input").isVisible()); verifyChecked("false"); verifyClassChange(moldLocation, jq(switchClass + onClass)); verifyChecked("true"); verifyClassChange(jq(".z-button:contains(Toggle)"), jq(toggleClass + onClass)); verifyClassChange(moldLocation, jq(toggleClass + offClass)); verifyChecked("false"); click(jq(".z-button:contains(setDisabled)")); waitResponse(); <START> Assert.assertEquals("0.5", moldLocation.css("opacity")); <END> verifyClassChange(moldLocation, jq(toggleClass + offClass)); verifyChecked("false"); }</code><technical_language>good for customizing. Preferred: setDisabled toggleClass('z-checkbox-disabled'). check if class is applied</technical_language>

Target:
public void test() { connect(); isCheckedButton = findButtonContains("isChecked"); JQuery moldLocation = jq(".z-checkbox-mold"); String switchMold = ".z-checkbox-switch"; String toggleMold = ".z-checkbox-toggle"; String off = "-off"; String on = "-on"; verifyClassChange(findButtonContains("Switch"), jq(switchMold + off)); Assert.assertFalse(jq(".z-checkbox > input").isVisible()); verifyChecked("false"); verifyClassChange(moldLocation, jq(switchMold + on)); verifyChecked("true"); verifyClassChange(findButtonContains("Toggle"), jq(toggleMold + on)); verifyClassChange(moldLocation, jq(toggleMold + off)); verifyChecked("false"); verifyClassChange(findButtonContains("setDisabled"), jq(toggleMold + "-disabled")); verifyClassChange(moldLocation, jq(toggleMold + off)); verifyChecked("false"); }
Source:
<code>public static VCFHeader readHeaderFrom(final SeekableStream in) throws IOException { FeatureCodecHeader headerCodec; final long initialPos = in.position(); try { BufferedInputStream bis = new BufferedInputStream(in); InputStream is = SamStreams.isGzippedSAMFile(bis) ? new GZIPInputStream(bis) : bis; headerCodec = new VCFCodec().readHeader(new AsciiLineReaderIterator(AsciiLineReader.from(is))); } catch (TribbleException e) { in.seek(initialPos); InputStream bin = new BufferedInputStream(in); if (BlockCompressedInputStream.isValidFile(bin)) { bin = new BlockCompressedInputStream(bin); } try { headerCodec = new BCF2Codec().readHeader(new PositionalBufferedStream(bin)); } catch (TribbleException e2) { <START> throw new IOException("No VCF header found", e2); <END> } } return (VCFHeader) headerCodec.getHeaderValue(); }</code><technical_language>suggestion - codecs throw TribbleException for header parsing issue, in some cases, exception (on line 42) represents real issue, user sees. deterministically figure out stream type delegate based that, this code report misleading errors, i.e. "No VCF header - BCF magic header info found" real issue is a malformed header in a VCF stream. time a PR stream sniffing code in it, I find it. is code in BCF codec in readHeader determine if a stream is a BCF stream, exposed</technical_language>

Target:
public static VCFHeader readHeaderFrom(final SeekableStream in) throws IOException { final long initialPos = in.position(); byte[] magicBytes = InputStreamUtils.readFully(bufferAndDecompressIfNecessary(in), BCFVersion.MAGIC_HEADER_START.length); in.seek(initialPos); if (magicBytes[0] == '#') { return readHeaderFrom(in, new VCFCodec()); } else if (Arrays.equals(magicBytes, BCFVersion.MAGIC_HEADER_START)) { return readHeaderFrom(in, new BCF2Codec()); } throw new IOException("No VCF header found"); }
Source:
<code>private void createTrainingData(final int numTotalInstances) { <START> kvMapBackingMemoryStore.clear(); <END> final Random generator = new Random(); for (int i = 0; i < numTotalInstances; i++) { final int value = generator.nextInt(); memoryStore.put((long)i, value); } kvMapBackingMemoryStore.putAll(memoryStore.getAll()); }</code><technical_language>confusing. Please replace upper line of kvMapBackingMemoryStore.putAll()</technical_language>

Target:
private void createTrainingData(final int numTotalInstances) { final Random generator = new Random(); for (int i = 0; i < numTotalInstances; i++) { final int value = generator.nextInt(); memoryStore.put((long)i, value); } }
Source:
<code>public void testValidUqSort(final File input, final File reference) throws IOException { final File sortOutput = File.createTempFile("Sort", ".bam"); sortOutput.deleteOnExit(); final File fixOutput = File.createTempFile("Fix", ".bam"); fixOutput.deleteOnExit(); final File validateOutput = File.createTempFile("Sort", ".validation_report"); validateOutput.deleteOnExit(); sort(input, sortOutput); setUqOnly(sortOutput, fixOutput, reference); <START> validate(fixOutput,validateOutput, reference, true); <END> }</code><technical_language>validate UQ tags</technical_language>

Target:
public void testValidUqSort(final File input, final File reference) throws IOException { final File sortOutput = File.createTempFile("Sort", ".bam"); sortOutput.deleteOnExit(); final File fixOutput = File.createTempFile("Fix", ".bam"); fixOutput.deleteOnExit(); final File validateOutput = File.createTempFile("Sort", ".validation_report"); validateOutput.deleteOnExit(); sort(input, sortOutput); setUqOnly(sortOutput, fixOutput, reference); validateUq(fixOutput, reference); }
Source:
<code>public void onClick(View v) { <START> getPlaylistService().removeSong(entry); <END> }</code><technical_language>tested this a song is currently played</technical_language>

Target:
public void onClick(View v) { if(getPlaylistService().getCurrentSong()!= null && getPlaylistService().getCurrentSong().equals(entry)){ getPlaylistService().skip(); } getPlaylistService().removeSong(entry); }
Source:
<code>private static void chmod(File file, int mode) throws IOException, InterruptedException { String octal = Integer.toOctalString(mode); if (Platform.getOS().equals(Platform.OS_WIN32)) { boolean ownerExecute = ((mode / (8 * 8)) & 1) == 1; boolean ownerRead = ((mode / (8 * 8)) & 4) == 4; boolean ownerWrite = ((mode / (8 * 8)) & 2) == 2; boolean everyoneExecute = ((mode / 8) & 1) == 1; boolean everyoneRead = ((mode / 8) & 4) == 4; <START> boolean everyoneWrite = ((mode / 8) & 2) == 2; <END> file.setWritable(true, false); file.setExecutable(ownerExecute, !everyoneExecute); file.setReadable(ownerRead, !everyoneRead); file.setWritable(ownerWrite, !everyoneWrite); } else { Process process = Runtime.getRuntime().exec(new String[] { "chmod", octal, file.getAbsolutePath() }, null, null); process.waitFor(); } }</code><technical_language>Personally I prefer original. I parenthesis is needed for separates "the calculation" "the assignment". I hard trace bug in due missing "unnecessary brackets". else opinion this</technical_language>

Target:
private static void chmod(File file, int mode) throws IOException, InterruptedException { String octal = Integer.toOctalString(mode); if (Platform.getOS().equals(Platform.OS_WIN32)) { boolean ownerExecute = (((mode / (8 * 8)) & 1) == 1); boolean ownerRead = (((mode / (8 * 8)) & 4) == 4); boolean ownerWrite = (((mode / (8 * 8)) & 2) == 2); boolean everyoneExecute = (((mode / 8) & 1) == 1); boolean everyoneRead = (((mode / 8) & 4) == 4); boolean everyoneWrite = (((mode / 8) & 2) == 2); file.setWritable(true, false); file.setExecutable(ownerExecute, !everyoneExecute); file.setReadable(ownerRead, !everyoneRead); file.setWritable(ownerWrite, !everyoneWrite); } else { Process process = Runtime.getRuntime().exec(new String[] { "chmod", octal, file.getAbsolutePath() }, null, null); process.waitFor(); } }
Source:
<code>public void testTimestampLogicalTypeWithUTCParameter() { PrimitiveType utcMillisExpected = new PrimitiveType(REQUIRED, INT64, "aTimestamp", <START> LogicalTypeAnnotation.timestampType(true, LogicalTypeAnnotation.TimeUnit.MILLIS)); <END> PrimitiveType nonUtcMillisExpected = new PrimitiveType(REQUIRED, INT64, "aTimestamp", LogicalTypeAnnotation.timestampType(false, LogicalTypeAnnotation.TimeUnit.MILLIS)); PrimitiveType utcMicrosExpected = new PrimitiveType(REQUIRED, INT64, "aTimestamp", LogicalTypeAnnotation.timestampType(true, LogicalTypeAnnotation.TimeUnit.MICROS)); PrimitiveType nonUtcMicrosExpected = new PrimitiveType(REQUIRED, INT64, "aTimestamp", LogicalTypeAnnotation.timestampType(false, LogicalTypeAnnotation.TimeUnit.MICROS)); PrimitiveType utcMillisActual = Types.required(INT64) .as(LogicalTypeAnnotation.timestampType(true, LogicalTypeAnnotation.TimeUnit.MILLIS)).named("aTimestamp"); PrimitiveType nonUtcMillisActual = Types.required(INT64) .as(LogicalTypeAnnotation.timestampType(false, LogicalTypeAnnotation.TimeUnit.MILLIS)).named("aTimestamp"); PrimitiveType utcMicrosActual = Types.required(INT64) .as(LogicalTypeAnnotation.timestampType(true, LogicalTypeAnnotation.TimeUnit.MICROS)).named("aTimestamp"); PrimitiveType nonUtcMicrosActual = Types.required(INT64) .as(LogicalTypeAnnotation.timestampType(false, LogicalTypeAnnotation.TimeUnit.MICROS)).named("aTimestamp"); Assert.assertEquals(utcMillisExpected, utcMillisActual); Assert.assertEquals(nonUtcMillisExpected, nonUtcMillisActual); Assert.assertEquals(utcMicrosExpected, utcMicrosActual); Assert.assertEquals(nonUtcMicrosExpected, nonUtcMicrosActual); }</code><technical_language>I think, more readable static imports. e.g. timestampType(true, MILLIS)</technical_language>

Target:
public void testTimestampLogicalTypeWithUTCParameter() { PrimitiveType utcMillisExpected = new PrimitiveType(REQUIRED, INT64, "aTimestamp", timestampType(true, MILLIS)); PrimitiveType nonUtcMillisExpected = new PrimitiveType(REQUIRED, INT64, "aTimestamp", timestampType(false, MILLIS)); PrimitiveType utcMicrosExpected = new PrimitiveType(REQUIRED, INT64, "aTimestamp", timestampType(true, MICROS)); PrimitiveType nonUtcMicrosExpected = new PrimitiveType(REQUIRED, INT64, "aTimestamp", timestampType(false, MICROS)); PrimitiveType utcMillisActual = Types.required(INT64) .as(timestampType(true, MILLIS)).named("aTimestamp"); PrimitiveType nonUtcMillisActual = Types.required(INT64) .as(timestampType(false, MILLIS)).named("aTimestamp"); PrimitiveType utcMicrosActual = Types.required(INT64) .as(timestampType(true, MICROS)).named("aTimestamp"); PrimitiveType nonUtcMicrosActual = Types.required(INT64) .as(timestampType(false, MICROS)).named("aTimestamp"); Assert.assertEquals(utcMillisExpected, utcMillisActual); Assert.assertEquals(nonUtcMillisExpected, nonUtcMillisActual); Assert.assertEquals(utcMicrosExpected, utcMicrosActual); Assert.assertEquals(nonUtcMicrosExpected, nonUtcMicrosActual); }
Source:
<code>public static void assertDoesNotContain(final String notExpected, final Set<Issue> result, final int rowNumber) { assertFalse("Found " + notExpected, result.stream() .filter(issue -> titleEquals(issue, notExpected) && rowNumberContains(issue, <START> new HashSet<Integer>() {{ <END> add(rowNumber); }})) .count() > 0); }</code><technical_language>Collections.singletonSet(rowNumber)</technical_language>

Target:
public static void assertDoesNotContain(final String notExpected, final Set<Issue> result, final int rowNumber) { assertFalse("Found " + notExpected, result.stream() .filter(issue -> titleEquals(issue, notExpected)) .filter(issue -> rowNumberContains(issue, Arrays.asList(rowNumber))) .count() > 0); }
Source:
<code>public void setUp() throws Exception { <START> validate(); <END> }</code><technical_language>This is confusing read - setup() call named validate(), instead of setting cluster? validate() figure out is going. named setupClusterAndValidate(), more readable</technical_language>

Target:
public void setUp() throws Exception { ControllerTestUtils.setupClusterAndValidate(); }
Source:
<code>public NotifyingFuture<V> attachListener(final FutureListener<V> listener) { future.whenComplete((value, throwable) -> { <START> if (throwable == null) { <END> listener.futureDone(this); } else { listener.futureDone(this); } }); return this; }</code><technical_language>this if else block replaced listener.futureDone(this);</technical_language>

Target:
public NotifyingFuture<V> attachListener(final FutureListener<V> listener) { future.whenComplete((value, throwable) -> { listener.futureDone(this); }); return this; }
Source:
<code><START> public CosmosContinuablePagedFlux(Function<CosmosPagedFluxOptions, Flux<FeedResponse<T>>> optionsFluxFunction) { <END> this.optionsFluxFunction = optionsFluxFunction; }</code><technical_language>access package level public</technical_language>

Target:
CosmosContinuablePagedFlux(Function<CosmosPagedFluxOptions, Flux<FeedResponse<T>>> optionsFluxFunction) { this.optionsFluxFunction = optionsFluxFunction; }
Source:
<code>private void buttonsEnablement() { <START> if ((fChangeInfo.getCodeReviewedTally() == 2 && fChangeInfo.getVerifiedTally() == 1)) { fSubmit.setEnabled(true); } else { fSubmit.setEnabled(false); } } <END></code><technical_language>Submit button is accessible I of reason tested if user is authorize anonymous. Tested a review eclipse.org a Code-Review+2 Verify+1, a user allowed submit review. anonymous a contributor review, a committer this project</technical_language>

Target:
private void buttonsEnablement() { if (findMaxDefined() != findMaxPermitted()) { fSubmit.setEnabled(false); } if (fChangeInfo.getLabels().get("Verified") != null && fChangeInfo.getLabels().get("Verified").isBlocking()) { fSubmit.setEnabled(false); } else if (fChangeInfo.getLabels().get("Verified") != null && fChangeInfo.getLabels().get("Verified").getValue() == null && fChangeInfo.getVerifiedTally() <= 0) { fSubmit.setEnabled(false); } else if (fChangeInfo.getLabels().get("Verified") != null && fChangeInfo.getLabels().get("Verified").getValue() != null && new Integer(fChangeInfo.getLabels().get("Verified").getValue()).intValue() <= 0) { fSubmit.setEnabled(false); } else if (fChangeInfo.getLabels().get("Code-Review") != null && fChangeInfo.getLabels().get("Code-Review").isBlocking()) { fSubmit.setEnabled(false); } else if (fChangeInfo.getLabels().get("Code-Review") != null && fChangeInfo.getLabels().get("Code-Review").getValue() == null && fChangeInfo.getCodeReviewedTally() <= 0) { fSubmit.setEnabled(false); } else if (fChangeInfo.getLabels().get("Code-Review") != null && fChangeInfo.getLabels().get("Code-Review").getValue() != null && new Integer(fChangeInfo.getLabels().get("Code-Review").getValue()).intValue() <= 0) { fSubmit.setEnabled(false); } }
Source:
<code>public void finish(TraceContext context, long finishTimestamp) { <START> if (noop.get()) return; <END> MutableSpan span = spanMap.remove(context); if (span == null || noop.get()) return; synchronized (span) { span.finish(finishTimestamp); reporter.report(V2SpanConverter.toSpan(span.toSpan())); } }</code><technical_language>for down, want early return remove data map (we want data removed in noop in case a span started tracing component set noop status)</technical_language>

Target:
public void finish(TraceContext context, long finishTimestamp) { MutableSpan span = spanMap.remove(context); if (span == null || noop.get()) return; synchronized (span) { span.finish(finishTimestamp); reporter.report(V2SpanConverter.toSpan(span.toSpan())); } }
Source:
<code>public void testHostShouldBeFenced() { validator = setValidatorForActivation(VDSStatus.Down); <START> assertTrue(validator.shouldVdsBeFenced()); <END> }</code><technical_language>please for positive tests convention: assertThat(validator.shouldVdsBeFenced(), isValid());</technical_language>

Target:
public void testHostShouldBeFenced() { validator = mockHostForActivation(VDSStatus.Down); assertTrue(validator.shouldVdsBeFenced()); }
Source:
<code>protected void loadDataCenters() { AsyncDataProvider.getInstance().getDataCenterById(new AsyncQuery(getModel(), new INewAsyncCallback() { @Override public void onSuccess(Object target, Object returnValue) { UnitVmModel model = (UnitVmModel) target; if (returnValue != null) { StoragePool dataCenter = (StoragePool) returnValue; List<StoragePool> dataCenters = new ArrayList<StoragePool>(Arrays.asList(new StoragePool[] { dataCenter })); initClusters(dataCenters); } else { NewVmFromTemplateModelBehavior behavior = (NewVmFromTemplateModelBehavior) model.getBehavior(); VmTemplate currentTemplate = behavior.selectedTemplate; VDSGroup cluster = new VDSGroup(); cluster.setId(currentTemplate.getVdsGroupId()); cluster.setName(currentTemplate.getVdsGroupName()); cluster.setStoragePoolId(currentTemplate.getStoragePoolId()); DataCenterWithCluster dataCenterWithCluster = new DataCenterWithCluster(null, cluster); model.getDataCenterWithClustersList().setItems(Arrays.asList(dataCenterWithCluster)); <START> model.getDataCenterWithClustersList().setSelectedItem(dataCenterWithCluster); <END> } } }), selectedTemplate.getStoragePoolId()); }</code><technical_language>this else block sense in existingVm/pool branches a - in new really. I do like: getModel().disableEditing(ConstantsManager.getInstance().getConstants().notAvailableWithNoUpDC()); similar</technical_language>

Target:
protected void loadDataCenters() { AsyncDataProvider.getInstance().getDataCenterById(new AsyncQuery(getModel(), new INewAsyncCallback() { @Override public void onSuccess(Object target, Object returnValue) { UnitVmModel model = (UnitVmModel) target; if (returnValue != null) { StoragePool dataCenter = (StoragePool) returnValue; List<StoragePool> dataCenters = new ArrayList<StoragePool>(Arrays.asList(new StoragePool[] { dataCenter })); initClusters(dataCenters); } else { getModel().disableEditing(ConstantsManager.getInstance().getConstants().notAvailableWithNoUpDC()); } } }), selectedTemplate.getStoragePoolId()); }
Source:
<code>public ActionResult execute() { String instructorId = getNonNullRequestParamValue(Const.ParamsNames.INSTRUCTOR_ID); String courseId = getNonNullRequestParamValue(Const.ParamsNames.COURSE_ID); InstructorAttributes instructor = logic.getInstructorForGoogleId(courseId, instructorId); if (instructor == null) { CourseAttributes courseAttributes = logic.getCourse(courseId); if (courseAttributes == null) { return new JsonResult("No course with id: " + courseId, HttpStatus.SC_NOT_FOUND); } return new JsonResult("No instructor with id: " + instructorId, HttpStatus.SC_NOT_FOUND); } if (userInfo.isInstructor && !hasAlternativeInstructor(courseId, instructor.email)) { return new JsonResult("The instructor you are trying to delete is the last instructor in the course. " + "Deleting the last instructor from the course is not allowed.", HttpStatus.SC_BAD_REQUEST); } logic.deleteInstructor(courseId, instructor.email); <START> return new JsonResult("OK", HttpStatus.SC_OK); <END> }</code><technical_language>message "OK"? Isnt more informative a message "Instructor is successfully deleted."</technical_language>

Target:
public ActionResult execute() { String instructorId = getNonNullRequestParamValue(Const.ParamsNames.INSTRUCTOR_ID); String courseId = getNonNullRequestParamValue(Const.ParamsNames.COURSE_ID); InstructorAttributes instructor = logic.getInstructorForGoogleId(courseId, instructorId); if (instructor == null) { return new JsonResult("Instructor is successfully deleted.", HttpStatus.SC_OK); } if (userInfo.isInstructor && !hasAlternativeInstructor(courseId, instructor.email)) { return new JsonResult("The instructor you are trying to delete is the last instructor in the course. " + "Deleting the last instructor from the course is not allowed.", HttpStatus.SC_BAD_REQUEST); } logic.deleteInstructor(courseId, instructor.email); return new JsonResult("Instructor is successfully deleted.", HttpStatus.SC_OK); }
Source:
<code>static public RelNode transform(CalcitePlannerType plannerType, PlannerPhase phase, RelNode input, RelTraitSet targetTraits) { final RelTraitSet toTraits = targetTraits.simplify(); final RelNode output; switch (plannerType) { case HEP: { final HepProgramBuilder hepProgramBuilder = new HepProgramBuilder(); hepProgramBuilder.addGroupBegin(); phase.getRules().forEach(hepProgramBuilder::addRuleInstance); hepProgramBuilder.addGroupEnd(); final HepPlanner planner = new HepPlanner(hepProgramBuilder.build()); JaninoRelMetadataProvider relMetadataProvider = JaninoRelMetadataProvider.of( VoltDBDefaultRelMetadataProvider.INSTANCE); RelMetadataQuery.THREAD_PROVIDERS.set(relMetadataProvider); <START> input.accept(new MetaDataProviderModifier(relMetadataProvider)); <END> planner.setRoot(input); if (!input.getTraitSet().equals(targetTraits)) { planner.changeTraits(input, toTraits); } output = planner.findBestExp(); break; } case VOLCANO: default: { output = null; break; } } return output; }</code><technical_language>No, in RelShuttleImpl.java, code is: suggestion RelNode child2 = child.accept(this); if (child2 != child) { ... } Apparently argument is changed of accept method; creates a copy of argument, change that, compare return argument. need change L162 to: suggestion final RelNode input2 = input.accept(new MetaDataProviderModifier(relMetadataProvider)); update L163-165 input2</technical_language>

Target:
static public RelNode transform(CalcitePlannerType plannerType, PlannerPhase phase, RelNode input, RelTraitSet targetTraits) { final RelTraitSet toTraits = targetTraits.simplify(); final RelNode output; switch (plannerType) { case HEP: { final HepProgramBuilder hepProgramBuilder = new HepProgramBuilder(); hepProgramBuilder.addGroupBegin(); phase.getRules().forEach(hepProgramBuilder::addRuleInstance); hepProgramBuilder.addGroupEnd(); final HepPlanner planner = new HepPlanner(hepProgramBuilder.build()); JaninoRelMetadataProvider relMetadataProvider = JaninoRelMetadataProvider.of( VoltDBDefaultRelMetadataProvider.INSTANCE); RelMetadataQuery.THREAD_PROVIDERS.set(relMetadataProvider); input = input.accept(new MetaDataProviderModifier(relMetadataProvider)); planner.setRoot(input); if (!input.getTraitSet().equals(targetTraits)) { planner.changeTraits(input, toTraits); } output = planner.findBestExp(); break; } case VOLCANO: { output = null; break; } default: { throw new RuntimeException("Dead branch."); } } return output; }
Source:
<code>public static PlanNode restrictOutputs(PlanNodeIdAllocator idAllocator, PlanNode node, Set<Symbol> permittedOutputs) { List<Symbol> restrictedOutputs = node.getOutputSymbols().stream() .filter(permittedOutputs::contains) .collect(toImmutableList()); if (restrictedOutputs.size() < node.getOutputSymbols().size()) { return new ProjectNode( idAllocator.getNextId(), <START> node, <END> Assignments.identity(restrictedOutputs) ); } return node; }</code><technical_language>I assignments in PlanNode . E.g. in case of node a ProjectNode assignments of { a_16 := a, b_12 := b + 5 }. For permittedOutputs = {a_16}, method return Assignments of { a_16 := a_16 }. IMO a special case for ProjectNode (because ProjectNode Assignments). Previously worked fine in context of CrossJoinElimination (if ProjectNode correct in case missing, add it) general-purpose util function, correct in cases</technical_language>

Target:
public static Optional<PlanNode> restrictOutputs(PlanNodeIdAllocator idAllocator, PlanNode node, Set<Symbol> permittedOutputs) { List<Symbol> restrictedOutputs = node.getOutputSymbols().stream() .filter(permittedOutputs::contains) .collect(toImmutableList()); if (restrictedOutputs.size() == node.getOutputSymbols().size()) { return Optional.empty(); } return Optional.of( new ProjectNode( idAllocator.getNextId(), node, Assignments.identity(restrictedOutputs))); }
Source:
<code>protected void createTable(TableName tableName) throws IOException { try{ getAsyncAdmin().createTable(createDescriptor(tableName)).get(); } catch (InterruptedException | ExecutionException e) { <START> e.printStackTrace(); <END> } }</code><technical_language>Please throw IOException here</technical_language>

Target:
protected void createTable(TableName tableName) throws IOException { try{ getAsyncAdmin().createTable(createDescriptor(tableName)).get(); } catch (InterruptedException | ExecutionException e) { throw new IOException("Error while creating table: "+e.getCause()); } }
Source:
<code>public HttpResult makePostWithFile( ContentBody fileBody, URI destinationUrl, Map<String, String> headers) throws IOException { <START> HttpPost httppost = new HttpPost(destinationUrl.toString()); <END> addHeadersTo(httppost, headers); MultipartEntityBuilder builder = MultipartEntityBuilder.create(); builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE); addCredentials(httppost, this.settings.getFormattedUserData()); builder = addFileToRequest(fileBody, builder); HttpEntity entity = builder.build(); httppost.setEntity(entity); return getResponseResult(httppost); }</code><technical_language>[HttpPost#HttpPost(URI uri)](<LINK_0></technical_language>

Target:
public HttpResult makePostWithFile( ContentBody fileBody, URI destinationUrl, Map<String, String> headers) throws IOException { HttpPost httppost = new HttpPost(destinationUrl); addHeadersTo(httppost, headers); MultipartEntityBuilder builder = MultipartEntityBuilder.create(); builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE); addCredentials(httppost, this.settings.getFormattedUserData()); builder = addFileToRequest(fileBody, builder); HttpEntity entity = builder.build(); httppost.setEntity(entity); return getResponseResult(httppost); }