auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public List<Project> GetProjectItems() throws ReleaseManagementException { String url = this.accountUrl + "/_apis/projects?api-version=1.0"; String response = this.ExecuteGetMethod(url); TeamProject teamProject = new Gson().fromJson(response, TeamProject.class); return teamProject.getValue(); }

Target:
public List<Project> GetProjectItems() throws ReleaseManagementException { String url = this.accountUrl + "/_apis/projects?api-version=1.0"; String response = this.ExecuteGetMethod(url); try { String values = new JSONObject(response).getString("value"); return Arrays.asList(new Gson().fromJson(values, Project[].class)); } catch (JSONException ex) { throw new ReleaseManagementException(ex); } }
Source:
public EventHubClientBuilder proxyConfiguration(ProxyConfiguration proxyConfiguration) { this.proxyConfiguration = proxyConfiguration; if (proxyConfiguration != null && proxyConfiguration.isProxyAddressConfigured()) { this.transport = TransportType.AMQP_WEB_SOCKETS; } return this; }

Target:
public EventHubClientBuilder proxyConfiguration(ProxyConfiguration proxyConfiguration) { this.proxyConfiguration = proxyConfiguration; return this; }
Source:
public void paintHTML(String text, int width, int height, int x, int y) { if (renderFigure == null || painter == null || contentPane == null) { return; } Image htmlImage_tmp = new Image(Display.getDefault(), 10, 10); GC gc_tmp = new GC(htmlImage_tmp); Rectangle bounds_tmp = new Rectangle(x, y, 0, 0); painter.preCalculate(text != null ? text : "", gc_tmp, bounds_tmp, false); width = this.painter.getPreferredSize().x; height = this.painter.getPreferredSize().y; if (!validated) { contentPane.setPreferredSize(width, height); contentPane.validate(); } if (htmlImage != null) { htmlImage.dispose(); } htmlImage = getTransparentBackground(Display.getDefault(), width, height); if (htmlImage == null) { htmlImage = new Image(Display.getDefault(), width, height); } if (htmlImage != null) { GC gc = new GC(htmlImage); Rectangle bounds = new Rectangle(x, y, width, height); painter.preCalculate(text != null ? text : "", gc, bounds, true); boolean changeBounds = false; if (width < getPreferredSize().x) { width = getPreferredSize().x; changeBounds = true; } if (height < getPreferredSize().y) { height = getPreferredSize().y; changeBounds = true; } if (changeBounds) { gc.dispose(); htmlImage.dispose(); htmlImage = getTransparentBackground(Display.getDefault(), width, height); if (htmlImage == null) { htmlImage = new Image(Display.getDefault(), width, height); } gc = new GC(htmlImage); bounds = new Rectangle(x, y, width, height); } painter.paintHTML(text != null ? text : "", gc, bounds); if (gc != null) { gc.dispose(); } renderFigure.setImage(htmlImage); } }

Target:
public void paintHTML(String text, int width, int height, int x, int y) { if (renderFigure == null || painter == null || contentPane == null) { return; } Image htmlImage_tmp = new Image(Display.getDefault(), 10, 10); GC gc_tmp = new GC(htmlImage_tmp); Rectangle bounds_tmp = new Rectangle(x, y, 10,10); painter.preCalculate(text != null ? text : "", gc_tmp, bounds_tmp, false); width = this.painter.getPreferredSize().x; height = this.painter.getPreferredSize().y; if (!validated) { contentPane.setPreferredSize(width, height); contentPane.validate(); } if (htmlImage != null) { htmlImage.dispose(); } htmlImage = getTransparentBackground(Display.getDefault(), width, height); if (htmlImage == null) { htmlImage = new Image(Display.getDefault(), width, height); } if (htmlImage != null) { GC gc = new GC(htmlImage); Rectangle bounds = new Rectangle(x, y, width, height); painter.preCalculate(text != null ? text : "", gc, bounds, true); boolean changeBounds = false; if (width < getPreferredSize().x) { width = getPreferredSize().x; changeBounds = true; } if (height < getPreferredSize().y) { height = getPreferredSize().y; changeBounds = true; } if (changeBounds) { gc.dispose(); htmlImage.dispose(); htmlImage = getTransparentBackground(Display.getDefault(), width, height); if (htmlImage == null) { htmlImage = new Image(Display.getDefault(), width, height); } gc = new GC(htmlImage); bounds = new Rectangle(x, y, width, height); } painter.paintHTML(text != null ? text : "", gc, bounds); if (gc != null) { gc.dispose(); } renderFigure.setImage(htmlImage); } }
Source:
public LegacyXaDataSourceImp buildCommonPool(Integer minPoolSize, Integer initialPoolSize, Integer maxPoolSize, Boolean prefill, Boolean useStrictMin, FlushStrategy flushStrategy, Boolean isSameRmOverride, Boolean interleaving, Boolean padXid, Boolean wrapXaResource, Boolean noTxSeparatePool) throws Exception { xaPool = new DsXaPoolImpl(minPoolSize, initialPoolSize, maxPoolSize, prefill, useStrictMin, flushStrategy, isSameRmOverride, interleaving, padXid, wrapXaResource, noTxSeparatePool, false, null, Defaults.FAIR, null); return this; }

Target:
public LegacyXaDataSourceImp buildCommonPool(Integer minPoolSize, Integer initialPoolSize, Integer maxPoolSize, Boolean prefill, Boolean useStrictMin, FlushStrategy flushStrategy, Boolean isSameRmOverride, Boolean interleaving, Boolean padXid, Boolean wrapXaResource, Boolean noTxSeparatePool) throws Exception { xaPool = new DsXaPoolImpl(minPoolSize, initialPoolSize, maxPoolSize, prefill, useStrictMin, flushStrategy, isSameRmOverride, interleaving, padXid, wrapXaResource, noTxSeparatePool, false, null, null, null); return this; }
Source:
public AttributeType guessAttributeType(List<Object> dataValues) { boolean guessCompleted = false; int rowCount = dataValues.size(); int currentRowIndex = 0; AttributeType guess = getBasicAttributeType(dataValues.get(0)); while (currentRowIndex < rowCount && !guessCompleted) { Object value = dataValues.get(currentRowIndex); AttributeType basicType = getBasicAttributeType(value); guess = getCommonType(guess, basicType); guess = getEnrichedType(guess, value); if (guess.equals(STRING) || guess.equals(TEXT)) { guessCompleted = true; } currentRowIndex++; } return guess; }

Target:
public AttributeType guessAttributeType(List<Object> dataValues) { boolean guessCompleted = false; int rowCount = dataValues.size(); int currentRowIndex = 0; AttributeType guess = getBasicAttributeType(dataValues.get(0)); while (currentRowIndex < rowCount && !guessCompleted) { Object value = dataValues.get(currentRowIndex); AttributeType basicType = getBasicAttributeType(value); guess = getCommonType(guess, basicType); guess = getEnrichedType(guess, value); if (TEXT.equals(guess)) { guessCompleted = true; } currentRowIndex++; } if (guess == null) { guess = STRING; } return guess; }
Source:
public static void tearDown() throws IOException, OperationException, CommandFailedException, TimeoutException, InterruptedException { client.apply(snapshotBackup.restore()); administration.reloadIfRequired(); client.close(); }

Target:
public static void tearDown() throws InterruptedException, TimeoutException, IOException, CommandFailedException { client.apply(snapshotBackup.restore()); administration.reloadIfRequired(); }
Source:
public void testInvalidPasswordValidate() throws BugzillaRestException { RepositoryLocation location = new RepositoryLocation(); location.setUrl(actualFixture.getRepositoryUrl()); location.setProxy(null); location.setCredentialsStore(new InMemoryCredentialsStore()); location.setCredentials(AuthenticationType.REPOSITORY, new UserCredentials("tests@mylyn.eclipse.org", "wrong")); thrown.expect(BugzillaRestException.class); thrown.expectMessage("Unauthorized"); BugzillaRestClient client; client = new BugzillaRestClient(location, connector); assertNotNull(client.getClient()); client.validate(new NullOperationMonitor()); }

Target:
public void testInvalidPasswordValidate() throws BugzillaRestException { RepositoryLocation location = new RepositoryLocation(); location.setUrl(actualFixture.getRepositoryUrl()); location.setProxy(null); location.setCredentialsStore(new InMemoryCredentialsStore()); location.setCredentials(AuthenticationType.REPOSITORY, new UserCredentials("tests@mylyn.eclipse.org", "wrong")); BugzillaRestClient client; client = new BugzillaRestClient(location, connector); assertNotNull(client.getClient()); thrown.expect(BugzillaRestException.class); thrown.expectMessage("Unauthorized"); client.validate(new NullOperationMonitor()); }
Source:
private void matchIndexesToNode( NodeRecord record, CheckerEngine<NodeRecord, ConsistencyReport.NodeConsistencyReport> engine, RecordAccess records, Collection<PropertyRecord> propertyRecs ) { Set<Long> labels = NodeLabelReader.getListOfLabels( record, records, engine ); List<PropertyBlock> properties = null; PrimitiveIntSet nodePropertyIds = null; for ( IndexRule indexRule : indexes.rules() ) { long labelId = indexRule.schema().getLabelId(); if ( labels.contains( labelId ) ) { if ( properties == null ) { properties = propertyReader.propertyBlocks( propertyRecs ); nodePropertyIds = propertyIds( properties ); } int[] indexPropertyIds = indexRule.schema().getPropertyIds(); if ( nodeHasSchemaProperties( nodePropertyIds, indexPropertyIds, NO_SUCH_PROPERTY_KEY ) ) { Object[] values = getPropertyValues( properties, indexPropertyIds ); try ( IndexReader reader = indexes.accessorFor( indexRule ).newReader() ) { long nodeId = record.getId(); if ( indexRule.canSupportUniqueConstraint() ) { verifyNodeCorrectlyIndexedUniquely( nodeId, values, engine, indexRule, reader ); } else { long count = reader.countIndexedNodes( nodeId, values ); reportIncorrectIndexCount( values, engine, indexRule, count ); } } } } } }

Target:
private void matchIndexesToNode( NodeRecord record, CheckerEngine<NodeRecord, ConsistencyReport.NodeConsistencyReport> engine, RecordAccess records, Collection<PropertyRecord> propertyRecs ) { Set<Long> labels = NodeLabelReader.getListOfLabels( record, records, engine ); PrimitiveIntObjectMap<PropertyBlock> nodePropertyMap = null; for ( IndexRule indexRule : indexes.rules() ) { long labelId = indexRule.schema().getLabelId(); if ( labels.contains( labelId ) ) { if ( nodePropertyMap == null ) { nodePropertyMap = properties( propertyReader.propertyBlocks( propertyRecs ) ); } int[] indexPropertyIds = indexRule.schema().getPropertyIds(); if ( nodeHasSchemaProperties( nodePropertyMap, indexPropertyIds ) ) { Object[] values = getPropertyValues( nodePropertyMap, indexPropertyIds ); try ( IndexReader reader = indexes.accessorFor( indexRule ).newReader() ) { long nodeId = record.getId(); if ( indexRule.canSupportUniqueConstraint() ) { verifyNodeCorrectlyIndexedUniquely( nodeId, values, engine, indexRule, reader ); } else { long count = reader.countIndexedNodes( nodeId, values ); reportIncorrectIndexCount( values, engine, indexRule, count ); } } } } } }
Source:
MemcachedMetadata(long flags, long lifespan, EntryVersion version) { super(lifespan, version); this.flags = flags; }

Target:
private MemcachedMetadata(long flags, long lifespan, EntryVersion version) { super(lifespan, version); this.flags = flags; }
Source:
public void open() throws Exception { super.open(); timestampAssigner = watermarkStrategy.createTimestampAssigner(this::getMetricGroup); watermarkGenerator = new NoOpWatermarkGenerator<>( watermarkStrategy.createWatermarkGenerator(this::getMetricGroup), emitProgressiveWatermarks); wmOutput = new WatermarkEmitter(output, getContainingTask().getStreamStatusMaintainer()); watermarkInterval = getExecutionConfig().getAutoWatermarkInterval(); if (watermarkInterval > 0) { final long now = getProcessingTimeService().getCurrentProcessingTime(); getProcessingTimeService().registerTimer(now + watermarkInterval, this); } }

Target:
public void open() throws Exception { super.open(); timestampAssigner = watermarkStrategy.createTimestampAssigner(this::getMetricGroup); watermarkGenerator = emitProgressiveWatermarks ? watermarkStrategy.createWatermarkGenerator(this::getMetricGroup) : new NoWatermarksGenerator<>(); wmOutput = new WatermarkEmitter(output, getContainingTask().getStreamStatusMaintainer()); watermarkInterval = getExecutionConfig().getAutoWatermarkInterval(); if (watermarkInterval > 0 && emitProgressiveWatermarks) { final long now = getProcessingTimeService().getCurrentProcessingTime(); getProcessingTimeService().registerTimer(now + watermarkInterval, this); } }
Source:
public BaseLease(String partitionId) { Objects.requireNonNull(partitionId, "'patitionId' cannot be null."); if (partitionId.isEmpty()) { throw new IllegalArgumentException("partitionId is Empty"); } this.partitionId = partitionId; }

Target:
public BaseLease(String partitionId) { Objects.requireNonNull(partitionId, "'partitionId' cannot be null."); if (partitionId.isEmpty()) { throw new IllegalArgumentException("partitionId is Empty"); } this.partitionId = partitionId; }
Source:
protected List<String> parseToUrlList(String responseBody) throws ParseUrlException { try { XPathFactory xPathFactory = XPathFactory.newInstance(); XPath xPath = xPathFactory.newXPath(); SimpleNamespaceContext namespaces = new SimpleNamespaceContext(); Map<String, String> namespaceMap = new HashMap<String, String>(); namespaceMap.put("x", "<LINK_0>"); namespaces.setBindings(namespaceMap); xPath.setNamespaceContext(namespaces); InputSource inputSource = new InputSource(new ByteArrayInputStream(responseBody.getBytes())); NodeList nodeList = (NodeList) xPath.compile("/x:xforms/x:xform/x:downloadUrl").evaluate(inputSource, XPathConstants.NODESET); List<String> urls = new ArrayList<>(); for (int i = 0; i < nodeList.getLength(); i++) { Node node = nodeList.item(i).getFirstChild(); urls.add(node.getNodeValue()); } return urls; } catch (XPathExpressionException e) { throw new ParseUrlException(e); } }

Target:
protected List<String> parseToUrlList(String responseBody) throws ParseUrlException { try { XPathFactory xPathFactory = XPathFactory.newInstance(); XPath xPath = xPathFactory.newXPath(); SimpleNamespaceContext namespaces = new SimpleNamespaceContext(); Map<String, String> namespaceMap = new HashMap<>(); namespaceMap.put("x", "<LINK_0>"); namespaces.setBindings(namespaceMap); xPath.setNamespaceContext(namespaces); InputSource inputSource = new InputSource(new ByteArrayInputStream(responseBody.getBytes())); NodeList nodeList = (NodeList) xPath.compile("/x:xforms/x:xform/x:downloadUrl").evaluate(inputSource, XPathConstants.NODESET); List<String> urls = new ArrayList<>(); for (int i = 0; i < nodeList.getLength(); i++) { Node node = nodeList.item(i).getFirstChild(); urls.add(node.getNodeValue()); } return urls; } catch (XPathExpressionException e) { throw new ParseUrlException(e); } }
Source:
public MLModel retrieveModel(long modelId) throws MLModelHandlerException { InputStream in = null; ObjectInputStream ois = null; String storageLocation = null; try { MLStorage storage = databaseService.getModelStorage(modelId); if (storage == null) { throw new MLModelHandlerException("Invalid model ID: " + modelId); } String storageType = storage.getType(); storageLocation = storage.getLocation(); MLIOFactory ioFactory = new MLIOFactory(mlProperties); MLInputAdapter inputAdapter = ioFactory.getInputAdapter(storageType + MLConstants.IN_SUFFIX); in = inputAdapter.read(storageLocation); ois = new ObjectInputStream(in); MLModel model = (MLModel) ois.readObject(); log.info("Successfully retrieved model"); return model; } catch (Exception e) { throw new MLModelHandlerException("Failed to retrieve the model [id] " + modelId, e); } finally { if (in != null) { try { in.close(); } catch (IOException ignore) { } } if (ois != null) { try { ois.close(); } catch (IOException ignore) { } } } }

Target:
public MLModel retrieveModel(long modelId) throws MLModelHandlerException { InputStream in = null; ObjectInputStream ois = null; String storageLocation = null; try { MLStorage storage = databaseService.getModelStorage(modelId); if (storage == null) { throw new MLModelHandlerException("Invalid model ID: " + modelId); } String storageType = storage.getType(); storageLocation = storage.getLocation(); MLIOFactory ioFactory = new MLIOFactory(mlProperties); MLInputAdapter inputAdapter = ioFactory.getInputAdapter(storageType + MLConstants.IN_SUFFIX); in = inputAdapter.read(storageLocation); ois = new ObjectInputStream(in); MLModel model = (MLModel) ois.readObject(); if (log.isDebugEnabled()) { log.debug("Successfully retrieved model"); } return model; } catch (Exception e) { throw new MLModelHandlerException("Failed to retrieve the model [id] " + modelId, e); } finally { if (in != null) { try { in.close(); } catch (IOException ignore) { } } if (ois != null) { try { ois.close(); } catch (IOException ignore) { } } } }
Source:
public void testEgality() { ToolTipString fromHtml = ToolTipString.fromHtml("<div>1</div>"); ToolTipString fromHtmlString = ToolTipString.fromString("<div>1</div>"); ToolTipString fromString = ToolTipString.fromString("1"); ToolTipString fromInt = ToolTipString.fromDecimal(1); ToolTipString fromLong = ToolTipString.fromDecimal(1L); assertNotEquals(fromInt, null); assertNotEquals(fromInt, new Object()); assertEquals(fromInt, fromInt); assertEquals(fromInt.hashCode(), fromLong.hashCode()); assertEquals(fromInt, fromLong); assertNotEquals(fromInt, fromHtml); assertNotEquals(fromHtmlString, fromHtml); assertEquals(fromString.hashCode(), fromLong.hashCode()); assertEquals(fromString, fromLong); }

Target:
public void testEgality() { ToolTipString fromHtml = ToolTipString.fromHtml("<div>1</div>"); ToolTipString fromHtmlString = ToolTipString.fromString("<div>1</div>"); ToolTipString fromString = ToolTipString.fromString("1"); ToolTipString fromInt = ToolTipString.fromDecimal(1); ToolTipString fromLong = ToolTipString.fromDecimal(1L); assertNotEquals(fromInt, null); assertNotEquals(fromInt, new Object()); assertEquals(fromInt, fromInt); assertEquals(fromInt.hashCode(), fromLong.hashCode()); assertEquals(fromInt, fromLong); assertNotEquals(fromInt, fromHtml); assertNotEquals(fromHtmlString, fromHtml); assertNotEquals(fromHtml, ToolTipString.fromHtml("<a>1</a>")); assertEquals(fromString.hashCode(), fromLong.hashCode()); assertEquals(fromString, fromLong); }
Source:
public void testOpenFileUnauthorized() throws Exception { final AzureBlobFileSystem fs = this.getFileSystem(); Path testFilePath = new Path( TEST_WRITE_ONLY_FILE_PATH_PREFIX_0 + name.getMethodName()); fs.create(testFilePath).close(); intercept(AbfsAuthorizationException.class, () -> { fs.open(testFilePath).close(); }); }

Target:
public void testOpenFileUnauthorized() throws Exception { runTest(FileSystemOperations.Open, true); }
Source:
public <RequestT> CallOptions create(MethodDescriptor<RequestT, ?> descriptor, RequestT request) { Deadline contextDeadline = Context.current().getDeadline(); if (contextDeadline != null) { return CallOptions.DEFAULT.withDeadline(contextDeadline); } else if (!config.isUseTimeout() || request == null) { return CallOptions.DEFAULT; } else { int timeout = isLongRequest(request) ? config.getLongRpcTimeoutMs() : config.getShortRpcTimeoutMs(); return CallOptions.DEFAULT.withDeadline(Deadline.after(timeout, TimeUnit.MILLISECONDS)); } }

Target:
public <RequestT> CallOptions create(MethodDescriptor<RequestT, ?> descriptor, RequestT request) { Deadline contextDeadline = Context.current().getDeadline(); if (contextDeadline != null) { return CallOptions.DEFAULT.withDeadline(contextDeadline); } else if (config.isUseTimeout() && request != null) { int timeout = isLongRequest(request) ? config.getLongRpcTimeoutMs() : config.getShortRpcTimeoutMs(); return CallOptions.DEFAULT.withDeadline(Deadline.after(timeout, TimeUnit.MILLISECONDS)); } else { return CallOptions.DEFAULT; } }
Source:
public void testInit_objectStore() throws Exception { String objectStore = "ObjectStore"; config.overrideKey("filenet.objectStore", objectStore); adaptor.init(context); Connection conn = getConfigOptions().getConnection(); assertTrue(getConfigOptions().getObjectStore(conn) instanceof ObjectStore); }

Target:
public void testInit_objectStore() throws Exception { String objectStore = "ObjectStore"; config.overrideKey("filenet.objectStore", objectStore); adaptor.init(context); Connection conn = getConfigOptions().getConnection(); assertNotNull(getConfigOptions().getObjectStore(conn)); }
Source:
private AsyncCompletionWaitor updateBreakpoint(final IBreakpointDMContext breakpoint, final Map<String, Object> delta) throws InterruptedException { final AsyncCompletionWaitor waitor = new AsyncCompletionWaitor(); final RequestMonitor rm = new RequestMonitor(fBreakpointService.getExecutor(), null) { @Override protected void handleCompleted() { waitor.waitFinished(getStatus()); } }; fBreakpointService.getExecutor().submit(new Runnable() { @Override public void run() { fBreakpointService.updateBreakpoint(breakpoint, delta, rm); } }); waitor.waitUntilDone(TestsPlugin.massageTimeout(2000)); return waitor; }

Target:
private void updateBreakpoint(final IBreakpointDMContext breakpoint, final Map<String, Object> delta) throws InterruptedException, ExecutionException { Query<Void> query = new Query<Void>() { @Override protected void execute(DataRequestMonitor<Void> rm) { fBreakpointService.updateBreakpoint(breakpoint, delta, rm); } }; fBreakpointService.getExecutor().submit(query); query.get(); }
Source:
public final void run() { if (logger.isDebugEnabled()) { logger.debug("Starting the AcquireTimeoutTask to clean for endpoint [{}].", this.pool.remoteAddress()); } long currentNanoTime = System.nanoTime(); while (true) { AcquireListener removedTask = this.pool.pendingAcquisitions.poll(); if (removedTask == null) { break; } long expiryTime = removedTask.getAcquisitionTimeoutInNanos(); if (expiryTime - currentNanoTime < 0) { this.onTimeout(removedTask); } else { if (!this.pool.pendingAcquisitions.offer(removedTask)) { logger.error("Unexpected failure when returning the removed task" + " to pending acquisition queue. current size [{}]", this.pool.pendingAcquisitions.size()); } break; } } }

Target:
public final void run() { if (logger.isDebugEnabled()) { logger.debug("Starting the AcquireTimeoutTask to clean for endpoint [{}].", this.pool.remoteAddress()); } long currentNanoTime = System.nanoTime(); while (true) { AcquireListener removedTask = this.pool.pendingAcquisitions.poll(); if (removedTask == null) { break; } long expiryTime = removedTask.getAcquisitionTimeoutInNanos(); if (expiryTime - currentNanoTime <= 0) { this.onTimeout(removedTask); } else { if (!this.pool.pendingAcquisitions.offer(removedTask)) { logger.error("Unexpected failure when returning the removed task" + " to pending acquisition queue. current size [{}]", this.pool.pendingAcquisitions.size()); } break; } } }
Source:
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } PartitionMeta that = (PartitionMeta)o; return Objects.equals(cluster, that.cluster) && Objects.equals(getTopicPartition(), that.getTopicPartition()); }

Target:
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } PartitionMeta that = (PartitionMeta)o; return Objects.equals(partitionId, that.partitionId) && Objects.equals(cluster, that.cluster) && Objects.equals(topic, that.topic); }
Source:
private static <T extends Node> T simplifiedParse(ParseStart<T> context, Provider provider) { ParseResult<T> result = new JavaParser(staticConfiguration).parse(context, provider); if (result.isSuccessful()) { considerInjectingSymbolResolver(result, staticConfiguration); return result.getResult().get(); } throw new ParseProblemException(result.getProblems()); }

Target:
private static <T extends Node> T simplifiedParse(ParseStart<T> context, Provider provider) { ParseResult<T> result = new JavaParser(staticConfiguration).parse(context, provider); if (result.isSuccessful()) { return result.getResult().get(); } throw new ParseProblemException(result.getProblems()); }
Source:
public PlanNode visitAggregation(AggregationNode node, RewriteContext<Context> context) { context.get().variables.addAll(node.getGroupingKeys()); for (Map.Entry<VariableReferenceExpression, AggregationNode.Aggregation> entry : node.getAggregations().entrySet()) { VariableReferenceExpression variable = entry.getKey(); AggregationNode.Aggregation aggregation = entry.getValue(); QualifiedFunctionName aggregateName = metadata.getFunctionManager().getFunctionMetadata(aggregation.getCall().getFunctionHandle()).getName(); if (ARBITRARY_AGGREGATE_FUNCTION.equals(aggregateName)) { checkArgument(aggregation.getArguments().get(0) instanceof VariableReferenceExpression); context.get().addAssignment(variable, (VariableReferenceExpression) aggregation.getArguments().get(0)); } else { aggregation.getArguments().forEach(expression -> expression.accept(subfieldExtractor, context.get())); } aggregation.getFilter().ifPresent(expression -> expression.accept(subfieldExtractor, context.get())); aggregation.getOrderBy() .map(OrderingScheme::getOrderByVariables) .ifPresent(context.get().variables::addAll); aggregation.getMask().ifPresent(context.get().variables::add); } return context.defaultRewrite(node, context.get()); }

Target:
public PlanNode visitAggregation(AggregationNode node, RewriteContext<Context> context) { context.get().variables.addAll(node.getGroupingKeys()); for (Map.Entry<VariableReferenceExpression, AggregationNode.Aggregation> entry : node.getAggregations().entrySet()) { VariableReferenceExpression variable = entry.getKey(); AggregationNode.Aggregation aggregation = entry.getValue(); QualifiedFunctionName aggregateName = metadata.getFunctionManager().getFunctionMetadata(aggregation.getCall().getFunctionHandle()).getName(); if (ARBITRARY_AGGREGATE_FUNCTION.equals(aggregateName)) { checkState(aggregation.getArguments().get(0) instanceof VariableReferenceExpression); context.get().addAssignment(variable, (VariableReferenceExpression) aggregation.getArguments().get(0)); } else { aggregation.getArguments().forEach(expression -> expression.accept(subfieldExtractor, context.get())); } aggregation.getFilter().ifPresent(expression -> expression.accept(subfieldExtractor, context.get())); aggregation.getOrderBy() .map(OrderingScheme::getOrderByVariables) .ifPresent(context.get().variables::addAll); aggregation.getMask().ifPresent(context.get().variables::add); } return context.defaultRewrite(node, context.get()); }
Source:
protected void sharedPeriodic() { xScheduler.run(); this.updatePeriodicDataSources(); loopCycleCounter++; double timeSinceLastLog = Timer.getFPGATimestamp() - lastFreqCounterResetTime; if(lastFreqCounterResetTime > 0 && timeSinceLastLog >= frequencyReportInterval.get()) { double loopsPerSecond = loopCycleCounter / timeSinceLastLog; loopCycleCounter = 0; lastFreqCounterResetTime = Timer.getFPGATimestamp(); log.info("Robot loops per second: " + loopsPerSecond); } }

Target:
protected void sharedPeriodic() { xScheduler.run(); this.updatePeriodicDataSources(); loopCycleCounter++; double timeSinceLastLog = Timer.getFPGATimestamp() - lastFreqCounterResetTime; if(lastFreqCounterResetTime <= 0) { lastFreqCounterResetTime = Timer.getFPGATimestamp(); } else if(timeSinceLastLog >= frequencyReportInterval.get()) { double loopsPerSecond = loopCycleCounter / timeSinceLastLog; loopCycleCounter = 0; lastFreqCounterResetTime = Timer.getFPGATimestamp(); log.info("Robot loops per second: " + loopsPerSecond); } }
Source:
public void startClient() throws JMSException, NamingException, IOException { if (null != connection && null != session && null != sender) { if (null != this.publisherConfig.getReadMessagesFromFilePath()) { this.getMessageContentFromFile(); } Thread subscriberThread = new Thread(this); subscriberThread.start(); } else { throw new NullPointerException("The connection, session and message sender is not assigned."); } }

Target:
public void startClient() throws AndesClientException, IOException { if (null != connection && null != session && null != sender) { if (null != this.publisherConfig.getReadMessagesFromFilePath()) { this.getMessageContentFromFile(); } Thread subscriberThread = new Thread(this); subscriberThread.start(); } else { throw new AndesClientException("The connection, session and message sender is not assigned."); } }
Source:
public static Payload buildPayload(long size) { ByteSource data = buildData(size); Payload payload = new ByteSourcePayload(data); payload.getContentMetadata().setContentType("text/plain"); payload.getContentMetadata().setContentLength(size); return payload; }

Target:
public static Payload buildPayload(long size) { ByteSource data = buildData(size); Payload payload = new ByteSourcePayload(data); payload.getContentMetadata().setContentType(PLAIN_TEXT_UTF_8.toString()); payload.getContentMetadata().setContentLength(size); return payload; }
Source:
public void releaseISOMount(java.io.File mountDir) { if (Sage.WINDOWS_OS) { java.io.File vcdMountExe = getVCDMountEXEPath(); if (vcdMountExe == null || !vcdMountExe.isFile()) { if (Sage.DBG) System.out.println("WARNING Cannot find VirtualCloneDrive EXE path so we can't unmount: " + mountDir); return; } if (Sage.DBG) System.out.println("Releasing VCDMount point at " + mountDir); synchronized (vcdLock) { IOUtils.exec(new String[] { vcdMountExe.getAbsolutePath(), "/l=" + mountDir.getAbsolutePath().charAt(0), "/u" }); } } else { if (Sage.EMBEDDED) { String loopDev = null; String mountDetails = IOUtils.exec(new String[] {"sh", "-c", "mount | grep " + mountDir.getName()}, true, true, true); if (mountDetails != null && mountDetails.length() > 0) { int idx = mountDetails.indexOf(' '); if (idx != -1) { loopDev = mountDetails.substring(0, idx).trim(); } } IOUtils.exec2(new String[] { "umount", mountDir.getAbsolutePath() }, false); if (loopDev != null) { try{Thread.sleep(200);}catch(Exception e){} if (Sage.DBG) System.out.println("Stopping loop device after ISO unmount: " + loopDev); if (IOUtils.exec2(new String[] { "losetup", "-d", loopDev }) != 0) { try{Thread.sleep(400);}catch(Exception e){} IOUtils.exec2(new String[] { "losetup", "-d", loopDev }); } } } else { if (Sage.LINUX_IS_ROOT) IOUtils.exec2(new String[]{"umount", mountDir.getAbsolutePath()}, false); else IOUtils.exec2(new String[]{"sudo","umount", mountDir.getAbsolutePath()}, false); } mountDir.delete(); } }

Target:
public void releaseISOMount(java.io.File mountDir) { if (Sage.WINDOWS_OS) { java.io.File vcdMountExe = getVCDMountEXEPath(); if (vcdMountExe == null || !vcdMountExe.isFile()) { if (Sage.DBG) System.out.println("WARNING Cannot find VirtualCloneDrive EXE path so we can't unmount: " + mountDir); return; } if (Sage.DBG) System.out.println("Releasing VCDMount point at " + mountDir); synchronized (vcdLock) { IOUtils.exec(new String[] { vcdMountExe.getAbsolutePath(), "/l=" + mountDir.getAbsolutePath().charAt(0), "/u" }); } } else { if (Sage.EMBEDDED) { String loopDev = null; String mountDetails = IOUtils.exec(new String[] {"sh", "-c", "mount | grep " + mountDir.getName()}, true, true, true); if (mountDetails != null && mountDetails.length() > 0) { int idx = mountDetails.indexOf(' '); if (idx != -1) { loopDev = mountDetails.substring(0, idx).trim(); } } IOUtils.exec2(new String[] { "umount", mountDir.getAbsolutePath() }, false); if (loopDev != null) { try{Thread.sleep(200);}catch(Exception e){} if (Sage.DBG) System.out.println("Stopping loop device after ISO unmount: " + loopDev); if (IOUtils.exec2(new String[] { "losetup", "-d", loopDev }) != 0) { try{Thread.sleep(400);}catch(Exception e){} IOUtils.exec2(new String[] { "losetup", "-d", loopDev }); } } } else { if (Sage.LINUX_IS_ROOT) IOUtils.exec2(new String[]{"umount", mountDir.getAbsolutePath()}, false); else IOUtils.exec2(new String[]{"sudo", "-n", "umount", mountDir.getAbsolutePath()}, false); } mountDir.delete(); } }
Source:
public StreamInputPacketIndexEntry(DataInputStream dataIn, String target) throws IOException { fOffsetBytes = dataIn.readLong(); fOffsetBits = fOffsetBytes * Byte.SIZE; fPacketSizeBits = dataIn.readLong(); fContentSizeBits = dataIn.readLong(); fTimestampBegin = dataIn.readLong(); System.out.println(fTimestampBegin); fTimestampEnd = dataIn.readLong(); fLostEvents = dataIn.readLong(); fTargetID = dataIn.readLong(); fTarget = target; }

Target:
public StreamInputPacketIndexEntry(DataInputStream dataIn, String target) throws IOException { fOffsetBytes = dataIn.readLong(); fOffsetBits = fOffsetBytes * Byte.SIZE; fPacketSizeBits = dataIn.readLong(); fContentSizeBits = dataIn.readLong(); fTimestampBegin = dataIn.readLong(); fTimestampEnd = dataIn.readLong(); fLostEvents = dataIn.readLong(); fAttributes.put("stream_id", dataIn.readLong()); fTarget = target; long parsedTarget = -1; try{ parsedTarget = Long.parseLong(target); }catch(NumberFormatException e){ } fTargetID = parsedTarget; }
Source:
public void testSetItems() { final boolean textItemEnabled = true; final String textItemText = "Inert rule above"; doReturn(textItemEnabled).when(textItem).isEnabled(); doReturn(textItemText).when(textItem).getText(); view.setItems(Arrays.asList(textItem, dividerItem)); verify(itemsContainer).appendChild(textElement); verify(itemsContainer).appendChild(dividerElement); verify(textItemView).setEnabled(eq(textItemEnabled)); verify(textItemView).setText(eq(textItemText)); final ArgumentCaptor<Command> commandCaptor = ArgumentCaptor.forClass(Command.class); verify(textItemView).addClickHandler(commandCaptor.capture()); commandCaptor.getValue().execute(); verify(presenter).onItemSelected(eq(textItem)); reset(presenter); doReturn(false).when(textItem).isEnabled(); commandCaptor.getValue().execute(); verify(presenter, never()).onItemSelected(eq(textItem)); }

Target:
public void testSetItems() { final boolean textItemEnabled = true; final String textItemText = "Inert rule above"; doReturn(textItemEnabled).when(textItem).isEnabled(); doReturn(textItemText).when(textItem).getText(); view.setItems(Arrays.asList(textItem, dividerItem)); verify(itemsContainer).appendChild(textElement); verify(itemsContainer).appendChild(dividerElement); verify(textItemView).setEnabled(eq(textItemEnabled)); verify(textItemView).setText(eq(textItemText)); final ArgumentCaptor<Command> commandCaptor = ArgumentCaptor.forClass(Command.class); verify(textItemView).addClickHandler(commandCaptor.capture()); commandCaptor.getValue().execute(); verify(presenter).onItemSelected(eq(textItem)); reset(presenter); doReturn(false).when(textItem).isEnabled(); commandCaptor.getValue().execute(); verify(presenter, never()).onItemSelected(any(HasListSelectorControl.ListSelectorTextItem.class)); }
Source:
RedirectAuthoritativeDnsServerCache(AuthoritativeDnsServerCache authoritativeDnsServerCache) { if (authoritativeDnsServerCache instanceof RedirectAuthoritativeDnsServerCache) { this.wrapped = ((RedirectAuthoritativeDnsServerCache) authoritativeDnsServerCache).wrapped; } else { this.wrapped = authoritativeDnsServerCache; } }

Target:
RedirectAuthoritativeDnsServerCache(AuthoritativeDnsServerCache authoritativeDnsServerCache) { this.wrapped = authoritativeDnsServerCache; }
Source:
public List<String> getContent(final INode node) { final List<String> content = new ArrayList<String>(); for (LexicalUnit lexicalUnit : contentLexicalUnits) { switch (lexicalUnit.getLexicalUnitType()) { case LexicalUnit.SAC_STRING_VALUE: content.add(lexicalUnit.getStringValue()); break; case LexicalUnit.SAC_ATTR: final LexicalUnit currentLexicalUnit = lexicalUnit; node.accept(new BaseNodeVisitor() { @Override public void visit(final IElement element) { final String attributeValue = element.getAttributeValue(currentLexicalUnit.getStringValue()); if (attributeValue != null) { content.add(attributeValue); } } @Override public void visit(final IProcessingInstruction pi) { if (currentLexicalUnit.getStringValue().equalsIgnoreCase("target")) { content.add(pi.getTarget()); } } }); break; } lexicalUnit = lexicalUnit.getNextLexicalUnit(); } return content; }

Target:
public List<String> getContent(final INode node) { final List<String> content = new ArrayList<String>(); for (LexicalUnit lexicalUnit : contentLexicalUnits) { switch (lexicalUnit.getLexicalUnitType()) { case LexicalUnit.SAC_STRING_VALUE: content.add(lexicalUnit.getStringValue()); break; case LexicalUnit.SAC_ATTR: final LexicalUnit currentLexicalUnit = lexicalUnit; node.accept(new BaseNodeVisitor() { @Override public void visit(final IElement element) { final String attributeValue = element.getAttributeValue(currentLexicalUnit.getStringValue()); if (attributeValue != null) { content.add(attributeValue); } } @Override public void visit(final IProcessingInstruction pi) { if (currentLexicalUnit.getStringValue().equalsIgnoreCase(CSS.PSEUDO_TARGET)) { content.add(pi.getTarget()); } } }); break; } lexicalUnit = lexicalUnit.getNextLexicalUnit(); } return content; }
Source:
private List<Integer[]> retrieveBranchAndGammaIds(OseeConnection connection, Collection<? extends IAttributeType> types) throws OseeCoreException { List<Integer[]> gammasAndBranchIds = new ArrayList<Integer[]>(50000); IOseeStatement chStmt = getDatabaseService().getStatement(connection); try { for (IAttributeType type : types) { chStmt.runPreparedQuery(RETRIEVE_GAMMAS_WITH_BRANCH_IDS, identityService.getLocalId(type)); while (chStmt.next()) { gammasAndBranchIds.add(new Integer[] {chStmt.getInt("gamma_id"), chStmt.getInt("branch_id")}); } } } finally { chStmt.close(); } return gammasAndBranchIds; }

Target:
private List<Integer[]> retrieveBranchAndGammaIds(OseeConnection connection, Collection<? extends IAttributeType> types) throws OseeCoreException { List<Integer[]> gammasAndBranchIds = new LinkedList<Integer[]>(); IOseeStatement chStmt = getDatabaseService().getStatement(connection); IdJoinQuery joinQuery = JoinUtility.createIdJoinQuery(); try { if (types.size() == 1) { chStmt.runPreparedQuery(RETRIEVE_GAMMAS_WITH_BRANCH_IDS, identityService.getLocalId(types.iterator().next())); } else { for (IAttributeType type : types) { joinQuery.add(identityService.getLocalId(type)); } chStmt.runPreparedQuery(RETRIEVE_GAMMAS_WITH_BRANCH_IDS_MULT_TYPES, joinQuery.getQueryId()); } while (chStmt.next()) { gammasAndBranchIds.add(new Integer[] {chStmt.getInt("gamma_id"), chStmt.getInt("branch_id")}); } } finally { chStmt.close(); } return gammasAndBranchIds; }
Source:
private void visitEnumType(String symbolName, EnumType type) { String unqualifiedName = getUnqualifiedName( symbolName ); visitTypeAlias(type.getElementsType().getPrimitiveType(), unqualifiedName); emit("var"); emit(unqualifiedName); emit(": {"); emitBreak(); indent(); for (String elem : sorted(type.getElements())) { emit(elem); emit(":"); visitType(type.getElementsType()); emit(","); emitBreak(); } unindent(); emit("};"); emitBreak(); }

Target:
private void visitEnumType(String symbolName, EnumType type) { String unqualifiedName = getUnqualifiedName(symbolName); visitTypeAlias(type.getElementsType().getPrimitiveType(), unqualifiedName); emit("var"); emit(unqualifiedName); emit(": {"); emitBreak(); indent(); for (String elem : sorted(type.getElements())) { emit(elem); emit(":"); emit(unqualifiedName); emit(","); emitBreak(); } unindent(); emit("};"); emitBreak(); }
Source:
public boolean filter(Object context, Descriptor descriptor) { boolean result = false; try { if (descriptor instanceof GlobalConfiguration) { return Functions.hasPermission(((GlobalConfiguration) descriptor).getPermission()); } else { return true; } } catch (AccessDeniedException e) { return false; } catch (ServletException | IOException e) { e.printStackTrace(); return true; } }

Target:
public boolean filter(Object context, Descriptor descriptor) { if (descriptor instanceof GlobalConfiguration) { return Jenkins.get().hasPermission(((GlobalConfiguration) descriptor).getPermission()); } return true; }
Source:
public String run(String[] args) throws Exception { JCommander jc = new JCommander(this); jc.setProgramName(this.getClass().getSimpleName()); try { jc.parse(args); } catch (Exception e) { jc.usage(); throw e; } prepare(); AlluxioConfiguration conf = new InstancedConfiguration(ConfigurationUtils.defaults()); String className = this.getClass().getCanonicalName(); if (mBaseParameters.mCluster) { List<String> commandArgs = Arrays.stream(args).filter((s) -> !BaseParameters.CLUSTER_FLAG.equals(s)) .filter((s) -> !s.isEmpty()).collect(Collectors.toList()); commandArgs.addAll(mBaseParameters.mJavaOpts); JobInfo jobInfo = JobGrpcClientUtils.run(new StressBenchConfig(className, commandArgs), 0, conf); return jobInfo.getResult().toString(); } if (mBaseParameters.mInProcess) { T result = runLocal(); if (mBaseParameters.mDistributed) { return result.toJson(); } return result.aggregator().aggregate(Collections.singletonList(result)).toJson(); } else { List<String> command = new ArrayList<>(); command.add(conf.get(PropertyKey.HOME) + "/bin/alluxio"); command.add("runClass"); command.add(className); command.addAll(Arrays.asList(args)); command.add(BaseParameters.IN_PROCESS_FLAG); command.addAll(mBaseParameters.mJavaOpts); LOG.info("running command: " + String.join(" ", command)); return ShellUtils.execCommand(command.toArray(new String[0])); } }

Target:
public String run(String[] args) throws Exception { JCommander jc = new JCommander(this); jc.setProgramName(this.getClass().getSimpleName()); try { jc.parse(args); } catch (Exception e) { jc.usage(); throw e; } prepare(); AlluxioConfiguration conf = new InstancedConfiguration(ConfigurationUtils.defaults()); String className = this.getClass().getCanonicalName(); if (mBaseParameters.mCluster) { List<String> commandArgs = Arrays.stream(args).filter((s) -> !BaseParameters.CLUSTER_FLAG.equals(s)) .filter((s) -> !s.isEmpty()).collect(Collectors.toList()); commandArgs.addAll(mBaseParameters.mJavaOpts); long jobId = JobGrpcClientUtils.run(new StressBenchConfig(className, commandArgs, 5000), 0, conf); JobInfo jobInfo = JobGrpcClientUtils.getJobStatus(jobId, conf, true); return jobInfo.getResult().toString(); } if (mBaseParameters.mInProcess) { T result = runLocal(); if (mBaseParameters.mDistributed) { return result.toJson(); } return result.aggregator().aggregate(Collections.singletonList(result)).toJson(); } else { List<String> command = new ArrayList<>(); command.add(conf.get(PropertyKey.HOME) + "/bin/alluxio"); command.add("runClass"); command.add(className); command.addAll(Arrays.asList(args)); command.add(BaseParameters.IN_PROCESS_FLAG); command.addAll(mBaseParameters.mJavaOpts); LOG.info("running command: " + String.join(" ", command)); return ShellUtils.execCommand(command.toArray(new String[0])); } }
Source:
private SingleStreamSpiller getSpiller() { return spiller.orElseThrow(() -> new IllegalStateException("Spiller not loaded")); }

Target:
private SingleStreamSpiller getSpiller() { return spiller.orElseThrow(() -> new IllegalStateException("Spiller not created")); }
Source:
private void collectWifiInfo (final DataInputProtos.batched_periodic_data batchedPeriodicData) { final String connectedSSID = batchedPeriodicData.hasConnectedSsid() ? batchedPeriodicData.getConnectedSsid() : "unknown_ssid"; final String senseId = batchedPeriodicData.getDeviceId(); for (final DataInputProtos.batched_periodic_data.wifi_access_point wifiAccessPoint : batchedPeriodicData.getScanList()) { final String scannedSSID = wifiAccessPoint.getSsid(); if (!connectedSSID.equals(scannedSSID)) { continue; } if (wifiInfoHistory.containsKey(senseId) && wifiInfoHistory.get(senseId).ssid.equals(connectedSSID)) { if (hasPersistSignificantWifiRssiChangeEnabled(senseId)) { if (!hasSignificantRssiChange(wifiInfoHistory, senseId, wifiAccessPoint.getRssi())) { LOGGER.trace("Skip writing because there is no significant wifi info change for {}'s network {}", senseId, connectedSSID); continue; } } else { LOGGER.trace("Skip writing because of {}'s unchanged network {}", senseId, connectedSSID); continue; } } final WifiInfo wifiInfo = WifiInfo.create(senseId, connectedSSID, wifiAccessPoint.getRssi(), new DateTime(batchedPeriodicData.getData(0).getUnixTime() * 1000L, DateTimeZone.UTC)); wifiInfoPerBatch.put(senseId, wifiInfo); wifiInfoHistory.put(senseId, wifiInfo); } }

Target:
private void collectWifiInfo (final DataInputProtos.batched_periodic_data batchedPeriodicData) { final String connectedSSID = batchedPeriodicData.hasConnectedSsid() ? batchedPeriodicData.getConnectedSsid() : "unknown_ssid"; final String senseId = batchedPeriodicData.getDeviceId(); for (final DataInputProtos.batched_periodic_data.wifi_access_point wifiAccessPoint : batchedPeriodicData.getScanList()) { final String scannedSSID = wifiAccessPoint.getSsid(); if (!connectedSSID.equals(scannedSSID)) { continue; } if (wifiInfoHistory.containsKey(senseId) && wifiInfoHistory.get(senseId).ssid.equals(connectedSSID)) { if (!hasPersistSignificantWifiRssiChangeEnabled(senseId)) { LOGGER.trace("Skip writing because of {}'s unchanged network {}", senseId, connectedSSID); continue; } if (!hasSignificantRssiChange(wifiInfoHistory, senseId, wifiAccessPoint.getRssi())) { LOGGER.trace("Skip writing because there is no significant wifi info change for {}'s network {}", senseId, connectedSSID); continue; } } final WifiInfo wifiInfo = WifiInfo.create(senseId, connectedSSID, wifiAccessPoint.getRssi(), new DateTime(batchedPeriodicData.getData(0).getUnixTime() * 1000L, DateTimeZone.UTC)); wifiInfoPerBatch.put(senseId, wifiInfo); wifiInfoHistory.put(senseId, wifiInfo); } }
Source:
public boolean isActive(ITimeGraphEntry element) { if (element instanceof ControlFlowEntry) { ControlFlowEntry cfe = (ControlFlowEntry) element; TmfTraceManager traceManager = TmfTraceManager.getInstance(); TmfTraceContext traceContext = traceManager.getCurrentTraceContext(); TmfTimeRange winRange = traceContext.getWindowRange(); TmfTimeRange selRange = traceContext.getSelectionRange(); long beginTS = selRange.getStartTime().getValue(); long endTS = selRange.getEndTime().getValue(); if (beginTS == endTS) { beginTS = winRange.getStartTime().getValue(); endTS = winRange.getEndTime().getValue(); } for (ITmfTrace trace : traceManager.getActiveTraceSet()) { if (trace == null) { continue; } ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(trace, KernelAnalysis.ID); if (ssq == null) { continue; } try { int statusQuark = ssq.getQuarkAbsolute(Attributes.THREADS, Integer.toString(cfe.getThreadId()), Attributes.STATUS); List<ITmfStateInterval> ivals = StateSystemUtils.queryHistoryRange(ssq, statusQuark, beginTS, endTS); for (ITmfStateInterval state : ivals) { int value = state.getStateValue().unboxInt(); if (value == StateValues.PROCESS_STATUS_RUN_USERMODE || value == StateValues.PROCESS_STATUS_RUN_SYSCALL || value == StateValues.PROCESS_STATUS_INTERRUPTED) { return true; } } } catch (AttributeNotFoundException | StateSystemDisposedException e) { } } } return false; }

Target:
public boolean isActive(ITimeGraphEntry element) { if (element instanceof ControlFlowEntry) { ControlFlowEntry cfe = (ControlFlowEntry) element; TmfTraceManager traceManager = TmfTraceManager.getInstance(); TmfTraceContext traceContext = traceManager.getCurrentTraceContext(); TmfTimeRange winRange = traceContext.getWindowRange(); TmfTimeRange selRange = traceContext.getSelectionRange(); long beginTS = selRange.getStartTime().getValue(); long endTS = selRange.getEndTime().getValue(); if (beginTS == endTS) { beginTS = winRange.getStartTime().getValue(); endTS = winRange.getEndTime().getValue(); } ITmfTrace trace = cfe.getTrace(); ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(trace, KernelAnalysis.ID); if (ssq != null) { try { int statusQuark = ssq.getQuarkRelative(cfe.getThreadQuark(), Attributes.STATUS); long ssqEndTS = ssq.getCurrentEndTime(); long ssqBeginTS = ssq.getStartTime(); if (beginTS < ssqBeginTS) { beginTS = ssqBeginTS; } if (endTS > ssqEndTS) { endTS = ssqEndTS; } ITmfStateInterval currentInterval = ssq.querySingleState(beginTS, statusQuark); if (isIntervalInStateActive(currentInterval)) { return true; } long ts = currentInterval.getEndTime(); while (ts != -1 && ts < endTS) { ts++; currentInterval = ssq.querySingleState(ts, statusQuark); if (isIntervalInStateActive(currentInterval)) { return true; } ts = currentInterval.getEndTime(); } } catch (AttributeNotFoundException | StateSystemDisposedException e) { } } } return false; }
Source:
public List<SSLContext> getConfiguredSSLContexts() { return this.configuredSSLContexts; }

Target:
public List<SSLContext> getConfiguredSSLContexts() throws DynamicSSLContextException { if (this.configuredSSLContexts != null) { return this.configuredSSLContexts; } try { return AUTH_CONTEXT_CLIENT.getConfiguredSSLContexts(AuthenticationContext.captureCurrent()); } catch (GeneralSecurityException e) { throw ElytronMessages.log.cannotObtainConfiguredSSLContexts(e); } }