id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
40,701
public synchronized void loadRegionLinks() { logger.info("Loading region links"); try (DB mainDB = DBMaker.fileDB(directory.resolve("regions.foxdb").normalize().toString()).make()) { Map<String, String> linksMap = mainDB.hashMap("links", Serializer.STRING, Serializer.STRING).createOrOpen(); linksMap.entrySet().forEach(entry -> { <BUG>IRegion region = FGManager.getInstance().getRegion(entry.getKey()); if (region != null) { logger.info("Loading links for region \"" + region.getName() + "\"");</BUG> String handlersString = entry.getValue();
Optional<IRegion> regionOpt = FGManager.getInstance().getRegion(entry.getKey()); if (regionOpt.isPresent()) { IRegion region = regionOpt.get(); logger.info("Loading links for region \"" + region.getName() + "\"");
40,702
public synchronized void loadWorldRegionLinks(World world) { logger.info("Loading world region links for world \"" + world.getName() + "\""); try (DB mainDB = DBMaker.fileDB(worldDirectories.get(world.getName()).resolve("wregions.foxdb").normalize().toString()).make()) { Map<String, String> linksMap = mainDB.hashMap("links", Serializer.STRING, Serializer.STRING).createOrOpen(); linksMap.entrySet().forEach(entry -> { <BUG>IRegion region = FGManager.getInstance().getWorldRegion(world, entry.getKey()); if (region != null) { logger.info("Loading links for world region \"" + region.getName() + "\"");</BUG> String handlersString = entry.getValue();
Optional<IWorldRegion> regionOpt = FGManager.getInstance().getWorldRegion(world, entry.getKey()); if (regionOpt.isPresent()) { IWorldRegion region = regionOpt.get(); logger.info("Loading links for world region \"" + region.getName() + "\"");
40,703
StringBuilder builder = new StringBuilder(); for (Iterator<IHandler> it = handlers.iterator(); it.hasNext(); ) { builder.append(it.next().getName()); if (it.hasNext()) builder.append(","); } <BUG>return builder.toString(); }</BUG> private final class LoadEntry { public final String name; public final Type type;
public enum Type { REGION, WREGION, HANDLER
40,704
.autoCloseQuotes(true) .leaveFinalAsIs(true) .parse(); if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) { if (parse.current.index == 0) <BUG>return ImmutableList.of("region", "worldregion", "handler", "controller").stream() </BUG> .filter(new StartsWithPredicate(parse.current.token)) .collect(GuavaCollectors.toImmutableList()); else if (parse.current.index == 1) {
return Stream.of("region", "worldregion", "handler", "controller")
40,705
@Rule public DisableAnimationsRule disableAnimationsRule = new DisableAnimationsRule(); @Test public void showsLoginFragmentOnLoginButtonClick() throws Exception{ onView(withId(R.id.welcome_login)) <BUG>.perform(click()); onView(withId(R.id.login_btn)) .check(matches(isDisplayed()));</BUG> }
public ActivityTestRule<WelcomeActivity> welcomeActivityTestRule = new ActivityTestRule<WelcomeActivity>(WelcomeActivity.class);
40,706
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.security.DigestOutputStream; import java.security.MessageDigest; <BUG>import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Collections; import java.util.List;</BUG> public final class PatchUtils {
import java.text.DateFormat; import java.util.Date; import java.util.List;
40,707
package org.jboss.as.patching.runner; <BUG>import org.jboss.as.boot.DirectoryStructure; import org.jboss.as.patching.LocalPatchInfo;</BUG> import org.jboss.as.patching.PatchInfo; import org.jboss.as.patching.PatchLogger; import org.jboss.as.patching.PatchMessages;
import static org.jboss.as.patching.runner.PatchUtils.generateTimestamp; import org.jboss.as.patching.CommonAttributes; import org.jboss.as.patching.LocalPatchInfo;
40,708
private static final String PATH_DELIMITER = "/"; public static final byte[] NO_CONTENT = PatchingTask.NO_CONTENT; enum Element { ADDED_BUNDLE("added-bundle"), ADDED_MISC_CONTENT("added-misc-content"), <BUG>ADDED_MODULE("added-module"), BUNDLES("bundles"),</BUG> CUMULATIVE("cumulative"), DESCRIPTION("description"), MISC_FILES("misc-files"),
APPLIES_TO_VERSION("applies-to-version"), BUNDLES("bundles"),
40,709
final int count = reader.getAttributeCount(); for (int i = 0; i < count; i++) { final String value = reader.getAttributeValue(i); final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i)); switch (attribute) { <BUG>case APPLIES_TO_VERSION: builder.addAppliesTo(value); break;</BUG> case RESULTING_VERSION: if(type == Patch.PatchType.CUMULATIVE) {
[DELETED]
40,710
final StringBuilder path = new StringBuilder(); for(final String p : item.getPath()) { path.append(p).append(PATH_DELIMITER); } path.append(item.getName()); <BUG>writer.writeAttribute(Attribute.PATH.name, path.toString()); if(type != ModificationType.REMOVE) {</BUG> writer.writeAttribute(Attribute.HASH.name, bytesToHexString(item.getContentHash())); } if(type != ModificationType.ADD) {
if (item.isDirectory()) { writer.writeAttribute(Attribute.DIRECTORY.name, "true"); if(type != ModificationType.REMOVE) {
40,711
package org.jboss.as.patching; import org.jboss.as.controller.OperationFailedException; import org.jboss.as.patching.runner.PatchingException; import org.jboss.logging.Messages; import org.jboss.logging.annotations.Message; <BUG>import org.jboss.logging.annotations.MessageBundle; import java.io.IOException;</BUG> import java.util.List; @MessageBundle(projectCode = "JBAS") public interface PatchMessages {
import org.jboss.logging.annotations.Cause; import java.io.IOException;
40,712
import android.view.View; import android.webkit.WebView; import com.afollestad.materialdialogs.MaterialDialog; import java.io.BufferedReader; import java.io.InputStream; <BUG>import java.io.InputStreamReader; public class ChangelogDialog extends DialogFragment {</BUG> public static ChangelogDialog create() { ChangelogDialog dialog = new ChangelogDialog(); return dialog;
import knf.animeflv.Utils.ThemeUtils; public class ChangelogDialog extends DialogFragment {
40,713
throw new IllegalStateException("This device does not support Web Views."); } MaterialDialog dialog = new MaterialDialog.Builder(getActivity()) .title("ChangeLog") .customView(customView, false) <BUG>.positiveText(android.R.string.ok) .build();</BUG> final WebView webView = (WebView) customView.findViewById(R.id.webview); try { StringBuilder buf = new StringBuilder();
.backgroundColor(ThemeUtils.isAmoled(getActivity()) ? ColorsRes.Prim(getActivity()) : ColorsRes.Blanco(getActivity())) .build();
40,714
import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import java.util.ArrayList; import java.util.List; <BUG>import knf.animeflv.Utils.Logger; import xdroid.toaster.Toaster;</BUG> public class BackDownload extends AppCompatActivity { String aid; String num;
import knf.animeflv.Utils.ThemeUtils; import xdroid.toaster.Toaster;
40,715
.titleGravity(GravityEnum.CENTER) .customView(R.layout.dialog_down, false) .cancelable(true) .autoDismiss(false) .positiveText("Descargar") <BUG>.negativeText("Cancelar") .callback(new MaterialDialog.ButtonCallback() {</BUG> @Override public void onPositive(MaterialDialog dialog) { super.onPositive(dialog);
.backgroundColor(ThemeUtils.isAmoled(context) ? ColorsRes.Prim(context) : ColorsRes.Blanco(context)) .callback(new MaterialDialog.ButtonCallback() {
40,716
import knf.animeflv.Utils.Files.FileSearchResponse; import knf.animeflv.Utils.FragmentExtras; import knf.animeflv.Utils.Keys.Conf; import knf.animeflv.Utils.Logger; import knf.animeflv.Utils.NetworkUtils; <BUG>import knf.animeflv.Utils.SoundsLoader; import knf.animeflv.Utils.UtilDialogPref;</BUG> import knf.animeflv.Utils.UtilSound; import xdroid.toaster.Toaster; public class Conf_fragment extends PreferenceFragment implements SharedPreferences.OnSharedPreferenceChangeListener, FolderChooserDialog.FolderCallback {
import knf.animeflv.Utils.ThemeUtils; import knf.animeflv.Utils.UtilDialogPref;
40,717
import com.loopj.android.http.SyncHttpClient; import org.json.JSONObject; import cz.msebera.android.httpclient.Header; import knf.animeflv.AdminControl.ControlEnum.AdminBundle; import knf.animeflv.AdminControl.ControlEnum.Control; <BUG>import knf.animeflv.BackEncryption; import knf.animeflv.Interfaces.EncryptionListener;</BUG> import knf.animeflv.Parser; import knf.animeflv.R; import knf.animeflv.TaskType;
import knf.animeflv.ColorsRes; import knf.animeflv.Interfaces.EncryptionListener;
40,718
.titleGravity(GravityEnum.CENTER) .customView(customView, false) .autoDismiss(false) .cancelable(false) .positiveText("COMENZAR") <BUG>.negativeText("CANCELAR") .onPositive(new MaterialDialog.SingleButtonCallback() {</BUG> @Override public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) { dialog.getActionButton(DialogAction.POSITIVE).setText("PROCESANDO...");
.backgroundColor(ThemeUtils.isAmoled(getActivity()) ? ColorsRes.Prim(getActivity()) : ColorsRes.Blanco(getActivity())) .onPositive(new MaterialDialog.SingleButtonCallback() {
40,719
import java.util.List; import cz.msebera.android.httpclient.Header; import knf.animeflv.DownloadManager.CookieConstructor; import knf.animeflv.DownloadManager.ManageDownload; import knf.animeflv.StreamManager.StreamManager; <BUG>import knf.animeflv.Utils.FileUtil; import xdroid.toaster.Toaster;</BUG> public class BackDownloadDeep extends AppCompatActivity { String aid; String num;
import knf.animeflv.Utils.ThemeUtils; import xdroid.toaster.Toaster;
40,720
options = new MaterialDialog.Builder(this) .title("OPCIONES") .titleGravity(GravityEnum.CENTER) .content("Deseas descargar el capitulo " + num + " de " + titulo + "?") .positiveText("DESCARGAR") <BUG>.negativeText("Streaming") .cancelable(true)</BUG> .onPositive(new MaterialDialog.SingleButtonCallback() { @Override public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
.backgroundColor(ThemeUtils.isAmoled(context) ? ColorsRes.Prim(context) : ColorsRes.Blanco(context)) .cancelable(true)
40,721
.titleGravity(GravityEnum.CENTER) .customView(R.layout.dialog_down, false) .cancelable(true) .autoDismiss(false) .positiveText("Ver") <BUG>.negativeText("Cancelar") .callback(new MaterialDialog.ButtonCallback() {</BUG> @Override public void onPositive(MaterialDialog dialog) { super.onPositive(dialog);
.positiveText("Descargar") .backgroundColor(ThemeUtils.isAmoled(context) ? ColorsRes.Prim(context) : ColorsRes.Blanco(context)) .callback(new MaterialDialog.ButtonCallback() {
40,722
import net.osmand.data.PointDescription; import net.osmand.plus.IconsCache; import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; <BUG>import net.osmand.plus.R; import net.osmand.plus.activities.search.SearchActivity.SearchActivityChild; import net.osmand.plus.dialogs.DirectionsDialogs;</BUG> import net.osmand.plus.helpers.SearchHistoryHelper; import net.osmand.plus.helpers.SearchHistoryHelper.HistoryEntry;
import net.osmand.plus.OsmAndLocationProvider.OsmAndCompassListener; import net.osmand.plus.dashboard.DashLocationFragment; import net.osmand.plus.dialogs.DirectionsDialogs;
40,723
import android.widget.ImageButton; import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; import android.widget.TextView.BufferType; <BUG>public class SearchHistoryFragment extends ListFragment implements SearchActivityChild { </BUG> private LatLon location; private SearchHistoryHelper helper; private Button clearButton;
public class SearchHistoryFragment extends ListFragment implements SearchActivityChild, OsmAndCompassListener {
40,724
private LatLon location; private SearchHistoryHelper helper; private Button clearButton; public static final String SEARCH_LAT = SearchActivity.SEARCH_LAT; public static final String SEARCH_LON = SearchActivity.SEARCH_LON; <BUG>private HistoryAdapter historyAdapter; @Override</BUG> public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { super.onCreateView(inflater, container, savedInstanceState); View view = inflater.inflate(R.layout.search_history, container, false);
private Float heading; private boolean searchAroundLocation; private boolean compassRegistered; private int screenOrientation; @Override
40,725
if (row == null) { LayoutInflater inflater = getActivity().getLayoutInflater(); row = inflater.inflate(R.layout.search_history_list_item, parent, false); } final HistoryEntry historyEntry = getItem(position); <BUG>udpateHistoryItem(historyEntry, row, location, getActivity(), getMyApplication()); ImageButton options = (ImageButton) row.findViewById(R.id.options);</BUG> options.setVisibility(View.VISIBLE); options.setOnClickListener(new View.OnClickListener() { @Override
TextView distanceText = (TextView) row.findViewById(R.id.distance); ImageView direction = (ImageView) row.findViewById(R.id.direction); DashLocationFragment.updateLocationView(!searchAroundLocation, location, heading, direction, distanceText, historyEntry.getLat(), historyEntry.getLon(), screenOrientation, getMyApplication(), getActivity()); ImageButton options = (ImageButton) row.findViewById(R.id.options);
40,726
package net.osmand.plus.activities; import java.util.Comparator; import java.util.List; <BUG>import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.support.v4.app.ListFragment; import android.support.v7.widget.PopupMenu; import android.view.*;</BUG> import net.osmand.data.FavouritePoint;
[DELETED]
40,727
public static final String SELECT_FAVORITE_POINT_INTENT_KEY = "SELECT_FAVORITE_POINT_INTENT_KEY"; public static final int SELECT_FAVORITE_POINT_RESULT_OK = 1; private FavouritesAdapter favouritesAdapter; private boolean selectFavoriteMode; private OsmandSettings settings; <BUG>private LatLon location; @Override</BUG> public void onAttach(Activity activity) { super.onAttach(activity); settings = ((OsmandApplication) getApplication()).getSettings();
private boolean compassRegistered; @Override
40,728
if (position != 0) { if (position == POSITION_CURRENT_LOCATION) { net.osmand.Location loc = getLocationProvider().getLastKnownLocation(); if(loc != null && System.currentTimeMillis() - loc.getTime() < 10000) { updateLocation(loc); <BUG>} else { startSearchCurrentLocation(); searchAroundCurrentLocation = true;</BUG> } } else {
searchAroundCurrentLocation = true;
40,729
" </lucene>" + " </index>" + "</collection>"; @Test public void store() { <BUG>ExecutorService executor = Executors.newFixedThreadPool(10); </BUG> for (int i = 0; i < 10; i++) { final String name = "thread" + i; final Runnable run = () -> {
final ExecutorService executor = Executors.newFixedThreadPool(10);
40,730
} executor.shutdown(); boolean terminated = false; try { terminated = executor.awaitTermination(60 * 60, TimeUnit.SECONDS); <BUG>} catch (InterruptedException e) { </BUG> } assertTrue(terminated); }
}; executor.submit(run); } catch (final InterruptedException e) {
40,731
for (int i = 0; i < 5; i++) { final String name = "thread" + i; Runnable run = () -> { try { xupdateDocs(name); <BUG>} catch (XMLDBException | IOException e) { </BUG> e.printStackTrace(); fail(e.getMessage()); }
} catch (final XMLDBException | IOException e) {
40,732
import org.exist.storage.txn.Txn; import org.exist.util.Configuration; import org.exist.util.DatabaseConfigurationException; import org.exist.util.FileUtils; import org.exist.xmldb.XmldbURI; <BUG>import static org.junit.Assert.assertNotNull; import static org.junit.Assert.fail;</BUG> import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail;
40,733
package org.glowroot.agent.config; import com.google.common.collect.ImmutableList; <BUG>import org.immutables.value.Value; import org.glowroot.wire.api.model.AgentConfigOuterClass.AgentConfig;</BUG> @Value.Immutable public abstract class UiConfig { @Value.Default
import org.glowroot.common.config.ConfigDefaults; import org.glowroot.wire.api.model.AgentConfigOuterClass.AgentConfig;
40,734
class RepoAdminImpl implements RepoAdmin { private final DataSource dataSource; private final List<CappedDatabase> rollupCappedDatabases; private final CappedDatabase traceCappedDatabase; private final ConfigRepository configRepository; <BUG>private final AgentDao agentDao; </BUG> private final GaugeValueDao gaugeValueDao; private final GaugeNameDao gaugeNameDao; private final TransactionTypeDao transactionTypeDao;
private final EnvironmentDao agentDao;
40,735
private final TransactionTypeDao transactionTypeDao; private final FullQueryTextDao fullQueryTextDao; private final TraceAttributeNameDao traceAttributeNameDao; RepoAdminImpl(DataSource dataSource, List<CappedDatabase> rollupCappedDatabases, CappedDatabase traceCappedDatabase, ConfigRepository configRepository, <BUG>AgentDao agentDao, GaugeValueDao gaugeValueDao, GaugeNameDao gaugeNameDao, </BUG> TransactionTypeDao transactionTypeDao, FullQueryTextDao fullQueryTextDao, TraceAttributeNameDao traceAttributeNameDao) { this.dataSource = dataSource;
EnvironmentDao agentDao, GaugeValueDao gaugeValueDao, GaugeNameDao gaugeNameDao,
40,736
this.fullQueryTextDao = fullQueryTextDao; this.traceAttributeNameDao = traceAttributeNameDao; } @Override public void deleteAllData() throws Exception { <BUG>Environment environment = agentDao.readEnvironment(""); dataSource.deleteAll();</BUG> agentDao.reinitAfterDeletingDatabase(); gaugeValueDao.reinitAfterDeletingDatabase(); gaugeNameDao.invalidateCache();
Environment environment = agentDao.read(""); dataSource.deleteAll();
40,737
public class SimpleRepoModule { private static final long SNAPSHOT_REAPER_PERIOD_MINUTES = 5; private final DataSource dataSource; private final ImmutableList<CappedDatabase> rollupCappedDatabases; private final CappedDatabase traceCappedDatabase; <BUG>private final AgentDao agentDao; private final TransactionTypeDao transactionTypeDao;</BUG> private final AggregateDao aggregateDao; private final TraceAttributeNameDao traceAttributeNameDao; private final TraceDao traceDao;
private final EnvironmentDao environmentDao; private final TransactionTypeDao transactionTypeDao;
40,738
rollupCappedDatabases.add(new CappedDatabase(file, sizeKb, ticker)); } this.rollupCappedDatabases = ImmutableList.copyOf(rollupCappedDatabases); traceCappedDatabase = new CappedDatabase(new File(dataDir, "trace-detail.capped.db"), storageConfig.traceCappedDatabaseSizeMb() * 1024, ticker); <BUG>agentDao = new AgentDao(dataSource); </BUG> transactionTypeDao = new TransactionTypeDao(dataSource); rollupLevelService = new RollupLevelService(configRepository, clock); FullQueryTextDao fullQueryTextDao = new FullQueryTextDao(dataSource);
environmentDao = new EnvironmentDao(dataSource);
40,739
traceDao = new TraceDao(dataSource, traceCappedDatabase, transactionTypeDao, fullQueryTextDao, traceAttributeNameDao); GaugeNameDao gaugeNameDao = new GaugeNameDao(dataSource); gaugeValueDao = new GaugeValueDao(dataSource, gaugeNameDao, clock); repoAdmin = new RepoAdminImpl(dataSource, rollupCappedDatabases, traceCappedDatabase, <BUG>configRepository, agentDao, gaugeValueDao, gaugeNameDao, transactionTypeDao, </BUG> fullQueryTextDao, traceAttributeNameDao); if (backgroundExecutor == null) { reaperRunnable = null;
configRepository, environmentDao, gaugeValueDao, gaugeNameDao, transactionTypeDao,
40,740
new TraceCappedDatabaseStats(traceCappedDatabase), "org.glowroot:type=TraceCappedDatabase"); platformMBeanServerLifecycle.lazyRegisterMBean(new H2DatabaseStats(dataSource), "org.glowroot:type=H2Database"); } <BUG>public AgentDao getAgentDao() { return agentDao; </BUG> } public TransactionTypeRepository getTransactionTypeRepository() {
public EnvironmentDao getEnvironmentDao() { return environmentDao;
40,741
package org.glowroot.agent.embedded.init; import java.io.Closeable; import java.io.File; <BUG>import java.lang.instrument.Instrumentation; import java.util.Map;</BUG> import java.util.concurrent.CountDownLatch; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService;
import java.util.List; import java.util.Map;
40,742
import java.util.concurrent.ScheduledExecutorService; import javax.annotation.Nullable; import com.google.common.base.MoreObjects; import com.google.common.base.Stopwatch; import com.google.common.base.Supplier; <BUG>import com.google.common.base.Ticker; import org.checkerframework.checker.nullness.qual.MonotonicNonNull;</BUG> import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.glowroot.agent.collector.Collector.AgentConfigUpdater;
import com.google.common.collect.ImmutableList; import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
40,743
import org.glowroot.agent.init.EnvironmentCreator; import org.glowroot.agent.init.GlowrootThinAgentInit; import org.glowroot.agent.init.JRebelWorkaround; import org.glowroot.agent.util.LazyPlatformMBeanServer; import org.glowroot.common.live.LiveAggregateRepository.LiveAggregateRepositoryNop; <BUG>import org.glowroot.common.live.LiveTraceRepository.LiveTraceRepositoryNop; import org.glowroot.common.repo.ConfigRepository; import org.glowroot.common.util.Clock;</BUG> import org.glowroot.common.util.OnlyUsedByTests; import org.glowroot.ui.CreateUiModuleBuilder;
import org.glowroot.common.repo.AgentRepository; import org.glowroot.common.repo.ImmutableAgentRollup; import org.glowroot.common.util.Clock;
40,744
SimpleRepoModule simpleRepoModule = new SimpleRepoModule(dataSource, dataDir, clock, ticker, configRepository, backgroundExecutor); simpleRepoModule.registerMBeans(new PlatformMBeanServerLifecycleImpl( agentModule.getLazyPlatformMBeanServer())); CollectorImpl collectorImpl = new CollectorImpl( <BUG>simpleRepoModule.getAgentDao(), simpleRepoModule.getAggregateDao(), simpleRepoModule.getTraceDao(),</BUG> simpleRepoModule.getGaugeValueDao()); collectorProxy.setInstance(collectorImpl); collectorImpl.init(baseDir, EnvironmentCreator.create(glowrootVersion),
simpleRepoModule.getEnvironmentDao(), simpleRepoModule.getTraceDao(),
40,745
.baseDir(baseDir) .glowrootDir(glowrootDir) .ticker(ticker) .clock(clock) .liveJvmService(agentModule.getLiveJvmService()) <BUG>.configRepository(simpleRepoModule.getConfigRepository()) .agentRepository(simpleRepoModule.getAgentDao()) </BUG> .transactionTypeRepository(simpleRepoModule.getTransactionTypeRepository()) .traceAttributeNameRepository(
.agentRepository(new AgentRepositoryImpl()) .environmentRepository(simpleRepoModule.getEnvironmentDao())
40,746
.baseDir(baseDir) .glowrootDir(glowrootDir) .ticker(ticker) .clock(clock) .liveJvmService(null) <BUG>.configRepository(simpleRepoModule.getConfigRepository()) .agentRepository(simpleRepoModule.getAgentDao()) </BUG> .transactionTypeRepository(simpleRepoModule.getTransactionTypeRepository()) .traceAttributeNameRepository(
.liveJvmService(agentModule.getLiveJvmService()) .agentRepository(new AgentRepositoryImpl()) .environmentRepository(simpleRepoModule.getEnvironmentDao())
40,747
} @Override public void lazyRegisterMBean(Object object, String name) { lazyPlatformMBeanServer.lazyRegisterMBean(object, name); } <BUG>} } </BUG>
void initEmbeddedServer() throws Exception { if (simpleRepoModule == null) { return;
40,748
List<GaugeConfig> configs = Lists.newArrayList(configService.getGaugeConfigs()); for (GaugeConfig loopConfig : configs) { if (loopConfig.mbeanObjectName().equals(gaugeConfig.getMbeanObjectName())) { throw new DuplicateMBeanObjectNameException(); } <BUG>} String version = Versions.getVersion(gaugeConfig); for (GaugeConfig loopConfig : configs) { if (Versions.getVersion(loopConfig.toProto()).equals(version)) { throw new IllegalStateException("This exact gauge already exists"); } } configs.add(GaugeConfig.create(gaugeConfig));</BUG> configService.updateGaugeConfigs(configs);
[DELETED]
40,749
configService.updateGaugeConfigs(configs); } } @Override public void updateGaugeConfig(String agentId, AgentConfig.GaugeConfig gaugeConfig, <BUG>String priorVersion) throws Exception { synchronized (writeLock) {</BUG> List<GaugeConfig> configs = Lists.newArrayList(configService.getGaugeConfigs()); boolean found = false; for (ListIterator<GaugeConfig> i = configs.listIterator(); i.hasNext();) {
GaugeConfig config = GaugeConfig.create(gaugeConfig); synchronized (writeLock) {
40,750
boolean found = false; for (ListIterator<GaugeConfig> i = configs.listIterator(); i.hasNext();) { GaugeConfig loopConfig = i.next(); String loopVersion = Versions.getVersion(loopConfig.toProto()); if (loopVersion.equals(priorVersion)) { <BUG>i.set(GaugeConfig.create(gaugeConfig)); found = true; break;</BUG> } else if (loopConfig.mbeanObjectName().equals(gaugeConfig.getMbeanObjectName())) { throw new DuplicateMBeanObjectNameException();
i.set(config);
40,751
boolean found = false; for (ListIterator<PluginConfig> i = configs.listIterator(); i.hasNext();) { PluginConfig loopPluginConfig = i.next(); if (pluginId.equals(loopPluginConfig.id())) { String loopVersion = Versions.getVersion(loopPluginConfig.toProto()); <BUG>checkVersionsEqual(loopVersion, priorVersion); PluginDescriptor pluginDescriptor = getPluginDescriptor(pluginId); i.set(PluginConfig.create(pluginDescriptor, properties));</BUG> found = true; break;
for (ListIterator<GaugeConfig> i = configs.listIterator(); i.hasNext();) { GaugeConfig loopConfig = i.next(); String loopVersion = Versions.getVersion(loopConfig.toProto()); if (loopVersion.equals(version)) { i.remove();
40,752
boolean found = false; for (ListIterator<InstrumentationConfig> i = configs.listIterator(); i.hasNext();) { InstrumentationConfig loopConfig = i.next(); String loopVersion = Versions.getVersion(loopConfig.toProto()); if (loopVersion.equals(priorVersion)) { <BUG>i.set(InstrumentationConfig.create(instrumentationConfig)); found = true; break; }</BUG> }
i.set(config); } else if (loopConfig.equals(config)) { throw new IllegalStateException("This exact instrumentation already exists");
40,753
package org.glowroot.agent.embedded.init; import java.io.File; import java.util.List; import org.glowroot.agent.collector.Collector; <BUG>import org.glowroot.agent.embedded.repo.AgentDao; import org.glowroot.agent.embedded.repo.AggregateDao; import org.glowroot.agent.embedded.repo.GaugeValueDao;</BUG> import org.glowroot.agent.embedded.repo.TraceDao; import org.glowroot.wire.api.model.AgentConfigOuterClass.AgentConfig;
import org.glowroot.agent.embedded.repo.EnvironmentDao; import org.glowroot.agent.embedded.repo.GaugeValueDao;
40,754
</BUG> private final AggregateDao aggregateDao; private final TraceDao traceDao; private final GaugeValueDao gaugeValueDao; <BUG>CollectorImpl(AgentDao agentDao, AggregateDao aggregateRepository, TraceDao traceRepository, GaugeValueDao gaugeValueRepository) { this.agentDao = agentDao;</BUG> this.aggregateDao = aggregateRepository; this.traceDao = traceRepository;
import org.glowroot.wire.api.model.CollectorServiceOuterClass.Environment; import org.glowroot.wire.api.model.CollectorServiceOuterClass.GaugeValue; import org.glowroot.wire.api.model.CollectorServiceOuterClass.LogEvent; import org.glowroot.wire.api.model.TraceOuterClass.Trace; class CollectorImpl implements Collector { private final EnvironmentDao agentDao; CollectorImpl(EnvironmentDao agentDao, AggregateDao aggregateRepository, TraceDao traceRepository, GaugeValueDao gaugeValueRepository) { this.agentDao = agentDao;
40,755
import org.jetbrains.jet.lang.types.JetType; import org.jetbrains.jet.lang.types.TypeConstructor; import org.jetbrains.jet.lang.types.TypeUtils; import org.jetbrains.jet.plugin.JetBundle; import org.jetbrains.jet.plugin.codeInsight.ReferenceToClassesShortening; <BUG>import org.jetbrains.jet.plugin.project.AnalyzeSingleFileUtil; </BUG> import org.jetbrains.jet.renderer.DescriptorRenderer; import java.util.*; public class SpecifyTypeExplicitlyAction extends PsiElementBaseIntentionAction {
import org.jetbrains.jet.plugin.project.AnalyzerFacadeWithCache;
40,756
return false; } return !hasPublicMemberDiagnostic(declaration); } private static boolean hasPublicMemberDiagnostic(@NotNull JetNamedDeclaration declaration) { <BUG>BindingContext bindingContext = AnalyzeSingleFileUtil.getContextForSingleFile((JetFile) declaration.getContainingFile()); for (Diagnostic diagnostic : bindingContext.getDiagnostics()) {</BUG> if (Errors.PUBLIC_MEMBER_SHOULD_SPECIFY_TYPE == diagnostic.getFactory() && declaration == diagnostic.getPsiElement()) { return true; }
JetNamedDeclaration declaration = (JetNamedDeclaration) parent; if (declaration instanceof JetProperty && !PsiTreeUtil.isAncestor(((JetProperty) declaration).getInitializer(), element, false)) { if (((JetProperty) declaration).getTypeRef() != null) { setText(JetBundle.message("specify.type.explicitly.remove.action.name"));
40,757
import org.jetbrains.jet.lang.resolve.scopes.JetScope; import org.jetbrains.jet.lang.types.JetType; import org.jetbrains.jet.lang.types.checker.JetTypeChecker; import org.jetbrains.jet.lexer.JetTokens; import org.jetbrains.jet.plugin.codeInsight.TipsManager; <BUG>import org.jetbrains.jet.plugin.project.AnalyzeSingleFileUtil; </BUG> import org.jetbrains.jet.renderer.DescriptorRenderer; import java.awt.*; import java.util.*;
import org.jetbrains.jet.plugin.project.AnalyzerFacadeWithCache;
40,758
context.setUIComponentEnabled(false); return; } FunctionDescriptor functionDescriptor = (FunctionDescriptor) descriptor; JetFile file = (JetFile) argumentList.getContainingFile(); <BUG>BindingContext bindingContext = AnalyzeSingleFileUtil.getContextForSingleFile(file); List<ValueParameterDescriptor> valueParameters = functionDescriptor.getValueParameters();</BUG> List<JetValueArgument> valueArguments = argumentList.getArguments(); StringBuilder builder = new StringBuilder(); int currentParameterIndex = context.getCurrentParameterIndex();
BindingContext bindingContext = AnalyzerFacadeWithCache.analyzeFileWithCache(file).getBindingContext(); List<ValueParameterDescriptor> valueParameters = functionDescriptor.getValueParameters();
40,759
import org.jetbrains.jet.lang.psi.JetFile; import org.jetbrains.jet.lang.psi.JetNamedDeclaration; import org.jetbrains.jet.lang.resolve.BindingContext; import org.jetbrains.jet.lang.types.DeferredType; import org.jetbrains.jet.lang.types.JetType; <BUG>import org.jetbrains.jet.lang.types.checker.JetTypeChecker; import org.jetbrains.jet.plugin.references.BuiltInsReferenceResolver; import static org.jetbrains.jet.plugin.project.AnalyzeSingleFileUtil.getContextForSingleFile;</BUG> public class QuickFixUtil { private QuickFixUtil() {
import org.jetbrains.jet.plugin.project.AnalyzerFacadeWithCache;
40,760
import org.jetbrains.jet.lang.psi.JetPsiFactory; import org.jetbrains.jet.lang.psi.JetSimpleNameExpression; import org.jetbrains.jet.lang.resolve.BindingContext; import org.jetbrains.jet.lang.resolve.BindingContextUtils; import org.jetbrains.jet.plugin.JetBundle; <BUG>import static org.jetbrains.jet.plugin.project.AnalyzeSingleFileUtil.getContextForSingleFile; public class ChangeVariableMutabilityFix implements IntentionAction {</BUG> private boolean isVar; public ChangeVariableMutabilityFix(boolean isVar) { this.isVar = isVar;
import org.jetbrains.jet.plugin.project.AnalyzerFacadeWithCache; public class ChangeVariableMutabilityFix implements IntentionAction {
40,761
PsiElement elementAtCaret = file.findElementAt(editor.getCaretModel().getOffset()); JetProperty property = PsiTreeUtil.getParentOfType(elementAtCaret, JetProperty.class); if (property != null) return property; JetSimpleNameExpression simpleNameExpression = PsiTreeUtil.getParentOfType(elementAtCaret, JetSimpleNameExpression.class); if (simpleNameExpression != null) { <BUG>BindingContext bindingContext = getContextForSingleFile(file); VariableDescriptor descriptor = BindingContextUtils.extractVariableDescriptorIfAny(bindingContext, simpleNameExpression, true);</BUG> if (descriptor != null) { PsiElement declaration = BindingContextUtils.descriptorToDeclaration(bindingContext, descriptor); if (declaration instanceof JetProperty) {
BindingContext bindingContext = AnalyzerFacadeWithCache.analyzeFileWithCache(file).getBindingContext(); VariableDescriptor descriptor = BindingContextUtils.extractVariableDescriptorIfAny(bindingContext, simpleNameExpression, true);
40,762
import org.jetbrains.jet.lang.types.TypeUtils; import org.jetbrains.jet.lang.types.checker.JetTypeChecker; import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns; import org.jetbrains.jet.lexer.JetLexer; import org.jetbrains.jet.lexer.JetTokens; <BUG>import org.jetbrains.jet.plugin.project.AnalyzeSingleFileUtil; </BUG> import java.util.ArrayList; import java.util.regex.Matcher; import java.util.regex.Pattern;
import org.jetbrains.jet.plugin.project.AnalyzerFacadeWithCache;
40,763
if (newName == null) return; result.add(newName); } public static String[] suggestNames(JetExpression expression, JetNameValidator validator) { ArrayList<String> result = new ArrayList<String>(); <BUG>BindingContext bindingContext = AnalyzeSingleFileUtil.getContextForSingleFile((JetFile)expression.getContainingFile()); JetType jetType = bindingContext.get(BindingContext.EXPRESSION_TYPE, expression);</BUG> if (jetType != null) { addNamesForType(result, jetType, validator); }
BindingContext bindingContext = AnalyzerFacadeWithCache.analyzeFileWithCache((JetFile) expression.getContainingFile()).getBindingContext(); JetType jetType = bindingContext.get(BindingContext.EXPRESSION_TYPE, expression);
40,764
import org.jetbrains.jet.lang.resolve.BindingContext; import org.jetbrains.jet.lexer.JetKeywordToken; import org.jetbrains.jet.lexer.JetToken; import org.jetbrains.jet.lexer.JetTokens; import org.jetbrains.jet.plugin.JetBundle; <BUG>import org.jetbrains.jet.plugin.project.AnalyzeSingleFileUtil; </BUG> public class ChangeVisibilityModifierFix extends JetIntentionAction<JetModifierListOwner> { public ChangeVisibilityModifierFix(@NotNull JetModifierListOwner element) { super(element);
import org.jetbrains.jet.plugin.project.AnalyzerFacadeWithCache;
40,765
JetKeywordToken modifier = findVisibilityChangeTo((JetFile)file); JetToken[] modifiersThanCanBeReplaced = new JetKeywordToken[] { JetTokens.PUBLIC_KEYWORD, JetTokens.PRIVATE_KEYWORD, JetTokens.PROTECTED_KEYWORD, JetTokens.INTERNAL_KEYWORD }; element.replace(AddModifierFix.addModifier(element, modifier, modifiersThanCanBeReplaced, project, true)); } private JetKeywordToken findVisibilityChangeTo(JetFile file) { <BUG>BindingContext bindingContext = AnalyzeSingleFileUtil.getContextForSingleFile(file); DeclarationDescriptor descriptor;</BUG> if (element instanceof JetParameter) { descriptor = bindingContext.get(BindingContext.PRIMARY_CONSTRUCTOR_PARAMETER, element); }
BindingContext bindingContext = AnalyzerFacadeWithCache.analyzeFileWithCache(file).getBindingContext(); DeclarationDescriptor descriptor;
40,766
import org.jetbrains.jet.lang.types.checker.JetTypeChecker; import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns; import org.jetbrains.jet.lexer.JetTokens; import org.jetbrains.jet.plugin.codeInsight.CodeInsightUtils; import org.jetbrains.jet.plugin.codeInsight.ReferenceToClassesShortening; <BUG>import org.jetbrains.jet.plugin.project.AnalyzeSingleFileUtil; </BUG> import org.jetbrains.jet.plugin.refactoring.*; import org.jetbrains.jet.renderer.DescriptorRenderer; import java.util.*;
import org.jetbrains.jet.plugin.project.AnalyzerFacadeWithCache;
40,767
if (operationExpression.getOperationReference() == expression) { showErrorHint(project, editor, JetRefactoringBundle.message("cannot.refactor.no.expression")); return; } } <BUG>AnalyzeExhaust analyzeExhaust = AnalyzeSingleFileUtil.analyzeSingleFileWithCache((JetFile) expression.getContainingFile()); </BUG> BindingContext bindingContext = analyzeExhaust.getBindingContext(); final JetType expressionType = bindingContext.get(BindingContext.EXPRESSION_TYPE, expression); //can be null or error type JetScope scope = bindingContext.get(BindingContext.RESOLUTION_SCOPE, expression);
AnalyzeExhaust analyzeExhaust = AnalyzerFacadeWithCache.analyzeFileWithCache((JetFile) expression.getContainingFile());
40,768
expression = innerExpression; } } final JetExpression actualExpression = expression; final ArrayList<JetExpression> result = new ArrayList<JetExpression>(); <BUG>final BindingContext bindingContext = AnalyzeSingleFileUtil.getContextForSingleFile((JetFile)expression.getContainingFile()); JetVisitorVoid visitor = new JetVisitorVoid() {</BUG> @Override public void visitJetElement(JetElement element) { element.acceptChildren(this);
final BindingContext bindingContext = AnalyzerFacadeWithCache.analyzeFileWithCache((JetFile) expression.getContainingFile()).getBindingContext(); JetVisitorVoid visitor = new JetVisitorVoid() {
40,769
import org.jetbrains.jet.lang.resolve.BindingContext; import org.jetbrains.jet.lang.types.JetType; import org.jetbrains.jet.lang.types.NamespaceType; import org.jetbrains.jet.lang.types.checker.JetTypeChecker; import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns; <BUG>import org.jetbrains.jet.plugin.codeInsight.CodeInsightUtils; import javax.swing.*;</BUG> import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; import java.awt.*;
import org.jetbrains.jet.plugin.project.AnalyzerFacadeWithCache; import javax.swing.*;
40,770
} @RootTask static Task<Exec.Result> exec(String parameter, int number) { Task<String> task1 = MyTask.create(parameter); Task<Integer> task2 = Adder.create(number, number + 2); <BUG>return Task.ofType(Exec.Result.class).named("exec", "/bin/sh") .in(() -> task1)</BUG> .in(() -> task2) .process(Exec.exec((str, i) -> args("/bin/sh", "-c", "\"echo " + i + "\""))); }
return Task.named("exec", "/bin/sh").ofType(Exec.Result.class) .in(() -> task1)
40,771
return args; } static class MyTask { static final int PLUS = 10; static Task<String> create(String parameter) { <BUG>return Task.ofType(String.class).named("MyTask", parameter) .in(() -> Adder.create(parameter.length(), PLUS))</BUG> .in(() -> Fib.create(parameter.length())) .process((sum, fib) -> something(parameter, sum, fib)); }
return Task.named("MyTask", parameter).ofType(String.class) .in(() -> Adder.create(parameter.length(), PLUS))
40,772
final String instanceField = "from instance"; final TaskContext context = TaskContext.inmem(); final AwaitingConsumer<String> val = new AwaitingConsumer<>(); @Test public void shouldJavaUtilSerialize() throws Exception { <BUG>Task<Long> task1 = Task.ofType(Long.class).named("Foo", "Bar", 39) .process(() -> 9999L); Task<String> task2 = Task.ofType(String.class).named("Baz", 40) .in(() -> task1)</BUG> .ins(() -> singletonList(task1))
Task<Long> task1 = Task.named("Foo", "Bar", 39).ofType(Long.class) Task<String> task2 = Task.named("Baz", 40).ofType(String.class) .in(() -> task1)
40,773
assertEquals(des.id().name(), "Baz"); assertEquals(val.awaitAndGet(), "[9999] hello 10004"); } @Test(expected = NotSerializableException.class) public void shouldNotSerializeWithInstanceFieldReference() throws Exception { <BUG>Task<String> task = Task.ofType(String.class).named("WithRef") .process(() -> instanceField + " causes an outer reference");</BUG> serialize(task); } @Test
Task<String> task = Task.named("WithRef").ofType(String.class) .process(() -> instanceField + " causes an outer reference");
40,774
serialize(task); } @Test public void shouldSerializeWithLocalReference() throws Exception { String local = instanceField; <BUG>Task<String> task = Task.ofType(String.class).named("WithLocalRef") .process(() -> local + " won't cause an outer reference");</BUG> serialize(task); Task<String> des = deserialize(); context.evaluate(des).consume(val);
Task<String> task = Task.named("WithLocalRef").ofType(String.class) .process(() -> local + " won't cause an outer reference");
40,775
} @RootTask public static Task<String> standardArgs(int first, String second) { firstInt = first; secondString = second; <BUG>return Task.ofType(String.class).named("StandardArgs", first, second) .process(() -> second + " " + first * 100);</BUG> } @Test public void shouldParseFlags() throws Exception {
return Task.named("StandardArgs", first, second).ofType(String.class) .process(() -> second + " " + first * 100);
40,776
assertThat(parsedEnum, is(CustomEnum.BAR)); } @RootTask public static Task<String> enums(CustomEnum enm) { parsedEnum = enm; <BUG>return Task.ofType(String.class).named("Enums", enm) .process(enm::toString);</BUG> } @Test public void shouldParseCustomTypes() throws Exception {
return Task.named("Enums", enm).ofType(String.class) .process(enm::toString);
40,777
assertThat(parsedType.content, is("blarg parsed for you!")); } @RootTask public static Task<String> customType(CustomType myType) { parsedType = myType; <BUG>return Task.ofType(String.class).named("Types", myType.content) .process(() -> myType.content);</BUG> } public enum CustomEnum { BAR
return Task.named("Types", myType.content).ofType(String.class) .process(() -> myType.content);
40,778
TaskContext taskContext = TaskContext.inmem(); TaskContext.Value<Long> value = taskContext.evaluate(fib92); value.consume(f92 -> System.out.println("fib(92) = " + f92)); } static Task<Long> create(long n) { <BUG>TaskBuilder<Long> fib = Task.ofType(Long.class).named("Fib", n); </BUG> if (n < 2) { return fib .process(() -> n);
TaskBuilder<Long> fib = Task.named("Fib", n).ofType(Long.class);
40,779
interpB.setROIdata(roiBounds, roiIter); if (nod == null) { nod = interpB.getNoDataRange(); } if (destNod == null) { <BUG>destNod = interpB.getDestinationNoData(); </BUG> } } if (nod != null) {
destNod = new double[]{interpB.getDestinationNoData()};
40,780
s_ix = startPts[0].x; s_iy = startPts[0].y; if (setDestinationNoData) { for (int x = dst_min_x; x < clipMinX; x++) { for (int k2 = 0; k2 < dst_num_bands; k2++) <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } } else
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
40,781
dstPixelOffset += dstPixelStride; } if (setDestinationNoData && clipMinX <= clipMaxX) { for (int x = clipMaxX; x < dst_max_x; x++) { for (int k2 = 0; k2 < dst_num_bands; k2++) <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } }
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
40,782
s_ix = startPts[0].x; s_iy = startPts[0].y; if (setDestinationNoData) { for (int x = dst_min_x; x < clipMinX; x++) { for (int k2 = 0; k2 < dst_num_bands; k2++) <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } } else
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
40,783
final int w10 = roiIter.getSample(x0, y0 + 1, 0) & 0xff; final int w11 = roiIter.getSample(x0 + 1, y0 + 1, 0) & 0xff; if (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0) { if (setDestinationNoData) { for (int k2 = 0; k2 < dst_num_bands; k2++) { <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> } } } else {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
40,784
dstPixelOffset += dstPixelStride; } if (setDestinationNoData && clipMinX <= clipMaxX) { for (int x = clipMaxX; x < dst_max_x; x++) { for (int k2 = 0; k2 < dst_num_bands; k2++) <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } }
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
40,785
for (int k2 = 0; k2 < dst_num_bands; k2++) { int s00 = srcDataArrays[k2][posx + posy + bandOffsets[k2]]; int s01 = srcDataArrays[k2][posxhigh + posy + bandOffsets[k2]]; int s10 = srcDataArrays[k2][posx + posyhigh + bandOffsets[k2]]; int s11 = srcDataArrays[k2][posxhigh + posyhigh + bandOffsets[k2]]; <BUG>int w00 = byteLookupTable[s00&0xFF] == destinationNoDataByte ? 0 : 1; int w01 = byteLookupTable[s01&0xFF] == destinationNoDataByte ? 0 : 1; int w10 = byteLookupTable[s10&0xFF] == destinationNoDataByte ? 0 : 1; int w11 = byteLookupTable[s11&0xFF] == destinationNoDataByte ? 0 : 1; </BUG> if (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0) {
int w00 = byteLookupTable[k2][s00&0xFF] == destinationNoDataByte[k2] ? 0 : 1; int w01 = byteLookupTable[k2][s01&0xFF] == destinationNoDataByte[k2] ? 0 : 1; int w10 = byteLookupTable[k2][s10&0xFF] == destinationNoDataByte[k2] ? 0 : 1; int w11 = byteLookupTable[k2][s11&0xFF] == destinationNoDataByte[k2] ? 0 : 1;
40,786
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = (byte) (intResult & 0xff); } } } else if (setDestinationNoData) { for (int k2 = 0; k2 < dst_num_bands; k2++) { <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> } } if (fracx < fracdx1) {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
40,787
s_ix = startPts[0].x; s_iy = startPts[0].y; if (setDestinationNoData) { for (int x = dst_min_x; x < clipMinX; x++) { for (int k2 = 0; k2 < dst_num_bands; k2++) <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } } else
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
40,788
int w11 = w11index < roiDataLength ? roiDataArray[w11index] & 0xff : 0; if (baseIndex > roiDataLength || w00 == 0 || (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0)) { if (setDestinationNoData) { for (int k2 = 0; k2 < dst_num_bands; k2++) { <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> } } } else {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
40,789
final int s00 = srcDataArrays[k2][posx + posy + bandOffsets[k2]]; final int s01 = srcDataArrays[k2][posxhigh + posy + bandOffsets[k2]]; final int s10 = srcDataArrays[k2][posx + posyhigh + bandOffsets[k2]]; final int s11 = srcDataArrays[k2][posxhigh + posyhigh + bandOffsets[k2]]; <BUG>w00 = byteLookupTable[s00&0xFF] == destinationNoDataByte ? 0 : 1; w01 = byteLookupTable[s01&0xFF] == destinationNoDataByte ? 0 : 1; w10 = byteLookupTable[s10&0xFF] == destinationNoDataByte ? 0 : 1; w11 = byteLookupTable[s11&0xFF] == destinationNoDataByte ? 0 : 1; </BUG> if (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0) {
w00 = byteLookupTable[k2][s00&0xFF] == destinationNoDataByte[k2] ? 0 : 1; w01 = byteLookupTable[k2][s01&0xFF] == destinationNoDataByte[k2] ? 0 : 1; w10 = byteLookupTable[k2][s10&0xFF] == destinationNoDataByte[k2] ? 0 : 1; w11 = byteLookupTable[k2][s11&0xFF] == destinationNoDataByte[k2] ? 0 : 1;
40,790
dstPixelOffset += dstPixelStride; } if (setDestinationNoData && clipMinX <= clipMaxX) { for (int x = clipMaxX; x < dst_max_x; x++) { for (int k2 = 0; k2 < dst_num_bands; k2++) <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } }
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
40,791
s_ix = startPts[0].x; s_iy = startPts[0].y; if (setDestinationNoData) { for (int x = dst_min_x; x < clipMinX; x++) { for (int k2 = 0; k2 < dst_num_bands; k2++) <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } } else
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
40,792
int w10 = roiIter.getSample(x0, y0 + 1, 0) & 0xff; int w11 = roiIter.getSample(x0 + 1, y0 + 1, 0) & 0xff; if (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0) { if (setDestinationNoData) { for (int k2 = 0; k2 < dst_num_bands; k2++) { <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> } } } else {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
40,793
+ bandOffsets[k2]]; final int s10 = srcDataArrays[k2][posx + posyhigh + bandOffsets[k2]]; final int s11 = srcDataArrays[k2][posxhigh + posyhigh + bandOffsets[k2]]; <BUG>w00 = byteLookupTable[s00&0xFF] == destinationNoDataByte ? 0 : 1; w01 = byteLookupTable[s01&0xFF] == destinationNoDataByte ? 0 : 1; w10 = byteLookupTable[s10&0xFF] == destinationNoDataByte ? 0 : 1; w11 = byteLookupTable[s11&0xFF] == destinationNoDataByte ? 0 : 1; </BUG> if (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0) {
w00 = byteLookupTable[k2][s00&0xFF] == destinationNoDataByte[k2] ? 0 : 1; w01 = byteLookupTable[k2][s01&0xFF] == destinationNoDataByte[k2] ? 0 : 1; w10 = byteLookupTable[k2][s10&0xFF] == destinationNoDataByte[k2] ? 0 : 1; w11 = byteLookupTable[k2][s11&0xFF] == destinationNoDataByte[k2] ? 0 : 1;
40,794
dstPixelOffset += dstPixelStride; } if (setDestinationNoData && clipMinX <= clipMaxX) { for (int x = clipMaxX; x < dst_max_x; x++) { for (int k2 = 0; k2 < dst_num_bands; k2++) <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte; </BUG> dstPixelOffset += dstPixelStride; } }
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataByte[k2];
40,795
s_ix = startPts[0].x; s_iy = startPts[0].y; if (setDestinationNoData) { for (int x = dst_min_x; x < clipMinX; x++) { for (int k2 = 0; k2 < dst_num_bands; k2++) <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort; </BUG> dstPixelOffset += dstPixelStride; } } else
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];
40,796
dstPixelOffset += dstPixelStride; } if (setDestinationNoData && clipMinX <= clipMaxX) { for (int x = clipMaxX; x < dst_max_x; x++) { for (int k2 = 0; k2 < dst_num_bands; k2++) <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort; </BUG> dstPixelOffset += dstPixelStride; } }
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];
40,797
s_ix = startPts[0].x; s_iy = startPts[0].y; if (setDestinationNoData) { for (int x = dst_min_x; x < clipMinX; x++) { for (int k2 = 0; k2 < dst_num_bands; k2++) <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort; </BUG> dstPixelOffset += dstPixelStride; } } else
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];
40,798
final int w10 = roiIter.getSample(x0, y0 + 1, 0) & 0xff; final int w11 = roiIter.getSample(x0 + 1, y0 + 1, 0) & 0xff; if (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0) { if (setDestinationNoData) { for (int k2 = 0; k2 < dst_num_bands; k2++) { <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort; </BUG> } } } else {
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];
40,799
dstPixelOffset += dstPixelStride; } if (setDestinationNoData && clipMinX <= clipMaxX) { for (int x = clipMaxX; x < dst_max_x; x++) { for (int k2 = 0; k2 < dst_num_bands; k2++) <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort; </BUG> dstPixelOffset += dstPixelStride; } }
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];
40,800
int w01 = noData.contains(s01) ? 0 : 1; int w10 = noData.contains(s10) ? 0 : 1; int w11 = noData.contains(s11) ? 0 : 1; if (w00 == 0 && w01 == 0 && w10 == 0 && w11 == 0) { if (setDestinationNoData) { <BUG>dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort; </BUG> } } else { double result = computeValue(s00, s01, s10, s11, w00, w01, w10,
dstDataArrays[k2][dstPixelOffset + dstBandOffsets[k2]] = destinationNoDataUShort[k2];