auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void disableProject(@NonNull AbstractProject project, @NonNull TaskListener listener) throws IOException { if (project.supportsMakeDisabled()) { project.makeDisabled(true); listener.getLogger().println(Messages.SubversionSCN_disableProject_disabled()); } else { listener.getLogger().println(Messages.SubversionSCN_disableProject_unsupported()); } }

Target:
private void disableProject(@NonNull AbstractProject project, @NonNull TaskListener listener) throws IOException { if (project.supportsMakeDisabled()) { project.makeDisabled(true); listener.getLogger().println(Messages.SubversionSCM_disableProject_disabled()); } else { listener.getLogger().println(Messages.SubversionSCM_disableProject_unsupported()); } }
Source:
private String getAccessToken() { if (ssoToken == null) { URI ssoURI = null; if (ssoUrl != null) { ssoURI = SsoUtils.buildUrl(ssoUrl); } else { if (kerberos) { ssoURI = SsoUtils.buildSsoUrlKerberos(url); } else { ssoURI = SsoUtils.buildSsoUrlBasic(url, user, password); } } JsonNode node = getSsoResponse(ssoURI); if (node.isArray()) { node = node.get(0); } if (node.get("error") != null) { throw new RuntimeException( String.format( "Error during SSO authentication %1$s : %2$s", node.get("error_code"), node.get("error") ) ); } ssoToken = node.get(ssoTokenName).getTextValue(); } return ssoToken; }

Target:
private String getAccessToken() { if (ssoToken == null) { URI ssoURI = ssoUrl != null ? SsoUtils.buildUrl(ssoUrl) : kerberos ? SsoUtils.buildSsoUrlKerberos(url) : SsoUtils.buildSsoUrlBasic(url, user, password); JsonNode node = getSsoResponse(ssoURI); if (node.isArray()) { node = node.get(0); } if (node.get("error") != null) { throw new RuntimeException( String.format( "Error during SSO authentication %1$s : %2$s", node.get("error_code"), node.get("error") ) ); } ssoToken = node.get(ssoTokenName).getTextValue(); } return ssoToken; }
Source:
void fullWURefresh(WorkunitInfo wu, boolean includeGraphs, boolean includeResults, boolean includeSourceFiles, boolean includeApplicationValues) throws Exception { getSoapProxy(); WUInfoRequestWrapper request = new WUInfoRequestWrapper(); request.setWuid(wu.getWuid()); request.setIncludeGraphs(includeGraphs); request.setIncludeResults(includeResults); request.setIncludeResultsViewNames(includeResults); request.setSuppressResultSchemas(!includeResults); request.setIncludeSourceFiles(includeSourceFiles); request.setIncludeApplicationValues(includeApplicationValues); WUInfoResponseWrapper response = null; if (targetVersion.major==6) { response=new WUInfoResponseWrapper(this.version6WorkunitsServiceSoapProxy.WUInfo(request.getRawVersion6())); } else if (targetVersion.major==7) { response=new WUInfoResponseWrapper(this.wsWorkunitsServiceSoapProxy.WUInfo(request.getRaw())); } else { throw new NotImplementedException("Can only handle cluster versions 6 and 7, not version " + String.valueOf(targetVersion.major)); } if (response.getWorkunit() == null) { for (ECLExceptionInfo e : response.getExceptions()) { if (e.getCode().equals("20082") || e.getCode().equals("20080")) { wu.setStateID(999); break; } } } else { wu.update(response.getWorkunit()); } }

Target:
void fullWURefresh(WorkunitInfo wu, boolean includeGraphs, boolean includeResults, boolean includeSourceFiles, boolean includeApplicationValues) throws Exception { getSoapProxy(); WUInfoRequestWrapper request = new WUInfoRequestWrapper(); request.setWuid(wu.getWuid()); request.setIncludeGraphs(includeGraphs); request.setIncludeResults(includeResults); request.setIncludeResultsViewNames(includeResults); request.setSuppressResultSchemas(!includeResults); request.setIncludeSourceFiles(includeSourceFiles); request.setIncludeApplicationValues(includeApplicationValues); WUInfoResponseWrapper response = soapWrapper.WUInfo(request); if (response.getWorkunit() == null) { for (WUExceptionWrapper e : response.getExceptions()) { if (e.getCode().equals("20082") || e.getCode().equals("20080")) { wu.setStateID(999); break; } } } else { wu.update(response.getWorkunit()); } }
Source:
public void checkEndOfExecution(CheckerContext context) { EvaluatedConditions ec = evaluatedConditions.pop(); for (Tree condition : Sets.difference(ec.evaluatedToFalse.keySet(), ec.evaluatedToTrue.keySet())) { context.reportIssue(condition, this, "Change this condition so that it does not always evaluate to \"false\"", ec.evaluatedToFalse.get(condition).stream().map(node -> flow(node.parent, node.programState.peekValue())).collect(Collectors.toSet())); } for (Tree condition : Sets.difference(ec.evaluatedToTrue.keySet(), ec.evaluatedToFalse.keySet())) { context.reportIssue(condition, this, "Change this condition so that it does not always evaluate to \"true\"", ec.evaluatedToTrue.get(condition).stream().map(node -> flow(node.parent, node.programState.peekValue())).collect(Collectors.toSet())); } }

Target:
public void checkEndOfExecution(CheckerContext context) { EvaluatedConditions ec = evaluatedConditions.pop(); for (Tree condition : Sets.difference(ec.evaluatedToFalse.keySet(), ec.evaluatedToTrue.keySet())) { context.reportIssue(condition, this, "Change this condition so that it does not always evaluate to \"false\"", ec.evaluatedToFalse.get(condition).stream().map(node -> SECheck.flow(node.parent, node.programState.peekValue())).collect(Collectors.toSet())); } for (Tree condition : Sets.difference(ec.evaluatedToTrue.keySet(), ec.evaluatedToFalse.keySet())) { context.reportIssue(condition, this, "Change this condition so that it does not always evaluate to \"true\"", ec.evaluatedToTrue.get(condition).stream().map(node -> SECheck.flow(node.parent, node.programState.peekValue())).collect(Collectors.toSet())); } }
Source:
public void run() { try { if (thriftServerType == null) { LOG.error("Unknow thrift server type configured, " + "it should be one of {THshaServer, TThreadedSelectorServer, TThreadPoolServer}"); return; } Scribe.Processor processor = new Scribe.Processor(new Receiver()); TNonblockingServerTransport transport = new TNonblockingServerSocket(port); LOG.info("Initializing thrift server:" + thriftServerType.getValue()); switch (thriftServerType) { case THSHA_SERVER: server = createThshaServer(processor, transport); break; case TTHREADED_SELECTOR_SERVER: server = createTThreadedSelectorServer(processor, transport); break; case TTHREADPOOL_SERVER: server = createTThreadPoolServer(processor, transport); break; default: LOG.error("Unsupported thrift server type, should happen!"); } LOG.info("Starting Scribe Source on port " + port); server.serve(); } catch (Exception e) { LOG.warn("Scribe failed", e); } }

Target:
public void run() { try { Receiver receiver = new Receiver(); server = ScribeSourceThriftServerFactory.create(scribeSourceConfiguration, receiver); LOG.info("Starting Scribe Source on port " + scribeSourceConfiguration.port + ", thrift server type:" + scribeSourceConfiguration.thriftServerType); server.serve(); } catch (Exception e) { LOG.warn("Scribe failed", e); } }
Source:
private void dispatchHomeScreen() { CommCareApp currentApp = CommCareApplication._().getCurrentApp(); if (currentApp != null) { boolean appResourcesCorrupted = currentApp.getAppResourceState() == CommCareApplication.STATE_CORRUPTED; boolean dbCorrupted = CommCareApplication._().getDatabaseState() == CommCareApplication.STATE_CORRUPTED; ApplicationRecord currentRecord = currentApp.getAppRecord(); try { if (appResourcesCorrupted || dbCorrupted) { handleDamagedApp(); } else if (!currentRecord.isUsable()) { boolean unseated = handleUnusableApp(currentRecord); if (unseated) { dispatchHomeScreen(); } } else if (!CommCareApplication._().getSession().isActive()) { returnToLogin(); } else if (this.getIntent().hasExtra(SESSION_REQUEST)) { handleExternalLaunch(); } else if (this.getIntent().hasExtra(AndroidShortcuts.EXTRA_KEY_SHORTCUT)) { handleShortcutLaunch(); } else if (CommCareApplication._().isUpdatePending()) { handlePendingUpdate(); } else if (CommCareApplication._().isSyncPending(false)) { handlePendingSync(); } else { refreshView(); } } catch (SessionUnavailableException sue) { returnToLogin(); } } else { if (CommCareApplication._().usableAppsPresent()) { Logger.log(AndroidLogger.TYPE_ERROR_WORKFLOW, "In CommCareHomeActivity with no" + "seated app, but there are other usable apps available on the device."); } Intent i = new Intent(getApplicationContext(), CommCareSetupActivity.class); this.startActivityForResult(i, INIT_APP); } }

Target:
private void dispatchHomeScreen() { CommCareApp currentApp = CommCareApplication._().getCurrentApp(); if (currentApp != null) { boolean appResourcesCorrupted = currentApp.getAppResourceState() == CommCareApplication.STATE_CORRUPTED; boolean dbCorrupted = CommCareApplication._().getDatabaseState() == CommCareApplication.STATE_CORRUPTED; ApplicationRecord currentRecord = currentApp.getAppRecord(); try { if (appResourcesCorrupted || dbCorrupted) { handleDamagedApp(); } else if (!currentRecord.isUsable()) { boolean unseated = handleUnusableApp(currentRecord); if (unseated) { dispatchHomeScreen(); } } else if (!CommCareApplication._().getSession().isActive()) { SessionActivityRegistration.returnToLogin(this); } else if (this.getIntent().hasExtra(SESSION_REQUEST)) { handleExternalLaunch(); } else if (this.getIntent().hasExtra(AndroidShortcuts.EXTRA_KEY_SHORTCUT)) { handleShortcutLaunch(); } else if (CommCareApplication._().isUpdatePending()) { handlePendingUpdate(); } else if (CommCareApplication._().isSyncPending(false)) { handlePendingSync(); } else { refreshView(); } } catch (SessionUnavailableException sue) { SessionActivityRegistration.returnToLogin(this); } } else { if (CommCareApplication._().usableAppsPresent()) { Logger.log(AndroidLogger.TYPE_ERROR_WORKFLOW, "In CommCareHomeActivity with no" + "seated app, but there are other usable apps available on the device."); } Intent i = new Intent(getApplicationContext(), CommCareSetupActivity.class); this.startActivityForResult(i, INIT_APP); } }
Source:
public AsyncClientHttpRequest createAsyncRequest(URI uri, HttpMethod httpMethod) throws IOException { AsyncClientHttpRequest request = this.delegate.createAsyncRequest(uri, httpMethod); Span span = getCurrentSpan(); if (span == null) { setHeader(request, Span.NOT_SAMPLED_NAME, "true"); return request; } enrichWithTraceHeaders(request, span); publish(new ClientSentEvent(this, span)); return request; }

Target:
public AsyncClientHttpRequest createAsyncRequest(URI uri, HttpMethod httpMethod) throws IOException { AsyncClientHttpRequest request = this.delegate.createAsyncRequest(uri, httpMethod); if (!isTracing()) { doNotSampleThisSpan(request); return request; } publishStartEvent(request); return request; }
Source:
private boolean setSealedReplicas(List<String> sealedReplicas) { synchronized (participateLock) { InstanceConfig instanceConfig = helixAdmin.getInstanceConfig(clusterName, instanceName); if (instanceConfig == null) { throw new IllegalStateException( "No instance config found for cluster: \"" + clusterName + "\", instance: \"" + instanceName + "\""); } logger.trace("Setting InstanceConfig with list of sealed replicas: {}", Arrays.toString(sealedReplicas.toArray())); instanceConfig.getRecord().setListField(ClusterMapUtils.SEALED_STR, sealedReplicas); return helixAdmin.setInstanceConfig(clusterName, instanceName, instanceConfig); } }

Target:
private boolean setSealedReplicas(List<String> sealedReplicas) { InstanceConfig instanceConfig = helixAdmin.getInstanceConfig(clusterName, instanceName); if (instanceConfig == null) { throw new IllegalStateException( "No instance config found for cluster: \"" + clusterName + "\", instance: \"" + instanceName + "\""); } logger.trace("Setting InstanceConfig with list of sealed replicas: {}", Arrays.toString(sealedReplicas.toArray())); instanceConfig.getRecord().setListField(ClusterMapUtils.SEALED_STR, sealedReplicas); return helixAdmin.setInstanceConfig(clusterName, instanceName, instanceConfig); }
Source:
public static String join(String delimiter, List<String> strings) { StringJoiner joiner = new StringJoiner(delimiter); for (CharSequence cs : strings) { joiner.add(cs); } return joiner.toString(); }

Target:
public static String join(String delimiter, List<String> strings) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < strings.size(); i++) { if (i > 0) { sb.append(delimiter); } sb.append(strings.get(i)); } return sb.toString(); }
Source:
private boolean checkForAvailabilityIn(String applicationIdentifier, int times) throws InterruptedException { while (times > 0) { for (WebkitApplication application : registeredApplications) { if (application.getBundleId().equals(applicationIdentifier)) { if (log.isLoggable(Level.FINE)) { log.log(Level.FINE, "application available in registeredApplications"); } return true; } } if (--times == 0) break; if (log.isLoggable(Level.FINE)) { log.log(Level.FINE, "Sleeping for 10 ms in checking availability..."); } Thread.sleep(10); } return false; }

Target:
private boolean checkForAvailabilityIn(String applicationIdentifier, int times) throws InterruptedException { while (times > 0) { for (WebkitApplication application : registeredApplications) { if (application.getBundleId().equals(applicationIdentifier)) { if (log.isLoggable(Level.FINE)) { log.log(Level.FINE, "Application available in the list of registered applications"); } return true; } } if (--times == 0) { break; } if (log.isLoggable(Level.FINE)) { log.log(Level.FINE, "Sleeping for 10 ms in checking availability..."); } Thread.sleep(10); } return false; }
Source:
public Set<String> getStageNames() { return stages.keySet(); }

Target:
public Set<String> getStageNames() { return Collections.unmodifiableSet(new HashSet<String>(stages.keySet())); }
Source:
private void validateMetrics(final List<CollectWgsMetricsFromQuerySorted.QuerySortedSeqMetrics> metrics, final long genomeSize) { for (final CollectWgsMetricsFromQuerySorted.QuerySortedSeqMetrics row : metrics) { final boolean isRaw = row.TYPE == CollectWgsMetricsFromQuerySorted.FILTERING_STRINGENCY.RAW; Assert.assertEquals(row.GENOME_TERRITORY, genomeSize); Assert.assertEquals(row.TOTAL_BASES, 606); Assert.assertEquals(row.TOTAL_PASSING_BASES, isRaw ? 238 : 200); Assert.assertEquals(row.PCT_EXC_OVERLAP, isRaw ? 0.085809 : 0.013201); Assert.assertEquals(row.PCT_EXC_BASEQ, isRaw ? 0.188119 : 0.156766); Assert.assertEquals(row.PCT_EXC_MAPQ, isRaw ? 0.0 : 0.166667); Assert.assertEquals(row.PCT_EXC_DUPE, 0.333333); Assert.assertEquals(row.TOTAL_READ_PAIRS, 3); Assert.assertEquals(row.TOTAL_DUPE_PAIRS, 1); Assert.assertEquals(row.TOTAL_ORIENTED_PAIRS, 2); Assert.assertEquals(row.MEAN_INSERT_SIZE, 118.0); } }

Target:
private void validateMetrics(final List<CollectWgsMetricsFromQuerySorted.QuerySortedSeqMetrics> metrics, final long genomeSize) { for (final CollectWgsMetricsFromQuerySorted.QuerySortedSeqMetrics row : metrics) { final boolean isRaw = row.TYPE == CollectWgsMetricsFromQuerySorted.FILTERING_STRINGENCY.RAW; Assert.assertEquals(row.GENOME_TERRITORY, genomeSize); Assert.assertEquals(row.TOTAL_BASES, 606); Assert.assertEquals(row.TOTAL_PASSING_BASES, isRaw ? 238 : 200); Assert.assertEquals(row.PCT_EXC_OVERLAP, isRaw ? 0.085809 : 0.013201); Assert.assertEquals(row.PCT_EXC_BASEQ, isRaw ? 0.188119 : 0.156766); Assert.assertEquals(row.PCT_EXC_MAPQ, isRaw ? 0.0 : 0.166667); Assert.assertEquals(row.PCT_EXC_DUPE, 0.333333); Assert.assertEquals(row.TOTAL_READ_PAIRS, 3); Assert.assertEquals(row.TOTAL_DUPE_PAIRS, 1); Assert.assertEquals(row.TOTAL_ORIENTED_PAIRS, 2); Assert.assertEquals(row.MEAN_INSERT_SIZE, 118.0); final BigDecimal meanCov = new BigDecimal((double)row.TOTAL_PASSING_BASES / genomeSize).setScale(6, RoundingMode.HALF_UP); Assert.assertEquals(Double.compare(row.MEAN_COVERAGE, meanCov.doubleValue()), 0); } }
Source:
public List<RebaseTodoLine> readRebaseTodo(String path, boolean includeComments) throws IOException { byte[] buf = IO.readFully(new File(repo.getDirectory(), path)); int ptr = 0; int tokenBegin = 0; List<RebaseTodoLine> r = new LinkedList<RebaseTodoLine>(); while (ptr < buf.length) { tokenBegin = ptr; ptr = RawParseUtils.nextLF(buf, ptr); int lineStart = tokenBegin; int lineEnd = ptr - 2; if (lineEnd >= 0 && buf[lineEnd] == '\r') lineEnd--; if (buf[tokenBegin] == '#') { if (includeComments) { parseComments(buf, tokenBegin, r, lineEnd); } } else { tokenBegin = nextParsableToken(buf, tokenBegin, lineEnd); if (tokenBegin == -1) { if (includeComments) r.add(new RebaseTodoLine(RawParseUtils.decode(buf, lineStart, 1 + lineEnd))); continue; } RebaseTodoLine line = parseLine(buf, tokenBegin, lineEnd); if (line == null) continue; r.add(line); } } return r; }

Target:
public List<RebaseTodoLine> readRebaseTodo(String path, boolean includeComments) throws IOException { byte[] buf = IO.readFully(new File(repo.getDirectory(), path)); int ptr = 0; int tokenBegin = 0; List<RebaseTodoLine> r = new LinkedList<RebaseTodoLine>(); while (ptr < buf.length) { tokenBegin = ptr; ptr = RawParseUtils.nextLF(buf, ptr); int lineStart = tokenBegin; int lineEnd = ptr - 2; if (lineEnd >= 0 && buf[lineEnd] == '\r') lineEnd--; if (buf[tokenBegin] == '#') { if (includeComments) parseComments(buf, tokenBegin, r, lineEnd); } else { tokenBegin = nextParsableToken(buf, tokenBegin, lineEnd); if (tokenBegin == -1) { if (includeComments) r.add(new RebaseTodoLine(RawParseUtils.decode(buf, lineStart, 1 + lineEnd))); continue; } RebaseTodoLine line = parseLine(buf, tokenBegin, lineEnd); if (line == null) continue; r.add(line); } } return r; }
Source:
public static void setupLogging() { final Logger rootLogger = LogManager.getRootLogger(); rootLogger.setLevel(Level.OFF); final ConsoleAppender ca = (ConsoleAppender) rootLogger.getAppender("stdout"); ca.setLayout(new PatternLayout("%d{MMM dd yyyy HH:mm:ss} %5p [%t] (%F:%L) - %m%n")); rootLogger.setLevel(Level.INFO); Logger.getLogger(ClientCnxn.class).setLevel(Level.OFF); Logger.getLogger(MockMongoFactory.class).setLevel(Level.OFF); }

Target:
public static void setupLogging() { final Logger rootLogger = LogManager.getRootLogger(); final ConsoleAppender ca = (ConsoleAppender) rootLogger.getAppender("stdout"); ca.setLayout(new PatternLayout("%d{MMM dd yyyy HH:mm:ss} %5p [%t] (%F:%L) - %m%n")); rootLogger.setLevel(Level.INFO); Logger.getLogger(ClientCnxn.class).setLevel(Level.OFF); Logger.getLogger(MockMongoFactory.class).setLevel(Level.OFF); }
Source:
private boolean filterNode(StructuralNode node) { for (ScanFilter scanFilter : parentScanner.getScanFilters()) { try { FilterResult filterResult = scanFilter.isFiltered(node); if (filterResult.isFiltered()) { try { HttpMessage msg = node.getHistoryReference().getHttpMessage(); parentScanner.notifyFilteredMessage(msg, filterResult.getReason()); } catch (HttpMalformedHeaderException | DatabaseException e) { log.error( "Error while getting httpmessage from history reference: " + e.getMessage(), e); } if (log.isDebugEnabled()) { log.debug( "Ignoring filtered node: " + node.getName() + " Reason: " + filterResult.getReason()); } return true; } } catch (Exception ex) { log.error(ex.getMessage(), ex); } } return false; }

Target:
private boolean filterNode(StructuralNode node) { for (ScanFilter scanFilter : parentScanner.getScanFilters()) { try { FilterResult filterResult = scanFilter.isFiltered(node); if (filterResult.isFiltered()) { try { HttpMessage msg = node.getHistoryReference().getHttpMessage(); parentScanner.notifyFilteredMessage(msg, filterResult.getReason()); } catch (HttpMalformedHeaderException | DatabaseException e) { log.warn( "Error while getting httpmessage from history reference: " + e.getMessage(), e); } if (log.isDebugEnabled()) { log.debug( "Ignoring filtered node: " + node.getName() + " Reason: " + filterResult.getReason()); } return true; } } catch (Exception ex) { log.error(ex.getMessage(), ex); } } return false; }
Source:
private void checkRuleParams( boolean checkRuleID ) { if( nodeId == null || nodeId.trim().length() == 0 ) { throw new IllegalArgumentException( "nodeId must be specified" ); } if( checkRuleID ) { if( ruleID == null || ruleID.trim().length() == 0 ) { throw new IllegalArgumentException( "ruleID must be specified" ); } } }

Target:
private void checkRuleParams( boolean checkRuleID ) { if( StringUtils.isBlank( nodeId ) ) { throw new IllegalArgumentException( "nodeId must be specified" ); } if( checkRuleID ) { if( StringUtils.isBlank( ruleID ) ) { throw new IllegalArgumentException( "ruleID must be specified" ); } } }
Source:
public static void setUp() { setUp("rabbit"); }

Target:
public static void setUp() { setUp("redis"); }
Source:
public abstract void writeTo(OutputStream os, ContentFilter filter) throws IOException; @Override public boolean shouldBeFiltered() { return false; }

Target:
public abstract void writeTo(OutputStream os, ContentFilter filter) throws IOException; @Override public final boolean shouldBeFiltered() { return false; }
Source:
public KetchSystem() { this(defaultExecutor(), "refs/txn/"); }

Target:
public KetchSystem() { this(defaultExecutor(), DEFAULT_TXN_NAMESPACE); }
Source:
public void onSessionExpired() { if (_shutdown) { return; } stopEventThread(); _leaderDatastreamAddOrDeleteEventScheduled.set(false); if (_leaderDatastreamAddOrDeleteEventScheduledFuture != null) { _leaderDatastreamAddOrDeleteEventScheduledFuture.cancel(true); _leaderDatastreamAddOrDeleteEventScheduledFuture = null; } _leaderDoAssignmentScheduled.set(false); if (_leaderDoAssignmentScheduledFuture != null) { _leaderDoAssignmentScheduledFuture.cancel(true); _leaderDoAssignmentScheduledFuture = null; } _eventQueue.clear(); List<Future<Boolean>> assignmentChangeFutures = _connectors.keySet().stream() .map(connectorType -> { _assignmentChangeThreadPool.get(connectorType).shutdownNow(); _assignmentChangeThreadPool.put(connectorType, Executors.newSingleThreadExecutor()); return dispatchAssignmentChangeIfNeeded(connectorType, new ArrayList<>(), false, false); }) .filter(Objects::nonNull) .collect(Collectors.toList()); ExecutorService threadPoolExecutor = Executors.newFixedThreadPool(1); threadPoolExecutor.submit(() -> { Instant start = Instant.now(); try { getAssignmentsFuture(assignmentChangeFutures, start); } catch (Exception e) { _log.warn("Hit exception while clearing the assignment list", e); } finally { assignmentChangeFutures.forEach(future -> future.cancel(true)); } }); onDatastreamChange(new ArrayList<>()); _assignedDatastreamTasks.clear(); }

Target:
public void onSessionExpired() { _log.info("Coordinator::onSessionExpired is called"); _zkSessionExpired = true; if (_shutdown) { return; } stopEventThread(); _leaderDatastreamAddOrDeleteEventScheduled.set(false); if (_leaderDatastreamAddOrDeleteEventScheduledFuture != null) { _leaderDatastreamAddOrDeleteEventScheduledFuture.cancel(true); _leaderDatastreamAddOrDeleteEventScheduledFuture = null; } _leaderDoAssignmentScheduled.set(false); if (_leaderDoAssignmentScheduledFuture != null) { _leaderDoAssignmentScheduledFuture.cancel(true); _leaderDoAssignmentScheduledFuture = null; } _eventQueue.clear(); List<Future<Boolean>> assignmentChangeFutures = _connectors.keySet().stream() .map(connectorType -> { _assignmentChangeThreadPool.get(connectorType).shutdownNow(); _assignmentChangeThreadPool.put(connectorType, Executors.newSingleThreadExecutor()); return dispatchAssignmentChangeIfNeeded(connectorType, new ArrayList<>(), false, false); }) .filter(Objects::nonNull) .collect(Collectors.toList()); onDatastreamChange(new ArrayList<>()); for (DatastreamTask task : _assignedDatastreamTasks.values()) { ((EventProducer) task.getEventProducer()).shutdown(true); } ExecutorService threadPoolExecutor = Executors.newFixedThreadPool(1); threadPoolExecutor.submit(() -> { Instant start = Instant.now(); try { getAssignmentsFuture(assignmentChangeFutures, start); } catch (Exception e) { _log.warn("Hit exception while clearing the assignment list", e); } finally { assignmentChangeFutures.forEach(future -> future.cancel(true)); } }); _assignedDatastreamTasks.clear(); _log.info("Coordinator::onSessionExpired completed successfully."); }
Source:
protected int doWork() { if (OUTPUT.exists()) { throw new PicardException(OUTPUT.getAbsolutePath() + " already exists. Delete this file and try again, or specify a different output file."); } final SortingCollection<String> sequenceNames = makeSortingCollection(); try (BufferedWriter writer = makeWriter()) { final ReferenceSequenceFile refSeqFile = ReferenceSequenceFileFactory. getReferenceSequenceFile(REFERENCE, TRUNCATE_NAMES_AT_WHITESPACE); SAMSequenceDictionaryCodec samDictCodec = new SAMSequenceDictionaryCodec(writer); samDictCodec.encodeHeaderLine(false); ReferenceSequence refSeq; while ((refSeq = refSeqFile.nextSequence()) != null) { final SAMSequenceRecord samSequenceRecord = makeSequenceRecord(refSeq); samDictCodec.encodeSequenceRecord(samSequenceRecord); sequenceNames.add(refSeq.getName()); } } catch (FileNotFoundException e) { throw new PicardException("File " + OUTPUT.getAbsolutePath() + " not found"); } catch (IOException e) { throw new PicardException("Can't write to or close output file " + OUTPUT.getAbsolutePath()); } final CloseableIterator<String> iterator = sequenceNames.iterator(); String first = iterator.hasNext() ? iterator.next() : ""; while (iterator.hasNext()) { final String next = iterator.next(); if (first.equals(next)) { OUTPUT.delete(); throw new PicardException("Sequence name " + first + " appears more than once in reference file"); } first = next; } return 0; }

Target:
protected int doWork() { if (OUTPUT.exists()) { throw new PicardException(OUTPUT.getAbsolutePath() + " already exists. Delete this file and try again, or specify a different output file."); } final SortingCollection<String> sequenceNames = makeSortingCollection(); try (BufferedWriter writer = makeWriter()) { final ReferenceSequenceFile refSeqFile = ReferenceSequenceFileFactory. getReferenceSequenceFile(REFERENCE, TRUNCATE_NAMES_AT_WHITESPACE); SAMSequenceDictionaryCodec samDictCodec = new SAMSequenceDictionaryCodec(writer); samDictCodec.encodeHeaderLine(false); for (ReferenceSequence refSeq = refSeqFile.nextSequence(); refSeq != null; refSeq = refSeqFile.nextSequence()) { final SAMSequenceRecord samSequenceRecord = makeSequenceRecord(refSeq); samDictCodec.encodeSequenceRecord(samSequenceRecord); sequenceNames.add(refSeq.getName()); } } catch (FileNotFoundException e) { throw new PicardException("File " + OUTPUT.getAbsolutePath() + " not found"); } catch (IOException e) { throw new PicardException("Can't write to or close output file " + OUTPUT.getAbsolutePath()); } final CloseableIterator<String> iterator = sequenceNames.iterator(); if(!iterator.hasNext()) return 0; String current = iterator.next(); while (iterator.hasNext()) { final String next = iterator.next(); if (current.equals(next)) { OUTPUT.delete(); throw new PicardException("Sequence name " + current + " appears more than once in reference file"); } current = next; } return 0; }
Source:
public void setUp() throws Exception { serializedCommandFilterData = new XStreamSerializer().serialize(COMMAND_NAME_FILTER, String.class).getData(); serializedCommandFilterClassName = COMMAND_NAME_FILTER.getClass().getName(); String atomicConsistentHashFieldName = "atomicConsistentHash"; atomicConsistentHashField = SpringCloudCommandRouter.class.getDeclaredField(atomicConsistentHashFieldName); String blackListedServiceInstancesFieldName = "blackListedServiceInstances"; blackListedServiceInstancesField = SpringCloudCommandRouter.class.getDeclaredField( blackListedServiceInstancesFieldName); serviceInstanceMetadata = new HashMap<>(); when(localServiceInstance.getServiceId()).thenReturn(SERVICE_INSTANCE_ID); when(localServiceInstance.getUri()).thenReturn(SERVICE_INSTANCE_URI); when(localServiceInstance.getMetadata()).thenReturn(serviceInstanceMetadata); when(discoveryClient.getServices()).thenReturn(singletonList(SERVICE_INSTANCE_ID)); when(discoveryClient.getInstances(SERVICE_INSTANCE_ID)) .thenReturn(singletonList(localServiceInstance)); when(routingStrategy.getRoutingKey(any())).thenReturn(ROUTING_KEY); testSubject = SpringCloudCommandRouter.builder() .discoveryClient(discoveryClient) .localServiceInstance(localServiceInstance) .routingStrategy(routingStrategy) .serviceInstanceFilter(s -> true) .consistentHashChangeListener(consistentHashChangeListener) .build(); }

Target:
public void setUp() throws Exception { serializedCommandFilterData = new XStreamSerializer().serialize(COMMAND_NAME_FILTER, String.class).getData(); serializedCommandFilterClassName = COMMAND_NAME_FILTER.getClass().getName(); String atomicConsistentHashFieldName = "atomicConsistentHash"; atomicConsistentHashField = SpringCloudCommandRouter.class.getDeclaredField(atomicConsistentHashFieldName); String blackListedServiceInstancesFieldName = "blackListedServiceInstances"; blackListedServiceInstancesField = SpringCloudCommandRouter.class.getDeclaredField( blackListedServiceInstancesFieldName); serviceInstanceMetadata = new HashMap<>(); when(localServiceInstance.getServiceId()).thenReturn(SERVICE_INSTANCE_ID); when(localServiceInstance.getUri()).thenReturn(SERVICE_INSTANCE_URI); when(localServiceInstance.getMetadata()).thenReturn(serviceInstanceMetadata); when(discoveryClient.getServices()).thenReturn(singletonList(SERVICE_INSTANCE_ID)); when(discoveryClient.getInstances(SERVICE_INSTANCE_ID)) .thenReturn(singletonList(localServiceInstance)); when(routingStrategy.getRoutingKey(any())).thenReturn(ROUTING_KEY); testSubject = SpringCloudCommandRouter.builder() .discoveryClient(discoveryClient) .localServiceInstance(localServiceInstance) .routingStrategy(routingStrategy) .serviceInstanceFilter(serviceInstance -> true) .consistentHashChangeListener(consistentHashChangeListener) .build(); }
Source:
public SiteRequestCondition(SiteResolver siteResolver, Set<String> validSites){ this.siteResolver = Preconditions.checkNotNull(siteResolver); this.validSites = ImmutableSet.copyOf(Preconditions.checkNotNull(validSites)); }

Target:
public SiteRequestCondition(SiteResolver siteResolver, Set<String> validSites){ this.siteResolver = Preconditions.checkNotNull(siteResolver); this.validSites = ImmutableSet.copyOf(validSites); }
Source:
public static Slice toSphericalGeography(@SqlType(GEOMETRY_TYPE_NAME) Slice input) { Envelope envelope = deserializeEnvelope(input); if (envelope != null && !envelope.isEmpty()) { validateSphericalPoint(envelope.getUpperLeft()); validateSphericalPoint(envelope.getUpperRight()); validateSphericalPoint(envelope.getLowerLeft()); validateSphericalPoint(envelope.getLowerRight()); } return input; }

Target:
public static Slice toSphericalGeography(@SqlType(GEOMETRY_TYPE_NAME) Slice input) { Envelope envelope = deserializeEnvelope(input); if (envelope != null) { checkLatitude(envelope.getYMin()); checkLatitude(envelope.getYMax()); checkLongitude(envelope.getXMin()); checkLongitude(envelope.getXMax()); } OGCGeometry geometry = deserialize(input); if (geometry.is3D()) { throw new PrestoException(INVALID_FUNCTION_ARGUMENT, "Cannot convert 3D geometry to a spherical geography"); } GeometryCursor cursor = geometry.getEsriGeometryCursor(); while (true) { com.esri.core.geometry.Geometry subGeometry = cursor.next(); if (subGeometry == null) { break; } if (!GEOMETRY_TYPES_FOR_SPHERICAL_GEOGRAPHY.contains(subGeometry.getType())) { throw new PrestoException(INVALID_FUNCTION_ARGUMENT, "Cannot convert geometry of this type to spherical geography: " + subGeometry.getType()); } } return input; }
Source:
public @Nullable String resolve(ITmfStateSystem ss, long value, int quark) throws StateSystemDisposedException { Map<Long, String> stringPool = fStringPools.computeIfAbsent(quark, unused -> HashBiMap.<String, Long> create()).inverse(); if (quark != ITmfStateSystem.INVALID_ATTRIBUTE) { String string = stringPool.get(value); if (string != null) { return string; } Object resolved = ss.querySingleState(value, quark).getValue(); if (resolved instanceof String) { return (String) resolved; } } return null; }

Target:
public @Nullable String resolve(ITmfStateSystem ss, long value, int quark) throws StateSystemDisposedException { if (quark != ITmfStateSystem.INVALID_ATTRIBUTE) { Map<Long, String> stringPool = fStringPools.computeIfAbsent(quark, unused -> HashBiMap.<String, Long> create()).inverse(); String string = stringPool.get(value); if (string != null) { return string; } Object resolved = ss.querySingleState(value, quark).getValue(); if (resolved instanceof String) { return (String) resolved; } } return null; }
Source:
public void getMeasurementJsonSuccess() { final CountDownLatch signal = new CountDownLatch(1); new OkHttpClient().newCall(new Request.Builder().url(JSON_URL).build()).enqueue(new GetMeasurementCallback() { @Override public void onSuccess(String json) { Assert.assertNotNull(json); signal.countDown(); } @Override public void onError(String msg) { Assert.fail(); signal.countDown(); } }); try { signal.await(1, TimeUnit.MINUTES); } catch (InterruptedException e) { e.printStackTrace(); Assert.fail(); } }

Target:
public void getMeasurementJsonSuccess() { final CountDownLatch signal = new CountDownLatch(1); a.getOkHttpClient().newCall(new Request.Builder().url(JSON_URL).build()).enqueue(new GetMeasurementJsonCallback() { @Override public void onSuccess(String json) { Assert.assertNotNull(json); signal.countDown(); } @Override public void onError(String msg) { Assert.fail(); signal.countDown(); } }); try { signal.await(1, TimeUnit.MINUTES); } catch (InterruptedException e) { e.printStackTrace(); Assert.fail(); } }
Source:
public boolean handleSelectedContextItem(AdapterView.AdapterContextMenuInfo info, MenuItem item) { try { if (item.getGroupId() == 2) { ProfileData data = (ProfileData) info.targetView.getTag(); if (item.getItemId() == 0) { startActivity( new Intent(mContext, ProfileActivity.class).putExtra( "profile", data ) ); } else if (item.getItemId() == 1) { if (data.isAdmin()) { Toast.makeText(mContext, R.string.info_platoon_member_demoting, Toast.LENGTH_SHORT).show(); } else { Toast.makeText(mContext, R.string.info_platoon_member_promoting, Toast.LENGTH_SHORT).show(); } new AsyncPlatoonMemberManagement(mContext, data.getId(), mPlatoonData).execute(!data.isAdmin()); } else if (item.getItemId() == 2) { Toast.makeText(mContext, R.string.info_platoon_member_kicking, Toast.LENGTH_SHORT).show(); new AsyncPlatoonMemberManagement(mContext, data.getId(), mPlatoonData).execute(); } else if (item.getItemId() == 3) { Toast.makeText(mContext, R.string.info_platoon_member_new_ok, Toast.LENGTH_SHORT).show(); new AsyncPlatoonRespond( mContext, mPlatoonData, data.getId(), true ).execute( mSharedPreferences.getString(Constants.SP_BL_PROFILE_CHECKSUM, "") ); } else if (item.getItemId() == 4) { Toast.makeText(mContext, R.string.info_platoon_member_new_false, Toast.LENGTH_SHORT).show(); new AsyncPlatoonRespond( mContext, mPlatoonData, data.getId(), false ).execute(mSharedPreferences.getString(Constants.SP_BL_PROFILE_CHECKSUM, "")); } } } catch (Exception ex) { ex.printStackTrace(); return false; } return true; }

Target:
public boolean handleSelectedContextItem(AdapterView.AdapterContextMenuInfo info, MenuItem item) { if (item.getGroupId() == 2) { ProfileData user = (ProfileData) info.targetView.getTag(); switch(item.getItemId()) { case 0: startActivity(new Intent(mContext, ProfileActivity.class).putExtra("profile", user)); break; case 1: modifyMembership(user); break; case 2: kickUser(user); break; case 3: answerUserApplication(user, true); break; case 4: answerUserApplication(user, false); break; default: return false; } } return true; }
Source:
public void testCompleteVerificationScan() { Buffer buffer = (Buffer) store; buffer.start(); addRandomElementsToBufferAndList(buffer, TestData.getScaleCount()); Iterator<Write> iterator = buffer.iterator(); while(iterator.hasNext()) { buffer.verify(iterator.next(), true); } float percent = Reflection.call(buffer, "getPercentVerifyScans"); Assert.assertTrue(percent == 1.0f); }

Target:
public void testCompleteVerificationScan() { Buffer buffer = (Buffer) store; List<Write> stored = addRandomElementsToBufferAndList(buffer, TestData.getScaleCount()); Iterator<Write> iterator = stored.iterator(); while(iterator.hasNext()) { Write write = iterator.next(); buffer.verify(write.getKey().toString(), write.getValue().getTObject(), write.getRecord().longValue()); } float percent = Reflection.call(buffer, "getPercentVerifyScans"); Assert.assertEquals(1.0f, percent, 0f); }
Source:
public void testReplace() { final String value1 = "A" ; final String value2 = "B" ; final Cache<Integer, Object> testCache = new CacheSimple<>(5); testCache.put(1, value1); testCache.put(1, value2); assertEquals("Wrong size", 1, testCache.size()) ; assertEquals("Wrong slot contents", value2, testCache.getIfPresent(1)) ; }

Target:
public void testReplace() { final Integer key = 1 ; final String value1 = "A" ; final String value2 = "B" ; final Cache<Integer, Object> testCache = new CacheSimple<>(5); testCache.put(key, value1); testCache.put(key, value2); assertEquals("Wrong size", 1, testCache.size()) ; assertEquals("Wrong slot contents", value2, testCache.getIfPresent(key)) ; }
Source:
public static String parseRoot(String zookeepers) { int slashIndex = zookeepers.indexOf("/"); if (slashIndex != -1) { return zookeepers.substring(slashIndex); } return "/"; }

Target:
public static String parseRoot(String zookeepers) { int slashIndex = zookeepers.indexOf("/"); if (slashIndex != -1) { return zookeepers.substring(slashIndex).trim(); } return "/"; }
Source:
public HttpSecurity addFilterAt(Filter filter, Class<? extends Filter> atFilter) { this.comparitor.registerAt(filter.getClass(), atFilter); this.filters.add(filter); return this; }

Target:
public HttpSecurity addFilterAt(Filter filter, Class<? extends Filter> atFilter) { this.comparitor.registerAt(filter.getClass(), atFilter); return addFilter(filter); }
Source:
protected boolean isImageRemovedFromStorage() { VDSReturnValue retValue = getBackend().getResourceManager().RunVdsCommand(VDSCommandType.GetImagesList, new GetImagesListVDSCommandParameters(getStorageDomainId(), getDiskImage().getStoragePoolId())); if (retValue.getSucceeded()) { List<Guid> ids = (List<Guid>) retValue.getReturnValue(); for (Guid id : ids) { if (id.equals(getDiskImage().getId())) { return false; } } return true; } else { log.warnFormat("Failed to retrieve list of images from storage domain '" + getStorageDomainId() + "', " + "therefore there is no proof that image was deleted!"); return false; } }

Target:
protected boolean isImageRemovedFromStorage() { VDSReturnValue retValue = getBackend().getResourceManager().RunVdsCommand(VDSCommandType.GetImagesList, new GetImagesListVDSCommandParameters(getStorageDomainId(), getDiskImage().getStoragePoolId())); if (retValue.getSucceeded()) { List<Guid> ids = (List<Guid>) retValue.getReturnValue(); for (Guid id : ids) { if (id.equals(getDiskImage().getId())) { return false; } } return true; } else { log.warnFormat("Could not retrieve image list from storage domain '{0}' '{1}', disk '{2}' might " + "not have been deleted", getStorageDomainId(), getStorageDomain().getName(), getDiskImage().getId()); return false; } }
Source:
public void transform(StructuredRecord in, Emitter<StructuredRecord> emitter) throws Exception { StructuredRecord.Builder builder = StructuredRecord.builder(outSchema); Schema inSchema = in.getSchema(); List<Field> inFields = inSchema.getFields(); for(Field field : inFields) { LOG.info("Looking at field '" + field.getName() + "'"); String name = field.getName(); if(!outSchemaMap.containsKey(name)) { continue; } Schema.Type outFieldType = outSchemaMap.get(name); if(!compMap.containsKey(name) || compMap.get(name) == CompressorType.NONE) { builder.set(name, in.get(name)); } else { byte[] obj = new byte[0]; if (field.getSchema().getType() == Schema.Type.BYTES){ obj = in.get(name); } else if (field.getSchema().getType() == Schema.Type.STRING) { obj = ((String)in.get(name)).getBytes(); } byte[] outValue = new byte[0]; CompressorType type = compMap.get(name); if(type == CompressorType.SNAPPY) { outValue = Snappy.compress(obj); } else if (type == CompressorType.ZIP) { outValue = compressZIP(obj); } else if (type == CompressorType.GZIP) { outValue = compressGZIP(obj); } if(outFieldType == Schema.Type.BYTES) { builder.set(name, outValue); } } } emitter.emit(builder.build()); }

Target:
public void transform(StructuredRecord in, Emitter<StructuredRecord> emitter) throws Exception { StructuredRecord.Builder builder = StructuredRecord.builder(outSchema); Schema inSchema = in.getSchema(); List<Field> inFields = inSchema.getFields(); for(Field field : inFields) { String name = field.getName(); if(!outSchemaMap.containsKey(name)) { continue; } Schema.Type outFieldType = outSchemaMap. get(name); if(!compMap.containsKey(name) || compMap.get(name) == CompressorType.NONE) { builder.set(name, in.get(name)); } else { byte[] obj = new byte[0]; if (field.getSchema().getType() == Schema.Type.BYTES){ obj = in.get(name); } else if (field.getSchema().getType() == Schema.Type.STRING) { obj = ((String)in.get(name)).getBytes(); } byte[] outValue = new byte[0]; CompressorType type = compMap.get(name); if(type == CompressorType.SNAPPY) { outValue = Snappy.compress(obj); } else if (type == CompressorType.ZIP) { outValue = compressZIP(obj); } else if (type == CompressorType.GZIP) { outValue = compressGZIP(obj); } if(outFieldType == Schema.Type.BYTES) { if(outValue != null) { builder.set(name, outValue); } } else { LOG.warn("Output field '" + name + "' is not of BYTES. In order to emit compressed data, you should set " + "it to type BYTES."); } } } emitter.emit(builder.build()); }
Source:
public void shutdown() { long startTime = SystemTime.getInstance().milliseconds(); try { logger.info("shutdown started"); if (scheduler != null) { scheduler.shutdown(); if (!scheduler.awaitTermination(5, TimeUnit.MINUTES)) { logger.error("Could not terminate all tasks after scheduler shutdown"); } } if (networkServer != null) { networkServer.shutdown(); } if (requestHandlerPool != null) { requestHandlerPool.shutdown(); } if (replicationManager != null) { replicationManager.shutdown(); } if (storageManager != null) { storageManager.shutdown(); } if (connectionPool != null) { connectionPool.shutdown(); } if (reporter != null) { reporter.stop(); } if (notificationSystem != null) { try { notificationSystem.close(); } catch (IOException e) { logger.error("Error while closing notification system.", e); } } if (statsManager != null) { statsManager.shutdown(); } logger.info("shutdown completed"); } catch (Exception e) { logger.error("Error while shutting down server", e); } finally { shutdownLatch.countDown(); long processingTime = SystemTime.getInstance().milliseconds() - startTime; metrics.serverShutdownTimeInMs.update(processingTime); logger.info("Server shutdown time in Ms " + processingTime); } }

Target:
public void shutdown() { long startTime = SystemTime.getInstance().milliseconds(); try { logger.info("shutdown started"); if (scheduler != null) { scheduler.shutdown(); if (!scheduler.awaitTermination(5, TimeUnit.MINUTES)) { logger.error("Could not terminate all tasks after scheduler shutdown"); } } if (statsManager != null) { statsManager.shutdown(); } if (networkServer != null) { networkServer.shutdown(); } if (requestHandlerPool != null) { requestHandlerPool.shutdown(); } if (replicationManager != null) { replicationManager.shutdown(); } if (storageManager != null) { storageManager.shutdown(); } if (connectionPool != null) { connectionPool.shutdown(); } if (reporter != null) { reporter.stop(); } if (notificationSystem != null) { try { notificationSystem.close(); } catch (IOException e) { logger.error("Error while closing notification system.", e); } } logger.info("shutdown completed"); } catch (Exception e) { logger.error("Error while shutting down server", e); } finally { shutdownLatch.countDown(); long processingTime = SystemTime.getInstance().milliseconds() - startTime; metrics.serverShutdownTimeInMs.update(processingTime); logger.info("Server shutdown time in Ms " + processingTime); } }
Source:
public ColumnType getExpectedColumnType(ColumnType type) { return null; }

Target:
public ColumnType getExpectedColumnType(ColumnType type) { return ColumnType.STRING; }
Source:
private AuditerMessage resolveBanSetForResource(PerunSessionImpl perunSession, BanSetForResource banSetForResource) throws InternalErrorException, AttributeNotExistsException, WrongAttributeAssignmentException { try { Member member = perunSession.getPerunBl().getMembersManagerBl().getMemberById(perunSession, banSetForResource.getMemberId()); Resource resource = perunSession.getPerunBl().getResourcesManagerBl().getResourceById(perunSession, banSetForResource.getResourceId()); Attribute attribute = perunSession.getPerunBl().getAttributesManagerBl().getAttribute(perunSession, member, resource, AttributesManager.NS_MEMBER_RESOURCE_ATTR_VIRT + ":isBanned"); return new AuditerMessage(perunSession, new AttributeSetForResourceAndMember(attribute, resource, member)); } catch (MemberNotExistsException | ResourceNotExistsException | MemberResourceMismatchException e) { log.error("Can't resolve virtual attribute value change for " + this.getClass().getSimpleName() + " module because of exception.", e); return null; } }

Target:
private List<AuditEvent> resolveBanSetForResource(PerunSessionImpl perunSession, BanSetForResource banSetForResource) throws InternalErrorException, AttributeNotExistsException, WrongAttributeAssignmentException { List<AuditEvent> resolvingMessages = new ArrayList<>(); try { Member member = perunSession.getPerunBl().getMembersManagerBl().getMemberById(perunSession, banSetForResource.getMemberId()); Resource resource = perunSession.getPerunBl().getResourcesManagerBl().getResourceById(perunSession, banSetForResource.getResourceId()); Attribute attribute = perunSession.getPerunBl().getAttributesManagerBl().getAttribute(perunSession, member, resource, A_MR_V_isBanned); resolvingMessages.add(new AttributeSetForResourceAndMember(attribute, resource, member)); } catch (MemberNotExistsException | ResourceNotExistsException | MemberResourceMismatchException e) { log.error("Can't resolve virtual attribute value change for " + this.getClass().getSimpleName() + " module because of exception.", e); } return resolvingMessages; }
Source:
public Event(String outcome, String[] context, float[] values) { Objects.requireNonNull(context, "context must not be null"); this.outcome = outcome; this.context = context; this.values = values; }

Target:
public Event(String outcome, String[] context, float[] values) { this.outcome = Objects.requireNonNull(outcome, "outcome must not be null"); this.context = Objects.requireNonNull(context, "context must not be null"); this.values = values; }