auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected static void setUp(String transport) { testApplicationBootstrap = new TestApplicationBootstrap(); singleNodeApplication = testApplicationBootstrap.getSingleNodeApplication().run("--transport", transport); integrationSupport = new SingleNodeIntegrationTestSupport(singleNodeApplication); if (testMessageBus != null && !transport.equalsIgnoreCase("local")) { TestMessageBusInjection.injectMessageBus(singleNodeApplication, testMessageBus); } ContainerAttributes cm = singleNodeApplication.containerContext().getBean(ContainerAttributes.class); integrationSupport.addPathListener(Paths.build(Paths.MODULE_DEPLOYMENTS, cm.getId()), deploymentsListener); }

Target:
protected static void setUp(String transport) { testApplicationBootstrap = new TestApplicationBootstrap(); singleNodeApplication = testApplicationBootstrap.getSingleNodeApplication().run("--transport", transport); integrationSupport = new SingleNodeIntegrationTestSupport(singleNodeApplication); if (testMessageBus != null && !transport.equalsIgnoreCase("local")) { TestMessageBusInjection.injectMessageBus(singleNodeApplication, testMessageBus); } ContainerAttributes attribs = singleNodeApplication.containerContext().getBean(ContainerAttributes.class); integrationSupport.addPathListener(Paths.build(Paths.MODULE_DEPLOYMENTS, attribs.getId()), deploymentsListener); }
Source:
private void findDir() { List<Path> candidates = Arrays.asList( Paths.get(configService.getMPConfig().getSecretDir()), Paths.get(System.getProperty("com.sun.aas.instanceRoot"), configService.getMPConfig().getSecretDir()) ); for (Path candidate : candidates) { if (Files.exists(candidate) || Files.isDirectory(candidate) || Files.isReadable(candidate)) { this.directory = candidate; return; } } }

Target:
private Path findDir() throws IOException { String path = configService.getMPConfig().getSecretDir(); List<Path> candidates = Arrays.asList( Paths.get(path), Paths.get(System.getProperty("com.sun.aas.instanceRoot"), path) ); for (Path candidate : candidates) { if (Files.exists(candidate) || Files.isDirectory(candidate) || Files.isReadable(candidate)) { return candidate; } } throw new IOException("Given MPCONFIG directory '"+path+"' is no directory or cannot be read."); }
Source:
public void validateAllProvidedTransactionsExists(final List<TransactionDto> transactionDtos, final Set<Integer> transactionIds) { errors = new MapBindingResult(new HashMap<String, String>(), TransactionDto.class.getName()); if (transactionIds != null && !transactionIds.isEmpty() && transactionIds.size() != transactionDtos.size()) { errors.reject("transactions.does.not.exist", ""); throw new ApiRequestValidationException(errors.getAllErrors()); } }

Target:
public void validateAllProvidedTransactionsExists(final List<TransactionDto> transactionDtos, final Set<Integer> transactionIds) { errors = new MapBindingResult(new HashMap<String, String>(), TransactionDto.class.getName()); if (transactionDtos.size() != transactionIds.size()) { final List<Integer> existentTransactionIds = transactionDtos.stream().map(TransactionDto::getTransactionId).collect(Collectors.toList()); final List<Integer> invalidTransactionIds = new ArrayList<>(transactionIds); invalidTransactionIds.removeAll(existentTransactionIds); errors.reject("transactions.not.found", new String[] {Util.buildErrorMessageFromList(invalidTransactionIds, 3)}, ""); throw new ApiRequestValidationException(errors.getAllErrors()); } }
Source:
public synchronized void start() throws AppiumServerHasNotBeenStartedLocallyException { if (isRunning()) return; try { process = new CommandLine(this.nodeJSExec.getCanonicalPath(), nodeJSArgs.toArray(new String[] {})); process.setEnvironmentVariables(nodeJSEnvironment); process.copyOutputTo(System.err); process.executeAsync(); ping(timeToWaitForServerIsStarted, timeUnitToWaitForServerIsStarted); } catch (UrlChecker.TimeoutException e) { destroyProcess(); String msgTxt = "The node hasn't been run! Arguments: " + nodeJSArgs.toString() + " " + "\n"; String processStream = process.getStdOut(); if (!StringUtils.isBlank(processStream)) msgTxt = msgTxt + "Process output: " + processStream + "\n"; throw new AppiumServerHasNotBeenStartedLocallyException(msgTxt, e); } catch (Throwable e){ destroyProcess(); throw new AppiumServerHasNotBeenStartedLocallyException("An unexpected throwable has been caught!", e); } }

Target:
public synchronized void start() throws AppiumServerHasNotBeenStartedLocallyException { if (isRunning()) return; try { process = new CommandLine(this.nodeJSExec.getCanonicalPath(), nodeJSArgs.toArray(new String[] {})); process.setEnvironmentVariables(nodeJSEnvironment); process.copyOutputTo(System.err); process.executeAsync(); ping(startupTimeout, timeUnit); } catch (Throwable e) { destroyProcess(); String msgTxt = "The local appium server has not been started. " + "The given Node.js executable: " + this.nodeJSExec.getAbsolutePath() + " Arguments: " + nodeJSArgs.toString() + " " + "\n"; String processStream = process.getStdOut(); if (!StringUtils.isBlank(processStream)) msgTxt = msgTxt + "Process output: " + processStream + "\n"; throw new AppiumServerHasNotBeenStartedLocallyException(msgTxt, e); } }
Source:
private void addOrUpdateSnapshotsConfig(Guid clusterId, GlusterSnapshotConfigInfo configInfo) { acquireLock(clusterId); try { for (Map.Entry<String, String> entry : configInfo.getClusterConfigOptions().entrySet()) { if (entry.getValue() != null) { addOrUpdateClusterConfig(clusterId, entry.getKey(), entry.getValue()); } } } finally { releaseLock(clusterId); } Map<String, Map<String, String>> volumeConfigs = configInfo.getVolumeConfigOptions(); for (Map.Entry<String, Map<String, String>> entry : volumeConfigs.entrySet()) { GlusterVolumeEntity volume = getGlusterVolumeDao().getByName(clusterId, entry.getKey()); if (volume == null) { continue; } acquireLock(volume.getId()); try { Map<String, String> volumeConfig = entry.getValue(); if (volumeConfig != null) { for (Map.Entry<String, String> entry1 : volumeConfig.entrySet()) { if (entry.getValue() != null) { addOrUpdateVolumeConfig(clusterId, volume.getId(), entry1.getKey(), entry1.getValue()); } } } } finally { releaseLock(volume.getId()); } } }

Target:
private void addOrUpdateSnapshotsConfig(Guid clusterId, GlusterSnapshotConfigInfo configInfo) { try (EngineLock lock = acquireVolumeSnapshotLock(clusterId)) { for (Map.Entry<String, String> entry : configInfo.getClusterConfigOptions().entrySet()) { if (entry.getValue() != null) { addOrUpdateClusterConfig(clusterId, entry.getKey(), entry.getValue()); } } } catch (Exception e) { log.error("Exception ocuured while adding/updating snapshots configurations from CLI - '{}'", e.getMessage()); log.debug("Exception", e); throw new VdcBLLException(VdcBllErrors.GlusterSnapshotInfoFailedException, e.getLocalizedMessage()); } Map<String, Map<String, String>> volumeConfigs = configInfo.getVolumeConfigOptions(); for (Map.Entry<String, Map<String, String>> entry : volumeConfigs.entrySet()) { GlusterVolumeEntity volume = getGlusterVolumeDao().getByName(clusterId, entry.getKey()); if (volume == null) { continue; } try (EngineLock lock = acquireVolumeSnapshotLock(volume.getId())) { Map<String, String> volumeConfig = entry.getValue(); if (volumeConfig != null) { for (Map.Entry<String, String> entry1 : volumeConfig.entrySet()) { if (entry.getValue() != null) { addOrUpdateVolumeConfig(clusterId, volume.getId(), entry1.getKey(), entry1.getValue()); } } } } catch (Exception e) { log.error("Exception ocuured while adding/updating snapshots configurations from CLI - '{}'", e.getMessage()); log.debug("Exception", e); throw new VdcBLLException(VdcBllErrors.GlusterSnapshotInfoFailedException, e.getLocalizedMessage()); } } }
Source:
public RequestDispatcher(StaticResolver staticResolver, Debugger debugger) { this.staticResolver = staticResolver; this.debugger = debugger; filters = new ArrayList<>(Arrays.asList(new CsrfFilter())); }

Target:
public RequestDispatcher(StaticResolver staticResolver, Debugger debugger) { this.staticResolver = staticResolver; this.debugger = debugger; this.filters = ImmutableList.of(new CsrfFilter()); }
Source:
public static JSONObject addForwardOptionalReverse(Collection col) { String name = "Basic (optional reversed card)"; Models mm = col.getModels(); JSONObject m = newBasicModel(col); try { m.put("name", name); JSONObject fm = mm.newField("Add Reverse"); mm.addFieldInNewModel(m, fm); JSONObject t = mm.newTemplate("Card 2"); t.put("qfmt", "{{#Add Reverse}}{{Back}}{{/Add Reverse}}"); t.put("afmt", "{{FrontSide}}\n\n<hr id=answer>\n\n{{Front}}"); mm.addTemplateInNewModel(m, t); mm.add(m); } catch (JSONException e) { throw new RuntimeException(e); } return m; }

Target:
public static JSONObject addForwardOptionalReverse(Collection col) { String name = "Basic (optional reversed card)"; Models mm = col.getModels(); JSONObject m = _newBasicModel(col); try { m.put("name", name); JSONObject fm = mm.newField("Add Reverse"); mm.addFieldInNewModel(m, fm); JSONObject t = mm.newTemplate("Card 2"); t.put("qfmt", "{{#Add Reverse}}{{Back}}{{/Add Reverse}}"); t.put("afmt", "{{FrontSide}}\n\n<hr id=answer>\n\n{{Front}}"); mm.addTemplateInNewModel(m, t); mm.add(m); } catch (JSONException e) { throw new RuntimeException(e); } return m; }
Source:
public void execute(final Object message) throws Exception { final int timeLimit = timeLimit(verb); final UntypedActorContext context = getContext(); context.setReceiveTimeout(Duration.create(timeLimit, TimeUnit.SECONDS)); if (dialRecordAttribute != null && "true".equalsIgnoreCase(dialRecordAttribute.value())) { if(logger.isInfoEnabled()) { logger.info("Start recording of the bridge"); } record(bridge); } if(enable200OkDelay){ call.tell(message, self()); } }

Target:
public void execute(final Object message) throws Exception { final int timeLimit = timeLimit(verb); final UntypedActorContext context = getContext(); context.setReceiveTimeout(Duration.create(timeLimit, TimeUnit.SECONDS)); if (dialRecordAttribute != null && "true".equalsIgnoreCase(dialRecordAttribute.value())) { if(logger.isInfoEnabled()) { logger.info("Start recording of the bridge"); } record(bridge); } if(enable200OkDelay && verb !=null && Verbs.dial.equals(verb.name())){ call.tell(message, self()); } }
Source:
public ClusterConditionFieldAutoCompleter() { mVerbs.add(NAME); mVerbs.add(DESCRIPTION); mVerbs.add("COMMENT"); mVerbs.add("ARCHITECTURE"); buildCompletions(); getTypeDictionary().put(NAME, String.class); getTypeDictionary().put(DESCRIPTION, String.class); getTypeDictionary().put("COMMENT", String.class); getTypeDictionary().put("ARCHITECTURE", ArchitectureType.class); columnNameDict.put(NAME, "name"); columnNameDict.put(DESCRIPTION, "description"); columnNameDict.put("COMMENT", "free_text_comment"); columnNameDict.put("ARCHITECTURE", "architecture"); buildBasicValidationTable(); }

Target:
public ClusterConditionFieldAutoCompleter() { mVerbs.add(NAME); mVerbs.add(DESCRIPTION); mVerbs.add(COMMENT); mVerbs.add(ARCHITECTURE); buildCompletions(); getTypeDictionary().put(NAME, String.class); getTypeDictionary().put(DESCRIPTION, String.class); getTypeDictionary().put(COMMENT, String.class); getTypeDictionary().put(ARCHITECTURE, ArchitectureType.class); columnNameDict.put(NAME, "name"); columnNameDict.put(DESCRIPTION, "description"); columnNameDict.put(COMMENT, "free_text_comment"); columnNameDict.put(ARCHITECTURE, "architecture"); buildBasicValidationTable(); }
Source:
public static StructuredRecord.Builder cloneRecord(StructuredRecord record, Schema outputSchema, String predictionField) { List<Schema.Field> fields = new ArrayList<>(); fields.addAll(outputSchema.getFields()); fields.add(Schema.Field.of(predictionField, Schema.of(Schema.Type.DOUBLE))); outputSchema = Schema.recordOf("records", fields); StructuredRecord.Builder builder = StructuredRecord.builder(outputSchema); for (Schema.Field field : outputSchema.getFields()) { if (!predictionField.equals(field.getName())) { builder.set(field.getName(), record.get(field.getName())); } } return builder; }

Target:
static StructuredRecord.Builder cloneRecord(StructuredRecord record, Schema outputSchema, String predictionField) { List<Schema.Field> fields = new ArrayList<>(outputSchema.getFields()); fields.add(Schema.Field.of(predictionField, Schema.of(Schema.Type.DOUBLE))); outputSchema = Schema.recordOf("records", fields); StructuredRecord.Builder builder = StructuredRecord.builder(outputSchema); for (Schema.Field field : outputSchema.getFields()) { if (!predictionField.equals(field.getName())) { builder.set(field.getName(), record.get(field.getName())); } } return builder; }
Source:
private void handleStateChange(ConnectionState newState) { switch ( newState ) { case SUSPENDED: publishEvent(TreeCacheEvent.Type.CONNECTION_SUSPENDED); break; case LOST: isInitialized.set(false); publishEvent(TreeCacheEvent.Type.CONNECTION_LOST); break; case CONNECTED: try { root.wasCreated(); } catch ( Exception e ) { handleException(e); } break; case RECONNECTED: try { root.wasReconnected(); publishEvent(TreeCacheEvent.Type.CONNECTION_RECONNECTED); } catch ( Exception e ) { handleException(e); } break; } }

Target:
private void handleStateChange(ConnectionState newState) { switch ( newState ) { case SUSPENDED: publishEvent(TreeCacheEvent.Type.CONNECTION_SUSPENDED); break; case LOST: isInitialized.set(false); publishEvent(TreeCacheEvent.Type.CONNECTION_LOST); break; case CONNECTED: try { root.wasCreated(); } catch ( Exception e ) { ThreadUtils.checkInterrupted(e); handleException(e); } break; case RECONNECTED: try { root.wasReconnected(); publishEvent(TreeCacheEvent.Type.CONNECTION_RECONNECTED); } catch ( Exception e ) { ThreadUtils.checkInterrupted(e); handleException(e); } break; } }
Source:
static boolean enqueueExitBlock4() { try { throwSpecificException(); } catch (Throwable e) { return true; } return true; }

Target:
static boolean enqueueExitBlock4() { try { throwSpecificException(); } catch (Throwable e) { return true; } return false; }
Source:
public void testGoodSubjectNonAmqp() throws SecurityServiceException { securityServerPlugin.clearCache(); Message message = new CoreMessage(); message.setAddress("test.address"); securityServerPlugin.handleMessage(mockServerSession, null, message, false, false); assertThat(message.getStringProperty("subject"), is("Hello World")); }

Target:
public void testGoodSubjectNonAmqp() throws SecurityServiceException { Message message = new CoreMessage(); message.setAddress("test.address"); securityServerPlugin.handleMessage(mockServerSession, null, message, false, false); assertThat(message.getStringProperty("subject"), is("Hello World")); }
Source:
protected void testMultiMapPutAllSetup() { MultiMapConfig multiMapConfig1 = new MultiMapConfig() .setName("testMultiMapList") .setValueCollectionType(MultiMapConfig.ValueCollectionType.LIST) .setBinary(false); MultiMapConfig multiMapConfig2 = new MultiMapConfig() .setName("testMultiMapSet") .setValueCollectionType(MultiMapConfig.ValueCollectionType.SET) .setBinary(false); MultiMapConfig multiMapConfig3 = new MultiMapConfig() .setName("expectedMultiMap1") .setValueCollectionType(MultiMapConfig.ValueCollectionType.LIST) .setBinary(false); client.getConfig() .addMultiMapConfig(multiMapConfig1) .addMultiMapConfig(multiMapConfig2) .addMultiMapConfig(multiMapConfig3); }

Target:
protected void testMultiMapPutAllSetup() { MultiMapConfig multiMapConfig1 = new MultiMapConfig() .setName("testMultiMapList") .setValueCollectionType(MultiMapConfig.ValueCollectionType.LIST) .setBinary(false); MultiMapConfig multiMapConfig2 = new MultiMapConfig() .setName("testMultiMapSet") .setValueCollectionType(MultiMapConfig.ValueCollectionType.SET) .setBinary(false); client.getConfig() .addMultiMapConfig(multiMapConfig1) .addMultiMapConfig(multiMapConfig2); }
Source:
public GoGoDuck(String geoserverUrl, String profile, String subset, String outputFile, Integer limit) { this(profile, subset, outputFile, limit); this.urlIndexInterface = new UrlIndexHttp(this.userLog, geoserverUrl); }

Target:
public GoGoDuck(String geoserverUrl, String profile, String subset, String outputFile, Integer limit) { this(profile, subset, outputFile, limit); this.indexReader = new HttpIndexReader(this.userLog, geoserverUrl); }
Source:
public UserCredentials getCredentials(PrivilegeLevel level) { if (level == PrivilegeLevel.ADMIN) { UserCredentials credentials = super.getCredentials(PrivilegeLevel.USER); return new UserCredentials(getAdminUserName(), credentials.getPassword()); } return super.getCredentials(level); }

Target:
public UserCredentials getCredentials(PrivilegeLevel level) { try { return super.getCredentials(level); } catch (AssertionFailedError e) { if (level == PrivilegeLevel.ADMIN) { UserCredentials credentials = super.getCredentials(PrivilegeLevel.USER); return new UserCredentials("admin@mylyn.eclipse.org", credentials.getPassword()); } throw e; } }
Source:
public Factory updateFactory(Factory update, Set<FactoryImage> images) throws ConflictException, NotFoundException, ServerException { requireNonNull(update); final AuthorImpl creator = factoryDao.getById(update.getId()).getCreator(); FactoryImpl updateImpl = new FactoryImpl(update, images); if (isNullOrEmpty(updateImpl.getName())) { updateImpl.setName(NameGenerator.generate("f", 9)); } return factoryDao.update(FactoryImpl.builder() .from(updateImpl) .setCreator(new AuthorImpl(creator.getUserId(), creator.getCreated())) .build()); }

Target:
public Factory updateFactory(Factory update, Set<FactoryImage> images) throws ConflictException, NotFoundException, ServerException { requireNonNull(update); final AuthorImpl creator = factoryDao.getById(update.getId()).getCreator(); return factoryDao.update(FactoryImpl.builder() .from(new FactoryImpl(update, images)) .setCreator(new AuthorImpl(creator.getUserId(), creator.getCreated())) .build()); }
Source:
public Attribute(long id, String backgroundColour, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, int textSize) { setId(id); setBackgroundColour(backgroundColour); setHorizontalAlignment(horizontalAlignment); setVerticalAlignment(verticalAlignment); setTextSize(textSize); }

Target:
public Attribute(long id, String backgroundColour, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, int textSize) { this.id = id; this.backgroundColour = backgroundColour; this.horizontalAlignment = horizontalAlignment; this.verticalAlignment = verticalAlignment; this.textSize = textSize; }
Source:
public void reverse() { Element current = head; Element next; Element previous = null; while (Objects.nonNull(current)) { next = current.next; current.next = previous; previous = current; current = next; } head = previous; }

Target:
public void reverse() { Element<T> current = head; Element<T> next; Element<T> previous = null; while (Objects.nonNull(current)) { next = current.next; current.next = previous; previous = current; current = next; } head = previous; }
Source:
public void visitNode(Tree tree) { Context ctx = new Context(); boolean issue = false; if (tree.is(Kind.FOR_STATEMENT)) { issue = checkFor((ForStatementTree) tree, ctx); } else if (tree.is(Kind.WHILE_STATEMENT)) { issue = checkWhile((WhileStatementTree) tree, ctx); } else { issue = checkForEach((ForEachStatement) tree); } if (issue) { StatementTree statement = getStatement(tree); reportIssue(statement, "Use \"Arrays.copyOf\", \"Arrays.asList\", \"Collections.add\" or \"System.arraycopy\" instead."); } }

Target:
public void visitNode(Tree tree) { boolean issue; if (tree.is(Kind.FOR_STATEMENT)) { issue = checkFor((ForStatementTree) tree); } else if (tree.is(Kind.WHILE_STATEMENT)) { issue = checkWhile((WhileStatementTree) tree); } else { issue = checkForEach((ForEachStatement) tree); } if (issue) { StatementTree statement = getStatement(tree); reportIssue(statement, "Use \"Arrays.copyOf\", \"Arrays.asList\", \"Collections.addAll\" or \"System.arraycopy\" instead."); } }
Source:
public void testIt() throws Exception { ZkHostDomainPartition hdpc = ZkHostDomainPartition.create(getZk(), getRoot(), 1234, 7); assertEquals(1234, hdpc.getPartNum()); assertNull("current version should be unset", hdpc.getCurrentDomainGroupVersion()); assertEquals(Integer.valueOf(7), hdpc.getUpdatingToDomainGroupVersion()); hdpc.setCurrentDomainGroupVersion(7); assertEquals(Integer.valueOf(7), hdpc.getCurrentDomainGroupVersion()); hdpc.setUpdatingToDomainGroupVersion(8); assertEquals(Integer.valueOf(8), hdpc.getUpdatingToDomainGroupVersion()); hdpc.setUpdatingToDomainGroupVersion(null); assertNull(hdpc.getUpdatingToDomainGroupVersion()); List<String> currentCountKeys = new ArrayList<String>(); hdpc.setCount("TotalHits", 45); currentCountKeys.add("TotalHits"); assertEquals(new Long(45), hdpc.getCount("TotalHits")); hdpc.setCount("RandomCount", 1); currentCountKeys.add("RandomCount"); assertTrue(hdpc.getCountKeys().containsAll(currentCountKeys) && hdpc.getCountKeys().size() == currentCountKeys.size()); hdpc.removeCount("RandomCount"); currentCountKeys.remove("RandomCount"); assertTrue(hdpc.getCountKeys().containsAll(currentCountKeys) && hdpc.getCountKeys().size() == currentCountKeys.size()); assertNotNull(hdpc.getCount("TotalHits")); assertNull(hdpc.getCount("RandomCount")); assertNull(hdpc.getCount("NewCount")); }

Target:
public void testIt() throws Exception { ZkHostDomainPartition hdpc = ZkHostDomainPartition.create(getZk(), getRoot(), 1234, 7); assertEquals(1234, hdpc.getPartNum()); assertNull("current version should be unset", hdpc.getCurrentDomainGroupVersion()); assertEquals(Integer.valueOf(7), hdpc.getUpdatingToDomainGroupVersion()); hdpc.setCurrentDomainGroupVersion(7); assertEquals(Integer.valueOf(7), hdpc.getCurrentDomainGroupVersion()); hdpc.setUpdatingToDomainGroupVersion(8); assertEquals(Integer.valueOf(8), hdpc.getUpdatingToDomainGroupVersion()); hdpc.setUpdatingToDomainGroupVersion(null); assertNull(hdpc.getUpdatingToDomainGroupVersion()); Set<String> currentCountKeys = new HashSet<String>(); hdpc.setCount("TotalHits", 45); currentCountKeys.add("TotalHits"); assertEquals(new Long(45), hdpc.getCount("TotalHits")); hdpc.setCount("TotalHits", 50); assertEquals(new Long(50), hdpc.getCount("TotalHits")); hdpc.setCount("RandomCount", 1); currentCountKeys.add("RandomCount"); assertTrue(hdpc.getCountKeys().equals(currentCountKeys)); hdpc.removeCount("RandomCount"); currentCountKeys.remove("RandomCount"); assertTrue(hdpc.getCountKeys().containsAll(currentCountKeys) && hdpc.getCountKeys().size() == currentCountKeys.size()); assertNull(hdpc.getCount("RandomCount")); assertNull(hdpc.getCount("NewCount")); }
Source:
public void run() { File folder = new File(System.getProperty("user.dir") + "/traces"); folder.mkdir(); File f = new File(folder.getAbsolutePath() + "/" + new Date().toString() + ".trace"); File sf = new File(folder.getAbsolutePath() + "/" + new Date().toString() + ".sym"); try (FileOutputStream fos = new FileOutputStream(f); FileOutputStream sfos = new FileOutputStream(sf); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(sfos))) { while (true) { ByteBuffer b = ActorExecutionTrace.fullBuffers.take(); fos.getChannel().write(b); b.rewind(); if (front != null) { synchronized (symbolsToWrite) { front.sendSymbols(ActorExecutionTrace.symbolsToWrite); } front.sendTracingData(b); } synchronized (symbolsToWrite) { for (SSymbol s : symbolsToWrite) { bw.write(s.getSymbolId() + ":" + s.getString()); bw.newLine(); } ActorExecutionTrace.symbolsToWrite.clear(); } b.clear(); ActorExecutionTrace.emptyBuffers.add(b); } } catch (FileNotFoundException e) { throw new RuntimeException(e); } catch (IOException e) { throw new RuntimeException(e); } catch (InterruptedException e) { throw new RuntimeException(e); } }

Target:
public void run() { File f = new File(VmSettings.TRACE_FILE + ".trace"); File sf = new File(VmSettings.TRACE_FILE + ".sym"); f.getParentFile().mkdirs(); try (FileOutputStream fos = new FileOutputStream(f); FileOutputStream sfos = new FileOutputStream(sf); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(sfos))) { while (true) { ByteBuffer b = ActorExecutionTrace.fullBuffers.take(); fos.getChannel().write(b); b.rewind(); if (front != null) { synchronized (symbolsToWrite) { front.sendSymbols(ActorExecutionTrace.symbolsToWrite); } front.sendTracingData(b); } synchronized (symbolsToWrite) { for (SSymbol s : symbolsToWrite) { bw.write(s.getSymbolId() + ":" + s.getString()); bw.newLine(); } ActorExecutionTrace.symbolsToWrite.clear(); } b.clear(); ActorExecutionTrace.emptyBuffers.add(b); } } catch (FileNotFoundException e) { throw new RuntimeException(e); } catch (IOException e) { throw new RuntimeException(e); } catch (InterruptedException e) { throw new RuntimeException(e); } }
Source:
public Attribute getAttributeValue(PerunSessionImpl sess, Facility facility, AttributeDefinition attributeDefinition) throws InternalErrorException { Attribute attribute = new Attribute(attributeDefinition); Attribute gidNamespaceAttribute = getUnixGIDNamespaceAttribute(sess, facility); if(gidNamespaceAttribute.getValue() == null) return attribute; Attribute namespaceGIDRangesAttribute = getNamespaceGIDRangesAttribute(sess, (String) gidNamespaceAttribute.getValue()); Utils.copyAttributeToVirtualAttributeWithValue(namespaceGIDRangesAttribute, attribute); return attribute; }

Target:
public Attribute getAttributeValue(PerunSessionImpl sess, Facility facility, AttributeDefinition attributeDefinition) throws InternalErrorException { Attribute attribute = new Attribute(attributeDefinition); Attribute gidNamespaceAttribute = getUnixGIDNamespaceAttribute(sess, facility); if(gidNamespaceAttribute.getValue() == null) return attribute; Attribute namespaceGIDRangesAttribute = getNamespaceGIDRangesAttribute(sess, (String) gidNamespaceAttribute.getValue()); return Utils.copyAttributeToVirtualAttributeWithValue(namespaceGIDRangesAttribute, attribute); }
Source:
public InstitutesStatsMetadata() { statsSince = Instant.parse("2011-10-01T00:00:00.00Z"); }

Target:
public InstitutesStatsMetadata() { statsSince = Instant.parse("2010-01-01T00:00:00.000Z"); }
Source:
public MockBarChartDataModel(MockBarChartView view) { super(view.getChartWidget().getData()); this.view = view; dataSeries = new BarDataset(); setDefaultStylingProperties(); addDataSeriesToChart(); }

Target:
public MockBarChartDataModel(MockBarChartView view) { super(view); dataSeries = new BarDataset(); setDefaultStylingProperties(); addDataSeriesToChart(); }
Source:
private static void onUpgrade(final int oldVersionCode, final int newVersionCode) { if (oldVersionCode < 1050004) { if(MediaPlayer.isPrestoLibraryInstalled(context) && Build.VERSION.SDK_INT >= 16) { UserPreferences.enableSonic(); } } if (oldVersionCode < 1070196) { int oldValueInDays = UserPreferences.getEpisodeCleanupValue(); if (oldValueInDays > 0) { UserPreferences.setEpisodeCleanupValue(oldValueInDays * 24); } } if (oldVersionCode < 1070197) { if (prefs.getBoolean(UserPreferences.PREF_MOBILE_UPDATE_OLD, false)) { prefs.edit().putString(UserPreferences.PREF_MOBILE_UPDATE, "everything").apply(); } } }

Target:
private static void onUpgrade(final int oldVersionCode, final int newVersionCode) { if (oldVersionCode < 1050004) { if(MediaPlayer.isPrestoLibraryInstalled(context) && Build.VERSION.SDK_INT >= 16) { UserPreferences.enableSonic(); } } if (oldVersionCode < 1070196) { int oldValueInDays = UserPreferences.getEpisodeCleanupValue(); if (oldValueInDays > 0) { UserPreferences.setEpisodeCleanupValue(oldValueInDays * 24); } } if (oldVersionCode < 1070197) { if (prefs.getBoolean("prefMobileUpdate", false)) { prefs.edit().putString(UserPreferences.PREF_MOBILE_UPDATE, "everything").apply(); } } }
Source:
public void dataCenterDoesntExist() throws Exception { doReturn(null).when(validator).getDataCenter(); assertEquals(new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_POOL_NOT_EXIST).getMessage(), validator.dataCenterExists().getMessage()); }

Target:
public void dataCenterDoesntExist() throws Exception { doReturn(null).when(validator).getDataCenter(); assertEquals(new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_POOL_NOT_EXIST), validator.dataCenterExists()); }
Source:
private NodeAvailabilityStatus getStatusByRunningOperationsOnEachHost() { int numberOfUnreachableNodes = 0; for (InetSocketAddress host : clientPool.currentPools.keySet()) { try { clientPool.runOnHost(host, CassandraVerifier.healthCheck); if (!partitionerIsValid(host)) { return NodeAvailabilityStatus.TERMINAL; } } catch (Exception e) { numberOfUnreachableNodes++; } } return getClusterAvailabilityStatus(numberOfUnreachableNodes); }

Target:
private NodeAvailabilityStatus getStatusByRunningOperationsOnEachHost() { int countUnreachableNodes = 0; for (InetSocketAddress host : clientPool.currentPools.keySet()) { try { clientPool.runOnHost(host, CassandraVerifier.healthCheck); if (!partitionerIsValid(host)) { return NodeAvailabilityStatus.TERMINAL; } } catch (Exception e) { countUnreachableNodes++; } } return getClusterAvailabilityStatus(countUnreachableNodes); }
Source:
public void setCollectionNameExpression(Expression collectionNameExpression) { this.collectionNameExpression = collectionNameExpression; }

Target:
public void setCollectionNameExpression(Expression collectionNameExpression) { Assert.notNull(collectionNameExpression, "collectionNameExpression must not be null."); this.collectionNameExpression = collectionNameExpression; }
Source:
public static void main(String[] args) throws IOException { ClassLoader loader = Nd4jEx16_Serialization.class.getClassLoader(); INDArray arrWrite = Nd4j.linspace(1,25,25).reshape(5,5); String pathname = "tmp.bin"; DataOutputStream sWrite = new DataOutputStream(new FileOutputStream(new File(pathname ))); Nd4j.write(arrWrite, sWrite); DataInputStream sRead = new DataInputStream(new FileInputStream(new File(pathname ))); INDArray arrRead = Nd4j.read(sRead); System.out.println("Read from binary format:" ); System.out.println(arrRead ); File file = new File( Objects.requireNonNull(loader.getResource("twentyfive.npy")).getFile()); INDArray x = Nd4j.createFromNpyFile(file); System.out.println(); System.out.println("Read from Numpy .npyformat:" ); System.out.println(x); file = new File(pathname); Nd4j.saveBinary(arrWrite, file); arrRead = Nd4j.readBinary(file ); System.out.println(); System.out.println("Read from Numpy .npyformat:" ); System.out.println(arrRead); file = new File( Objects.requireNonNull(loader.getResource("twentyfive.csv")).getFile()); String Filename = file.getAbsolutePath(); arrRead = Nd4j.readNumpy(Filename, ","); System.out.println(); System.out.println("Read from csv format:" ); System.out.println(arrRead); }

Target:
public static void main(String[] args) throws Exception { ClassLoader loader = Nd4jEx16_Serialization.class.getClassLoader(); INDArray arrWrite = Nd4j.linspace(1,25,25).reshape(5,5); String pathname = "tmp.bin"; try(DataOutputStream sWrite = new DataOutputStream(new FileOutputStream(new File(pathname )))){ Nd4j.write(arrWrite, sWrite); } INDArray arrRead; try(DataInputStream sRead = new DataInputStream(new FileInputStream(new File(pathname )))){ arrRead = Nd4j.read(sRead); } System.out.println("Read from binary stream:" ); System.out.println(arrRead ); File file = new File("nd4j.npy" ); Nd4j.writeAsNumpy(arrRead, file ); arrRead = Nd4j.createFromNpyFile(file); System.out.println(); System.out.println("Read from Numpy .npy format:" ); System.out.println(arrRead); file = new File( Objects.requireNonNull(loader.getResource("numpyz.npz")).getFile()); Map<String, INDArray> arrayMap = Nd4j.createFromNpzFile(file); System.out.println(); System.out.println("Read from Numpy .npz format:" ); System.out.println(arrayMap.get("arr_0")); System.out.println(arrayMap.get("arr_1")); file = new File(pathname); Nd4j.saveBinary(arrWrite, file); arrRead = Nd4j.readBinary(file ); System.out.println(); System.out.println("Read from binary format:" ); System.out.println(arrRead); file = new File( Objects.requireNonNull(loader.getResource("twentyfive.csv")).getFile()); String Filename = file.getAbsolutePath(); arrRead = Nd4j.readNumpy(Filename, ","); System.out.println(); System.out.println("Read from csv format:" ); System.out.println(arrRead); }
Source:
public synchronized Map<String, Pattern> regexpPropertiesMap() { if (regexpProps == null) { regexpProps = new HashMap<>(props.size()); for (Map.Entry<Object, Object> val : props.entrySet()) { try { Pattern p = Pattern.compile((String) val.getValue()); regexpProps.put((String) val.getKey(), p); } catch (PatternSyntaxException e) { ActiveMQServerLogger.LOGGER.warn("Ignoring invalid regexp: " + val.getValue()); } } } return regexpProps; }

Target:
public synchronized Map<String, Pattern> regexpPropertiesMap() { if (regexpProps == null) { regexpProps = new HashMap<>(props.size()); for (Map.Entry<Object, Object> val : props.entrySet()) { String str = (String) val.getValue(); if (looksLikeRegexp(str)) { try { Pattern p = Pattern.compile(str.substring(1, str.length() - 1)); regexpProps.put((String) val.getKey(), p); } catch (PatternSyntaxException e) { ActiveMQServerLogger.LOGGER.warn("Ignoring invalid regexp: " + str); } } } } return regexpProps; }
Source:
public FormValidation doCheckUrl(@QueryParameter("url") String resourceRootUrlString) { Jenkins.get().checkPermission(Jenkins.CONFIGURE); return checkUrl(resourceRootUrlString, true); }

Target:
public FormValidation doCheckUrl(@QueryParameter("url") String resourceRootUrlString) { Jenkins.get().checkPermission(Jenkins.ADMINISTER); return checkUrl(resourceRootUrlString, true); }
Source:
public void testDrivingSimpleTopology() { final int partition = 10; driver = new TopologyTestDriver(createSimpleTopology(partition), props); final TestInputTopic<String, String> inputTopic = driver.createInputTopic(INPUT_TOPIC_1, STRING_SERIALIZER, STRING_SERIALIZER, Instant.ofEpochMilli(0L), Duration.ZERO); final TestOutputTopic<String, String> outputTopic1 = driver.createOutputTopic(OUTPUT_TOPIC_1, Serdes.String().deserializer(), Serdes.String().deserializer()); final TestOutputTopic<String, String> outputTopic2 = driver.createOutputTopic(OUTPUT_TOPIC_1, Serdes.String().deserializer(), Serdes.String().deserializer()); inputTopic.pipeInput("key1", "value1"); assertNextOutputRecord(outputTopic1.readRecord(), "key1", "value1"); assertTrue(outputTopic1.isEmpty()); inputTopic.pipeInput("key2", "value2"); assertNextOutputRecord(outputTopic1.readRecord(), "key2", "value2"); assertTrue(outputTopic1.isEmpty()); inputTopic.pipeInput("key3", "value3"); inputTopic.pipeInput("key4", "value4"); inputTopic.pipeInput("key5", "value5"); assertNextOutputRecord(outputTopic1.readRecord(), "key3", "value3"); assertNextOutputRecord(outputTopic1.readRecord(), "key4", "value4"); assertNextOutputRecord(outputTopic1.readRecord(), "key5", "value5"); assertTrue(outputTopic1.isEmpty()); }

Target:
public void testDrivingSimpleTopology() { final int partition = 10; driver = new TopologyTestDriver(createSimpleTopology(partition), props); final TestInputTopic<String, String> inputTopic = driver.createInputTopic(INPUT_TOPIC_1, STRING_SERIALIZER, STRING_SERIALIZER, Instant.ofEpochMilli(0L), Duration.ZERO); final TestOutputTopic<String, String> outputTopic1 = driver.createOutputTopic(OUTPUT_TOPIC_1, Serdes.String().deserializer(), Serdes.String().deserializer()); inputTopic.pipeInput("key1", "value1"); assertNextOutputRecord(outputTopic1.readRecord(), "key1", "value1"); assertTrue(outputTopic1.isEmpty()); inputTopic.pipeInput("key2", "value2"); assertNextOutputRecord(outputTopic1.readRecord(), "key2", "value2"); assertTrue(outputTopic1.isEmpty()); inputTopic.pipeInput("key3", "value3"); inputTopic.pipeInput("key4", "value4"); inputTopic.pipeInput("key5", "value5"); assertNextOutputRecord(outputTopic1.readRecord(), "key3", "value3"); assertNextOutputRecord(outputTopic1.readRecord(), "key4", "value4"); assertNextOutputRecord(outputTopic1.readRecord(), "key5", "value5"); assertTrue(outputTopic1.isEmpty()); }
Source:
public void endWindow() { if(leftCount == maxTuplesPerWindow && rightCount == maxTuplesPerWindow) { byte[] leftBytes = lmd.digest(); byte[] rightBytes = rmd.digest(); if(!MessageDigest.isEqual(leftBytes, rightBytes)) { try { out.writeBytes("Error: Kafka and RandomGenerator data are not equal"); out.flush(); } catch (IOException e) { throw new RuntimeException(e); } } lmd.reset(); rmd.reset(); leftCount = lqueue.size(); rightCount = rqueue.size(); if(lqueue.size() != 0) { int size = lqueue.size(); for(int i = 0; i < size; i++) { byte[] x = lqueue.poll(); lmd.update(x); } } if(rqueue.size() != 0) { int size = rqueue.size(); for(int i = 0; i < size; i++) { byte[] x = rqueue.poll(); rmd.update(x); } } } }

Target:
public void endWindow() { if(leftCount == maxTuplesPerWindow && rightCount == maxTuplesPerWindow) { byte[] leftBytes = lmd.digest(); byte[] rightBytes = rmd.digest(); if(!MessageDigest.isEqual(leftBytes, rightBytes)) { try { out.writeBytes("Error: Kafka and RandomGenerator data are not equal"); out.flush(); } catch (IOException e) { throw new RuntimeException("Unable to write " + e); } } lmd.reset(); rmd.reset(); leftCount = lqueue.size(); rightCount = rqueue.size(); if(lqueue.size() != 0) { int size = lqueue.size(); for(int i = 0; i < size; i++) { byte[] x = lqueue.poll(); lmd.update(x); } } if(rqueue.size() != 0) { int size = rqueue.size(); for(int i = 0; i < size; i++) { byte[] x = rqueue.poll(); rmd.update(x); } } } }
Source:
public String getAttribute(Attribute attribute) { if (attribute.startsWith("can_build") && attribute.hasContext(1)) { dLocation location = dLocation.valueOf(attribute.getContext(1)); if (location == null ) { return null; } if (wgp.canBuild(player, location)) { return Element.TRUE.getAttribute(attribute.fulfill(1)); } return Element.FALSE.getAttribute(attribute.fulfill(1)); } if (attribute.startsWith("can_pvp")) { ApplicableRegionSet set = getApplicableRegions(); if (set.testState(wgp.wrapPlayer(player), DefaultFlag.PVP)) { return Element.TRUE.getAttribute(attribute.fulfill(1)); } return Element.FALSE.getAttribute(attribute.fulfill(1)); } return null; }

Target:
public String getAttribute(Attribute attribute) { if (!attribute.startsWith("worldguard") && !attribute.startsWith("wg") ) { return null; } attribute = attribute.fulfill(1); if (attribute.startsWith("can_build") && attribute.hasContext(1)) { dLocation location = dLocation.valueOf(attribute.getContext(1)); if (location == null) { return null; } if (wgp.canBuild(player, location)) { return new Element(true).getAttribute(attribute.fulfill(1)); } return new Element(false).getAttribute(attribute.fulfill(1)); } if (attribute.startsWith("test_flag")) { if (!attribute.hasContext(1)) { dB.echoError("The tag p@player.worlduard.test_flag[...] must have a value."); return null; } StateFlag flag = getStateFlag(attribute.getContext(1)); if (flag == null) { dB.echoError("The tag p@player.worlduard.test_flag[...] has an invalid value: " + attribute.getContext(1)); return null; } ApplicableRegionSet set = getApplicableRegions(); if (set.testState(wgp.wrapPlayer(player), flag)) { return new Element(true).getAttribute(attribute.fulfill(1)); } return new Element(false).getAttribute(attribute.fulfill(1)); } return null; }
Source:
public ClosableIterator<AgnosticLightResultRow> getAllRows( Iterable<byte[]> rows, ColumnSelection columns, long ts, boolean includeValues) { return getAllRows(rows, columns, ts, includeValues, null); }

Target:
public ClosableIterator<AgnosticLightResultRow> getAllRows( Iterable<byte[]> rows, ColumnSelection columns, long ts, boolean includeValues) { return getAllRows(rows, columns, ts, includeValues, Order.UNDEFINED); }
Source:
public Status insert(String table, String key, HashMap<String, ByteIterator> values) { try { if (defaultCollection == null) { createCollection(table); } BaseDocument toInsert = new BaseDocument(key); for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { toInsert.addAttribute(entry.getKey(), byteIteratorToString(entry.getValue())); } arangoDriver.createDocument(table, toInsert, true , waitForSync); return Status.OK; } catch (ArangoException e) { if (e.getErrorNumber() != ErrorNums.ERROR_ARANGO_UNIQUE_CONSTRAINT_VIOLATED) { logger.error("Fail to insert: " + table + " " + key, e); } else { logger.debug("Trying to create document with duplicate key: {}", table, key); return Status.BAD_REQUEST; } } catch (Exception e) { logger.error("Exception while trying insert " + table + " " + key, e); } return Status.ERROR; }

Target:
public Status insert(String table, String key, HashMap<String, ByteIterator> values) { try { BaseDocument toInsert = new BaseDocument(key); for (Map.Entry<String, ByteIterator> entry : values.entrySet()) { toInsert.addAttribute(entry.getKey(), byteIteratorToString(entry.getValue())); } arangoDriver.createDocument(table, toInsert, true , waitForSync); return Status.OK; } catch (ArangoException e) { if (e.getErrorNumber() != ErrorNums.ERROR_ARANGO_UNIQUE_CONSTRAINT_VIOLATED) { logger.error("Fail to insert: with ex {}", table, key, e.toString()); } else { logger.debug("Trying to create document with duplicate key: {}", table, key); return Status.BAD_REQUEST; } } catch (RuntimeException e) { logger.error("Exception while trying insert with ex {}", table, key, e.toString()); } return Status.ERROR; }
Source:
public void upgradeShouldGiveProgressMonitorProgressMessages() throws Exception { fileSystem.deleteFile( new File( dbDirectory, INTERNAL_LOG_FILE ) ); PageCache pageCache = pageCacheRule.getPageCache( fileSystem ); UpgradableDatabase upgradableDatabase = new UpgradableDatabase( fileSystem, new StoreVersionCheck( pageCache ), getRecordFormats() ); AssertableLogProvider logProvider = new AssertableLogProvider(); newUpgrader( upgradableDatabase, pageCache, allowMigrateConfig, new VisibleMigrationProgressMonitor( logProvider.getLog( "test" ) ) ).migrateIfNeeded( dbDirectory ); logProvider.assertContainsLogCallContaining( "Store files" ); logProvider.assertContainsLogCallContaining( "Indexes" ); logProvider.assertContainsLogCallContaining( "Count rebuilding" ); logProvider.assertContainsLogCallContaining( "Successfully finished" ); }

Target:
public void upgradeShouldGiveProgressMonitorProgressMessages() throws Exception { PageCache pageCache = pageCacheRule.getPageCache( fileSystem ); UpgradableDatabase upgradableDatabase = new UpgradableDatabase( fileSystem, new StoreVersionCheck( pageCache ), getRecordFormats() ); AssertableLogProvider logProvider = new AssertableLogProvider(); newUpgrader( upgradableDatabase, pageCache, allowMigrateConfig, new VisibleMigrationProgressMonitor( logProvider.getLog( "test" ) ) ).migrateIfNeeded( dbDirectory ); logProvider.assertContainsLogCallContaining( "Store files" ); logProvider.assertContainsLogCallContaining( "Indexes" ); logProvider.assertContainsLogCallContaining( "Count rebuilding" ); logProvider.assertContainsLogCallContaining( "Successfully finished" ); }
Source:
public RemoteBitrateEstimatorSingleStream getRemoteBitrateEstimator() { return remoteBitrateEstimator; }

Target:
public RemoteBitrateEstimator getRemoteBitrateEstimator() { return remoteBitrateEstimator; }
Source:
public boolean isAggregator(String aggregatorName) { try { if( classToIncrementalAggregatorName.values().contains(aggregatorName) || nameToOTFAggregator.containsKey(aggregatorName)) return true; String aggregatorType = aggregatorName.split("-")[0]; return (AggregatorTopBottomType.valueOf(aggregatorType) != null); } catch(Exception e) { lOG.error(e.getMessage()); return false; } }

Target:
public boolean isAggregator(String aggregatorName) { if( classToIncrementalAggregatorName.values().contains(aggregatorName) || nameToOTFAggregator.containsKey(aggregatorName)) return true; String aggregatorType = aggregatorName.split("-")[0]; return (AggregatorTopBottomType.valueOf(aggregatorType) != null); }
Source:
public void process() { List<CrewMember> otherPublisherPeople = getOtherPublisherPeople(film); if (otherPublisherPeople.isEmpty()) { film.setPeople(ImmutableList.copyOf( Iterables.concat( getActors(filmElement.getFirstChildElement("cast")), getDirectors(filmElement.getFirstChildElement("direction")) ))); } else { film.setPeople(otherPublisherPeople); } people = Lists.newArrayList( Iterables.concat( makeActors(filmElement.getFirstChildElement("cast")), makeDirectors(filmElement.getFirstChildElement("direction")), makeWriters(filmElement.getFirstChildElement("writing")) )); }

Target:
public void process() { List<CrewMember> otherPublisherPeople = getOtherPublisherPeople(film); if (otherPublisherPeople.isEmpty()) { film.setPeople(ImmutableList.copyOf( Iterables.concat( getActors(filmElement.getFirstChildElement(CAST)), getDirectors(filmElement.getFirstChildElement(DIRECTION)) ))); } else { film.setPeople(otherPublisherPeople); } people = Lists.newArrayList( Iterables.concat( makeActors(filmElement.getFirstChildElement(CAST)), makeDirectors(filmElement.getFirstChildElement(DIRECTION)), makeWriters(filmElement.getFirstChildElement(WRITING)) )); }
Source:
public JwtDecoder createDecoder(ClientRegistration clientRegistration) { return this.jwtDecoders.computeIfAbsent(clientRegistration.getRegistrationId(), key -> { if (!StringUtils.hasText(clientRegistration.getProviderDetails().getJwkSetUri())) { OAuth2Error oauth2Error = new OAuth2Error( MISSING_SIGNATURE_VERIFIER_ERROR_CODE, "Failed to find a Signature Verifier for Client Registration: '" + clientRegistration.getRegistrationId() + "'. Check to ensure you have configured the JwkSet URI.", null ); throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString()); } String jwkSetUri = clientRegistration.getProviderDetails().getJwkSetUri(); NimbusJwtDecoder jwtDecoder = new NimbusJwtDecoder(withJwkSetUri(jwkSetUri).build()); OAuth2TokenValidator<Jwt> jwtValidator = new DelegatingOAuth2TokenValidator<>(jwtValidatorFactory.apply(clientRegistration)); jwtDecoder.setJwtValidator(jwtValidator); return jwtDecoder; }); }

Target:
public JwtDecoder createDecoder(ClientRegistration clientRegistration) { Assert.notNull(clientRegistration, "clientRegistration cannot be null."); return this.jwtDecoders.computeIfAbsent(clientRegistration.getRegistrationId(), key -> { if (!StringUtils.hasText(clientRegistration.getProviderDetails().getJwkSetUri())) { OAuth2Error oauth2Error = new OAuth2Error( MISSING_SIGNATURE_VERIFIER_ERROR_CODE, "Failed to find a Signature Verifier for Client Registration: '" + clientRegistration.getRegistrationId() + "'. Check to ensure you have configured the JwkSet URI.", null ); throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString()); } String jwkSetUri = clientRegistration.getProviderDetails().getJwkSetUri(); NimbusJwtDecoder jwtDecoder = new NimbusJwtDecoder(withJwkSetUri(jwkSetUri).build()); OAuth2TokenValidator<Jwt> jwtValidator = jwtValidatorFactory.apply(clientRegistration); jwtDecoder.setJwtValidator(jwtValidator); return jwtDecoder; }); }
Source:
public List<T> value(boolean forceRefresh) { if (forceRefresh) { m_value = null; return value(); } return value(); }

Target:
public List<T> value(boolean forceRefresh) { if (forceRefresh) { m_value = null; } return value(); }