auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public Response getAllMetadataStoreRealms(@QueryParam("sharding-key") String shardingKey) { try { if (shardingKey == null) { Collection<String> realms = _metadataStoreDirectory.getAllMetadataStoreRealms(_namespace); Map<String, Collection<String>> responseMap = ImmutableMap.of(MetadataStoreRoutingConstants.METADATA_STORE_REALMS, realms); return JSONRepresentation(responseMap); } else { String realm = _metadataStoreDirectory.getMetadataStoreRealm(_namespace, shardingKey); return JSONRepresentation(new MetadataStoreShardingKey(shardingKey, realm)); } } catch (NoSuchElementException ex) { return notFound(ex.getMessage()); } }

Target:
public Response getAllMetadataStoreRealms(@QueryParam("sharding-key") String shardingKey) { try { if (shardingKey == null) { Collection<String> realms = _metadataStoreDirectory.getAllMetadataStoreRealms(_namespace); Map<String, Collection<String>> responseMap = ImmutableMap.of(MetadataStoreRoutingConstants.METADATA_STORE_REALMS, realms); return JSONRepresentation(responseMap); } String realm = _metadataStoreDirectory.getMetadataStoreRealm(_namespace, shardingKey); return JSONRepresentation(new MetadataStoreShardingKey(shardingKey, realm)); } catch (NoSuchElementException ex) { return notFound(ex.getMessage()); } }
Source:
public PollingResult compareRemoteRevisionWith(@Nonnull Job<?,?> project, @Nullable Launcher launcher, @Nonnull TaskListener listener, @Nonnull SCMRevisionState baseline) throws IOException, InterruptedException { if (requiresWorkspaceForPolling()) return PollingResult.SIGNIFICANT; else return compareRemoteRevisionWith(project, launcher, null, listener, baseline); }

Target:
public PollingResult compareRemoteRevisionWith(@Nonnull Job<?,?> project, @Nullable Launcher launcher, @Nonnull TaskListener listener, @Nonnull SCMRevisionState baseline) throws IOException, InterruptedException { if (requiresWorkspaceForPolling()) return PollingResult.UNCERTAIN; else return compareRemoteRevisionWith(project, launcher, null, listener, baseline); }
Source:
private static void reset() throws MalformedURLException { for (Enumeration<Logger> logger = LogManager.getCurrentLoggers(); logger.hasMoreElements();) { logger.nextElement().setLevel(null); } if (Strings.isNullOrEmpty(System.getProperty(JAVA_OPTIONS_LOG_CONFIG))) { PropertyConfigurator.configure(Loader.getResource(LOG_CONFIGURATION)); } else { PropertyConfigurator.configure( new URL(System.getProperty(JAVA_OPTIONS_LOG_CONFIG))); } }

Target:
private static void reset() throws MalformedURLException { for (Enumeration<Logger> logger = LogManager.getCurrentLoggers(); logger.hasMoreElements();) { logger.nextElement().setLevel(null); } String path = System.getProperty(JAVA_OPTIONS_LOG_CONFIG); if (Strings.isNullOrEmpty(path)) { PropertyConfigurator.configure(Loader.getResource(LOG_CONFIGURATION)); } else { PropertyConfigurator.configure(new URL(path)); } }
Source:
public void containersChanged(Set<TaskContainerDelta> containers) { for (TaskContainerDelta delta : containers) { ITask updatedTask = (ITask) delta.getElement(); if (updatedTask != null && isTaskAssosciatedWithReviewConnector(updatedTask)) { SynchronizationState taskState = updatedTask.getSynchronizationState(); if (taskState == SynchronizationState.INCOMING || taskState == SynchronizationState.INCOMING_NEW) { for (ITask assosciatedTask : getTasksAssosciatedWithReviewTask(updatedTask)) { updateTaskWithIncomingReviewState(assosciatedTask, true); } } else { forceFullRefreshFor(updatedTask); } } } }

Target:
public void containersChanged(Set<TaskContainerDelta> containers) { for (TaskContainerDelta delta : containers) { ITask updatedReview = (ITask) delta.getElement(); if (updatedReview != null && isTaskAssosciatedWithReviewConnector(updatedReview)) { SynchronizationState taskState = updatedReview.getSynchronizationState(); if (taskState.isIncoming()) { ITask assosciatedTask = getTasksAssosciatedWithReviewTask(updatedReview); if (assosciatedTask != null) { updateTaskWithIncomingReviewState(assosciatedTask, true); } } else { forceFullRefreshFor(updatedReview); } } } }
Source:
public void testDownloadUnknownPackage() throws Exception { assertPkgs(NON_EXISTENT, "unknown-package"); boolean isSuccessful = connectBroker.downloadPackages(Arrays.asList("unknown-package")); assertThat(isSuccessful).isFalse(); assertPkgs(NON_EXISTENT, "unknown-package"); connectBroker.getCommandSet().log(); String expectedLogs = "Downloading [unknown-package]...\n" + "\tDownload failed (not found)."; assertThat(logOf(logCaptureResult)).isEqualTo(expectedLogs); }

Target:
public void testDownloadUnknownPackage() throws Exception { checkPackagesState(null, "unknown-package"); boolean isSuccessful = connectBroker.downloadPackages(Arrays.asList("unknown-package")); assertThat(isSuccessful).isFalse(); checkPackagesState(null, "unknown-package"); connectBroker.getCommandSet().log(); String expectedLogs = "Downloading [unknown-package]...\n" + "\tDownload failed (not found)."; assertThat(logOf(logCaptureResult)).isEqualTo(expectedLogs); }
Source:
public void reload() { if (pluginDirectory == null || !pluginDirectory.isDirectory() || !pluginDirectory.canRead()) { LOGGER.log(Level.WARNING, "Plugin directory not found or not readable: {0}. " + "All requests allowed.", pluginDirectory); return; } if (stack == null) { LOGGER.log(Level.WARNING, "Plugin stack not found in configuration: null. All requests allowed."); return; } LOGGER.log(Level.INFO, "Plugins are being reloaded from {0}", pluginDirectory.getAbsolutePath()); loader = (AuthorizationPluginClassLoader) AccessController.doPrivileged(new PrivilegedAction() { @Override public Object run() { return new AuthorizationPluginClassLoader(pluginDirectory); } }); AuthorizationStack newStack = getStack().clone(); if (getLoadClasses()) { loadClassFiles(newStack, IOUtils.listFilesRec(pluginDirectory, ".class")); } if (getLoadJars()) { loadJarFiles(newStack, IOUtils.listFiles(pluginDirectory, ".jar")); } loadAllPlugins(newStack); AuthorizationStack oldStack; lock.writeLock().lock(); try { oldStack = stack; stack = newStack; increasePluginVersion(); } finally { lock.writeLock().unlock(); } Statistics stats = RuntimeEnvironment.getInstance().getStatistics(); stats.addRequest("authorization_stack_reload"); removeAll(oldStack); oldStack = null; }

Target:
public void reload() { if (pluginDirectory == null || !pluginDirectory.isDirectory() || !pluginDirectory.canRead()) { LOGGER.log(Level.WARNING, "Plugin directory not found or not readable: {0}. " + "All requests allowed.", pluginDirectory); return; } if (stack == null) { LOGGER.log(Level.WARNING, "Plugin stack not found in configuration: null. All requests allowed."); return; } LOGGER.log(Level.INFO, "Plugins are being reloaded from {0}", pluginDirectory.getAbsolutePath()); loader = (AuthorizationPluginClassLoader) AccessController.doPrivileged(new PrivilegedAction() { @Override public Object run() { return new AuthorizationPluginClassLoader(pluginDirectory); } }); AuthorizationStack newLocalStack; if (this.newStack == null) { newLocalStack = getStack().clone(); } else { newLocalStack = this.newStack.clone(); } if (isLoadClassesEnabled()) { loadClassFiles(newLocalStack, IOUtils.listFilesRec(pluginDirectory, ".class")); } if (isLoadJarsEnabled()) { loadJarFiles(newLocalStack, IOUtils.listFiles(pluginDirectory, ".jar")); } loadAllPlugins(newLocalStack); AuthorizationStack oldStack; lock.writeLock().lock(); try { oldStack = stack; stack = newLocalStack; increasePluginVersion(); } finally { lock.writeLock().unlock(); } Statistics stats = RuntimeEnvironment.getInstance().getStatistics(); stats.addRequest("authorization_stack_reload"); removeAll(oldStack); oldStack = null; }
Source:
private List<DatasetField> sortDatasetFields (List<DatasetField> dsfList) { Collections.sort(dsfList, (DatasetField d1, DatasetField d2) -> { int a = d1.getDatasetFieldType().getDisplayOrder(); int b = d2.getDatasetFieldType().getDisplayOrder(); return Integer.valueOf(a).compareTo(b); }); return dsfList; }

Target:
private List<DatasetField> sortDatasetFields (List<DatasetField> dsfList) { Collections.sort(dsfList, new Comparator<DatasetField>() { public int compare(DatasetField d1, DatasetField d2) { int a = d1.getDatasetFieldType().getDisplayOrder(); int b = d2.getDatasetFieldType().getDisplayOrder(); return Integer.valueOf(a).compareTo(Integer.valueOf(b)); } }); return dsfList; }
Source:
private void update() { if (boshURL == null || StringUtils.isNullOrEmpty(domain)) { return; } boshURL = boshURL.replace("{host}", domain); String subdomain = ""; if (roomName != null && roomName.contains("@")) { String mucAddress = roomName.substring(roomName.indexOf("@") + 1); String mucAddressPrefix = this.mucAddressPrefix != null ? this.mucAddressPrefix : "conference"; if (mucAddress.startsWith(mucAddressPrefix) && mucAddress.endsWith(domain)) { if (mucAddressPrefix.length() + domain.length() + 2 < mucAddress.length()) { subdomain = mucAddress.substring( mucAddressPrefix.length() + 1, mucAddress.length() - domain.length() - 1); this.subDomain = subdomain; subdomain = "/" + subdomain; } } boshURL = boshURL.replace("{subdomain}", subdomain); } if (this.authToken != null) { String tokenParam = "&token=" + this.authToken; if (!boshURL.endsWith(tokenParam)) { boshURL = boshURL + tokenParam; } } }

Target:
private void update() { if (boshURL == null || StringUtils.isNullOrEmpty(domain)) { return; } boshURL = boshURL.replace("{host}", domain); String subdomain = ""; if (roomName != null && roomName.contains("@")) { String mucAddress = roomName.substring(roomName.indexOf("@") + 1); String mucAddressPrefix = this.mucAddressPrefix != null ? this.mucAddressPrefix : "conference"; if (mucAddress.startsWith(mucAddressPrefix) && mucAddress.endsWith(domain)) { if (mucAddressPrefix.length() + domain.length() + 2 < mucAddress.length()) { subdomain = mucAddress.substring( mucAddressPrefix.length() + 1, mucAddress.length() - domain.length() - 1); this.subDomain = subdomain; subdomain = "/" + subdomain; } } boshURL = boshURL.replace("{subdomain}", subdomain); } if (this.authToken != null) { if (!boshURL.contains("&token=")) { boshURL = boshURL + "&token=" + this.authToken; } } }
Source:
public void integerValue(DistinctQueryType queryType) { String resource = String.format("{ " + "\"id\": %d + \"}", 5); DistinctMap distinctMap = DistinctMap.create(queryType, null); Utils.ValueHolder<String> outHash = new Utils.ValueHolder<>(); boolean add = distinctMap.add(resource, outHash); System.out.println("outHash5 = " + outHash.v); assertThat(add).as("Value should be added first time").isTrue(); boolean add2 = distinctMap.add(resource, outHash); assertThat(add2).as("same value should not be added again").isFalse(); resource = String.format("{ " + "\"id\": %d + \"}", 3); boolean add3 = distinctMap.add(resource, outHash); assertThat(add3).as("different value should be added again").isTrue(); }

Target:
public void integerValue(DistinctQueryType queryType) { String doc = String.format("{ " + "\"id\": \"%s\", \"prop\": %d }", UUID.randomUUID().toString(), 5); Document resource = new Document(doc); DistinctMap distinctMap = DistinctMap.create(queryType, null); Utils.ValueHolder<String> outHash = new Utils.ValueHolder<>(); boolean add = distinctMap.add(resource, outHash); assertThat(add).as("Value should be added first time").isTrue(); boolean add2 = distinctMap.add(resource, outHash); assertThat(add2).as("same value should not be added again").isFalse(); resource = new Document(String.format("{ " + "\"id\": \"%s\", \"prop\": %d }", UUID.randomUUID().toString(), 3)); boolean add3 = distinctMap.add(resource, outHash); assertThat(add3).as("different value should be added again").isTrue(); }
Source:
public void leaseExpiry() throws Exception { URI connectionURI = getProxyURI(); CacheManagerBuilder<PersistentCacheManager> clusteredCacheManagerBuilder = CacheManagerBuilder.newCacheManagerBuilder() .with(ClusteringServiceConfigurationBuilder.cluster(connectionURI.resolve("/crud-cm")) .timeouts(TimeoutsBuilder.timeouts() .connection(Duration.ofSeconds(20))) .autoCreate() .defaultServerResource("primary-server-resource")); PersistentCacheManager cacheManager = clusteredCacheManagerBuilder.build(false); cacheManager.init(); CacheConfiguration<Long, String> config = CacheConfigurationBuilder.newCacheConfigurationBuilder(Long.class, String.class, resourcePoolsBuilder).build(); Cache<Long, String> cache = cacheManager.createCache("clustered-cache", config); cache.put(1L, "The one"); cache.put(2L, "The two"); cache.put(3L, "The three"); assertThat(cache.get(1L), equalTo("The one")); assertThat(cache.get(2L), equalTo("The two")); assertThat(cache.get(3L), equalTo("The three")); setDelay(6000); Thread.sleep(6000); setDelay(0L); assertThat(cache.get(1L), is(nullValue())); assertThat(cache.get(2L), is(nullValue())); assertThat(cache.get(3L), is(nullValue())); }

Target:
public void leaseExpiry() throws Exception { URI connectionURI = getProxyURI(); CacheManagerBuilder<PersistentCacheManager> clusteredCacheManagerBuilder = CacheManagerBuilder.newCacheManagerBuilder() .with(ClusteringServiceConfigurationBuilder.cluster(connectionURI.resolve("/crud-cm")) .timeouts(TimeoutsBuilder.timeouts() .connection(Duration.ofSeconds(20))) .autoCreate() .defaultServerResource("primary-server-resource")); PersistentCacheManager cacheManager = clusteredCacheManagerBuilder.build(false); cacheManager.init(); CacheConfiguration<Long, String> config = CacheConfigurationBuilder.newCacheConfigurationBuilder(Long.class, String.class, resourcePoolsBuilder).build(); Cache<Long, String> cache = cacheManager.createCache("clustered-cache", config); cache.put(1L, "The one"); cache.put(2L, "The two"); cache.put(3L, "The three"); assertThat(cache.get(1L), equalTo("The one")); assertThat(cache.get(2L), equalTo("The two")); assertThat(cache.get(3L), equalTo("The three")); setDelay(2000); Thread.sleep(2000); setDelay(0L); assertThat(cache.get(1L), is(nullValue())); assertThat(cache.get(2L), is(nullValue())); assertThat(cache.get(3L), is(nullValue())); }
Source:
public void focusLost(FocusEvent e) { if (this.handleFocusChanges) { if (!e.widget.isDisposed() && !commit(MoveDirectionEnum.NONE, true)) { if (e.widget instanceof Control && !e.widget.isDisposed()) { ((Control) e.widget).forceFocus(); } } else { if (!AbstractCellEditor.this.parent.isDisposed()) AbstractCellEditor.this.parent.forceFocus(); } } }

Target:
public void focusLost(FocusEvent e) { if (this.handleFocusChanges) { if (!e.widget.isDisposed() && !commit(MoveDirectionEnum.NONE, true)) { if (e.widget instanceof Control) { ((Control) e.widget).forceFocus(); } } else { if (!AbstractCellEditor.this.parent.isDisposed()) AbstractCellEditor.this.parent.forceFocus(); } } }
Source:
public void setUpTest() { String username = UUID.randomUUID().toString(); RealmLog.error("Username %s", username); SyncCredentials credentials = SyncCredentials.usernamePassword(username, "password", true); user = SyncUser.login(credentials, Constants.AUTH_URL); looperThread.runAfterTest(new Runnable() { @Override public void run() { user.logout(); } }); SystemClock.sleep(5000); }

Target:
public void setUpTest() { user = UserFactory.createUniqueUser(Constants.AUTH_URL); looperThread.runAfterTest(new Runnable() { @Override public void run() { user.logout(); } }); }
Source:
public void eventOccured(String message) { if (message.contains("(CRC wrong after decryption)")) { logger.debug("BaseStation eventOccured: CRC wrong after decryption"); return; } if (message.contains("Base Station")) { StringTokenizer strTok = new StringTokenizer(message, "\n"); String data = null; versionInfo = new String[strTok.countTokens()]; logger.debug("BaseStation eventOccured - initial message ( " + strTok.countTokens() + " )"); int i = 0; while (strTok.hasMoreTokens()) { versionInfo[i] = strTok.nextToken(); logger.debug("<BaseStation>[" + i + "]: " + versionInfo[i]); i++; } } else { String logResult = message.replaceAll("\n", "\\\\n").replaceAll("\r", "\\\\r").substring(0, 40); logger.debug("BaseStation eventOccured - giving to Binding " + logResult); if (bindingEventWorker != null) { bindingEventWorker.eventOccured(message); } } }

Target:
public void eventOccured(String message) { if (message.contains("(CRC wrong after decryption)")) { logger.debug("BaseStation eventOccured: CRC wrong after decryption"); return; } if (message.contains("Base Station")) { StringTokenizer strTok = new StringTokenizer(message, "\n"); String data = null; versionInfo = new String[strTok.countTokens()]; logger.debug("BaseStation eventOccured - initial message ( )", strTok.countTokens()); int i = 0; while (strTok.hasMoreTokens()) { versionInfo[i] = strTok.nextToken(); logger.debug("<BaseStation>[ ]: {}", i, versionInfo[i]); i++; } } else { String logResult = message.replaceAll("\n", "\\\\n").replaceAll("\r", "\\\\r").substring(0, 40); logger.debug("BaseStation eventOccured - giving to Binding {}", logResult); if (bindingEventWorker != null) { bindingEventWorker.eventOccured(message); } } }
Source:
protected void updateNetworks(Collection<Network> networks) { VnicProfile profile = getProfile(); if (profile != null) { Network selected = networks.stream() .filter(net -> Objects.equals(profile.getNetworkId(), net.getId())) .findFirst().get(); getNetwork().setSelectedItem(selected); getNetwork().setIsChangeable(false); } }

Target:
protected void updateNetworks(Collection<Network> networks) { VnicProfile profile = getProfile(); if (profile != null && profile.getNetworkId() != null) { Network selected = networks.stream() .filter(net -> Objects.equals(profile.getNetworkId(), net.getId())) .findFirst().get(); getNetwork().setSelectedItem(selected); getNetwork().setIsChangeable(false); } }
Source:
public void testRecorderCamera() throws Exception { int width; int height; if (!hasCamera()) { return; } try { Camera camera = Camera.open(); width = camera.getParameters().getSupportedPreviewSizes().get(0).width; height = camera.getParameters().getSupportedPreviewSizes().get(0).height; camera.release(); } catch (Exception e) { width = VIDEO_WIDTH; height = VIDEO_HEIGHT; } mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA); mMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT); mMediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.DEFAULT); mMediaRecorder.setVideoSize(width, height); mMediaRecorder.setVideoEncodingBitRate(VIDEO_BIT_RATE_IN_BPS); mMediaRecorder.setPreviewDisplay(mActivity.getSurfaceHolder().getSurface()); mMediaRecorder.prepare(); mMediaRecorder.start(); Thread.sleep(RECORD_TIME_MS); mMediaRecorder.stop(); checkOutputExist(); }

Target:
public void testRecorderCamera() throws Exception { int width; int height; Camera camera = null; if (!hasCamera()) { return; } try { camera = Camera.open(); width = camera.getParameters().getSupportedPreviewSizes().get(0).width; height = camera.getParameters().getSupportedPreviewSizes().get(0).height; } catch (Exception e) { width = VIDEO_WIDTH; height = VIDEO_HEIGHT; } if (camera != null) { camera.release(); } mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA); mMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT); mMediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.DEFAULT); mMediaRecorder.setVideoSize(width, height); mMediaRecorder.setVideoEncodingBitRate(VIDEO_BIT_RATE_IN_BPS); mMediaRecorder.setPreviewDisplay(mActivity.getSurfaceHolder().getSurface()); mMediaRecorder.prepare(); mMediaRecorder.start(); Thread.sleep(RECORD_TIME_MS); mMediaRecorder.stop(); checkOutputExist(); }
Source:
@VisibleForTesting Call<MwQueryResponse<Nearby>> request(@NonNull Service service, double latitude, double longitude, double radius, @NonNull final Callback cb) { String latLng = String.format(Locale.ROOT, "%f|%f", latitude, longitude); Call<MwQueryResponse<Nearby>> call = service.request(latLng, radius, Constants.PREFERRED_THUMB_SIZE); call.enqueue(new retrofit2.Callback<MwQueryResponse<Nearby>>() { @Override public void onResponse(Call<MwQueryResponse<Nearby>> call, Response<MwQueryResponse<Nearby>> response) { if (response.isSuccessful()) { if (response.body().success()) { cb.success(call, new NearbyResult(response.body().query().list())); } else if (response.body().hasError()) { cb.failure(call, new MwApiErrorException(response.body().getError())); } } else { cb.failure(call, RetrofitException.httpError(response, cachedService.retrofit())); } } @Override public void onFailure(Call<MwQueryResponse<Nearby>> call, Throwable t) { cb.failure(call, t); } }); return call; }

Target:
@VisibleForTesting Call<MwQueryResponse<Nearby>> request(@NonNull Service service, double latitude, double longitude, double radius, @NonNull final Callback cb) { String latLng = String.format(Locale.ROOT, "%f|%f", latitude, longitude); Call<MwQueryResponse<Nearby>> call = service.request(latLng, radius, Constants.PREFERRED_THUMB_SIZE); call.enqueue(new retrofit2.Callback<MwQueryResponse<Nearby>>() { @Override public void onResponse(Call<MwQueryResponse<Nearby>> call, Response<MwQueryResponse<Nearby>> response) { if (response.isSuccessful()) { if (response.body().success()) { cb.success(call, new NearbyResult(response.body().query().list())); } else if (response.body().hasError()) { cb.failure(call, new MwApiException(response.body().getError())); } else { cb.success(call, new NearbyResult(new ArrayList<NearbyPage>())); } } else { cb.failure(call, RetrofitException.httpError(response, cachedService.retrofit())); } } @Override public void onFailure(Call<MwQueryResponse<Nearby>> call, Throwable t) { cb.failure(call, t); } }); return call; }
Source:
public List<JournalEntry> getEntriesSince(long offset, boolean inclusive) { try { if (offset < journal.firstKey() || offset > journal.lastKey() || !journal.containsKey(offset)) { return null; } } catch (NoSuchElementException e) { return null; } ConcurrentNavigableMap<Long, StoreKey> subsetMap = journal.tailMap(offset, true); int entriesToReturn = Math.min(subsetMap.size(), maxEntriesToReturn); List<JournalEntry> journalEntries = new ArrayList<JournalEntry>(entriesToReturn); int entriesAdded = 0; for (Map.Entry<Long, StoreKey> entry : subsetMap.entrySet()) { if (inclusive || entry.getKey() != offset) { journalEntries.add(new JournalEntry(entry.getKey(), entry.getValue())); entriesAdded++; if (entriesAdded == entriesToReturn) { break; } } } try { if (offset < journal.firstKey()) { return null; } } catch (NoSuchElementException e) { return null; } logger.trace("Journal : " + dataDir + " entries returned " + journalEntries.size()); return journalEntries; }

Target:
public List<JournalEntry> getEntriesSince(long offset, boolean inclusive) { Map.Entry<Long, StoreKey> first = journal.firstEntry(); Map.Entry<Long, StoreKey> last = journal.lastEntry(); if (first == null || offset < first.getKey() || last == null || offset > last.getKey() || !journal.containsKey(offset)) { return null; } ConcurrentNavigableMap<Long, StoreKey> subsetMap = journal.tailMap(offset, true); int entriesToReturn = Math.min(subsetMap.size(), maxEntriesToReturn); List<JournalEntry> journalEntries = new ArrayList<JournalEntry>(entriesToReturn); int entriesAdded = 0; for (Map.Entry<Long, StoreKey> entry : subsetMap.entrySet()) { if (inclusive || entry.getKey() != offset) { journalEntries.add(new JournalEntry(entry.getKey(), entry.getValue())); entriesAdded++; if (entriesAdded == entriesToReturn) { break; } } } first = journal.firstEntry(); if (first == null || offset < first.getKey()) { return null; } logger.trace("Journal : " + dataDir + " entries returned " + journalEntries.size()); return journalEntries; }
Source:
public AggregatorFactory getMergingFactory(AggregatorFactory other) throws AggregatorFactoryNotMergeableException { if (other.getName().equals(this.getName()) && other instanceof DoublesSketchAggregatorFactory) { return new DoublesSketchMergeAggregatorFactory(name, k); } else { throw new AggregatorFactoryNotMergeableException(this, other); } }

Target:
public AggregatorFactory getMergingFactory(AggregatorFactory other) throws AggregatorFactoryNotMergeableException { if (other.getName().equals(this.getName()) && other instanceof DoublesSketchAggregatorFactory) { return new DoublesSketchMergeAggregatorFactory(name, Math.max(k, ((DoublesSketchAggregatorFactory) other).k)); } else { throw new AggregatorFactoryNotMergeableException(this, other); } }
Source:
public static void main(String[] args) throws SmackException, IOException, XMPPException, InterruptedException { ModularXmppClientToServerConnectionConfiguration.Builder builder = ModularXmppClientToServerConnectionConfiguration.builder(); builder.removeModule(XmppTcpTransportModuleDescriptor.class); builder.setXmppAddressAndPassword(args[0], args[1]); ModularXmppClientToServerConnectionConfiguration config = builder.build(); ModularXmppClientToServerConnection connection = new ModularXmppClientToServerConnection(config); connection.connect(); connection.login(); }

Target:
public static void main(String[] args) throws SmackException, IOException, XMPPException, InterruptedException, URISyntaxException { ModularXmppClientToServerConnectionConfiguration.Builder builder = ModularXmppClientToServerConnectionConfiguration.builder(); builder.removeAllModules(); builder.setXmppAddressAndPassword(args[0], args[1]); XmppWebsocketTransportModuleDescriptor.Builder websocketBuilder = XmppWebsocketTransportModuleDescriptor.getBuilder(builder); websocketBuilder.explicitlySetWebsocketEndpointAndDiscovery(new URI(args[2]), false); builder.addModule(websocketBuilder.build()); ModularXmppClientToServerConnectionConfiguration config = builder.build(); ModularXmppClientToServerConnection connection = new ModularXmppClientToServerConnection(config); connection.connect(); connection.login(); connection.disconnect(); }
Source:
private void assertConstraints(TaskAssigningSolution solution) { int[] totalTasks = {0}; solution.getUserList().forEach(user -> { List<Task> taskList = extractTaskList(user); totalTasks[0] += taskList.size(); taskList.forEach(task -> assertAssignment(user, task, solution.getUserList())); }); assertEquals(solution.getTaskList().size(), totalTasks[0]); }

Target:
private void assertConstraints(TaskAssigningSolution solution) { int totalTasks = 0; for (User user : solution.getUserList()) { List<Task> taskList = extractTaskList(user); totalTasks += taskList.size(); taskList.forEach(task -> assertAssignment(user, task, solution.getUserList())); } assertEquals(solution.getTaskList().size(), totalTasks); }
Source:
public void bind(PropertyBindingContext context) { context.getDependencies() .useRootOnly(); IndexSchemaElement schemaElement = context.getIndexSchemaElement(); IndexSchemaObjectField userMetadataField = schemaElement.objectField( "userMetadata" ); userMetadataField.fieldTemplate( "userMetadataValueTemplate", f -> f.asString().analyzer( "english" ) ); context.setBridge( new Bridge( userMetadataField.toReference() ) ); }

Target:
public void bind(PropertyBindingContext context) { context.getDependencies() .useRootOnly(); IndexSchemaElement schemaElement = context.getIndexSchemaElement(); IndexSchemaObjectField userMetadataField = schemaElement.objectField( "userMetadata" ); userMetadataField.fieldTemplate( "userMetadataValueTemplate", f -> f.asString().analyzer( "english" ) ); context.setBridge( new UserMetadataBridge( userMetadataField.toReference() ) ); }
Source:
protected void addCanDoActionMessages(VdcBllMessages... messages) { for (VdcBllMessages msg : messages) { addCanDoActionMessage(msg); } }

Target:
protected final void addCanDoActionMessages(VdcBllMessages... messages) { for (VdcBllMessages msg : messages) { addCanDoActionMessage(msg); } }
Source:
public void shouldRunAllTests() { final Result result = runJUnit( DummyTestClass.class.getName(), DummyTestClass0.class.getName(), DummyTestClass1.class.getName(), DummyTestClass01.class.getName(), DummyTestClass0TestMethod1.class.getName()); assertFinished(DummyTestClass.class); assertFinished(DummyTestClass0.class); assertFinished(DummyTestClass1.class); assertFinished(DummyTestClass01.class); assertFinished(DummyTestClass0TestMethod1.class); assertThat("runCount does not match", result.getRunCount(), is(5)); assertThat("failureCount does not match", result.getFailureCount(), is(0)); }

Target:
public void shouldRunAllTests() { Result result = runJUnit( DummyTestClass.class.getName(), DummyTestClass0.class.getName(), DummyTestClass1.class.getName(), DummyTestClass01.class.getName(), DummyTestClass0TestMethod1.class.getName()); assertWasRun(DummyTestClass.class); assertWasRun(DummyTestClass0.class); assertWasRun(DummyTestClass1.class); assertWasRun(DummyTestClass01.class); assertWasRun(DummyTestClass0TestMethod1.class); assertThat("runCount does not match", result.getRunCount(), is(5)); assertThat("failureCount does not match", result.getFailureCount(), is(0)); }
Source:
private void toggleMute() { mLogger.d("toggleMute"); mMute = !mMute; updateMicrophoneVolume(mMute ? getResources().getInteger(R.integer.mute_microphone_volume_value) : getResources().getInteger(R.integer.unmute_microphone_volume_value)); updateUi(); }

Target:
private void toggleMute() { mLogger.d("toggleMute"); mMute = !mMute; int volume = getResources().getInteger(mMute ? R.integer.mute_microphone_volume_value : R.integer.unmute_microphone_volume_value); updateMicrophoneVolume(volume); updateUi(); }
Source:
@Override public RelNode convert(RelNode rel) { LogicalTableSpool spool = (LogicalTableSpool) rel; return new EnumerableTableSpool( spool.getCluster(), spool.getTraitSet().replace(EnumerableConvention.INSTANCE), convert(spool.getInput(), spool.getInput().getTraitSet().replace(EnumerableConvention.INSTANCE)), spool.getReadType(), spool.getWriteType(), spool.getTableName()); }

Target:
@Override public RelNode convert(RelNode rel) { LogicalTableSpool spool = (LogicalTableSpool) rel; return EnumerableTableSpool.create( convert(spool.getInput(), spool.getInput().getTraitSet().replace(EnumerableConvention.INSTANCE)), spool.readType, spool.writeType, spool.getTableName()); }
Source:
@Override public void initCubicWorld() { ICubicChunksWorldType type = (ICubicChunksWorldType) this.getWorldType(); this.maxHeight = type.getDefaultMaxHeight(); this.minHeight = type.getDefaultMinHeight(); if (CubicChunks.Config.getWorldHeightLowerBound() >= type.getDefaultMinHeight()) { this.minHeight = CubicChunks.Config.getWorldHeightLowerBound(); } if (CubicChunks.Config.getWorldHeightUpperBound() <= this.maxHeight) { this.maxHeight = CubicChunks.Config.getWorldHeightUpperBound(); } }

Target:
@Override public void initCubicWorld() { ICubicChunksWorldType type = (ICubicChunksWorldType) this.getWorldType(); this.maxHeight = type.getMaximumPossibleHeight(); this.minHeight = type.getMinimumPossibleHeight(); if (CubicChunks.Config.getWorldHeightLowerBound() >= type.getMinimumPossibleHeight()) { this.minHeight = CubicChunks.Config.getWorldHeightLowerBound(); } if (CubicChunks.Config.getWorldHeightUpperBound() <= this.maxHeight) { this.maxHeight = CubicChunks.Config.getWorldHeightUpperBound(); } }
Source:
public Optional<TYPE> last() { Optional result = Optional.empty(); List<TYPE> list = last(1).asList(); if(!list.isEmpty()) { result = Optional.of(list.get(0)); } return result; }

Target:
public Optional<TYPE> last() { Iterator<TYPE> resultIterator = last(1).iterator(); return resultIterator.hasNext() ? Optional.of(resultIterator.next()) : Optional.empty(); }
Source:
public SocatContainer() { this(DockerImageName.parse("alpine/socat:latest")); }

Target:
public SocatContainer() { this(DockerImageName.parse("alpine/socat:1.7.3.4-r0")); }
Source:
public void testValidationWithoutSettings() throws ValidationException { CloudWatchWriter writer = createCloudWatchWriter(); Query query = Query.builder() .setObj("test") .build(); Server server = Server.builder().setHost("localhost").setPort("123").build(); writer.validateSetup(server, query); System.out.println("I got here"); }

Target:
public void testValidationWithoutSettings() throws ValidationException { CloudWatchWriter writer = createCloudWatchWriter(); Query query = Query.builder() .setObj("test") .build(); Server server = Server.builder().setHost("localhost").setPort("123").build(); writer.validateSetup(server, query); }
Source:
public ClassLoader connectorLoader(String connectorClassOrAlias) { log.debug("Getting plugin class loader for connector: '{}'", connectorClassOrAlias); String fullName = aliases.containsKey(connectorClassOrAlias) ? aliases.get(connectorClassOrAlias) : connectorClassOrAlias; PluginClassLoader classLoader = pluginClassLoader(fullName); if (classLoader == null) { log.trace( "Plugin class loader for connector: '{}' was not found. Returning: {}", connectorClassOrAlias, this ); return this; } return classLoader; }

Target:
public ClassLoader connectorLoader(String connectorClassOrAlias) { String fullName = aliases.containsKey(connectorClassOrAlias) ? aliases.get(connectorClassOrAlias) : connectorClassOrAlias; ClassLoader classLoader = pluginClassLoader(fullName); if (classLoader == null) classLoader = this; log.debug( "Getting plugin class loader: '{}' for connector: {}", classLoader, connectorClassOrAlias ); return classLoader; }
Source:
void sendEvent(byte[] key, byte[] value, long dataVersion, CacheEntryEvent event) { Events.Event remoteEvent = createRemoteEvent(key, value, dataVersion, event); if (isTrace) log.tracef("Queue event %s, before queuing event queue size is %d", remoteEvent, eventQueue.size()); EventLoop loop = ch.eventLoop(); if (loop.inEventLoop()) { boolean offered = eventQueue.offer(remoteEvent); while (!offered) { writeEventsIfPossible(); try { offered = eventQueue.offer(remoteEvent, 1, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { throw new CacheException(e); } } if (ch.isWritable()) { loop.submit(writeEventsIfPossible); } } else { try { eventQueue.put(remoteEvent); } catch (InterruptedException e) { throw new CacheException(e); } if (ch.isWritable()) { loop.submit(writeEventsIfPossible); } } }

Target:
void sendEvent(byte[] key, byte[] value, long dataVersion, CacheEntryEvent event) { Events.Event remoteEvent = createRemoteEvent(key, value, dataVersion, event); if (isTrace) log.tracef("Queue event %s, before queuing event queue size is %d", remoteEvent, eventQueue.size()); EventLoop loop = ch.eventLoop(); if (loop.inEventLoop()) { boolean offered = eventQueue.offer(remoteEvent); while (!offered) { writeEventsIfPossible(); try { offered = eventQueue.offer(remoteEvent, 1, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { throw new CacheException(e); } } } else { try { if (!eventQueue.offer(remoteEvent, 30, TimeUnit.SECONDS)) { throw new TimeoutException("Timed out attempting to offer remote event into queue"); } } catch (InterruptedException e) { throw new CacheException(e); } } if (ch.isWritable()) { loop.submit(writeEventsIfPossible); } }
Source:
private static void sartIterate(){ reconPre=new Grid2D(recon); for (int theta = 0; theta < sinogram.getSize()[1]; theta++) { if(isOpencl) sinoDiff1D= projector.projectRayDriven1DCL(recon, theta); else sinoDiff1D = projector.projectRayDriven1D(recon, theta); sinoDiff1D=(Grid1D)NumericPointwiseOperators.subtractedBy(sinoDiff1D, sinogram.getSubGrid(theta)); NumericPointwiseOperators.divideBy(sinoDiff1D, normSinogram.getSubGrid(theta)); if(isOpencl) localImageUpdate = backProj.backprojectPixelDriven1DCL(sinoDiff1D, theta); else localImageUpdate = backProj.backprojectPixelDriven1D(sinoDiff1D, theta); double stepSize = -1.0; NumericPointwiseOperators.multiplyBy(localImageUpdate,(float) stepSize); NumericPointwiseOperators.divideBy(localImageUpdate, normGrids); NumericPointwiseOperators.addBy(recon, localImageUpdate); } recon.getGridOperator().removeNegative(recon); }

Target:
public void sartIterate(){ reconPre=new Grid2D(recon); for (int theta = 0; theta < sinogram.getSize()[1]; theta++) { if(isOpencl) sinoDiff1D= projector.projectRayDriven1DCL(recon, theta); else sinoDiff1D = projector.projectRayDriven1D(recon, theta); sinoDiff1D=(Grid1D)NumericPointwiseOperators.subtractedBy(sinoDiff1D, sinogram.getSubGrid(theta)); NumericPointwiseOperators.divideBy(sinoDiff1D, normSinogram.getSubGrid(theta)); if(isOpencl) localImageUpdate = backProj.backprojectPixelDriven1DCL(sinoDiff1D, theta); else localImageUpdate = backProj.backprojectPixelDriven1D(sinoDiff1D, theta); double stepSize = -1.0; NumericPointwiseOperators.multiplyBy(localImageUpdate,(float) stepSize); NumericPointwiseOperators.divideBy(localImageUpdate, normGrids); NumericPointwiseOperators.addBy(recon, localImageUpdate); } recon.getGridOperator().removeNegative(recon); }
Source:
private static Set<Scope> getScopesFromExtensions(Swagger swagger) throws APIManagementException { Set<Scope> scopeList = new LinkedHashSet<>(); Map<String, Object> extensions = swagger.getVendorExtensions(); if (extensions != null && extensions.containsKey(APIConstants.SWAGGER_X_WSO2_SECURITY)) { Map<String, Object> securityDefinitions = (Map<String, Object>) extensions.get(APIConstants.SWAGGER_X_WSO2_SECURITY); for (Map.Entry<String, Object> entry : securityDefinitions.entrySet()) { Map<String, Object> securityDefinition = (Map<String, Object>) entry.getValue(); if (securityDefinition.containsKey(APIConstants.SWAGGER_X_WSO2_SCOPES)) { List<Map<String, String>> oauthScope = (List<Map<String, String>>) securityDefinition.get(APIConstants.SWAGGER_X_WSO2_SCOPES); for (Map<String, String> anOauthScope : oauthScope) { Scope scope = new Scope(); scope.setKey(anOauthScope.get(APIConstants.SWAGGER_SCOPE_KEY)); scope.setName(anOauthScope.get(APIConstants.SWAGGER_NAME)); scope.setDescription(anOauthScope.get(APIConstants.SWAGGER_DESCRIPTION)); scope.setRoles(anOauthScope.get(APIConstants.SWAGGER_ROLES)); scopeList.add(scope); } } } } return scopeList; }

Target:
private Set<Scope> getScopesFromExtensions(Swagger swagger) throws APIManagementException { Set<Scope> scopeList = new LinkedHashSet<>(); Map<String, Object> extensions = swagger.getVendorExtensions(); if (extensions != null && extensions.containsKey(APIConstants.SWAGGER_X_WSO2_SECURITY)) { Map<String, Object> securityDefinitions = (Map<String, Object>) extensions.get(APIConstants.SWAGGER_X_WSO2_SECURITY); for (Map.Entry<String, Object> entry : securityDefinitions.entrySet()) { Map<String, Object> securityDefinition = (Map<String, Object>) entry.getValue(); if (securityDefinition.containsKey(APIConstants.SWAGGER_X_WSO2_SCOPES)) { List<Map<String, String>> oauthScope = (List<Map<String, String>>) securityDefinition.get(APIConstants.SWAGGER_X_WSO2_SCOPES); for (Map<String, String> anOauthScope : oauthScope) { Scope scope = new Scope(); scope.setKey(anOauthScope.get(APIConstants.SWAGGER_SCOPE_KEY)); scope.setName(anOauthScope.get(APIConstants.SWAGGER_NAME)); scope.setDescription(anOauthScope.get(APIConstants.SWAGGER_DESCRIPTION)); scope.setRoles(anOauthScope.get(APIConstants.SWAGGER_ROLES)); scopeList.add(scope); } } } } return scopeList; }
Source:
public void waitForEpochAck(long id, StateSummary ss) throws IOException, InterruptedException { synchronized(electingFollowers) { if (electionFinished) { return; } if (ss.getCurrentEpoch() != -1) { if (ss.isMoreRecentThan(leaderStateSummary)) { throw new IOException("Follower is ahead of the leader, leader summary: " + leaderStateSummary.getCurrentEpoch() + " (current epoch), " + leaderStateSummary.getLastZxid() + " (last zxid)"); } if (self.getVotingView().containsKey(id)) { electingFollowers.add(id); } } QuorumVerifier verifier = self.getQuorumVerifier(); if (electingFollowers.contains(self.getId()) && verifier.containsQuorum(electingFollowers)) { electionFinished = true; electingFollowers.notifyAll(); } else { long start = Time.currentElapsedTime(); long cur = start; long end = start + self.getInitLimit()*self.getTickTime(); while(!electionFinished && cur < end) { electingFollowers.wait(end - cur); cur = Time.currentElapsedTime(); } if (!electionFinished) { throw new InterruptedException("Timeout while waiting for epoch to be acked by quorum"); } } } }

Target:
public void waitForEpochAck(long id, StateSummary ss) throws IOException, InterruptedException { synchronized(electingFollowers) { if (electionFinished) { return; } if (ss.getCurrentEpoch() != -1) { if (ss.isMoreRecentThan(leaderStateSummary)) { throw new IOException("Follower is ahead of the leader, leader summary: " + leaderStateSummary.getCurrentEpoch() + " (current epoch), " + leaderStateSummary.getLastZxid() + " (last zxid)"); } if (isParticipant(id)) { electingFollowers.add(id); } } QuorumVerifier verifier = self.getQuorumVerifier(); if (electingFollowers.contains(self.getId()) && verifier.containsQuorum(electingFollowers)) { electionFinished = true; electingFollowers.notifyAll(); } else { long start = Time.currentElapsedTime(); long cur = start; long end = start + self.getInitLimit()*self.getTickTime(); while(!electionFinished && cur < end) { electingFollowers.wait(end - cur); cur = Time.currentElapsedTime(); } if (!electionFinished) { throw new InterruptedException("Timeout while waiting for epoch to be acked by quorum"); } } } }
Source:
public List<File> getJspClasspath() { List<File> jspClasspath = new ArrayList<>(); jspClasspath.add(findPluginJar()); jspClasspath.addAll(javaClasspath.getElements()); return jspClasspath; }

Target:
public List<File> getJspClasspath() { List<File> jspClasspath = new ArrayList<>(); jspClasspath.add(findPluginJar()); jspClasspath.addAll(getJavaClasspath()); return jspClasspath; }
Source:
public PortForwarder(final int myPort, final String hostName, final int hostPort) throws IOException { this.myPort = myPort; log.info("Starting port forwarder " + myPort + " -> " + hostPort); openServerSocket(); Runnable myRunnable = new Runnable() { @Override public void run() { log.info("Forwarder running"); while (isAlive.get()) { if (pause.get()) { continue; } try { final Socket clientSocket = serverSocket.accept(); synchronized (threadMonitor) { if (isAlive.get() && !pause.get()) { clientThreadList.add(new ClientThread(clientSocket, hostName, hostPort)); } } } catch (IOException e) { if (pause.get()) { } else { log.log(Level.SEVERE, "Got exception in forwarder", e); } } } } }; portThread = new Thread(myRunnable); portThread.start(); }

Target:
public PortForwarder(final int myPort, final String hostName, final int hostPort) throws IOException { this.myPort = myPort; this.hostName = hostName; this.hostPort = hostPort; log.info("Starting port forwarder " + myPort + " -> " + hostPort); startServerSocketThread(); }
Source:
public void setUp() { when(this.exampleProject.getRoot()).thenReturn(mock(Path.class)); when(this.pomService.load(any())).thenReturn(this.pom); this.validator = new CheckModulesValidator(this.pomService); }

Target:
public void setUp() { Path path = mock(Path.class); when(path.toURI()).thenReturn("/"); when(this.exampleProject.getRoot()).thenReturn(path); when(this.pomService.load(any())).thenReturn(this.pom); this.validator = new CheckModulesValidator(this.pomService); }
Source:
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.sendRedirect(request.getContextPath() + SSOUtils.LOGIN_EXTERNAL_URI); }

Target:
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.getRequestDispatcher("/WEB-INF/login.jsp").forward(request, response); }
Source:
public void testZkBarrierForVersionUpgrade() { ScheduleAfterDebounceTime debounceTimer = new ScheduleAfterDebounceTime(); ZkBarrierForVersionUpgrade barrier = new ZkBarrierForVersionUpgrade(testZkUtils, debounceTimer); String ver = "1"; List<String> processors = new ArrayList<String>(); processors.add("p1"); processors.add("p2"); class Status { boolean p1 = false; boolean p2 = false; } final Status s = new Status(); barrier.leaderStartBarrier(ver, processors); barrier.waitForBarrier(ver, "p1", new Runnable() { @Override public void run() { s.p1 = true; } }); barrier.waitForBarrier(ver, "p2", new Runnable() { @Override public void run() { s.p2 = true; } }); Assert.assertTrue(TestZkUtils.testWithDelayBackOff(() -> s.p1 && s.p2, 2, 100)); }

Target:
public void testZkBarrierForVersionUpgrade() { ScheduleAfterDebounceTime debounceTimer = new ScheduleAfterDebounceTime(); ZkBarrierForVersionUpgrade barrier = new ZkBarrierForVersionUpgrade(testZkUtils, debounceTimer); String ver = "1"; List<String> processors = new ArrayList<String>(); processors.add("p1"); processors.add("p2"); class Status { boolean p1 = false; boolean p2 = false; } final Status s = new Status(); barrier.startBarrier(ver, processors); barrier.waitForBarrier(ver, "p1", new Runnable() { @Override public void run() { s.p1 = true; } }); barrier.waitForBarrier(ver, "p2", new Runnable() { @Override public void run() { s.p2 = true; } }); Assert.assertTrue(TestZkUtils.testWithDelayBackOff(() -> s.p1 && s.p2, 2, 100)); }
Source:
static void validateConnectionSpecificHeaders(Http2Headers headers, int streamId) throws Http2Exception { for (int i = 0; i < connectionSpecificHeaders.size(); i++) { final AsciiString header = connectionSpecificHeaders.get(i); if (headers.contains(header)) { throw streamError(streamId, PROTOCOL_ERROR, "Connection-speficic headers like [%s] must not be used with HTTP/2.", header); } } final CharSequence teHeader = headers.get(TE); if (teHeader != null && !AsciiString.contentEqualsIgnoreCase(teHeader, TRAILERS)) { throw streamError(streamId, PROTOCOL_ERROR, "TE header must not contain any value other than \"%s\"", TRAILERS); } }

Target:
static void validateConnectionSpecificHeaders(Http2Headers headers, int streamId) throws Http2Exception { for (int i = 0; i < connectionSpecificHeaders.size(); i++) { final AsciiString header = connectionSpecificHeaders.get(i); if (headers.contains(header)) { throw streamError(streamId, PROTOCOL_ERROR, "Connection-specific headers like [%s] must not be used with HTTP/2.", header); } } final CharSequence teHeader = headers.get(TE); if (teHeader != null && !AsciiString.contentEqualsIgnoreCase(teHeader, TRAILERS)) { throw streamError(streamId, PROTOCOL_ERROR, "TE header must not contain any value other than \"%s\"", TRAILERS); } }
Source:
public Object[][] keys() { return new Object[][]{ {"*", 0x123456789abcdef0L, true}, {"any", 0x123456789abcdef0L, true}, {"Any", 0x123456789abcdef0L, true}, {"ANY", 0x123456789abcdef0L, true}, {"0x123456789abcdef0", 0x123456789abcdef0L, true}, {"0x123456789abcdef0,0x0fedcba987654321", 0x123456789abcdef0L, true}, {"0x123456789abcdef0, 0x0fedcba987654321", 0x123456789abcdef0L, true}, {"0x123456789abcdef0", 0x231456789abcdef0L, false}, {"0x123456789abcdef0, 0x0fedcba987654321", 0x321456789abcdef0L, false}, }; }

Target:
public Object[][] keys() { return new Object[][]{ {"*", 0x123456789abcdef0L, true}, {"any", 0x123456789abcdef0L, true}, {"Any", 0x123456789abcdef0L, true}, {"ANY", 0x123456789abcdef0L, true}, {"0x123456789abcdef0", 0x123456789abcdef0L, true}, {"0x123456789abcdef0,0x0fedcba987654321", 0x123456789abcdef0L, true}, {"0x123456789abcdef0, 0x0fedcba987654321", 0x123456789abcdef0L, true}, {"0x123456789abcdef0", 0x231456789abcdef0L, false}, {"0x123456789abcdef0, 0x0fedcba987654321", 0x321456789abcdef0L, false} }; }
Source:
public void trace(String s, Throwable t) { delegate.trace(tag + s, t); }

Target:
public void trace(String s, Throwable t) { if (delegate.isTraceEnabled()) { delegate.trace(tag + s, t); } }