auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public PooledConnection borrowConnection(ServerLocation server, long acquireTimeout, boolean onlyUseExistingCnx) throws AllConnectionsInUseException, NoAvailableServersException, ServerConnectivityException { PooledConnection connection; logger.trace("Connection borrowConnection single hop connection"); long waitStart = NOT_WAITING; try { long timeout = System.nanoTime() + MILLISECONDS.toNanos(acquireTimeout); while (true) { connection = availableConnectionManager.useFirst((c) -> c.getServer().equals(server)); if (null != connection) { return connection; } if (connectionAccounting.tryCreate()) { try { connection = createPooledConnection(server); if (null != connection) { return connection; } throw new NoAvailableServersException(); } finally { if (connection == null) { connectionAccounting.cancelTryCreate(); if (connectionAccounting.isUnderMinimum()) { startBackgroundPrefill(); } } } } if (checkShutdownInterruptedOrTimeout(timeout)) { break; } if (!onlyUseExistingCnx) { connection = forceCreateConnection(server); if (null != connection) { return connection; } throw new ServerConnectivityException(BORROW_CONN_ERROR_MSG + server); } waitStart = beginConnectionWaitStatIfNotStarted(waitStart); <START> Thread.yield(); <END> } } finally { endConnectionWaitStatIfStarted(waitStart); } cancelCriterion.checkCancelInProgress(null); throw new AllConnectionsInUseException(); }</code><technical_language>Do need this? java doc for "yield" says, rarely for testing debugging</technical_language>

Target:
public PooledConnection borrowConnection(ServerLocation server, long acquireTimeout, boolean onlyUseExistingCnx) throws AllConnectionsInUseException, NoAvailableServersException, ServerConnectivityException { PooledConnection connection; logger.trace("Connection borrowConnection single hop connection"); long waitStart = NOT_WAITING; try { long timeout = System.nanoTime() + MILLISECONDS.toNanos(acquireTimeout); while (true) { connection = availableConnectionManager.useFirst((c) -> c.getServer().equals(server)); if (null != connection) { return connection; } if (connectionAccounting.tryCreate()) { try { connection = createPooledConnection(server); if (null != connection) { return connection; } throw new NoAvailableServersException(); } finally { if (connection == null) { connectionAccounting.cancelTryCreate(); if (connectionAccounting.isUnderMinimum()) { startBackgroundPrefill(); } } } } if (!onlyUseExistingCnx) { connection = forceCreateConnection(server); if (null != connection) { return connection; } throw new ServerConnectivityException(BORROW_CONN_ERROR_MSG + server); } if (checkShutdownInterruptedOrTimeout(timeout)) { break; } waitStart = beginConnectionWaitStatIfNotStarted(waitStart); Thread.yield(); } } finally { endConnectionWaitStatIfStarted(waitStart); } cancelCriterion.checkCancelInProgress(null); throw new AllConnectionsInUseException(); }
Source:
<code>public Iterable<String> getEdgeIds(Direction direction, String label, Authorizations authorizations) { <START> getFetchHints().validateHasEdgeFetchHints(direction); <END> return getEdgeIdsWithOtherVertexId(null, direction, labelToArrayOrNull(label), authorizations); }</code><technical_language>checking label</technical_language>

Target:
public Iterable<String> getEdgeIds(Direction direction, String label, Authorizations authorizations) { getFetchHints().validateHasEdgeFetchHints(direction, label); return getEdgeIdsWithOtherVertexId(null, direction, labelToArrayOrNull(label), authorizations); }
Source:
<code>public void stop(BundleContext context) throws Exception { for(IServer liveReloadServer : WSTUtils.findLiveReloadServers()) { <START> WSTUtils.stop(liveReloadServer, 30, TimeUnit.SECONDS); <END> } plugin = null; super.stop(context); }</code><technical_language>throw exceptions ? guarded prevent stop</technical_language>

Target:
public void stop(BundleContext context) throws Exception { for (IServer liveReloadServer : WSTUtils.findLiveReloadServers()) { try { WSTUtils.stop(liveReloadServer, 10, TimeUnit.SECONDS); } catch (TimeoutException e) { Logger.error("Failed to stop '" + liveReloadServer.getName() + "' within expected duration.", e); } catch (RuntimeException e) { Logger.error("Failed to stop '" + liveReloadServer.getName() + "'", e); } } plugin = null; super.stop(context); }
Source:
<code>public DistStageAck executeOnSlave() { if (backupValueGeneratorClass != null) { backupValueGenerator = Utils.instantiateAndInit(slaveState.getClassLoader(), backupValueGeneratorClass, backupValueGeneratorParam); backupCacheValueChecker = new BackupCacheValueChecker(); int numBackups = backupCaches.size(); backupCacheInstances = new BasicOperations.Cache[numBackups]; if (debugable != null) { backupDebugable = new Debugable.Cache[numBackups]; } for (int i = 0; i < backupCaches.size(); i++) { String cacheName = backupCaches.get(i); backupCacheInstances[i] = basicOperations.getCache(cacheName); if (debugable != null) { backupDebugable[i] = debugable.getCache(cacheName); } } <START> backupCacheValueChecker = new BackupCacheValueChecker(); <END> } valueGenerator = getValueGenerator(); if (valueGenerator == null) { throw new IllegalStateException("Value generator has not been specified"); } mainCacheValueChecker = new MainCacheValueChecker(); return super.executeOnSlave(); }</code><technical_language>this duplicates line 45</technical_language>

Target:
public DistStageAck executeOnSlave() { if (backupValueGeneratorClass != null) { backupValueGenerator = Utils.instantiateAndInit(slaveState.getClassLoader(), backupValueGeneratorClass, backupValueGeneratorParam); backupCacheValueChecker = new BackupCacheValueChecker(); int numBackups = backupCaches.size(); backupCacheInstances = new BasicOperations.Cache[numBackups]; if (debugable != null) { backupDebugable = new Debugable.Cache[numBackups]; } for (int i = 0; i < backupCaches.size(); i++) { String cacheName = backupCaches.get(i); backupCacheInstances[i] = basicOperations.getCache(cacheName); if (debugable != null) { backupDebugable[i] = debugable.getCache(cacheName); } } } valueGenerator = getValueGenerator(); if (valueGenerator == null) { throw new IllegalStateException("Value generator has not been specified"); } mainCacheValueChecker = new MainCacheValueChecker(); return super.executeOnSlave(); }
Source:
<code>public void testMapInvalidEnumValue() throws SQLException { Handle h = db.openHandle(); h.createStatement("insert into something (id, name) values (1, 'joe')").execute(); try { h.createQuery("select * from something order by id") .mapToBean(SomethingElse.class) .findFirst(); fail("Expected IllegalArgumentException was not thrown"); } catch (IllegalArgumentException e) { <START> assertThat(e).isNotNull(); <END> } }</code><technical_language>Redundant assertion</technical_language>

Target:
public void testMapInvalidEnumValue() throws SQLException { Handle h = db.openHandle(); h.createStatement("insert into something (id, name) values (1, 'joe')").execute(); h.createQuery("select * from something order by id") .mapToBean(SomethingElse.class) .findFirst(); }
Source:
<code>protected void onMethodInvocationFound(MethodInvocationTree subjectMit) { <START> List<MethodInvocationTree> predicates = new ArrayList<>(); Optional<MethodInvocationTree> nextPredicate = MethodTreeUtils.subsequentMethodInvocation(subjectMit, ASSERTION_PREDICATES); <END> while (nextPredicate.isPresent()) { predicates.add(nextPredicate.get()); nextPredicate = MethodTreeUtils.subsequentMethodInvocation(nextPredicate.get(), ASSERTION_PREDICATES); } boolean wasIssueRaised = checkPredicatesForSimplification( predicates, CONTEXT_FREE_SIMPLIFIERS, SimplifierWithoutContext::simplify, (predicate, replacement) -> reportIssue(ExpressionUtils.methodName(predicate), String.format("Use %s instead", replacement))); if (wasIssueRaised || predicates.size() > 1) { return; } checkPredicatesForSimplification( predicates, SIMPLIFIERS_WITH_CONTEXT, (simplifier, predicate) -> simplifier.simplify(subjectMit, predicate), (predicate, replacement) -> reportIssue(ExpressionUtils.methodName(predicate), String.format("Use %s instead", replacement), Collections.singletonList( new JavaFileScannerContext.Location("", subjectMit)), null)); }</code><technical_language>subsequentMethodInvocation bypasses methods do match ASSERTION_PREDICATES. ASSERTION_PREDICATES matches method ofSubTypes(ABSTRACT_ASSERT). some methods this subtype this rule proposed simplification wrong in cases. safer collect methods follow assertThat consecutiveMethodInvocation filter: keeping methods matching: ofSubTypes(ABSTRACT_ASSERT).names("as", "describedAs", "withFailMessage", "overridingErrorMessage") instead of keeping methods matching: ofSubTypes(ABSTRACT_ASSERT).names(name -> !ASSERTION_MESSAGE_NAMES.contains(name))</technical_language>

Target:
protected void onMethodInvocationFound(MethodInvocationTree subjectMit) { List<MethodInvocationTree> predicates = new ArrayList<>(); Optional<MethodInvocationTree> nextPredicateOpt = MethodTreeUtils.consecutiveMethodInvocation(subjectMit); while (nextPredicateOpt.isPresent()) { MethodInvocationTree nextPredicate = nextPredicateOpt.get(); if (!ASSERTION_MESSAGE_METHODS.matches(nextPredicate)) { predicates.add(nextPredicate); } nextPredicateOpt = MethodTreeUtils.consecutiveMethodInvocation(nextPredicate); } boolean wasIssueRaised = checkPredicatesForSimplification( predicates, CONTEXT_FREE_SIMPLIFIERS, SimplifierWithoutContext::simplify, (predicate, replacement) -> reportIssue(ExpressionUtils.methodName(predicate), String.format(ISSUE_MESSAGE_FORMAT_STRING, replacement))); if (wasIssueRaised || predicates.size() > 1) { return; } checkPredicatesForSimplification( predicates, SIMPLIFIERS_WITH_CONTEXT, (simplifier, predicate) -> simplifier.simplify(subjectMit, predicate), (predicate, replacement) -> reportIssue(ExpressionUtils.methodName(predicate), String.format(ISSUE_MESSAGE_FORMAT_STRING, replacement), Collections.singletonList( new JavaFileScannerContext.Location("This can be simplified", subjectMit.arguments().get(0))), null)); }
Source:
<code>String getLabel() { <START> return "Conflicting"; END> }</code><technical_language>label externalized</technical_language>

Target:
String getLabel() { return UIText.ConflictingNode_Label; }
Source:
<code>private PersistedCommandContext buildPersistedCommandContext() { PersistedCommandContext persistedCommandContext = new PersistedCommandContext(); persistedCommandContext.setJobId(getExecutionContext() == null || getExecutionContext().getJob() == null ? <START> Guid.Empty : <END> getExecutionContext().getJob().getId()); persistedCommandContext.setStepId(getExecutionContext() == null || getExecutionContext().getStep() == null ? Guid.Empty : getExecutionContext().getStep().getId()); persistedCommandContext.setExecutionMethod(getExecutionContext() == null ? ExecutionContext.ExecutionMethod.AsStep.toString() : getExecutionContext().getExecutionMethod().toString()); if (getExecutionContext() != null) { persistedCommandContext.setCompleted(getExecutionContext().isCompleted()); persistedCommandContext.setJobRequired(getExecutionContext().isJobRequired()); persistedCommandContext.setMonitored(getExecutionContext().isMonitored()); persistedCommandContext.setShouldEndJob(getExecutionContext().shouldEndJob()); persistedCommandContext.setTasksMonitored(getExecutionContext().isTasksMonitored()); } return persistedCommandContext; }</code><technical_language>empty guid null</technical_language>

Target:
private PersistedCommandContext buildPersistedCommandContext() { PersistedCommandContext persistedCommandContext = new PersistedCommandContext(); persistedCommandContext.setJobId(getExecutionContext() == null || getExecutionContext().getJob() == null ? null : getExecutionContext().getJob().getId()); persistedCommandContext.setStepId(getExecutionContext() == null || getExecutionContext().getStep() == null ? null : getExecutionContext().getStep().getId()); persistedCommandContext.setExecutionMethod(getExecutionContext() == null ? ExecutionMethod.AsStep : getExecutionContext().getExecutionMethod()); if (getExecutionContext() != null) { persistedCommandContext.setCompleted(getExecutionContext().isCompleted()); persistedCommandContext.setJobRequired(getExecutionContext().isJobRequired()); persistedCommandContext.setMonitored(getExecutionContext().isMonitored()); persistedCommandContext.setShouldEndJob(getExecutionContext().shouldEndJob()); persistedCommandContext.setTasksMonitored(getExecutionContext().isTasksMonitored()); } return persistedCommandContext; }
Source:
<code>protected Object getResult(String executionId) { if (isAsync(executionId)) { AsyncService service = getAsyncService(executionId); if (service != null) { Serializable taskId = getTransientStore().getParameter(executionId, TRANSIENT_STORE_TASK_ID); return service.getResult(taskId); } } Object output; <START> List<Blob> blobs = getTransientStore().getBlobs(executionId); <END> if (CollectionUtils.isNotEmpty(blobs)) { boolean isSingle = (boolean) getTransientStore().getParameter(executionId, TRANSIENT_STORE_OUTPUT_BLOB); output = isSingle ? blobs.get(0) : new BlobList(blobs); } else { output = getTransientStore().getParameter(executionId, TRANSIENT_STORE_OUTPUT); } if (output instanceof DocumentModel) { return attach((DocumentModel) output); } else if (output instanceof DocumentModelList) { return new DocumentModelListImpl( ((DocumentModelList) output).stream().map(this::attach).collect(Collectors.toList())); } return output; }</code><technical_language>Put getTransientStore() in a local variable</technical_language>

Target:
protected Object getResult(String executionId) { TransientStore ts = getTransientStore(); if (isAsync(executionId)) { AsyncService service = getAsyncService(executionId); if (service != null) { Serializable taskId = ts.getParameter(executionId, TRANSIENT_STORE_TASK_ID); return service.getResult(taskId); } } Object output; List<Blob> blobs = ts.getBlobs(executionId); if (CollectionUtils.isNotEmpty(blobs)) { boolean isSingle = (boolean) ts.getParameter(executionId, TRANSIENT_STORE_OUTPUT_BLOB); output = isSingle ? blobs.get(0) : new BlobList(blobs); } else { output = ts.getParameter(executionId, TRANSIENT_STORE_OUTPUT); } if (output instanceof DocumentModel) { attach((DocumentModel) output); } else if (output instanceof DocumentModelList) { ((DocumentModelList) output).forEach(this::attach); } return output; }
Source:
<code>public static boolean fitsIntoType(ICPPBasicType target, ICPPBasicType source, IASTNode point) { if (target.getKind() == Kind.eBoolean && source.getKind() != Kind.eBoolean) return false; if (!source.isUnsigned() && target.isUnsigned()) return false; SizeAndAlignment sourceSizeAndAlignment = SizeofCalculator.getSizeAndAlignment(source, point); SizeAndAlignment targetSizeAndAlignment = SizeofCalculator.getSizeAndAlignment(target, point); if (sourceSizeAndAlignment == null || targetSizeAndAlignment == null) <START> return true; END> long sizeofSource = sourceSizeAndAlignment.size; long sizeofTarget = targetSizeAndAlignment.size; if (sizeofSource == sizeofTarget) return target.isUnsigned() == source.isUnsigned(); else return sizeofSource < sizeofTarget; }</code><technical_language>Sizes if CDT is a compiler other GCC. In situations this for fact some of conversions narrowing, for example char32_t char16_t. Some other conversions narrowing in environments, for example, int char</technical_language>

Target:
public static boolean fitsIntoType(ICPPBasicType target, ICPPBasicType source, IASTNode point) { if (target.getKind() == Kind.eBoolean && source.getKind() != Kind.eBoolean) return false; if (!source.isUnsigned() && target.isUnsigned()) return false; SizeAndAlignment sourceSizeAndAlignment = SizeofCalculator.getSizeAndAlignment(source, point); SizeAndAlignment targetSizeAndAlignment = SizeofCalculator.getSizeAndAlignment(target, point); long sizeofSource = sourceSizeAndAlignment == null ? getApproximateSize(source) : sourceSizeAndAlignment.size; long sizeofTarget = targetSizeAndAlignment == null ? getApproximateSize(target) : targetSizeAndAlignment.size; if (sizeofSource == sizeofTarget) return target.isUnsigned() == source.isUnsigned(); else return sizeofSource < sizeofTarget; }
Source:
<code>private static Collection<Profile> loadProfiles(final URI uri) { final Collection<Profile> profiles = new HashSet<>(); final ResourceSet resourceSet = new ResourceSetImpl(); try { final Resource resource = resourceSet.getResource(uri, true); if <START> (resource != <END> null) { if (!resource.getContents().isEmpty()) { final Iterator<EObject> contentIt = resource.getAllContents(); while (contentIt.hasNext()) { final EObject content = contentIt.next(); if (content instanceof Profile) { profiles.add((Profile) content); } } } } } catch (final Exception ex) { Activator.log.error("Cannot load file: " + uri.toString(), ex); } return profiles; }</code><technical_language>I inverted check unnecessary</technical_language>

Target:
private static Collection<Profile> loadProfiles(final URI uri) { final Collection<Profile> profiles = new HashSet<>(); final ResourceSet resourceSet = new ResourceSetImpl(); try { final Resource resource = resourceSet.getResource(uri, true); if (null != resource) { if (!resource.getContents().isEmpty()) { final Iterator<EObject> contentIt = resource.getAllContents(); while (contentIt.hasNext()) { final EObject content = contentIt.next(); if (content instanceof Profile) { profiles.add((Profile) content); } } } } } catch (final Exception ex) { Activator.log.error("Cannot load file: " + uri.toString(), ex); } return profiles; }
Source:
<code>public void testUrlFetch() throws Exception { Path testFilePath = Paths.get(UrlFetchTest.class.getProtectionDomain().getCodeSource().getLocation().getPath() + "/testdata.json"); UrlFetchRealtimeSourceConfig config = new UrlFetchRealtimeSourceConfig( testFilePath.toUri().toString(), 1L ); UrlFetchRealtimeSource source = new UrlFetchRealtimeSource(config); source.initialize(new MockRealtimeContext()); MockEmitter<StructuredRecord> emitter = new MockEmitter<>(); SourceState state = new SourceState(); source.poll(emitter, state); Assert.assertEquals(1, emitter.getEmitted().size()); StructuredRecord urlData = emitter.getEmitted().get(0); <START> Assert.assertNotNull(urlData); <END> Assert.assertNotNull(urlData.get("url")); Assert.assertNotNull(urlData.get("body")); }</code><technical_language>assert actual contents instead of asserting null</technical_language>

Target:
public void testUrlFetch() throws Exception { UrlFetchRealtimeSourceConfig config = new UrlFetchRealtimeSourceConfig( String.format("http://%s:%s/ping", service.getBindAddress().getHostName(), service.getBindAddress().getPort()), 1L); UrlFetchRealtimeSource source = new UrlFetchRealtimeSource(config); source.initialize(new MockRealtimeContext()); MockEmitter<StructuredRecord> emitter = new MockEmitter<>(); SourceState state = new SourceState(); source.poll(emitter, state); Assert.assertEquals(1, emitter.getEmitted().size()); StructuredRecord urlData = emitter.getEmitted().get(0); Assert.assertNotNull(urlData); Assert.assertNotNull(urlData.get("url")); Assert.assertEquals("http://localhost:7777/ping", urlData.get("url")); Assert.assertNotNull(urlData.get("body")); Assert.assertEquals("OK", urlData.get("body")); Assert.assertNotNull(urlData.get("headers")); Assert.assertEquals("2", ((Map) urlData.get("headers")).get("Content-Length")); Assert.assertNotNull(urlData.get("responseCode")); Assert.assertEquals(200, urlData.get("responseCode")); }
Source:
<code>void cancelTask() { LOGGER.log(Level.WARNING, "AddLogicalImageTask cancelled, processing may be incomplete"); cancelled = true; if (addMultipleImageTask != null) { addMultipleImageTask.cancelTask(); } <START> if (!createVHD && !addingInterestingFiles) { <END> deleteDestinationDirectory(); } }</code><technical_language>need volatile</technical_language>

Target:
void cancelTask() { LOGGER.log(Level.WARNING, "AddLogicalImageTask cancelled, processing may be incomplete"); synchronized (addMultipleImagesLock) { cancelled = true; if (addMultipleImagesTask != null) { addMultipleImagesTask.cancelTask(); } } }
Source:
<code>protected Control createContents(Composite parent) { final Composite composite = createComposite(parent); <START> System.out.println(composite.getBackground()); <END> createAutoSaveCheckbox(composite); createAutoSaveGroup(composite); createIntervalPart(); createMessagesPart(); return composite; }</code><technical_language>Please remove debug/log lines</technical_language>

Target:
protected Control createContents(Composite parent) { final Composite composite = createComposite(parent); createAutoSaveCheckbox(composite); createAutoSaveGroup(composite); createIntervalPart(); createMessagesPart(); return composite; }
Source:
<code>private boolean containsComment(GHPullRequest ghPullRequest, String expectedBody) { List<GHIssueComment> prComments = null; try { prComments = ghPullRequest.getComments(); } catch (IOException e) { logger.log(Level.WARNING, "Failed to get comments for PR " + ghPullRequest, e); return false; } for (GHIssueComment comment : prComments) { <START> if (comment.getBody() != null && comment.getBody().contains(expectedBody)) { <END> return true; } } return false; }</code><technical_language>i contains is for. body match expected content, no</technical_language>

Target:
private boolean containsComment(GHPullRequest ghPullRequest, String expectedBody) { List<GHIssueComment> prComments; try { prComments = ghPullRequest.getComments(); } catch (IOException e) { LOGGER.log(Level.WARNING, "Failed to get comments for PR " + ghPullRequest, e); return false; } for (GHIssueComment comment : prComments) { if (comment.getBody() != null && comment.getBody().equals(expectedBody)) { return true; } } return false; }
Source:
<code><START> public FactoryBuilder injectFormats(Span.Kind kind, Format format1, Format format2) { <END> if (kind == null) throw new NullPointerException("kind == null"); if (format1 == null) throw new NullPointerException("format1 == null"); if (format2 == null) throw new NullPointerException("format2 == null"); kindToInjectFormats.put(kind, new Format[] {format1, format2}); return this; }</code><technical_language>this check format1 format2 SINGLE SINGLE_NO_PARENT</technical_language>

Target:
public FactoryBuilder injectFormats(Span.Kind kind, Format format1, Format format2) { if (kind == null) throw new NullPointerException("kind == null"); if (format1 == null) throw new NullPointerException("format1 == null"); if (format2 == null) throw new NullPointerException("format2 == null"); if (format1.equals(format2)) throw new IllegalArgumentException("format1 == format2"); if (!format1.equals(Format.MULTI) && !format2.equals(Format.MULTI)) { throw new IllegalArgumentException("One argument must be Format.MULTI"); } kindToInjectFormats.put(kind, new Format[] {format1, format2}); return this; }
Source:
<code><START> for (String lib : bootPath) { <END> if (lib.endsWith("rt.jar")) { File f = new File(lib); try { RT_JAR = f.toURI().toURL(); } catch (MalformedURLException e) { throw new RuntimeException("The java.lang classes cannot be loaded", e.getCause()); } } }</code><technical_language>File.pathSeparator</technical_language>

Target:
for (String lib : bootPath) { if (lib.endsWith("rt.jar")) { File f = new File(lib); try { foundJar = f.toURI().toURL(); } catch (MalformedURLException e) { throw new RuntimeException("The java.lang classes cannot be loaded", e.getCause()); } } }
Source:
<code>public ConcurrentMap<String, Object> deserializeAttributes(final byte[] data ) { final Kryo kryo = _kryoPool.borrow(); Input in = null; try { in = kryo.getStreamFactory().getInput(data); return kryo.readObject(in, ConcurrentHashMap.class); } catch ( final RuntimeException e ) { throw new TranscoderDeserializationException( e ); } finally { <START> IOUtils.closeQuietly(in); <END> kryo.reset(); _kryoPool.release(kryo); } }</code><technical_language>prefer closeQuietly pull in commons-io for this</technical_language>

Target:
public ConcurrentMap<String, Object> deserializeAttributes(final byte[] data ) { final Kryo kryo = _kryoPool.borrow(); Input in = null; try { in = kryo.getStreamFactory().getInput(data); return kryo.readObject(in, ConcurrentHashMap.class); } catch ( final RuntimeException e ) { throw new TranscoderDeserializationException( e ); } finally { closeSilently(in); kryo.reset(); _kryoPool.release(kryo); } }
Source:
<code>public void keySmallerThanTotalSize() { try { new ArrayGroupSort(3, 2); fail("should have failed"); <START> } catch (IllegalArgumentException e) { <END> } }</code><technical_language>Nit: This put in @Test(expected=IllegalArgumentException.class) for checks</technical_language>

Target:
public void keySmallerThanTotalSize() { new ArrayGroupSort(3, 2); }
Source:
<code>public String toString() { <START> return "Script " + this.name + " from version " + from + " to " + to; <END> }</code><technical_language>null. suggestion return "Script " + this.name + (from != null ? " version " + : "") + (to != null ? " " + : "");</technical_language>

Target:
public String toString() { return from != null && to != null ? "Script " + this.name + " from version " + from + " to " + to : "Script " + this.name; }
Source:
<code>public void updateCookiesFromResponse(final HttpURLConnection conn) throws URISyntaxException, DolphinRemotingException { LOG.debug("adding cookies from response to cookie store"); Map<String, List<String>> headerFields = conn.getHeaderFields(); List<String> cookiesHeader = headerFields.get(PlatformConstants.SET_COOKIE_HEADER); if (cookiesHeader != null) { LOG.debug("found '{}' header field", PlatformConstants.SET_COOKIE_HEADER); for (String cookie : cookiesHeader) { if (cookie == null || cookie.isEmpty()) { continue; } <START> LOG.debug("**************** will parse '{}' ", cookie); <END> System.out.println("**************** will parse cookie : " + cookie); LOG.debug("will parse '{}' header content '{}'", cookie); List<HttpCookie> cookies = new ArrayList<>(); try { cookies.addAll(HttpCookie.parse(cookie)); } catch (Exception e) { throw new DolphinRemotingException("Can not convert '" + PlatformConstants.SET_COOKIE_HEADER + "' response header field to http cookies. Bad content: " + cookie); } LOG.debug("Found http cookies in header", cookies.size()); for (HttpCookie httpCookie : cookies) { cookieStore.add(conn.getURL().toURI(), httpCookie); } } } }</code><technical_language>please remove this addition logging lines</technical_language>

Target:
public void updateCookiesFromResponse(final HttpURLConnection conn) throws URISyntaxException, DolphinRemotingException { LOG.debug("adding cookies from response to cookie store"); Map<String, List<String>> headerFields = conn.getHeaderFields(); List<String> cookiesHeader = headerFields.get(PlatformConstants.SET_COOKIE_HEADER); if (cookiesHeader != null) { LOG.debug("found '{}' header field", PlatformConstants.SET_COOKIE_HEADER); for (String cookie : cookiesHeader) { if (cookie == null || cookie.isEmpty()) { continue; } LOG.debug("will parse '{}' header content '{}'", cookie); List<HttpCookie> cookies = new ArrayList<>(); try { cookies.addAll(HttpCookie.parse(cookie)); } catch (Exception e) { throw new DolphinRemotingException("Can not convert '" + PlatformConstants.SET_COOKIE_HEADER + "' response header field to http cookies. Bad content: " + cookie); } LOG.debug("Found http cookies in header", cookies.size()); for (HttpCookie httpCookie : cookies) { cookieStore.add(conn.getURL().toURI(), httpCookie); } } } }
Source:
<code>public void init(PE exe) throws IOException { isLE = true; SectionHeader[] sections = exe.getSectionHeaders(); for (int i = 0; i < sections.length; i++) { String name = new String(sections[i].s_name).trim(); if (name.startsWith("/")) { int stringTableOffset = Integer.parseInt(name.substring(1)); name = exe.getStringTableEntry(stringTableOffset); } for (String element : Dwarf.DWARF_SCNNAMES) { if (name.equals(element)) { try { dwarfSections.put(element, sections[i].mapSectionData()); } catch (Exception e) { CCorePlugin.log(e); } } } } <START> printEnabled = true; <END> m_parsed = false; }</code><technical_language>this set false</technical_language>

Target:
public void init(PE exe) throws IOException { isLE = true; SectionHeader[] sections = exe.getSectionHeaders(); for (int i = 0; i < sections.length; i++) { String name = new String(sections[i].s_name).trim(); if (name.startsWith("/")) { int stringTableOffset = Integer.parseInt(name.substring(1)); name = exe.getStringTableEntry(stringTableOffset); } for (String element : Dwarf.DWARF_SCNNAMES) { if (name.equals(element)) { try { dwarfSections.put(element, sections[i].mapSectionData()); } catch (Exception e) { CCorePlugin.log(e); } } } } printEnabled = false; m_parsed = false; }
Source:
<code>public void creatingTopic_ifSubscribedToBranch_shouldReceiveBranchNotification() throws Exception { Topic topic = new Topic().withBranch(NOTIFICATION_BRANCH); User user = Users.signUpAndSignIn(); Branches.subscribe(topic.getBranch()); Users.signUpAndSignIn(); Topics.createTopic(topic); <START> Users.logout(); <END> Users.signIn(user); unsubscribeIgnoringFail(Branch branch); Notifications.assertBranchNotificationSentTo(topic.getBranch(), user); }</code><technical_language>do log out? Users.signIn() log out user implicitly</technical_language>

Target:
public void creatingTopic_ifSubscribedToBranch_shouldReceiveBranchNotification() throws Exception { Topic topic = new Topic().withBranch(NOTIFICATION_BRANCH); User user = Users.signUpAndSignIn(); Branches.subscribe(topic.getBranch()); Users.signUpAndSignIn(); Topics.createTopic(topic); Users.signIn(user); unsubscribeIgnoringFail(Branch branch); Notifications.assertNotificationOnTopicNotSentBranchSent(topic, user); }
Source:
<code>public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { this.viewer = (TreeViewer) viewer; this.outlineInfo = (OutlineInfo) newInput; resource = LSPEclipseUtils.findResourceFor(outlineInfo.info.getFileUri().toString()); resource.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE); super.setIsIncrementalReconciler(false); super.setIsAllowedToModifyDocument(false); <START> super.install((ITextViewer) outlineInfo.textEditor.getAdapter(ITextOperationTarget.class)); <END> }</code><technical_language>outlineInfo.textEditor null checked</technical_language>

Target:
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { this.viewer = (TreeViewer) viewer; this.outlineInfo = (OutlineInfo) newInput; resource = LSPEclipseUtils.findResourceFor(outlineInfo.info.getFileUri().toString()); resource.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE); if (outlineStrategyUpdater != null) { outlineStrategyUpdater.uninstall(); } ITextViewer textViewer = outlineInfo.textEditor == null ? null : ((ITextViewer) outlineInfo.textEditor.getAdapter(ITextOperationTarget.class)); outlineStrategyUpdater = textViewer == null ? new DocumentChangedOutlineStrategyUpdater(outlineInfo.info.getDocument()) : new ReconcilerOutlineStrategyUpdater(textViewer); outlineStrategyUpdater.install(); }
Source:
<code>public void loadTrace(ITmfTrace trace) { super.loadTrace(trace); updateContent(); <START> clearContent(); <END> }</code><technical_language>if this change is intentional, a difference TmfCommonXLineChartViewer of of asyncExec(). updateContent() is abstract here, clearContent() called first</technical_language>

Target:
public void loadTrace(ITmfTrace trace) { super.loadTrace(trace); clearContent(); updateContent(); }
Source:
<code>public Iterable<TmfXmlLocation> getLocations() { <START> return new LinkedList<>(); <END> }</code><technical_language>Collections.EMPTY_LIST</technical_language>

Target:
public Iterable<TmfXmlLocation> getLocations() { return Collections.EMPTY_SET; }
Source:
<code>private boolean validateSnapshotDisksArePlugged() { Map<Guid, Disk> vmDisks = diskDao.getAllForVm(getVmId()) .stream() .collect(Collectors.toMap(Disk::getId, Function.identity())); String unpluggedDisks = getSourceImages() .stream() .map(DiskImage::getId) .map(vmDiskId -> vmDisks.getOrDefault(vmDiskId, diskDao.get(vmDiskId))) .filter(disk -> !disk.getPlugged()) .map(Disk::getDiskAlias) <START> .collect(Collectors.joining("\n")); <END> if (!unpluggedDisks.isEmpty()) { return validate(new ValidationResult(EngineMessage.ACTION_TYPE_FAILED_VM_SNAPSHOT_HAS_UNPLUGGED_OR_UNATTACHED_DISKS, String.format("$diskAliases %s", unpluggedDisks))); } return true; }</code><technical_language>Please System.lineSeparator()</technical_language>

Target:
private boolean validateSnapshotDisksArePlugged() { Map<Guid, Disk> vmDisks = diskDao.getAllForVm(getVmId()) .stream() .collect(Collectors.toMap(Disk::getId, Function.identity())); String unpluggedDisks = getSourceImages() .stream() .map(DiskImage::getId) .map(vmDiskId -> vmDisks.getOrDefault(vmDiskId, diskDao.get(vmDiskId))) .filter(disk -> !disk.getPlugged()) .map(Disk::getDiskAlias) .collect(Collectors.joining(System.lineSeparator())); if (!unpluggedDisks.isEmpty()) { return validate(new ValidationResult(EngineMessage.ACTION_TYPE_FAILED_VM_SNAPSHOT_HAS_UNPLUGGED_OR_UNATTACHED_DISKS, String.format("$diskAliases %s", unpluggedDisks))); } return true; }
Source:
<code>public UUID importSingleCellExperiment(String experimentAccession, boolean isPrivate) throws IOException { checkNotNull(experimentAccession); Optional<String> accessKey = fetchExperimentAccessKey(experimentAccession); CondensedSdrfParserOutput condensedSdrfParserOutput = condensedSdrfParser.parse(experimentAccession, ExperimentType.SINGLE_CELL_RNASEQ_MRNA_BASELINE); IdfParserOutput idfParserOutput = idfParser.newParse(experimentAccession); ExperimentDTO experimentDTO = ExperimentDTO.create( condensedSdrfParserOutput.getExperimentAccession(), ExperimentType.SINGLE_CELL_RNASEQ_MRNA_BASELINE, "homo sapiens", idfParserOutput.getPublications().keySet(), idfParserOutput.getTitle(), isPrivate <START> ); <END> if (accessKey.isPresent()) { deleteExperiment(experimentAccession); } analyticsLoaderFactory .getLoader(ExperimentType.SINGLE_CELL_RNASEQ_MRNA_BASELINE) .loadAnalytics(experimentAccession); UUID accessKeyUuid = accessKey.map(UUID::fromString).orElseGet(UUID::randomUUID); experimentDao.addExperiment(experimentDTO, accessKeyUuid); updateWithNewExperimentDesign(condensedSdrfParserOutput.getExperimentDesign(), experimentDTO); return accessKeyUuid; }</code><technical_language>I this</technical_language>

Target:
public UUID importSingleCellExperiment(String experimentAccession, boolean isPrivate) throws IOException { checkNotNull(experimentAccession); Optional<String> accessKey = fetchExperimentAccessKey(experimentAccession); CondensedSdrfParserOutput condensedSdrfParserOutput = condensedSdrfParser.parse(experimentAccession, ExperimentType.SINGLE_CELL_RNASEQ_MRNA_BASELINE); IdfParserOutput idfParserOutput = idfParser.parse(experimentAccession); ExperimentDTO experimentDTO = ExperimentDTO.create( condensedSdrfParserOutput, idfParserOutput, condensedSdrfParserOutput.getSpecies(), isPrivate ); if (accessKey.isPresent()) { deleteExperiment(experimentAccession); } analyticsLoaderFactory .getLoader(ExperimentType.SINGLE_CELL_RNASEQ_MRNA_BASELINE) .loadAnalytics(experimentAccession); UUID accessKeyUuid = accessKey.map(UUID::fromString).orElseGet(UUID::randomUUID); experimentDao.addExperiment(experimentDTO, accessKeyUuid); updateWithNewExperimentDesign(condensedSdrfParserOutput.getExperimentDesign(), experimentDTO); return accessKeyUuid; }
Source:
<code>protected Object decode( Channel channel, SocketAddress remoteAddress, Object msg) throws Exception { ChannelBuffer buf = (ChannelBuffer) msg; if (buf.readShort() != HEADER_KEY) { Log.warning(new IllegalArgumentException("Invalid Header")); return null; } int type = buf.readUnsignedByte(); short length = buf.readShort(); if (buf.readableBytes() != length) { Log.warning(new IllegalArgumentException("Packet length error")); return null; } index = buf.readUnsignedShort(); if (type == MSG_LOGIN) { DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, ChannelBuffers.hexDump(buf.readBytes(8)).substring(1)); if (deviceSession != null) { sendAck(channel, type, index); } return null; } else { DeviceSession deviceSession = getDeviceSession(channel, remoteAddress); if (deviceSession == null) { return null; } Position position = decodeInit(deviceSession, buf, type, index); if (type == MSG_GPS || type == MSG_ALARM || type == MSG_STATE || type == MSG_SMS) { return decodeOld(deviceSession, buf, channel, position, type, index); } else if (type == MSG_DOWNLINK) { return decodeDownlink(deviceSession, buf, channel, position, type, index); } else if (type >= MSG_NORMAL && type <= MSG_OBD_CODE) { return decodeNew(deviceSession, buf, position, type, index); } else if (type == MSG_HEARTBEAT && buf.readableBytes() >= 2) { getLastLocation(position, null); decodeStatus(position, buf.readUnsignedShort()); sendAck(channel, type, index); return position; } else { <START> Log.warning(new UnsupportedOperationException()); <END> sendAck(channel, type, index); } } return null; }</code><technical_language>log these</technical_language>

Target:
protected Object decode( Channel channel, SocketAddress remoteAddress, Object msg) throws Exception { ChannelBuffer buf = (ChannelBuffer) msg; buf.skipBytes(2); int type = buf.readUnsignedByte(); buf.readShort(); int index = buf.readUnsignedShort(); if (type != MSG_GPS && type != MSG_DATA) { sendResponse(channel, type, index); } if (type == MSG_LOGIN) { getDeviceSession(channel, remoteAddress, ChannelBuffers.hexDump(buf.readBytes(8)).substring(1)); } else { DeviceSession deviceSession = getDeviceSession(channel, remoteAddress); if (deviceSession == null) { return null; } if (type == MSG_GPS || type == MSG_ALARM || type == MSG_STATE || type == MSG_SMS) { return decodeOld(deviceSession, buf, type, index); } else if (type >= MSG_NORMAL && type <= MSG_OBD_CODE) { return decodeNew(deviceSession, buf, index); } else if (type == MSG_HEARTBEAT && buf.readableBytes() >= 2) { Position position = new Position(); position.setDeviceId(deviceSession.getDeviceId()); position.setProtocol(getProtocolName()); getLastLocation(position, null); decodeStatus(position, buf.readUnsignedShort()); return position; } } return null; }
Source:
<code>private Query buildAssignedToMeQuery() { boolean hasStatus = false; List<TaskStatus> statuses = queryCriteria.getStatuses(); if (statuses != null && !statuses.isEmpty()) { hasStatus = true; } boolean hasTaskName = false; if (!StringUtils.isEmpty(queryCriteria.getTaskName())) { hasTaskName = true; } Query assignedToMeQuery = em.createQuery(SELECT_DISTINCT_TASKS + JOIN_HUMAN_ROLES_JOIN_ORG_ENTITIES + <START> "LOWER(oe.name) = :name " + <END> AND + HR_TYPE_ROLE_TYPE + AND + T_TENANT_ID_TENANT_ID + AND + T_TYPE_TASK_TYPE + (hasTaskName ? AND + FILTER_BY_TASKNAME : "") + AND + T_STATUS_IN_TASK_STATUSES + generateOrderedByQuery()).setMaxResults(queryCriteria.getPageSize()).setFirstResult(queryCriteria .getPageSize() * queryCriteria.getPageNumber()); assignedToMeQuery.setParameter(TENANT_ID, queryCriteria.getCallerTenantId()); assignedToMeQuery.setParameter("name", queryCriteria.getCaller().toLowerCase()); assignedToMeQuery.setParameter(TASK_TYPE, TaskType.TASK); assignedToMeQuery.setParameter(ROLE_TYPE, GenericHumanRoleDAO.GenericHumanRoleType.ACTUAL_OWNER); if (hasStatus) { assignedToMeQuery.setParameter(TASK_STATUSES, statuses); } else { List<TaskStatus> statusList = Arrays.asList(TaskStatus.RESERVED, TaskStatus.IN_PROGRESS, TaskStatus.SUSPENDED); assignedToMeQuery.setParameter(TASK_STATUSES, statusList); } if (hasTaskName) { assignedToMeQuery.setParameter(TASK_NAME, queryCriteria.getTaskName()); } return assignedToMeQuery; }</code><technical_language>check LOWER(oe.name) = LOWER(:name). avoid havinf pass lowercase name in query parameter</technical_language>

Target:
private Query buildAssignedToMeQuery() { boolean hasStatus = false; List<TaskStatus> statuses = queryCriteria.getStatuses(); if (statuses != null && !statuses.isEmpty()) { hasStatus = true; } boolean hasTaskName = false; if (!StringUtils.isEmpty(queryCriteria.getTaskName())) { hasTaskName = true; } Query assignedToMeQuery = em.createQuery(SELECT_DISTINCT_TASKS + JOIN_HUMAN_ROLES_JOIN_ORG_ENTITIES + "LOWER(oe.name) = LOWER(:name) " + AND + HR_TYPE_ROLE_TYPE + AND + T_TENANT_ID_TENANT_ID + AND + T_TYPE_TASK_TYPE + (hasTaskName ? AND + FILTER_BY_TASKNAME : "") + AND + T_STATUS_IN_TASK_STATUSES + generateOrderedByQuery()).setMaxResults(queryCriteria.getPageSize()).setFirstResult(queryCriteria .getPageSize() * queryCriteria.getPageNumber()); assignedToMeQuery.setParameter(TENANT_ID, queryCriteria.getCallerTenantId()); assignedToMeQuery.setParameter("name", queryCriteria.getCaller()); assignedToMeQuery.setParameter(TASK_TYPE, TaskType.TASK); assignedToMeQuery.setParameter(ROLE_TYPE, GenericHumanRoleDAO.GenericHumanRoleType.ACTUAL_OWNER); if (hasStatus) { assignedToMeQuery.setParameter(TASK_STATUSES, statuses); } else { List<TaskStatus> statusList = Arrays.asList(TaskStatus.RESERVED, TaskStatus.IN_PROGRESS, TaskStatus.SUSPENDED); assignedToMeQuery.setParameter(TASK_STATUSES, statusList); } if (hasTaskName) { assignedToMeQuery.setParameter(TASK_NAME, queryCriteria.getTaskName()); } return assignedToMeQuery; }
Source:
<code>private void verifyForbiddenRequest() { final ArgumentCaptor<Response> responseCaptor = ArgumentCaptor.forClass(Response.class); verify(containerRequestContext).abortWith(responseCaptor.capture()); final Response response = responseCaptor.getValue(); assertThat(response.getStatus(), is(Status.UNAUTHORIZED.getStatusCode())); assertThat( response.getStatusInfo().getReasonPhrase(), StringContains.containsString("5 minutes")); <START> assertThat(response.getStatusInfo().getReasonPhrase(), StringContains.containsString(BAN_ID)); <END> }</code><technical_language>statically import methods, we</technical_language>

Target:
private void verifyForbiddenRequest() { final ArgumentCaptor<Response> responseCaptor = ArgumentCaptor.forClass(Response.class); verify(containerRequestContext).abortWith(responseCaptor.capture()); final Response response = responseCaptor.getValue(); assertThat(response.getStatus(), is(Status.UNAUTHORIZED.getStatusCode())); assertThat(response.getStatusInfo().getReasonPhrase(), containsString("5 minutes")); assertThat(response.getStatusInfo().getReasonPhrase(), containsString(BAN_ID)); }
Source:
<code>public static TaskTimer getTimer(IConfiguration config) throws Exception { TaskTimer timer = CronTimer.getCronTimer(JOBNAME, config.getBackupCronExpression()); if (timer == null) { <START> Set<Path> backupPaths = AbstractBackup.getBackupDirectories(config, SNAPSHOT_FOLDER); <END> for (Path backupDirPath : backupPaths) try (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(backupDirPath, path -> Files.isDirectory(path))) { for (Path backupDir : directoryStream) { if (isValidBackupDir(backupDir)) { FileUtils.cleanDirectory(backupDir.toFile()); } } } } return timer; }</code><technical_language>want refactor this method deletion separate getTimer</technical_language>

Target:
public static TaskTimer getTimer(IConfiguration config) throws Exception { TaskTimer timer = CronTimer.getCronTimer(JOBNAME, config.getBackupCronExpression()); if (timer == null) { cleanOldBackups(config); } return timer; }
Source:
<code>public void testFormat() { DecimalType dt1 = new DecimalType("87"); assertEquals("87", dt1.format("%d")); DecimalType dt2 = new DecimalType("87"); assertEquals(" 87", dt2.format("%3d")); DecimalType dt3 = new DecimalType("87"); assertEquals("0x57", dt3.format("%#x")); DecimalType dt4 = new DecimalType("87.5"); try { dt4.format("%x"); fail(); } catch (Exception e) { } DecimalType dt5 = new DecimalType("11.123"); <START> dt5.format("%.1f"); <END> DecimalType dt6 = new DecimalType("11"); dt6.format("%.1f"); }</code><technical_language>want add assertEquals here</technical_language>

Target:
public void testFormat() { DecimalType dt1 = new DecimalType("87"); assertEquals("87", dt1.format("%d")); DecimalType dt2 = new DecimalType("87"); assertEquals(" 87", dt2.format("%3d")); DecimalType dt3 = new DecimalType("87"); assertEquals("0x57", dt3.format("%#x")); DecimalType dt4 = new DecimalType("87.5"); try { dt4.format("%x"); fail(); } catch (Exception e) { } final char sep = (new DecimalFormatSymbols().getDecimalSeparator()); DecimalType dt5 = new DecimalType("11.123"); assertEquals("11" + sep + "1", dt5.format("%.1f")); DecimalType dt6 = new DecimalType("11"); assertEquals("11" + sep + "0", dt6.format("%.1f")); }
Source:
<code>private byte[] decrypt(final byte[] bytes) throws IOException { try { final Cipher cipher = Cipher.getInstance(ALGORITHM); final AlgorithmParameterSpec spec = <START> new IvParameterSpec(this.ivbytes); <END> cipher.init(Cipher.DECRYPT_MODE, this.secret, spec); return cipher.doFinal(bytes); } catch (final InvalidKeyException ike) { throw new IOException(ike); } catch (final NoSuchAlgorithmException nse) { throw new IOException(nse); } catch (final NoSuchPaddingException nspe) { throw new IOException(nspe); } catch (final InvalidAlgorithmParameterException iape) { throw new IOException(iape); } catch (final IllegalBlockSizeException ibse) { throw new IOException(ibse); } catch (final BadPaddingException bpe) { throw new IOException(bpe); } }</code><technical_language>@super132 init decrypt/encrypt ciphers in Ctor, need create this time</technical_language>

Target:
private byte[] decrypt(final byte[] bytes) throws IOException { try { return this.dec.doFinal(bytes); } catch (final GeneralSecurityException gse) { throw new IOException(gse); } }
Source:
<code>public void testCallsiteAnalysis() { CallsiteAnalysis module = <START> TmfTraceUtils.getAnalysisModuleOfClass(fTrace, CallsiteAnalysis.class, <END> CallsiteAnalysis.ID); assertNotNull(module); assertTrue(module.schedule().isOK()); assertTrue(module.waitForCompletion()); String uuid = String.valueOf(fTrace.getUUID()); List<@NonNull ITmfCallsite> cs = module.getCallsites(uuid, "0", 42); assertEquals(EXPECTED, cs); assertEquals(Collections.emptyList(), module.getCallsites("Hello", "0", 42)); assertEquals(Collections.emptyList(), module.getCallsites(uuid, "1", 42)); assertEquals(Collections.emptyList(), module.getCallsites(uuid, "0", 12)); assertEquals(EXPECTED, module.getCallsites(uuid, "0", 55)); assertEquals(Collections.emptyList(), module.getCallsites(uuid, "..", 42)); assertEquals(Collections.emptyList(), module.getCallsites(uuid, "..", 42)); }</code><technical_language>I a null warning. Mabye add a assertNotNull() before</technical_language>

Target:
public void testCallsiteAnalysis() { TmfXmlKernelTraceStub trace = fTrace; assertNotNull(trace); CallsiteAnalysis module = TmfTraceUtils.getAnalysisModuleOfClass(trace, CallsiteAnalysis.class, CallsiteAnalysis.ID); assertNotNull(module); assertTrue(module.schedule().isOK()); assertTrue(module.waitForCompletion()); String uuid = String.valueOf(fTrace.getUUID()); List<@NonNull ITmfCallsite> cs = module.getCallsites(uuid, "0", 42); assertEquals(EXPECTED, cs); assertEquals(Collections.emptyList(), module.getCallsites("Hello", "0", 42)); assertEquals(Collections.emptyList(), module.getCallsites(uuid, "1", 42)); assertEquals(Collections.emptyList(), module.getCallsites(uuid, "0", 12)); assertEquals(EXPECTED, module.getCallsites(uuid, "0", 55)); assertEquals(Collections.emptyList(), module.getCallsites(uuid, "..", 42)); assertEquals(Collections.emptyList(), module.getCallsites(uuid, "..", 42)); }