auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void loadAuthenticatorsClasses() { File authenticatorsDirectory = null; try { authenticatorsDirectory = ConfigurationResourceResolver.getConfigurationResource("lib.authentication", "lib/authentication").getFile(); } catch (FileNotFoundException e) { logger.debug(e.getMessage(), e); return; } catch (IOException e) { throw Throwables.propagate(e); } if (!authenticatorsDirectory.exists()) { logger.debug(authenticatorsDirectory + " does not exist."); return; } if (!authenticatorsDirectory.isDirectory()) { logger.error(authenticatorsDirectory + " is not a directory."); return; } final File[] authenticatorsJars = authenticatorsDirectory.listFiles(name -> name.getName().endsWith(".jar")); if (ArrayUtils.isEmpty(authenticatorsJars)) { logger.debug(authenticatorsDirectory + "contains 0 authenticators jar files."); return; } Stream.of(authenticatorsJars).forEach(jarFile -> { try { JarFileClassLoader.loadClasses( Thread.currentThread().getContextClassLoader(), jarFile.getAbsolutePath()); } catch (IOException | ClassNotFoundException e) { throw Throwables.propagate(e); } }); }

Target:
public static void loadAuthenticatorsClasses() { File authenticatorsDirectory = null; try { authenticatorsDirectory = ConfigurationResourceResolver.getConfigurationResource("authentication.lib", "authentication-lib").getFile(); } catch (FileNotFoundException e) { logger.debug(e.getMessage(), e); return; } catch (IOException e) { throw Throwables.propagate(e); } if (!authenticatorsDirectory.exists()) { logger.debug(authenticatorsDirectory + " does not exist."); return; } if (!authenticatorsDirectory.isDirectory()) { logger.error(authenticatorsDirectory + " is not a directory."); return; } final File[] authenticatorsJars = authenticatorsDirectory.listFiles(name -> name.getName().endsWith(".jar")); if (ArrayUtils.isEmpty(authenticatorsJars)) { logger.debug(authenticatorsDirectory + "contains 0 authenticators jar files."); return; } Stream.of(authenticatorsJars).forEach(jarFile -> { try { JarFileClassLoader.loadClasses( Thread.currentThread().getContextClassLoader(), jarFile.getAbsolutePath()); } catch (IOException | ClassNotFoundException e) { throw Throwables.propagate(e); } }); }
Source:
public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() { try { scrolledComposite = new ScrolledComposite(null, 0); fail("No exception thrown"); } catch (IllegalArgumentException e) { } int[] cases = {SWT.H_SCROLL, SWT.V_SCROLL, SWT.BORDER, SWT.LEFT_TO_RIGHT, SWT.RIGHT_TO_LEFT}; for (int i = 0; i < cases.length; i++) scrolledComposite = new ScrolledComposite(shell, cases[i]); }

Target:
public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() { try { scrolledComposite = new ScrolledComposite(null, 0); fail("No exception thrown"); } catch (IllegalArgumentException e) { } int[] cases = {SWT.H_SCROLL, SWT.V_SCROLL, SWT.BORDER, SWT.LEFT_TO_RIGHT, SWT.RIGHT_TO_LEFT}; for (int i = 0; i < cases.length; i++){ scrolledComposite = new ScrolledComposite(shell, cases[i]); } }
Source:
public RuleStatus getRuleStatus(String ruleUID) { if (ruleManager != null) { RuleStatusInfo rsi = ruleManager.getStatusInfo(ruleUID); return rsi != null ? rsi.getStatus() : null; } else { return null; } }

Target:
public RuleStatus getRuleStatus(String ruleUID) { RuleStatusInfo rsi = ruleManager.getStatusInfo(ruleUID); return rsi != null ? rsi.getStatus() : null; }
Source:
public void waitForCompletion(long timeoutMillis) { if(!(this.wrappedCommand instanceof BaseCommand)) { log.error("waitForCompletion called on command which doesn't inherit from BaseCommand!" + " Unable to wait for command to complete."); return; } ScriptedCommandCompletionLock lock = new ScriptedCommandCompletionLock((BaseCommand)wrappedCommand); parentCommand.addCompletionLock(lock); try { long startTime = System.currentTimeMillis(); synchronized (lock) { if(timeoutMillis <= 0) { log.debug("Waiting indefinitely for lock notification"); lock.wait(); } else { log.debug("Waiting with a timeout of " + timeoutMillis + "ms"); lock.wait(timeoutMillis); } } log.debug("Wait completed (waited " + (System.currentTimeMillis() - startTime) + "millis)"); } catch (InterruptedException e) { log.error("Scripted command wait unexpectedly interrupted!"); } }

Target:
public void waitForCompletion(long timeoutMillis) { if(!(this.wrappedCommand instanceof BaseCommand)) { log.error("waitForCompletion called on command which doesn't inherit from BaseCommand!" + " Unable to wait for command to complete."); return; } ScriptedCommandCompletionLock lock = new ScriptedCommandCompletionLock((BaseCommand)wrappedCommand); parentCommand.addCompletionLock(lock); try { long startTime = System.currentTimeMillis(); synchronized (lock) { log.debug("Waiting with a timeout of " + timeoutMillis + "ms"); lock.wait(timeoutMillis); } log.debug("Wait completed (waited " + (System.currentTimeMillis() - startTime) + "millis)"); } catch (InterruptedException e) { log.error("Scripted command wait unexpectedly interrupted!"); } }
Source:
public long get6ByteLong( long index, int offset ) { long pageId = pageId( index ); offset += offset( index ); try ( PageCursor cursor = pagedFile.io( pageId, PF_SHARED_READ_LOCK ) ) { cursor.next(); long result; do { long low4b = cursor.getInt( offset ) & 0xFFFFFFFFL; long high2b = cursor.getShort( offset + Integer.BYTES ); result = low4b | (high2b << 32); } while ( cursor.shouldRetry() ); checkBounds( cursor ); return result; } catch ( IOException e ) { throw new UncheckedIOException( e ); } }

Target:
public long get6ByteLong( long index, int offset ) { long pageId = pageId( index ); offset += offset( index ); try ( PageCursor cursor = pagedFile.io( pageId, PF_SHARED_READ_LOCK ) ) { cursor.next(); long result; do { long low4b = cursor.getInt( offset ) & 0xFFFFFFFFL; long high2b = cursor.getShort( offset + Integer.BYTES ); result = low4b | (high2b << Integer.SIZE); } while ( cursor.shouldRetry() ); checkBounds( cursor ); return result; } catch ( IOException e ) { throw new UncheckedIOException( e ); } }
Source:
public EventWithLocalDate() { super(); }

Target:
public EventWithLocalDate()
Source:
public Repository getRepository() throws IOException { if (repo == null) { this.repo = repoManager.openRepository(project); inserter = repo.newObjectInserter(); revWalk = new RevWalk(inserter.newReader()); batchRefUpdate = repo.getRefDatabase().newBatchUpdate(); } return repo; }

Target:
public Repository getRepository() throws IOException { if (repo == null) { this.repo = repoManager.openRepository(project); closeRepo = true; inserter = repo.newObjectInserter(); revWalk = new RevWalk(inserter.newReader()); batchRefUpdate = repo.getRefDatabase().newBatchUpdate(); } return repo; }
Source:
private void maybeExecuteBashScripts() { if (executeScripts()) { Path dirPath = Paths.get(getLogDirPath(), dirName) .toAbsolutePath(); for(String path : getPathsToScriptsToExecute()) { Path scriptPath = Paths.get(path).toAbsolutePath(); try { logger.info("executing " + scriptPath + " with arguments '" + dirPath + "'"); Process p = new ProcessBuilder(scriptPath.toString(), dirPath.toString()).start(); } catch (IOException e) { logger.error("Could not execute " + scriptPath, e); } } } }

Target:
private void maybeExecuteBashScripts() { if (shouldExecuteScripts()) { Path absDirPath = Paths.get(getLogDirPath(), dirName).toAbsolutePath(); for(String scriptPath : getPathsToScriptsToExecute()) { Path absScriptPath = Paths.get(scriptPath).toAbsolutePath(); try { logger.info("executing " + scriptPath + " with arguments '" + absDirPath + "'"); new ProcessBuilder(scriptPath.toString(), absDirPath.toString()).start(); } catch (IOException e) { logger.error("Could not execute " + scriptPath, e); } } } }
Source:
public void setLastCancelAllTimeMillis(final long timeMillis) { mWorkDatabase.beginTransaction(); try { Preference preference = new Preference(KEY_LAST_CANCEL_ALL_TIME_MS, timeMillis); mWorkDatabase.preferenceDao().insertPreference(preference); mWorkDatabase.setTransactionSuccessful(); } finally { mWorkDatabase.endTransaction(); } }

Target:
public void setLastCancelAllTimeMillis(final long timeMillis) { Preference preference = new Preference(KEY_LAST_CANCEL_ALL_TIME_MS, timeMillis); mWorkDatabase.preferenceDao().insertPreference(preference); }
Source:
public static void run() { if (!ok) { return; } System.out.println("............................................"); if (generate) { generateWorlds(); } else { InferenceEngine engine = InferenceEngine.constructEngine(model, inferenceProps); engine.setEvidence(evidence); engine.setQueries(queries); engine.answerQueries(); System.out.println("======== Query Results ========="); System.out.println("Iteration: " + numSamples); for (Iterator iter = queries.iterator(); iter.hasNext();) { Query q = (Query) iter.next(); q.printResults(System.out); } System.out.println("======== Done ========"); System.out.println(); if (outputPath != null) { writeResultsJson(queries, outputPath); } } Timer.printAllTimers(); }

Target:
public static void run() { if (!ok) { return; } System.out.println("............................................"); if (generate) { generateWorlds(); } else { InferenceEngine engine = InferenceEngine.constructEngine(model, inferenceProps); engine.setEvidence(evidence); engine.setQueries(queries); engine.answerQueries(); TableWriter tableWriter = new TableWriter(queries); tableWriter.setHeader("Iteration: " + numSamples); tableWriter.writeResults(System.out); if (outputPath != null) { System.out.println("Writing query results to " + outputPath + "..."); JsonWriter jsonWriter = new JsonWriter(queries); jsonWriter.writeResults(outputPath); System.out.println("Done."); } } Timer.printAllTimers(); }
Source:
public RelOptPredicateList getPredicates(Intersect intersect, RelMetadataQuery mq) { final RexBuilder rexBuilder = intersect.getCluster().getRexBuilder(); final RexExecutorImpl rexImpl = (RexExecutorImpl) (intersect.getCluster().getPlanner().getExecutor()); final RexImplicationChecker rexImplicationChecker = new RexImplicationChecker( intersect.getCluster().getRexBuilder(), rexImpl, intersect.getRowType()); Set<RexNode> finalPredicates = new HashSet<>(); for (Ord<RelNode> input : Ord.zip(intersect.getInputs())) { RelOptPredicateList info = mq.getPulledUpPredicates(input.e); if (info == null || info.pulledUpPredicates.isEmpty()) { continue; } for (RexNode pred: info.pulledUpPredicates) { if (finalPredicates.stream().anyMatch( finalPred -> rexImplicationChecker.implies(finalPred, pred))) { continue; } finalPredicates = finalPredicates.stream() .filter(finalPred -> !rexImplicationChecker.implies(pred, finalPred)) .collect(Collectors.toSet()); finalPredicates.add(pred); } } return RelOptPredicateList.of(rexBuilder, finalPredicates); }

Target:
public RelOptPredicateList getPredicates(Intersect intersect, RelMetadataQuery mq) { final RexBuilder rexBuilder = intersect.getCluster().getRexBuilder(); final RexExecutorImpl rexImpl = (RexExecutorImpl) (intersect.getCluster().getPlanner().getExecutor()); final RexImplicationChecker rexImplicationChecker = new RexImplicationChecker(rexBuilder, rexImpl, intersect.getRowType()); Set<RexNode> finalPredicates = new HashSet<>(); for (Ord<RelNode> input : Ord.zip(intersect.getInputs())) { RelOptPredicateList info = mq.getPulledUpPredicates(input.e); if (info == null || info.pulledUpPredicates.isEmpty()) { continue; } for (RexNode pred: info.pulledUpPredicates) { if (finalPredicates.stream().anyMatch( finalPred -> rexImplicationChecker.implies(finalPred, pred))) { continue; } finalPredicates = finalPredicates.stream() .filter(finalPred -> !rexImplicationChecker.implies(pred, finalPred)) .collect(Collectors.toSet()); finalPredicates.add(pred); } } return RelOptPredicateList.of(rexBuilder, finalPredicates); }
Source:
private String getQueryString(Query query, Table table) { final OrderByClause orderByClause = query.getOrderByClause(); if(orderByClause.isEmpty()) { query.orderBy(table.getColumnByName("id"), Direction.ASC); } String queryString = query.toSql(); return queryString.replace(table.getName() + ".", ""); }

Target:
private String getQueryString(Query query, Table table) { if (isPlainSelectOfColumns(query)) { addOrderByClauseIfMissing(query, table); } String queryString = query.toSql(); return queryString.replace(table.getName() + ".", ""); }
Source:
public IndexBuilder fillIndexBuilder(final Path path) throws Exception { InputStream inputStream = null; try { inputStream = ioService.newInputStream(path, StandardOpenOption.READ); final String drl = DecisionTableFactory.loadFromInputStream(inputStream, null); return fillDrlIndexBuilder(path, drl); } finally { if (inputStream != null) { try { inputStream.close(); } catch (IOException e) { } } } }

Target:
public IndexBuilder fillIndexBuilder(final Path path) throws Exception { try (final InputStream inputStream = ioService.newInputStream(path, StandardOpenOption.READ)) { final String drl = DecisionTableFactory.loadFromInputStream(inputStream, null); return fillDrlIndexBuilder(path, drl); } }
Source:
public Optional<MemorySegment> getUnconsumedSegment() { if (hasRemaining()) { MemorySegment target = MemorySegmentFactory.allocateUnpooledSegment(remaining()); segment.copyTo(position, target, 0, remaining()); return Optional.of(target); } else { return Optional.empty(); } }

Target:
CloseableIterator<Buffer> getUnconsumedSegment() { if (!hasRemaining()) { return CloseableIterator.empty(); } MemorySegment segment = MemorySegmentFactory.allocateUnpooledSegment(remaining()); this.segment.copyTo(position, segment, 0, remaining()); return singleBufferIterator(segment); }
Source:
public void scanHttpResponseReceive(HttpMessage msg, int id, Source source) { String siteIdentifier = getSiteIdentifier(msg); if (alreadySeen(msg)) { if(LOGGER.isDebugEnabled()) { LOGGER.debug("Skipping analyse, because already seen " + siteIdentifier); } return; } if(siteIdentifier != null){ visitedSiteIdentifiers.add(siteIdentifier); } long startTime = System.currentTimeMillis(); for (Application app : this.getApps()) { this.currentApp = app; checkAppMatches(msg, source); if(appMatch != null) { String site = msg.getRequestHeader().getHostName() + ":" + msg.getRequestHeader().getHostPort(); if(LOGGER.isDebugEnabled()) { LOGGER.debug("Adding " + app.getName() + " to " + site); } addApplicationsToSite(site, appMatch); this.appMatch = null; } this.currentApp = null; } if(LOGGER.isDebugEnabled()) { LOGGER.debug("Analyse took " + (System.currentTimeMillis() - startTime) + "ms"); } }

Target:
public void scanHttpResponseReceive(HttpMessage msg, int id, Source source) { String siteIdentifier = getSiteIdentifier(msg); if (!visitedSiteIdentifiers.add(siteIdentifier)) { return; } long startTime = System.currentTimeMillis(); for (Application app : this.getApps()) { this.currentApp = app; checkAppMatches(msg, source); if(appMatch != null) { String site = msg.getRequestHeader().getHostName() + ":" + msg.getRequestHeader().getHostPort(); if(LOGGER.isDebugEnabled()) { LOGGER.debug("Adding " + app.getName() + " to " + site); } addApplicationsToSite(site, appMatch); this.appMatch = null; } this.currentApp = null; } if(LOGGER.isDebugEnabled()) { LOGGER.debug("Analyse took " + (System.currentTimeMillis() - startTime) + "ms"); } }
Source:
public boolean loadSqlCipher(Context context) { try { loadLibs(context); } catch (UnsatisfiedLinkError ule) { return extractAndLoadAgain(context, DATABASE_SQLCIPHER, getSupportedAbis()); } catch (Exception ex) { Log.e(TAG, "Error loading native libraries for Sqlcipher", ex); return false; } return true; }

Target:
public static boolean loadSqlCipher(Context context) { try { loadLibs(context); } catch (UnsatisfiedLinkError ule) { return extractAndLoadAgain(context, DATABASE_SQLCIPHER, getSupportedAbis()); } catch (Exception ex) { Log.e(TAG, "Error loading native libraries for Sqlcipher", ex); return false; } return true; }
Source:
public ITreeEditor openWithResourceSet(final ResourceSet resourceSet) throws TreeEditorOpenerException { final ResourceImpl newResource = new ResourceImpl(); for (Resource resource : resourceSet.getResources()) { final EList<EObject> contents = resource.getContents(); newResource.getContents().addAll(contents); } return openEditor(newResource); }

Target:
public ITreeEditor openWithResourceSet(final ResourceSet resourceSet) throws TreeEditorOpenerException { final ResourceSetEditorInput editorInput = new ResourceSetEditorInput( resourceSet); return openEditor(editorInput); }
Source:
Map<String, String> getCanonicalHeaders() { return canonicalHeaders; }

Target:
Map<String, String> getCanonicalHeaders() { return new HashMap<>(canonicalHeaders); }
Source:
private void makeChangeLogForIndices(List<Index> originalIndices, List<Index> updatedIndices, Library target) throws IOException { Set<String> added = new TreeSet<>(stringifyIndices(updatedIndices)); added.removeAll(originalIndices); Set<String> removed = new TreeSet<>(stringifyIndices(originalIndices)); removed.removeAll(updatedIndices); if (!added.isEmpty() || !removed.isEmpty()) { StringBuilder message = new StringBuilder(); message.append("Indices"); LimsUtils.appendSet(message, removed, "removed"); LimsUtils.appendSet(message, added, " Added"); LibraryChangeLog changeLog = new LibraryChangeLog(); changeLog.setLibrary(target); changeLog.setColumnsChanged("indices"); changeLog.setSummary(message.toString()); changeLog.setTime(new Date()); changeLog.setUser(authorizationManager.getCurrentUser()); changeLogDao.create(changeLog); } }

Target:
private void makeChangeLogForIndices(List<Index> originalIndices, List<Index> updatedIndices, Library target) throws IOException { Set<String> original = stringifyIndices(originalIndices); Set<String> updated = stringifyIndices(updatedIndices); Set<String> added = new TreeSet<>(updated); added.removeAll(originalIndices); Set<String> removed = new TreeSet<>(original); removed.removeAll(updatedIndices); if (!added.isEmpty() || !removed.isEmpty()) { StringBuilder message = new StringBuilder(); message.append("Indices"); LimsUtils.appendSet(message, removed, "removed"); LimsUtils.appendSet(message, added, (removed.isEmpty() ? "" : "; ") + "added"); LibraryChangeLog changeLog = new LibraryChangeLog(); changeLog.setLibrary(target); changeLog.setColumnsChanged("indices"); changeLog.setSummary(message.toString()); changeLog.setTime(new Date()); changeLog.setUser(authorizationManager.getCurrentUser()); changeLogDao.create(changeLog); } }
Source:
private void testContextLiteral( final SqlOperator operator, final DataContext.Variable variable, final Object value) { Frameworks.withPrepare(new Frameworks.PrepareAction<Void>() { public Void apply(final RelOptCluster cluster, final RelOptSchema relOptSchema, final SchemaPlus rootSchema, final CalciteServerStatement statement) { final RexBuilder rexBuilder = cluster.getRexBuilder(); final RexExecutorImpl executor = new RexExecutorImpl( new SingleValueDataContext(variable.camelName, value)); try { checkConstant(value, new Function<RexBuilder, RexNode>() { public RexNode apply(RexBuilder builder) { List<RexNode> output = new ArrayList<>(); executor.reduce(rexBuilder, ImmutableList.of(rexBuilder.makeCall(operator)), output); return output.get(0); } }); } catch (Exception e) { throw new RuntimeException(e); } return null; } }); }

Target:
private void testContextLiteral( final SqlOperator operator, final DataContext.Variable variable, final Object value) { Frameworks.withPrepare(new Frameworks.PrepareAction<Void>() { public Void apply(final RelOptCluster cluster, final RelOptSchema relOptSchema, final SchemaPlus rootSchema, final CalciteServerStatement statement) { final RexBuilder rexBuilder = cluster.getRexBuilder(); final RexExecutorImpl executor = new RexExecutorImpl( new SingleValueDataContext(variable.camelName, value)); try { checkConstant(value, builder -> { final List<RexNode> output = new ArrayList<>(); executor.reduce(rexBuilder, ImmutableList.of(rexBuilder.makeCall(operator)), output); return output.get(0); }); } catch (Exception e) { throw TestUtil.rethrow(e); } return null; } }); }
Source:
public IndexSnapshot createIndexSnapshot(UnloadedIndexKeyRecordSet indexKeysRecordSet) { checkArgument(indexKeysRecordSet.getColumnTypes().equals(missingKeysTypes), "indexKeysRecordSet must have same schema as missingKeys"); checkState(!isMemoryExceeded(), "Max memory exceeded"); for (Page page : pages) { outputPagesIndex.addPage(page); } pages.clear(); LookupSource lookupSource = outputPagesIndex.createLookupSourceSupplier(session, keyOutputChannels, keyOutputHashChannel, Optional.empty(), Optional.empty(), ImmutableList.of()).get(); UnloadedIndexKeyRecordCursor indexKeysRecordCursor = indexKeysRecordSet.cursor(); while (indexKeysRecordCursor.advanceNextPosition()) { Page page = indexKeysRecordCursor.getPage(); int position = indexKeysRecordCursor.getPosition(); if (lookupSource.getJoinPosition(position, page, page) < 0) { missingKeysPageBuilder.declarePosition(); for (int i = 0; i < page.getChannelCount(); i++) { Block block = page.getBlock(i); Type type = indexKeysRecordCursor.getType(i); type.appendTo(block, position, missingKeysPageBuilder.getBlockBuilder(i)); } } } Page missingKeysPage = missingKeysPageBuilder.build(); if (!missingKeysPageBuilder.isEmpty()) { missingKeysPageBuilder.reset(); } memoryInBytes += missingKeysPage.getSizeInBytes(); if (isMemoryExceeded()) { return null; } if (missingKeysPage.getPositionCount() != 0) { missingKeysIndex.addPage(missingKeysPage); missingKeys = missingKeysIndex.createLookupSourceSupplier(session, missingKeysChannels).get(); } return new IndexSnapshot(lookupSource, missingKeys); }

Target:
public IndexSnapshot createIndexSnapshot(UnloadedIndexKeyRecordSet indexKeysRecordSet) { checkArgument(indexKeysRecordSet.getColumnTypes().equals(missingKeysTypes), "indexKeysRecordSet must have same schema as missingKeys"); checkState(!isMemoryExceeded(), "Max memory exceeded"); for (Page page : pages) { outputPagesIndex.addPage(page); } pages.clear(); LookupSource lookupSource = outputPagesIndex.createLookupSourceSupplier(session, keyOutputChannels, keyOutputHashChannel, Optional.empty(), Optional.empty(), ImmutableList.of()).get(); verify(missingKeysPageBuilder.isEmpty()); UnloadedIndexKeyRecordCursor indexKeysRecordCursor = indexKeysRecordSet.cursor(); while (indexKeysRecordCursor.advanceNextPosition()) { Page page = indexKeysRecordCursor.getPage(); int position = indexKeysRecordCursor.getPosition(); if (lookupSource.getJoinPosition(position, page, page) < 0) { missingKeysPageBuilder.declarePosition(); for (int i = 0; i < page.getChannelCount(); i++) { Block block = page.getBlock(i); Type type = indexKeysRecordCursor.getType(i); type.appendTo(block, position, missingKeysPageBuilder.getBlockBuilder(i)); } } } Page missingKeysPage = missingKeysPageBuilder.build(); if (!missingKeysPageBuilder.isEmpty()) { missingKeysPageBuilder.reset(); } memoryInBytes += missingKeysPage.getSizeInBytes(); if (isMemoryExceeded()) { return null; } if (missingKeysPage.getPositionCount() != 0) { missingKeysIndex.addPage(missingKeysPage); missingKeys = missingKeysIndex.createLookupSourceSupplier(session, missingKeysChannels).get(); } return new IndexSnapshot(lookupSource, missingKeys); }
Source:
public void run() { LOG.info("Background ContainerMetadataScanner starting up"); while (!stopping) { scrub(); if (!stopping) { try { Thread.sleep(300000); } catch (InterruptedException e) { LOG.info("Background ContainerMetadataScanner interrupted." + " Going to exit"); } } } }

Target:
public void run() { LOG.info("Background ContainerMetadataScanner starting up"); while (!stopping) { long start = System.nanoTime(); scrub(); long interval = TimeUnit.NANOSECONDS.toMillis(System.nanoTime()-start); if (!stopping && interval < metadataScanInterval) { try { Thread.sleep(metadataScanInterval - interval); } catch (InterruptedException e) { LOG.info("Background ContainerMetadataScanner interrupted." + " Going to exit"); } } } }
Source:
public List<String> validateItemTriple(Statement itemTriple) { List<String> invalid = new ArrayList<>(); String subject = itemTriple.getSubject().stringValue(); if (!isValidTripleComponent(subject, VALID_NAMESPACES.entity(), "item")) { invalid.add(subject); } String predicate = itemTriple.getPredicate().stringValue(); if (!isValidTripleComponent(predicate, VALID_NAMESPACES.property(WikibaseUris.PropertyType.CLAIM), "property")) { invalid.add(predicate); } String object = itemTriple.getObject().stringValue(); if (!isValidTripleComponent(object, VALID_NAMESPACES.statement(), "statement")) { invalid.add(object); } return invalid; }

Target:
public List<String> validateItemTriple(Statement itemTriple) { List<String> invalid = new ArrayList<>(); String subject = itemTriple.getSubject().stringValue(); checkNode(subject, VALID_NAMESPACES.entity(), "item", invalid); String predicate = itemTriple.getPredicate().stringValue(); checkNode(predicate, VALID_NAMESPACES.property(WikibaseUris.PropertyType.CLAIM), "property", invalid); String object = itemTriple.getObject().stringValue(); checkNode(object, VALID_NAMESPACES.statement(), "statement", invalid); return invalid; }
Source:
protected HttpContext createHttpContext(HttpMethod httpMethod, URI uri) { HttpHost targetHost = new HttpHost(uri.getHost(), uri.getPort(), uri.getScheme()); BasicScheme basicScheme = new BasicScheme(); BasicAuthCache authCache = new BasicAuthCache(); authCache.put(targetHost, basicScheme); BasicHttpContext localContext = new BasicHttpContext(); localContext.setAttribute(ClientContext.AUTH_CACHE, authCache); return createHttpContext(localContext); }

Target:
protected HttpContext createHttpContext(HttpMethod httpMethod, URI uri) { BasicHttpContext localContext = new BasicHttpContext(); if (Boolean.valueOf(settings.getProperty(HTTP_AUTH_PREEMPTIVE))) { HttpHost targetHost = new HttpHost(uri.getHost(), uri.getPort(), uri.getScheme()); BasicScheme basicScheme = new BasicScheme(); BasicAuthCache authCache = new BasicAuthCache(); authCache.put(targetHost, basicScheme); localContext.setAttribute(ClientContext.AUTH_CACHE, authCache); } return createHttpContext(localContext); }
Source:
public synchronized void stop(StopContext context) { context.asynchronous(); final DeploymentScanner scanner = this.scanner; this.scanner = null; scanner.stopScanner(); scheduledExecutorValue.getValue().shutdown(); if (callbackHandle != null) { callbackHandle.remove(); } context.complete(); }

Target:
public synchronized void stop(StopContext context) { final DeploymentScanner scanner = this.scanner; this.scanner = null; scanner.stopScanner(); scheduledExecutorValue.getValue().shutdown(); if (callbackHandle != null) { callbackHandle.remove(); } }
Source:
public Object visitKeySetCommand(InvocationContext ctx, KeySetCommand command) throws Throwable { Object keys = super.visitKeySetCommand(ctx, command); if (enabled && !shouldSkipCacheLoader(command)) { Set<Object> keysSet = (Set<Object>) keys; final ConcurrentHashSet<Object> union = new ConcurrentHashSet<Object>(keysSet.size()); union.addAll(keysSet); persistenceManager.processOnAllStores(new CollectionKeyFilter(union), new AdvancedCacheLoader.CacheLoaderTask() { @Override public void processEntry(MarshalledEntry marshalledEntry, AdvancedCacheLoader.TaskContext taskContext) throws InterruptedException { union.add(marshalledEntry.getKey()); } }, false, false); return Collections.unmodifiableSet(union); } return keys; }

Target:
public Object visitKeySetCommand(InvocationContext ctx, KeySetCommand command) throws Throwable { Object keys = super.visitKeySetCommand(ctx, command); if (enabled && !shouldSkipCacheLoader(command)) { Set<Object> keysSet = (Set<Object>) keys; final ConcurrentHashSet<Object> union = new ConcurrentHashSet<Object>(); for (Object k : keysSet) union.add(k); persistenceManager.processOnAllStores(new CollectionKeyFilter(union), new AdvancedCacheLoader.CacheLoaderTask() { @Override public void processEntry(MarshalledEntry marshalledEntry, AdvancedCacheLoader.TaskContext taskContext) throws InterruptedException { union.add(marshalledEntry.getKey()); } }, false, false); return Collections.unmodifiableSet(union); } return keys; }
Source:
public void testSslWithClientAuthenticationFailsWithoutProperServerTrustStore() { SslConfiguration serverConfig = SslConfiguration.builder() .trustStorePath(TestConstants.SERVER_KEY_STORE_JKS_PATH) .keyStorePath(TestConstants.SERVER_KEY_STORE_JKS_PATH) .keyStorePassword(TestConstants.SERVER_KEY_STORE_JKS_PASSWORD) .build(); SslConfiguration clientConfig = SslConfiguration.builder() .trustStorePath(TestConstants.CLIENT_KEY_STORE_JKS_PATH) .build(); try { runSslConnectionTest(serverConfig, clientConfig, false); fail(); } catch (RuntimeException ex) { assertThat(ex.getCause(), is(instanceOf(SSLHandshakeException.class))); assertThat(ex.getMessage(), containsString("PKIX path building failed")); } }

Target:
public void testSslWithClientAuthenticationFailsWithoutProperServerTrustStore() { TrustStoreConfiguration serverTrustStoreConfig = TrustStoreConfiguration.of( TestConstants.SERVER_KEY_STORE_JKS_PATH); KeyStoreConfiguration serverKeyStoreConfig = KeyStoreConfiguration.of( TestConstants.SERVER_KEY_STORE_JKS_PATH, TestConstants.SERVER_KEY_STORE_JKS_PASSWORD); SslConfiguration serverConfig = SslConfiguration.of(serverTrustStoreConfig, serverKeyStoreConfig); TrustStoreConfiguration clientTrustStoreConfig = TrustStoreConfiguration.of(TestConstants.CA_TRUST_STORE_PATH); KeyStoreConfiguration clientKeyStoreConfig = KeyStoreConfiguration.of( TestConstants.CLIENT_KEY_STORE_JKS_PATH, TestConstants.CLIENT_KEY_STORE_JKS_PASSWORD); SslConfiguration clientConfig = SslConfiguration.of(clientTrustStoreConfig, clientKeyStoreConfig); try { runSslConnectionTest(serverConfig, clientConfig, ClientAuth.WITH_CLIENT_AUTH); fail(); } catch (RuntimeException ex) { assertThat(ex.getCause(), is(instanceOf(SSLHandshakeException.class))); assertThat(ex.getMessage(), containsString("bad_certificate")); } }
Source:
public AsyncTableLayoutUpdater( final AsyncKiji kiji, final KijiURI tableURI, final TableLayoutDesc layoutUpdate ) throws IOException, KeeperException { this(kiji, tableURI, new Function<KijiTableLayout, TableLayoutDesc>() { @Override public TableLayoutDesc apply(KijiTableLayout input) { return layoutUpdate; } }); }

Target:
public AsyncTableLayoutUpdater( final AsyncKiji kiji, final KijiURI tableURI, final TableLayoutDesc layoutUpdate ) throws IOException { this(kiji, tableURI, new Function<KijiTableLayout, TableLayoutDesc>() { @Override public TableLayoutDesc apply(KijiTableLayout input) { return layoutUpdate; } }); }
Source:
protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { resp.setStatus(HttpServletResponse.SC_OK); resp.setContentType(TextFormat.contentType004); Writer writer = resp.getWriter(); TextFormat.write004(writer, registry.metricFamilySamples()); writer.flush(); writer.close(); }

Target:
protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { resp.setStatus(HttpServletResponse.SC_OK); resp.setContentType(TextFormat.CONTENT_TYPE_004); Writer writer = resp.getWriter(); TextFormat.write004(writer, registry.metricFamilySamples()); writer.flush(); writer.close(); }
Source:
String join(String... packageNames) { checkNonNullArgument(packageNames, "'packageNames' cannot be null"); return Stream.of(packageNames).collect(Collectors.joining(",")); }

Target:
String join(String... packageNames) { requireNonNull(packageNames, "'packageNames' cannot be null"); return Stream.of(packageNames).collect(Collectors.joining(",")); }
Source:
public void testOpenSSL() throws IOException { assumeTrue(NativeCodeLoader.buildSupportsOpenssl()); Configuration conf = new Configuration(); conf.setEnum(Constants.SSL_CHANNEL_MODE, OpenSSLSocketFactory.SSLChannelMode.OpenSSL); S3AFileSystem fs = S3ATestUtils.createTestFileSystem(conf); writeThenReadFile(fs, path("ITestS3ASSL/testOpenSSL")); }

Target:
public void testOpenSSL() throws IOException { assumeTrue(NativeCodeLoader.buildSupportsOpenssl()); Configuration conf = new Configuration(getConfiguration()); conf.setEnum(Constants.SSL_CHANNEL_MODE, OpenSSLSocketFactory.SSLChannelMode.OpenSSL); try (S3AFileSystem fs = S3ATestUtils.createTestFileSystem(conf)) { writeThenReadFile(fs, path("ITestS3ASSL/testOpenSSL")); } }
Source:
public ContainerInfo inspectContainer(String container) throws IOException { ContainerInfo info = super.inspectContainer(container); if (info == null) { return null; } Pod pod = getChePodByContainerId(info.getId()); if (pod == null ) { LOG.warn("No Pod found by container ID " + info.getId()); return null; } String deploymentName = pod.getMetadata().getLabels().get(OPENSHIFT_DEPLOYMENT_LABEL); if (deploymentName == null ) { LOG.warn("No label " + OPENSHIFT_DEPLOYMENT_LABEL + " found for Pod " + pod.getMetadata().getName()); return null; } Service svc = getCheServiceBySelector(OPENSHIFT_DEPLOYMENT_LABEL, deploymentName); if (svc == null) { LOG.warn("No Service found by selector " + OPENSHIFT_DEPLOYMENT_LABEL + "=" + deploymentName); return null; } Map<String, String> annotations = kubernetesLabelConverter.namesToLabels(svc.getMetadata().getAnnotations()); Map<String, String> containerLabels = info.getConfig().getLabels(); Map<String, String> labels = Stream.concat(annotations.entrySet().stream(), containerLabels.entrySet().stream()) .filter(e -> e.getKey().startsWith(kubernetesLabelConverter.getCheServerLabelPrefix())) .collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue())); info.getConfig().setLabels(labels); LOG.info("Container labels:"); info.getConfig().getLabels().entrySet() .stream().forEach(e -> LOG.info("- " + e.getKey() + "=" + e.getValue())); replaceNetworkSettings(info); return info; }

Target:
public ContainerInfo inspectContainer(String container) throws IOException { ContainerInfo info = super.inspectContainer(container); if (info == null) { return null; } Pod pod = getChePodByContainerId(info.getId()); if (pod == null ) { LOG.warn("No Pod found by container ID {}", info.getId()); return null; } String deploymentName = pod.getMetadata().getLabels().get(OPENSHIFT_DEPLOYMENT_LABEL); if (deploymentName == null ) { LOG.warn("No label found for Pod {}", OPENSHIFT_DEPLOYMENT_LABEL, pod.getMetadata().getName()); return null; } Service svc = getCheServiceBySelector(OPENSHIFT_DEPLOYMENT_LABEL, deploymentName); if (svc == null) { LOG.warn("No Service found by selector {}={}", OPENSHIFT_DEPLOYMENT_LABEL, deploymentName); return null; } Map<String, String> annotations = kubernetesLabelConverter.namesToLabels(svc.getMetadata().getAnnotations()); Map<String, String> containerLabels = info.getConfig().getLabels(); Map<String, String> labels = Stream.concat(annotations.entrySet().stream(), containerLabels.entrySet().stream()) .filter(e -> e.getKey().startsWith(kubernetesLabelConverter.getCheServerLabelPrefix())) .collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue())); info.getConfig().setLabels(labels); LOG.info("Container labels:"); info.getConfig().getLabels().entrySet() .stream().forEach(e -> LOG.info("- {}={}", e.getKey(), e.getValue())); replaceNetworkSettings(info); return info; }
Source:
public void updateStockPrice(String symbol, double newPrice) throws StockMarketExpection { if (getStockForSymbol(symbol) == null) { throw new StockMarketExpection("Stock not present (" + symbol + ")"); } if (newPrice < 0.0) { throw new StockMarketExpection( "Stock price cannot be set to a negative value (" + symbol + ", " + getStockForSymbol(symbol).getPrice() + ") -> " + newPrice + " X Not Allowed "); } Stock StockToUpdate = removeStockFromStockList(symbol); StockToUpdate.setPrice(newPrice); addStock(StockToUpdate); }

Target:
public void updateStockPrice(String symbol, double newPrice) throws StockMarketExpection { datacheck(String symbol, double newPrice) Stock StockToUpdate = removeStockFromStockList(symbol); StockToUpdate.setPrice(newPrice); addStock(StockToUpdate); }
Source:
private Action toAction() { try { return new ActionImpl(getId(), title, description != null ? description : "", new URL(url)); } catch (MalformedURLException e) { LOGGER.debug("Unable to parse the action url: url={}", url, e); return null; } }

Target:
private Action toAction() { try { return new ActionImpl(getId(), title, description, new URL(url)); } catch (MalformedURLException e) { LOGGER.debug("Unable to parse the action url: url={}", url, e); return null; } }
Source:
public void testGetResourceBundleNoResourceBundle() { String resourcePath = "/path/to/resource"; Locale locale = Locale.getDefault(); setupGetResourceBundleTest( resourcePath, locale ); ResourceBundle actualResourceBundle = this.pwpLocalizationService .getResourceBundle( getModuleID( "/path/to/other/resource" ), locale.toLanguageTag() ); assertNull( actualResourceBundle ); }

Target:
public void testGetResourceBundleNoResourceBundle() { String resourcePath = "/path/to/resource"; Locale locale = Locale.ENGLISH; setupGetResourceBundleTest( resourcePath, locale ); ResourceBundle actualResourceBundle = this.pwpLocalizationService .getResourceBundle( getModuleID( "/path/to/other/resource" ), locale.toLanguageTag() ); assertNull( actualResourceBundle ); }
Source:
public Change perform(IProgressMonitor pm) throws CoreException { pm.beginTask("", 1); try { ITestSuite suiteCopy = (ITestSuite) getTestSuite().getWorkingCopy( new NullProgressMonitor()); List<TestSuiteItem> references = getReferences(suiteCopy); Map<Integer, TestSuiteItem> deletedItems = new HashMap<Integer, TestSuiteItem>(); for (TestSuiteItem item : references) { int idx = suiteCopy.getTestSuite().getItems().indexOf(item); deletedItems.put(idx, item); } try { TestSuite suiteNamedElement = (TestSuite) suiteCopy .getModifiedNamedElement(); for (TestSuiteItem item : references) { suiteNamedElement.getItems().remove(item); } WriteAccessChecker writeAccessChecker = new WriteAccessChecker(); if (writeAccessChecker.makeResourceWritable(suiteCopy)) { suiteCopy.commitWorkingCopy(true, new NullProgressMonitor()); } } finally { suiteCopy.discardWorkingCopy(); } return new UndoDeleteTestReferenceChange(getTestSuite(), getQ7Element(), deletedItems); } finally { pm.done(); } }

Target:
public Change perform(IProgressMonitor pm) throws CoreException { pm.beginTask("", 1); try { ITestSuite suiteCopy = (ITestSuite) getTestSuite().getWorkingCopy( new NullProgressMonitor()); List<TestSuiteItem> references = getReferences(suiteCopy); Map<Integer, TestSuiteItem> deletedItems = new HashMap<Integer, TestSuiteItem>(); for (TestSuiteItem item : references) { int idx = suiteCopy.getTestSuite().getItems().indexOf(item); deletedItems.put(idx, item); } try { TestSuite suiteNamedElement = (TestSuite) suiteCopy .getModifiedNamedElement(); for (TestSuiteItem item : references) { suiteNamedElement.getItems().remove(item); } suiteCopy.commitWorkingCopy(true, new NullProgressMonitor()); } finally { suiteCopy.discardWorkingCopy(); } return new UndoDeleteTestReferenceChange(getTestSuite(), getQ7Element(), deletedItems); } finally { pm.done(); } }
Source:
public void testCanGetConfiguredZones() { HttpRequest authenticate = HttpRequest.builder().method("POST") .endpoint("<LINK_0>") .addHeader("Accept", "application/json") .payload(payloadFromStringWithContentType( "{\"auth\":{\"passwordCredentials\":{\"username\":\"myUsername\", \"password\":\"myPassword\"}, \"tenantName\":\"myTenantName\"}}" , "application/json")).build(); HttpResponse authenticationResponse = HttpResponse.builder() .statusCode(200) .payload(payloadFromResourceWithContentType("/access_hpcloud.json", "application/json")) .build(); CinderApi whenNovaRegionExists = requestSendsResponse(authenticate, authenticationResponse); assertEquals(whenNovaRegionExists.getConfiguredZones(), ImmutableSet.of("region-a.geo-1", "region-b.geo-1")); }

Target:
public void testCanGetConfiguredZones() { HttpRequest authenticate = HttpRequest.builder().method("POST") .endpoint("<LINK_0>") .addHeader("Accept", "application/json") .payload(payloadFromResourceWithContentType("/auth_post_req.json", "application/json")) .build(); HttpResponse authenticationResponse = HttpResponse.builder() .statusCode(200) .payload(payloadFromResourceWithContentType("/access_hpcloud.json", "application/json")) .build(); CinderApi whenNovaRegionExists = requestSendsResponse(authenticate, authenticationResponse); assertEquals(whenNovaRegionExists.getConfiguredZones(), ImmutableSet.of("region-a.geo-1", "region-b.geo-1")); }
Source:
public PayloadSlice(Payload payload, ContentRange range, int part) { this.payload = checkNotNull(payload, "payload"); this.range = checkNotNull(range, "range"); this.part = part; }

Target:
public PayloadSlice(Payload payload, ContentRange range, int part) { this.payload = checkNotNull(payload, "payload"); this.range = checkNotNull(range, "range"); checkArgument(part >= 0, "The part number cannot be negative"); this.part = part; }
Source:
public static void setSharedIndexLocation(String value, Class<?> clazz) { if (clazz != null && "org.eclipse.jdt.core.tests.model.JavaIndexTests".equals(clazz.getName())) { SHARED_INDEX_LOCATION = value; } }

Target:
public static void setSharedIndexLocation(String value, Class<?> clazz) throws IllegalArgumentException{ if (clazz != null && "org.eclipse.jdt.core.tests.model.JavaIndexTests".equals(clazz.getName())) { SHARED_INDEX_LOCATION = value; } else { throw new IllegalArgumentException("Cannot set index location for specified test class"); } }
Source:
private void maintainDepth(JsonToken currentToken) { if (currentToken == JsonToken.START_ARRAY || currentToken == JsonToken.START_OBJECT) { depth++; } if (currentToken == JsonToken.END_ARRAY || currentToken == JsonToken.END_OBJECT) { depth--; } }

Target:
private void maintainDepth(JsonToken currentToken) { switch(currentToken) { case START_OBJECT: case START_ARRAY: depth++; break; case END_OBJECT: case END_ARRAY: depth--; break; } }
Source:
public void testExceptionSuppression() throws Exception { Cache<String, String> cache1 = cache(0, CACHE_NAME); Cache<String, String> cache2 = cache(1, CACHE_NAME); assert cache1.getAdvancedCache().addInterceptorBefore(new CommandInterceptor() { @Override public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable { throw new RuntimeException("Barf!"); } @Override public Object visitRemoveCommand(InvocationContext ctx, RemoveCommand command) throws Throwable { throw new RuntimeException("Barf!"); } }, CallInterceptor.class); try { cache1.put(key, value); fail("Should have barfed"); } catch (RuntimeException re) { } try { cache1.remove(key); fail("Should have barfed"); } catch (RuntimeException re) { } assertNull("Should have cleaned up", cache1.get(key)); assertNull("Should have cleaned up", cache1.getAdvancedCache().getDataContainer().get(key)); assertNull("Should have cleaned up", cache2.get(key)); assertNull("Should have cleaned up", cache2.getAdvancedCache().getDataContainer().get(key)); cache1.putForExternalRead(key, value); }

Target:
public void testExceptionSuppression() throws Exception { Cache<String, String> cache1 = cache(0, CACHE_NAME); Cache<String, String> cache2 = cache(1, CACHE_NAME); assertTrue(cache1.getAdvancedCache().getSequentialInterceptorChain().addInterceptorBefore(new BaseSequentialInterceptor() { @Override public CompletableFuture<Void> visitCommand(InvocationContext ctx, VisitableCommand command) throws Throwable { if (command instanceof PutKeyValueCommand || command instanceof RemoveCommand) { throw new RuntimeException("Barf!"); } return ctx.continueInvocation(); } }, CallInterceptor.class)); try { cache1.put(key, value); fail("Should have barfed"); } catch (RuntimeException re) { } try { cache1.remove(key); fail("Should have barfed"); } catch (RuntimeException re) { } assertNull("Should have cleaned up", cache1.get(key)); assertNull("Should have cleaned up", cache1.getAdvancedCache().getDataContainer().get(key)); assertNull("Should have cleaned up", cache2.get(key)); assertNull("Should have cleaned up", cache2.getAdvancedCache().getDataContainer().get(key)); cache1.putForExternalRead(key, value); }
Source:
public static URLClassLoader loadLegacyJar() throws MalformedURLException { return new URLClassLoader(new URL[] {Common.MA_HOME_PATH.resolve("libs/h2-1.4.196.jar").toUri().toURL()}); }

Target:
public static URLClassLoader loadLegacyJar() throws MalformedURLException { return new URLClassLoader(new URL[] {Common.MA_HOME_PATH.resolve("boot/h2-1.4.196.jar").toUri().toURL()}); }
Source:
public static <T> GenericMapMapper<T> getMapperForValueType(Class<T> valueType, ConfigRegistry config) { return config.get(ColumnMappers.class) .findFor(valueType) .map(GenericMapMapper::new) .orElseThrow(() -> new RuntimeException("no column mapper found for type " + valueType)); }

Target:
public static <T> RowMapper<Map<String, T>> getMapperForValueType(Class<T> valueType, ConfigRegistry config) { return config.get(ColumnMappers.class) .findFor(valueType) .map(GenericMapMapper::new) .orElseThrow(() -> new RuntimeException("no column mapper found for type " + valueType)); }
Source:
private void testSanitization() throws IOException { ______TS("Test sanitization for edit page"); instructorId = testData.accounts.get("instructor1OfTestingSanitizationCourse").googleId; FeedbackSessionAttributes session = testData.feedbackSessions.get("session1InTestingSanitizationCourse"); courseId = session.getCourseId(); feedbackSessionName = session.getFeedbackSessionName(); feedbackEditPage = getFeedbackEditPage(); feedbackEditPage.verifyHtmlMainContent("instructorFeedbackEditPageTestingSanitization.html"); ______TS("Test sanitization for copy question modal"); feedbackEditPage.clickCopyButton(); feedbackEditPage.waitForCopyTableToLoad(); feedbackEditPage.verifyHtmlPart(By.id("copyModal"), "/instructorFeedbackCopyQuestionModalTestingSanitization.html"); }

Target:
private void testSanitization() throws IOException { ______TS("Test sanitization for edit page"); instructorId = testData.accounts.get("instructor1OfTestingSanitizationCourse").googleId; FeedbackSessionAttributes session = testData.feedbackSessions.get("session1InTestingSanitizationCourse"); courseId = session.getCourseId(); feedbackSessionName = session.getFeedbackSessionName(); feedbackEditPage = getFeedbackEditPage(); feedbackEditPage.verifyHtmlMainContent("/instructorFeedbackEditPageTestingSanitization.html"); ______TS("Test sanitization for copy question modal"); feedbackEditPage.clickCopyButton(); feedbackEditPage.waitForCopyTableToLoad(); feedbackEditPage.verifyHtmlPart(By.id("copyModal"), "/instructorFeedbackCopyQuestionModalTestingSanitization.html"); }
Source:
protected void done() { try { get(); } catch (InterruptedException | ExecutionException ex) { domainWrapper.setThumnail(null); logger.log(Level.WARNING, "Document Worker Exception", ex); } catch (CancellationException ignored) { domainWrapper.setThumnail(null); } documentPreviewViewer.repaint(); }

Target:
protected void done() { try { get(); } catch (InterruptedException | ExecutionException ex) { domainWrapper.setThumbnail(null); logger.log(Level.WARNING, "Document Worker Exception", ex); } catch (CancellationException ignored) { domainWrapper.setThumbnail(null); } domainSummaryViewer.repaint(); }