id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
24,901
import com.teamwizardry.wizardry.common.entity.EntityDevilDust; import com.teamwizardry.wizardry.common.entity.EntityFairy; import com.teamwizardry.wizardry.common.entity.EntitySpellCodex; import com.teamwizardry.wizardry.common.tile.TilePedestal; import com.teamwizardry.wizardry.init.ModBlocks; <BUG>import com.teamwiz...
import com.teamwizardry.wizardry.init.ModPotions; import net.minecraft.entity.item.EntityItem;
24,902
public void onFallDamage(LivingHurtEvent event) { if (!(event.getEntity() instanceof EntityPlayer)) return; if (event.getSource() == EntityDamageSource.outOfWorld) { EntityPlayer player = ((EntityPlayer) event.getEntityLiving()); BlockPos spawn = player.isSpawnForced(0) ? player.getBedLocation(0) : player.world.getSpaw...
BlockPos teleportTo = spawn.add(0, 300 - spawn.getY(), 0);
24,903
if (event.getEntity().fallDistance >= 250) { BlockPos location = event.getEntity().getPosition(); BlockPos bedrock = PosUtils.checkNeighbor(event.getEntity().getEntityWorld(), location, Blocks.BEDROCK); if (bedrock != null) { if (event.getEntity().getEntityWorld().getBlockState(bedrock).getBlock() == Blocks.BEDROCK) { ...
TeleportUtil.teleportToDimension((EntityPlayer) event.getEntity(), Wizardry.underWorld.getId(), 0, 300, 0); ((EntityPlayer) event.getEntity()).addPotionEffect(new PotionEffect(ModPotions.NULLIFY_GRAVITY, 100, 1, false, false)); fallResetUUIDs.add(event.getEntity().getUniqueID());
24,904
if (event.getEntityPlayer().fallDistance >= 250) { BlockPos location = event.getEntityPlayer().getPosition(); BlockPos bedrock = PosUtils.checkNeighbor(event.getEntity().getEntityWorld(), location, Blocks.BEDROCK); if (bedrock != null) { if (event.getEntity().getEntityWorld().getBlockState(bedrock).getBlock() == Blocks...
TeleportUtil.teleportToDimension(event.getEntityPlayer(), Wizardry.underWorld.getId(), 0, 300, 0); ((EntityPlayer) event.getEntity()).addPotionEffect(new PotionEffect(ModPotions.NULLIFY_GRAVITY, 100, 1, false, false)); fallResetUUIDs.add(event.getEntityPlayer().getUniqueID());
24,905
package com.teamwizardry.wizardry.common.world; <BUG>import com.teamwizardry.wizardry.Wizardry; import net.minecraft.client.Minecraft;</BUG> import net.minecraft.client.multiplayer.WorldClient; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.Tessellator;
import com.teamwizardry.wizardry.common.world.biome.BiomeUnderWorld; import net.minecraft.client.Minecraft;
24,906
ModBlocks.init(); Achievements.init(); Fluids.preInit(); ModEntities.init(); ModPotions.init(); <BUG>ModCapabilities.preInit(); WizardryPacketHandler.registerMessages();</BUG> NetworkRegistry.INSTANCE.registerGuiHandler(Wizardry.instance, new GuiHandler()); ModStructures.INSTANCE.getClass(); Wizardry.underWorld = Dimen...
ModBiomes.init(); WizardryPacketHandler.registerMessages();
24,907
import javax.persistence.EntityManager; import javax.persistence.Query; import com.google.common.collect.Sets; import io.joynr.accesscontrol.global.jee.persistence.MasterAccessControlEntryEntity; import io.joynr.accesscontrol.global.jee.persistence.ControlEntryType; <BUG>import io.joynr.exceptions.JoynrIllegalStateExce...
import joynr.infrastructure.DacTypes.ChangeType; import joynr.infrastructure.DacTypes.MasterAccessControlEntry;
24,908
interfaceName, operation)); } return entity; } <BUG>public Boolean createOrUpdate(MasterAccessControlEntry updatedMasterAce, ControlEntryType type) { </BUG> MasterAccessControlEntryEntity entity = findByUserIdDomainInterfaceNameOperationAndType(updatedMasterAce.getUid(), updatedMasterAce.getDomain(), updatedMasterAce.g...
public CreateOrUpdateResult<MasterAccessControlEntry> createOrUpdate(MasterAccessControlEntry updatedMasterAce, ControlEntryType type) {
24,909
MasterAccessControlEntryEntity entity = findByUserIdDomainInterfaceNameOperationAndType(updatedMasterAce.getUid(), updatedMasterAce.getDomain(), updatedMasterAce.getInterfaceName(), updatedMasterAce.getOperation(), type); <BUG>if (entity == null) { entity = new MasterAccessControlEntryEntity();</BUG> entity.setUserId(u...
boolean created = entity == null; if (created) { entity = new MasterAccessControlEntryEntity();
24,910
entity.setPossibleRequiredTrustLevels(Sets.newHashSet(updatedMasterAce.getPossibleRequiredTrustLevels())); entity.setDefaultRequiredControlEntryChangeTrustLevel(updatedMasterAce.getDefaultRequiredControlEntryChangeTrustLevel()); entity.setPossibleRequiredControlEntryChangeTrustLevels(Sets.newHashSet(updatedMasterAce.ge...
return new CreateOrUpdateResult<>(mapEntityToJoynrType(entity), created ? ChangeType.ADD : ChangeType.UPDATE); public MasterAccessControlEntry removeByUserIdDomainInterfaceNameAndOperation(String uid,
24,911
private boolean handleTime(Message m, PeerNode source) { long delta = m.getLong(DMT.TIME) - System.currentTimeMillis(); source.setTimeDelta(delta); return true; } <BUG>private boolean handleDataRequest(Message m, PeerNode source, boolean isSSK) { </BUG> long id = m.getLong(DMT.UID); ByteCounter ctr = isSSK ? node.nodeS...
private void handleDataRequest(Message m, PeerNode source, boolean isSSK) {
24,912
try { source.sendAsync(rejected, null, ctr); } catch (NotConnectedException e) { Logger.normal(this, "Rejecting data request (loop, finished): "+e); } <BUG>return true; }</BUG> short htl = m.getShort(DMT.HTL); Key key = (Key) m.getObject(DMT.FREENET_ROUTING_KEY); boolean realTimeFlag = DMT.getRealTimeFlag(m);
return;
24,913
try { source.sendAsync(rejected, null, ctr); } catch (NotConnectedException e) { Logger.normal(this, "Rejecting insert request from "+source.getPeer()+": "+e); } <BUG>return true; }</BUG> boolean realTimeFlag = DMT.getRealTimeFlag(m); InsertTag tag = new InsertTag(isSSK, InsertTag.START.REMOTE, source, realTimeFlag, id...
return;
24,914
_cacheListeners = null; _map = null; _name = null; } @Override <BUG>public V get(K key) { return _map.get(key); } @Override</BUG> public String getName() {
[DELETED]
24,915
_map.clear(); for (CacheListener<K, V> cacheListener : _cacheListeners) { cacheListener.notifyRemoveAll(this); } } @Override public void unregisterCacheListener(CacheListener<K, V> cacheListener) { _cacheListeners.remove(cacheListener); } @Override public void unregisterCacheListeners() { <BUG>_cacheListeners.clear(); ...
cacheListener.notifyEntryRemoved(this, key, value);
24,916
new RegistrationPair(cacheEventListener, notificationScope)); RegisteredEventListeners registeredEventListeners = ehcache.getCacheEventNotificationService(); registeredEventListeners.registerListener( cacheEventListener, notificationScope); <BUG>} @Override public void remove(K key) { ehcache.remove(key);</BUG> }
[DELETED]
24,917
import java.util.Map; import javax.annotation.PostConstruct; import javax.enterprise.context.ApplicationScoped; import javax.enterprise.event.Event; import javax.inject.Inject; <BUG>import javax.inject.Named; import org.drools.workbench.screens.workitems.service.WorkItemsEditorService; import org.guvnor.common.services...
import org.drools.workbench.screens.workitems.backend.server.WorkbenchConfigurationHelper;
24,918
import org.guvnor.structure.server.config.ConfigItem; import org.guvnor.structure.server.config.ConfigType; import org.guvnor.structure.server.config.ConfigurationFactory; import org.guvnor.structure.server.config.ConfigurationService; import org.jbpm.console.ng.bd.service.AdministrationService; <BUG>import org.kie.wor...
import org.kie.workbench.screens.workbench.backend.BaseAppSetup; import org.slf4j.Logger;
24,919
package com.projecttango.examples.java.augmentedreality; import com.google.atap.tangoservice.Tango; import com.google.atap.tangoservice.Tango.OnTangoUpdateListener; import com.google.atap.tangoservice.TangoCameraIntrinsics; import com.google.atap.tangoservice.TangoConfig; <BUG>import com.google.atap.tangoservice.TangoC...
import com.google.atap.tangoservice.TangoErrorException; import com.google.atap.tangoservice.TangoEvent;
24,920
super.onResume(); if (!mIsConnected) { mTango = new Tango(AugmentedRealityActivity.this, new Runnable() { @Override public void run() { <BUG>try { connectTango();</BUG> setupRenderer(); mIsConnected = true; } catch (TangoOutOfDateException e) {
TangoSupport.initialize(); connectTango();
24,921
if (lastFramePose.statusCode == TangoPoseData.POSE_VALID) { mRenderer.updateRenderCameraPose(lastFramePose, mExtrinsics); mCameraPoseTimestamp = lastFramePose.timestamp;</BUG> } else { <BUG>Log.w(TAG, "Can't get device pose at time: " + mRgbTimestampGlThread); }</BUG> } } } @Override
mRenderer.updateRenderCameraPose(lastFramePose); mCameraPoseTimestamp = lastFramePose.timestamp; Log.w(TAG, "Can't get device pose at time: " +
24,922
import org.rajawali3d.materials.Material; import org.rajawali3d.materials.methods.DiffuseMethod; import org.rajawali3d.materials.textures.ATexture; import org.rajawali3d.materials.textures.StreamingTexture; import org.rajawali3d.materials.textures.Texture; <BUG>import org.rajawali3d.math.Matrix4; import org.rajawali3d....
import org.rajawali3d.math.Quaternion; import org.rajawali3d.math.vector.Vector3;
24,923
translationMoon.setRepeatMode(Animation.RepeatMode.INFINITE); translationMoon.setTransformable3D(moon); getCurrentScene().registerAnimation(translationMoon); translationMoon.play(); } <BUG>public void updateRenderCameraPose(TangoPoseData devicePose, DeviceExtrinsics extrinsics) { Pose cameraPose = ScenePoseCalculator.t...
public void updateRenderCameraPose(TangoPoseData cameraPose) { float[] rotation = cameraPose.getRotationAsFloats(); float[] translation = cameraPose.getTranslationAsFloats(); Quaternion quaternion = new Quaternion(rotation[3], rotation[0], rotation[1], rotation[2]); getCurrentCamera().setRotation(quaternion.conjugate()...
24,924
package com.projecttango.examples.java.helloareadescription; import com.google.atap.tangoservice.Tango; <BUG>import com.google.atap.tangoservice.Tango.OnTangoUpdateListener; import com.google.atap.tangoservice.TangoConfig;</BUG> import com.google.atap.tangoservice.TangoCoordinateFramePair; import com.google.atap.tangos...
import com.google.atap.tangoservice.TangoAreaDescriptionMetaData; import com.google.atap.tangoservice.TangoConfig;
24,925
public void testRestart() throws Exception { BsonObject docPut = createObject(); assertNull(testBinder1.put("id1234", docPut).get()); BsonObject docGet = testBinder1.get("id1234").get(); assertEquals(docPut, docGet); <BUG>restart(); docGet = testBinder1.get("id1234").get();</BUG> assertEquals(docPut, docGet); } @Test
stopServerAndClient(); startServer(); testBinder1 = server.getBinder(TEST_BINDER1);
24,926
import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ConcurrentHashMap; <BUG>import java.util.concurrent.ConcurrentMap; import java.util.stream.Collectors;</BUG> public class ServerImpl implements Server { private final static Logg...
import java.util.function.Supplier; import java.util.stream.Collectors;
24,927
return binder; } private CompletableFuture<Void> startBinders(List<String> binderNames) { CompletableFuture[] arr = new CompletableFuture[binderNames.size()]; int i = 0; <BUG>for (String binderName : binderNames) { Binder binder = loadBinder(binderName);</BUG> arr[i++] = binder.start(); } return CompletableFuture.allOf...
logger.trace("Starting binder: " + binderName); Binder binder = loadBinder(binderName);
24,928
import com.tesco.mewbase.bson.BsonObject; import com.tesco.mewbase.client.Client; import com.tesco.mewbase.client.ClientOptions; import com.tesco.mewbase.client.Producer; import io.vertx.ext.unit.Async; <BUG>import io.vertx.ext.unit.TestContext; import io.vertx.ext.unit.junit.VertxUnitRunner;</BUG> import org.junit.Ass...
import io.vertx.ext.unit.junit.Repeat; import io.vertx.ext.unit.junit.VertxUnitRunner;
24,929
import org.junit.Test; import org.junit.runner.RunWith; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.concurrent.CompletableFuture; <BUG>import java.util.concurrent.atomic.AtomicInteger; @RunWith(VertxUnitRunner.class)</BUG> public class QueryTest extends ServerTestBase { private final stati...
import static junit.framework.TestCase.assertNotNull; @RunWith(VertxUnitRunner.class)
24,930
package org.apache.sling.ide.eclipse.core.internal; import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import java.util.List; <BUG>import java.util.Set; import org.eclipse.core.resources.IFile;</BUG> import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; i...
import org.apache.sling.ide.eclipse.core.debug.PluginLogger; import org.eclipse.core.resources.IFile;
24,931
package org.apache.sling.ide.eclipse.core.internal; <BUG>import org.apache.sling.ide.eclipse.core.ServiceUtil; import org.apache.sling.ide.filter.FilterLocator;</BUG> import org.apache.sling.ide.osgi.OsgiClientFactory; import org.apache.sling.ide.serialization.SerializationManager; import org.apache.sling.ide.transport...
import org.apache.sling.ide.eclipse.core.debug.PluginLogger; import org.apache.sling.ide.eclipse.core.debug.PluginLoggerRegistrar; import org.apache.sling.ide.filter.FilterLocator;
24,932
serializationManager.open(); filterLocator = new ServiceTracker<FilterLocator, FilterLocator>(context, FilterLocator.class, null); filterLocator.open(); osgiClientFactory = new ServiceTracker<OsgiClientFactory, OsgiClientFactory>(context, OsgiClientFactory.class, null); <BUG>osgiClientFactory.open(); } public void stop...
ServiceReference<Object> reference = (ServiceReference<Object>) tracerRegistration.getReference(); tracer = new ServiceTracker<Object, Object>(context, reference, null); tracer.open(); tracerRegistration.unregister(); repositoryFactory.close();
24,933
} public void stop(BundleContext context) throws Exception { repositoryFactory.close();</BUG> serializationManager.close(); filterLocator.close(); <BUG>osgiClientFactory.close(); plugin = null;</BUG> super.stop(context); } public static Activator getDefault() {
tracerRegistration.unregister(); repositoryFactory.close(); tracer.close(); plugin = null;
24,934
public static String getSyncDirectoryValue(IProject project) { String value = null; try { value = project.getPersistentProperty(new QualifiedName(Activator.PLUGIN_ID, PROPERTY_SYNC_ROOT)); } catch (CoreException e) { <BUG>Activator.getDefault().getLog().log(new Status(Status.ERROR, Activator.PLUGIN_ID, e.getMessage(), ...
Activator.getDefault().getPluginLogger().error(e.getMessage(), e); }
24,935
timeWarp = new OwnLabel(getFormattedTimeWrap(), skin, "warp"); timeWarp.setName("time warp"); Container wrapWrapper = new Container(timeWarp); wrapWrapper.width(60f * GlobalConf.SCALE_FACTOR); wrapWrapper.align(Align.center); <BUG>VerticalGroup timeGroup = new VerticalGroup().align(Align.left).space(3 * GlobalConf.SCAL...
VerticalGroup timeGroup = new VerticalGroup().align(Align.left).columnAlign(Align.left).space(3 * GlobalConf.SCALE_FACTOR).padTop(3 * GlobalConf.SCALE_FACTOR);
24,936
focusListScrollPane.setFadeScrollBars(false); focusListScrollPane.setScrollingDisabled(true, false); focusListScrollPane.setHeight(tree ? 200 * GlobalConf.SCALE_FACTOR : 100 * GlobalConf.SCALE_FACTOR); focusListScrollPane.setWidth(160); } <BUG>VerticalGroup objectsGroup = new VerticalGroup().align(Align.left).space(3 *...
VerticalGroup objectsGroup = new VerticalGroup().align(Align.left).columnAlign(Align.left).space(3 * GlobalConf.SCALE_FACTOR);
24,937
headerGroup.addActor(expandIcon); headerGroup.addActor(detachIcon); addActor(headerGroup); expandIcon.setChecked(expanded); } <BUG>public void expand() { </BUG> if (!expandIcon.isChecked()) { expandIcon.setChecked(true); }
public void expandPane() {
24,938
</BUG> if (!expandIcon.isChecked()) { expandIcon.setChecked(true); } } <BUG>public void collapse() { </BUG> if (expandIcon.isChecked()) { expandIcon.setChecked(false); }
headerGroup.addActor(expandIcon); headerGroup.addActor(detachIcon); addActor(headerGroup); expandIcon.setChecked(expanded); public void expandPane() { public void collapsePane() {
24,939
}); playstop.addListener(new TextTooltip(txt("gui.tooltip.playstop"), skin)); TimeComponent timeComponent = new TimeComponent(skin, ui); timeComponent.initialize(); CollapsiblePane time = new CollapsiblePane(ui, txt("gui.time"), timeComponent.getActor(), skin, true, playstop); <BUG>time.align(Align.left); mainActors.ad...
time.align(Align.left).columnAlign(Align.left); mainActors.add(time);
24,940
panes.put(visualEffectsComponent.getClass().getSimpleName(), visualEffects); ObjectsComponent objectsComponent = new ObjectsComponent(skin, ui); objectsComponent.setSceneGraph(sg); objectsComponent.initialize(); CollapsiblePane objects = new CollapsiblePane(ui, txt("gui.objects"), objectsComponent.getActor(), skin, fal...
objects.align(Align.left).columnAlign(Align.left); mainActors.add(objects);
24,941
if (Constants.desktop) { MusicComponent musicComponent = new MusicComponent(skin, ui); musicComponent.initialize(); Actor[] musicActors = MusicActorsManager.getMusicActors() != null ? MusicActorsManager.getMusicActors().getActors(skin) : null; CollapsiblePane music = new CollapsiblePane(ui, txt("gui.music"), musicCompo...
music.align(Align.left).columnAlign(Align.left); mainActors.add(music);
24,942
n1.setCoor(new LatLon(0,0)); n1.put("key1", "value1"); cal.add(Calendar.HOUR, 1); Date timestamp = cal.getTime(); n1.setTimestamp(timestamp); <BUG>n1.user = theirUser; </BUG> their.addPrimitive(n1); MergeVisitor visitor = new MergeVisitor(my,their); visitor.merge();
n1.setUser(theirUser);
24,943
visitor.merge(); Node n2 = my.nodes.iterator().next(); assertEquals(0,visitor.getConflicts().size()); assertEquals("value1",n2.get("key1")); assertEquals(true, n1.getTimestamp().equals(n2.getTimestamp())); <BUG>assertEquals(theirUser,n2.user); </BUG> } @Test public void nodeSimple_IncompleteNode() {
assertEquals(theirUser,n2.getUser());
24,944
n4.setOsmId(2,1); their.addPrimitive(n4); Way theirWay = new Way(); theirWay.addNode(n3); theirWay.addNode(n4); <BUG>theirWay.user = User.createOsmUser(1111, "their"); </BUG> theirWay.setTimestamp(new Date()); their.addPrimitive(theirWay); MergeVisitor visitor = new MergeVisitor(my,their);
theirWay.setOsmId(3,2); theirWay.put("key1", "value1"); theirWay.put("key2", "value2");
24,945
theirWay.setTimestamp(new Date()); their.addPrimitive(theirWay); MergeVisitor visitor = new MergeVisitor(my,their); visitor.merge(); assertEquals(0,visitor.getConflicts().size()); <BUG>assertEquals("their", myWay.user.getName()); assertEquals(1111, myWay.user.getId()); assertEquals(1111, myWay.user.getId()); </BUG> a...
assertEquals("their", myWay.getUser().getName()); assertEquals(1111, myWay.getUser().getId()); assertEquals(1111, myWay.getUser().getId());
24,946
Node n4 = new Node(new LatLon(1,1)); their.addPrimitive(n4); Way theirWay = new Way(); theirWay.addNode(n3); theirWay.addNode(n4); <BUG>theirWay.user = User.createOsmUser(1111, "their"); </BUG> theirWay.setTimestamp(new Date()); their.addPrimitive(theirWay); MergeVisitor visitor = new MergeVisitor(my,their);
theirWay.setUser(User.createOsmUser(1111, "their"));
24,947
theirWay.setTimestamp(new Date()); their.addPrimitive(theirWay); MergeVisitor visitor = new MergeVisitor(my,their); visitor.merge(); assertEquals(0,visitor.getConflicts().size()); <BUG>assertEquals("their", myWay.user.getName()); assertEquals(1111, myWay.user.getId()); assertEquals(1111, myWay.user.getId()); </BUG> a...
assertEquals("their", myWay.getUser().getName()); assertEquals(1111, myWay.getUser().getId()); assertEquals(1111, myWay.getUser().getId());
24,948
Way theirWay = new Way(); theirWay.setOsmId(4,1); theirWay.addNode(n3); theirWay.addNode(n4); theirWay.addNode(n5); <BUG>theirWay.user = User.createOsmUser(1111, "their"); </BUG> theirWay.setTimestamp(new Date()); their.addPrimitive(theirWay); MergeVisitor visitor = new MergeVisitor(my,their);
theirWay.setUser(User.createOsmUser(1111, "their"));
24,949
package com.projecttango.examples.java.augmentedreality; import com.google.atap.tangoservice.Tango; import com.google.atap.tangoservice.Tango.OnTangoUpdateListener; import com.google.atap.tangoservice.TangoCameraIntrinsics; import com.google.atap.tangoservice.TangoConfig; <BUG>import com.google.atap.tangoservice.TangoC...
import com.google.atap.tangoservice.TangoErrorException; import com.google.atap.tangoservice.TangoEvent;
24,950
super.onResume(); if (!mIsConnected) { mTango = new Tango(AugmentedRealityActivity.this, new Runnable() { @Override public void run() { <BUG>try { connectTango();</BUG> setupRenderer(); mIsConnected = true; } catch (TangoOutOfDateException e) {
TangoSupport.initialize(); connectTango();
24,951
if (lastFramePose.statusCode == TangoPoseData.POSE_VALID) { mRenderer.updateRenderCameraPose(lastFramePose, mExtrinsics); mCameraPoseTimestamp = lastFramePose.timestamp;</BUG> } else { <BUG>Log.w(TAG, "Can't get device pose at time: " + mRgbTimestampGlThread); }</BUG> } } } @Override
mRenderer.updateRenderCameraPose(lastFramePose); mCameraPoseTimestamp = lastFramePose.timestamp; Log.w(TAG, "Can't get device pose at time: " +
24,952
import org.rajawali3d.materials.Material; import org.rajawali3d.materials.methods.DiffuseMethod; import org.rajawali3d.materials.textures.ATexture; import org.rajawali3d.materials.textures.StreamingTexture; import org.rajawali3d.materials.textures.Texture; <BUG>import org.rajawali3d.math.Matrix4; import org.rajawali3d....
import org.rajawali3d.math.Quaternion; import org.rajawali3d.math.vector.Vector3;
24,953
translationMoon.setRepeatMode(Animation.RepeatMode.INFINITE); translationMoon.setTransformable3D(moon); getCurrentScene().registerAnimation(translationMoon); translationMoon.play(); } <BUG>public void updateRenderCameraPose(TangoPoseData devicePose, DeviceExtrinsics extrinsics) { Pose cameraPose = ScenePoseCalculator.t...
public void updateRenderCameraPose(TangoPoseData cameraPose) { float[] rotation = cameraPose.getRotationAsFloats(); float[] translation = cameraPose.getTranslationAsFloats(); Quaternion quaternion = new Quaternion(rotation[3], rotation[0], rotation[1], rotation[2]); getCurrentCamera().setRotation(quaternion.conjugate()...
24,954
package com.projecttango.examples.java.helloareadescription; import com.google.atap.tangoservice.Tango; <BUG>import com.google.atap.tangoservice.Tango.OnTangoUpdateListener; import com.google.atap.tangoservice.TangoConfig;</BUG> import com.google.atap.tangoservice.TangoCoordinateFramePair; import com.google.atap.tangos...
import com.google.atap.tangoservice.TangoAreaDescriptionMetaData; import com.google.atap.tangoservice.TangoConfig;
24,955
@Reference private TopologyHandler topologyHandler; @Reference private EventAdmin eventAdmin; @Reference <BUG>private QueueConfigurationManager queueConfigManager; @Reference</BUG> private Scheduler scheduler; @Reference private JobConsumerManager jobConsumerManager;
[DELETED]
24,956
final JobExecutor consumer = this.jobConsumerManager.getExecutor(job.getTopic()); boolean reassign = false; String reassignTargetId = null; if ( consumer == null && (!job.isBridgedEvent() || !this.jobConsumerManager.supportsBridgedEvents())) { reassign = true; <BUG>} final QueueInfo queueInfo = queueConfigManager.getQu...
final TopologyCapabilities caps = this.topologyCapabilities; final QueueInfo queueInfo = caps != null ? caps.getQueueInfo(job.getTopic()) : null; if ( queueInfo == null ) { return; // TODO final InternalQueueConfiguration config = queueInfo.queueConfiguration;
24,957
properties); properties.put(JobImpl.PROPERTY_RESOURCE_PATH, path); return new JobImpl(jobTopic, jobName, jobId, properties); } public void reassign(final JobImpl job) { <BUG>final QueueInfo queueInfo = queueConfigManager.getQueueInfo(job.getTopic()); final InternalQueueConfiguration config = queueInfo.queueConfiguratio...
final QueueInfo queueInfo = queueManager.getQueueInfo(job.getTopic()); final InternalQueueConfiguration config = queueInfo.queueConfiguration;
24,958
this.stopJobById(jobId, true); } private void stopJobById(final String jobId, final boolean forward) { final JobImpl job = (JobImpl)this.getJobById(jobId); if ( job != null && !this.configuration.isStoragePath(job.getResourcePath()) ) { <BUG>final QueueInfo queueInfo = queueConfigManager.getQueueInfo(job.getTopic()); <...
final QueueInfo queueInfo = this.queueManager.getQueueInfo(job.getTopic());
24,959
package org.neo4j.management.impl; import java.util.Collection; import java.util.Iterator; import javax.management.NotCompliantMBeanException; <BUG>import org.neo4j.helpers.Service; import org.neo4j.jmx.impl.ManagementBeanProvider;</BUG> import org.neo4j.jmx.impl.ManagementData; import org.neo4j.jmx.impl.Neo4jMBean; im...
import org.neo4j.jmx.impl.KernelBean; import org.neo4j.jmx.impl.ManagementBeanProvider;
24,960
package org.neo4j.management.impl; import java.io.File; import java.io.IOException; import javax.management.NotCompliantMBeanException; <BUG>import org.neo4j.helpers.Service; import org.neo4j.jmx.impl.ManagementBeanProvider;</BUG> import org.neo4j.jmx.impl.ManagementData; import org.neo4j.jmx.impl.Neo4jMBean; import or...
import org.neo4j.jmx.impl.KernelBean; import org.neo4j.jmx.impl.ManagementBeanProvider;
24,961
private static final String LOGICAL_LOG2 = "nioneo_logical.log.2"; private final File storePath; StoreFileImpl( ManagementData management ) throws NotCompliantMBeanException { super( management ); <BUG>NeoStoreXaDataSource nioneodb = management.getKernelData().graphDatabase().getXaDataSourceManager().getNeoStoreDataSou...
NeoStoreXaDataSource nioneodb = KernelBean.getNeoDataSource( management.getKernelData() ); File path;
24,962
mView.showContent(sectionListBean); } }, new Action1<Throwable>() { @Override public void call(Throwable throwable) { <BUG>mView.showError("数据加载失败"); </BUG> } }); addSubscrebe(rxSubscription);
mView.showError("数据加载失败ヽ(≧Д≦)ノ");
24,963
mView.showContent(dailyListBean); } }, new Action1<Throwable>() { @Override public void call(Throwable throwable) { <BUG>mView.showError("数据加载失败"); </BUG> } }); addSubscrebe(rxSubscription);
mView.showError("数据加载失败ヽ(≧Д≦)ノ");
24,964
new Action1<Throwable>() { @Override public void call(Throwable throwable) { registerEvent(); LogUtil.d(throwable.toString()); <BUG>mView.showError("数据加载失败"); </BUG> }}); addSubscrebe(rxSubscription); }
mView.showError("数据加载失败ヽ(≧Д≦)ノ");
24,965
mView.showContent(themeChildListBean); } }, new Action1<Throwable>() { @Override public void call(Throwable throwable) { <BUG>mView.showError("数据加载失败"); </BUG> } }); addSubscrebe(rxSubscription);
mView.showError("数据加载失败ヽ(≧Д≦)ノ");
24,966
mView.showContent(commentBean); } }, new Action1<Throwable>() { @Override public void call(Throwable throwable) { <BUG>mView.showError("数据加载失败"); </BUG> } }); addSubscrebe(rxSubscription);
mView.showError("数据加载失败ヽ(≧Д≦)ノ");
24,967
Bundle savedInstanceState) { final View rootView = inflater.inflate(R.layout.tab_qibla, container, false); final QiblaCompassView qiblaCompassView = (QiblaCompassView)rootView.findViewById(R.id.qibla_compass); qiblaCompassView.setConstants(((TextView)rootView.findViewById(R.id.bearing_north)), getText(R.string.bearing_...
sOrientationListener = new android.hardware.SensorListener() {
24,968
Map<String, Object> _revisions = ClientTestUtils.getRevisionHistory(revision3, revision2, revision1); doc1.put(CouchConstants._rev, revision3); doc1.put(CouchConstants._revisions, _revisions); List<Response> responses = client.bulkCreateDocs(doc1); Assert.assertEquals(0, responses.size()); <BUG>Map<String, Object> allR...
Map<String, Object> allRevs = client.getDocRevisions(res1.getId(), revision3, JSONUtils.STRING_MAP_TYPE_DEF);
24,969
Assert.assertEquals("world", doc.get("hello")); Assert.assertTrue(doc.containsKey(CouchConstants._id)); Assert.assertEquals(res.getId(), doc.get(CouchConstants._id)); Assert.assertTrue(doc.containsKey(CouchConstants._rev)); Assert.assertEquals(res.getRev(), doc.get(CouchConstants._rev)); <BUG>} @Test(expected = NoResou...
[DELETED]
24,970
import com.cloudant.sync.internal.mazha.DocumentRevs; import com.cloudant.sync.internal.mazha.Response; <BUG>import com.cloudant.sync.internal.documentstore.InternalDocumentRevision; import com.cloudant.sync.internal.documentstore.DocumentRevsList; import com.cloudant.sync.internal.documentstore.MultipartAttachmentWrit...
[DELETED]
24,971
return executeResult; } finally { IOUtils.closeQuietly(errorStream); } } <BUG>private InputStream executeToInputStreamWithRetry(final Callable<ExecuteResult> task) throws CouchException { int attempts = 10; CouchException lastException= null; </BUG> while (attempts-- > 0) {
private <T> T executeWithRetry(final Callable<ExecuteResult> task, InputStreamProcessor<T> processor) throws CouchException lastException = null;
24,972
public boolean contains(String id) { Misc.checkNotNullOrEmpty(id, "id"); URI doc = this.uriHelper.documentUri(id); try { HttpConnection connection = Http.HEAD(doc); <BUG>this.executeToInputStreamWithRetry(connection); return true;</BUG> } catch (Exception e) { return false; }
this.executeWithRetry(connection, new NoOpInputStreamProcessor()); return true;
24,973
final URI doc = this.uriHelper.attachmentUri(id, queries, attachmentName); HttpConnection connection = Http.GET(doc); if (acceptGzip) { connection.requestProperties.put("Accept-Encoding", "gzip"); } <BUG>return executeToInputStreamWithRetry(connection); </BUG> } public void putAttachmentStream(String id, String rev, St...
return executeWithRetry(connection, processor);
24,974
} else { options.put("attachments", false); options.put("att_encoding_info", true); } options.put("open_revs", JSONUtils.toJson(revisions)); <BUG>return this.getDocument(id, options, JSONUtils.openRevisionList()); }</BUG> public Iterable<DocumentRevsList> bulkReadDocsWithOpenRevisions(List<BulkGetRequest> request, bool...
return this.getDocument(id, options, JSONUtils.OPEN_REVS_LIST_TYPE_DEF);
24,975
Misc.checkNotNull(rev, "Revision ID"); Map<String, Object> queries = new HashMap<String, Object>(); queries.put("revs", "true"); queries.put("rev", rev); URI findRevs = this.uriHelper.documentUri(id, queries); <BUG>InputStream is = null; try { HttpConnection connection = Http.GET(findRevs); is = this.executeToInputStre...
return executeToJsonObjectWithRetry(connection, type);
24,976
package com.cloudant.sync.internal.replication; import com.cloudant.http.HttpConnectionRequestInterceptor; import com.cloudant.http.HttpConnectionResponseInterceptor; <BUG>import com.cloudant.sync.internal.mazha.ChangesResult; import com.cloudant.sync.internal.mazha.CouchClient; import com.cloudant.sync.internal.mazha....
[DELETED]
24,977
attachmentName); if (a != null) { continue; } } <BUG>UnsavedStreamAttachment usa = this.sourceDb .getAttachmentStream(documentRevs.getId(), documentRevs.getRev(), attachmentName, contentType, encoding); preparedAtts.put(attachmentName, this.targetDb.prepareAttachment(usa, length, encodedLength)); }</BUG> }
preparedAtts.put(attachmentName, this.sourceDb.pullAttachmentWithRetry (documentRevs.getId(), documentRevs.getRev(), entry .getKey(), new AttachmentPullProcessor(this .targetDb, entry.getKey(), contentType, encoding, length, encodedLength)));
24,978
if (!(sender instanceof Player)) { sender.sendMessage(plugin.getCore().getMessage("no-console")); return true; } if (plugin.isBungeeCord()) { <BUG>plugin.sendBungeeActivateMessage(sender, sender.getName(), false); String message = plugin.getCore().getMessage("wait-on-proxy"); if (message != null) { sender.sendMessage(m...
plugin.getCore().sendLocaleMessage("wait-on-proxy", sender);
24,979
profile.setUuid(null); Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> { plugin.getCore().getStorage().save(profile); }); } else { <BUG>sender.sendMessage(plugin.getCore().getMessage("not-premium")); }</BUG> } return true; } else {
plugin.getCore().sendLocaleMessage("not-premium", sender);
24,980
if (profile == null) { sender.sendMessage("Error occured"); return; } if (profile.getUserId() != -1 && !profile.isPremium()) { <BUG>sender.sendMessage(plugin.getCore().getMessage("not-premium-other")); } else { sender.sendMessage(plugin.getCore().getMessage("remove-premium")); profile.setPremium(false);</BUG> Bukkit.ge...
plugin.getCore().sendLocaleMessage("not-premium-other", sender); plugin.getCore().sendLocaleMessage("remove-premium", sender); profile.setPremium(false);
24,981
import com.github.games647.fastlogin.bukkit.BukkitLoginSession; import com.github.games647.fastlogin.bukkit.FastLoginBukkit; import com.github.games647.fastlogin.core.PlayerProfile; import com.github.games647.fastlogin.core.shared.JoinManagement; import java.util.Random; <BUG>import java.util.logging.Level; import org....
import org.bukkit.command.CommandSender; public class NameCheckTask extends JoinManagement<Player, CommandSender, ProtocolLibLoginSource> private final FastLoginBukkit plugin;
24,982
BukkitLoginSession session = plugin.getSessions().get(fromPlayer.getAddress().toString()); if (session == null) { disconnect(plugin.getCore().getMessage("invalid-requst"), true , "Player {0} tried to send encryption response at invalid state", fromPlayer.getAddress()); } else { <BUG>String ip = fromPlayer.getAddress()....
[DELETED]
24,983
if (core != null) { core.close(); } getServer().getOnlinePlayers().forEach(player -> player.removeMetadata(getName(), this)); } <BUG>public BukkitCore getCore() { return core;</BUG> } public void sendBungeeActivateMessage(CommandSender sender, String target, boolean activate) { if (sender instanceof Player) {
public FastLoginCore<Player, CommandSender, FastLoginBukkit> getCore() { return core;
24,984
String id = '/' + address.getAddress().getHostAddress() + ':' + address.getPort(); if ("AUTO_LOGIN".equalsIgnoreCase(subchannel)) { BukkitLoginSession playerSession = new BukkitLoginSession(playerName, true); playerSession.setVerified(true); plugin.getSessions().put(id, playerSession); <BUG>Bukkit.getScheduler().runTas...
Bukkit.getScheduler().runTaskAsynchronously(plugin, new ForceLoginTask(plugin.getCore(), player));
24,985
try { if (authPlugin == null || !authPlugin.isRegistered(playerName)) { BukkitLoginSession playerSession = new BukkitLoginSession(playerName, false); playerSession.setVerified(true); plugin.getSessions().put(id, playerSession); <BUG>new ForceLoginTask(plugin, player).run(); </BUG> } } catch (Exception ex) { plugin.getL...
new ForceLoginTask(plugin.getCore(), player).run();
24,986
import de.vanita5.twittnuker.receiver.NotificationReceiver; import de.vanita5.twittnuker.service.LengthyOperationsService; import de.vanita5.twittnuker.util.ActivityTracker; import de.vanita5.twittnuker.util.AsyncTwitterWrapper; import de.vanita5.twittnuker.util.DataStoreFunctionsKt; <BUG>import de.vanita5.twittnuker.u...
import de.vanita5.twittnuker.util.DebugLog; import de.vanita5.twittnuker.util.ImagePreloader;
24,987
final List<InetAddress> addresses = mDns.lookup(host); for (InetAddress address : addresses) { c.addRow(new String[]{host, address.getHostAddress()}); } } catch (final IOException ignore) { <BUG>if (BuildConfig.DEBUG) { Log.w(LOGTAG, ignore); }</BUG> }
DebugLog.w(LOGTAG, null, ignore);
24,988
FileBody fileBody = null; try { fileBody = getFileBody(context, imageUri); twitter.updateProfileBannerImage(fileBody); } finally { <BUG>Utils.closeSilently(fileBody); if (deleteImage && "file".equals(imageUri.getScheme())) { final File file = new File(imageUri.getPath()); if (!file.delete()) { Log.w(LOGTAG, String.form...
if (deleteImage) { Utils.deleteMedia(context, imageUri);
24,989
FileBody fileBody = null; try { fileBody = getFileBody(context, imageUri); twitter.updateProfileBackgroundImage(fileBody, tile); } finally { <BUG>Utils.closeSilently(fileBody); if (deleteImage && "file".equals(imageUri.getScheme())) { final File file = new File(imageUri.getPath()); if (!file.delete()) { Log.w(LOGTAG, S...
twitter.updateProfileBannerImage(fileBody); if (deleteImage) { Utils.deleteMedia(context, imageUri);
24,990
FileBody fileBody = null; try { fileBody = getFileBody(context, imageUri); return twitter.updateProfileImage(fileBody); } finally { <BUG>Utils.closeSilently(fileBody); if (deleteImage && "file".equals(imageUri.getScheme())) { final File file = new File(imageUri.getPath()); if (!file.delete()) { Log.w(LOGTAG, String.for...
twitter.updateProfileBannerImage(fileBody); if (deleteImage) { Utils.deleteMedia(context, imageUri);
24,991
import de.vanita5.twittnuker.annotation.CustomTabType; import de.vanita5.twittnuker.library.MicroBlog; import de.vanita5.twittnuker.library.MicroBlogException; import de.vanita5.twittnuker.library.twitter.model.RateLimitStatus; import de.vanita5.twittnuker.library.twitter.model.Status; <BUG>import de.vanita5.twittnuker...
import org.mariotaku.pickncrop.library.PNCUtils; import org.mariotaku.sqliteqb.library.AllColumns;
24,992
context.getApplicationContext().sendBroadcast(intent); } } @Nullable public static Location getCachedLocation(Context context) { <BUG>if (BuildConfig.DEBUG) { Log.v(LOGTAG, "Fetching cached location", new Exception()); }</BUG> Location location = null;
DebugLog.v(LOGTAG, "Fetching cached location", new Exception());
24,993
import java.util.List; import java.util.Map.Entry; import javax.inject.Singleton; import okhttp3.Dns; @Singleton <BUG>public class TwidereDns implements Constants, Dns { </BUG> private static final String RESOLVER_LOGTAG = "TwittnukerDns"; private final SharedPreferences mHostMapping; private final SharedPreferencesWra...
public class TwidereDns implements Dns, Constants {
24,994
for (Location location : twitter.getAvailableTrends()) { map.put(location); } return map.pack(); } catch (final MicroBlogException e) { <BUG>if (BuildConfig.DEBUG) { Log.w(LOGTAG, e); }</BUG> }
DebugLog.w(LOGTAG, null, e);
24,995
} else { updateMemo(); callback.updateMemo(); } dismiss(); <BUG>}else{ </BUG> Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show(); } }
[DELETED]
24,996
} @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_memo); <BUG>ChinaPhoneHelper.setStatusBar(this,true); </BUG> topicId = getIntent().getLongExtra("topicId", -1); if (topicId == -1) { finish();
ChinaPhoneHelper.setStatusBar(this, true);
24,997
MemoEntry.COLUMN_REF_TOPIC__ID + " = ?" , new String[]{String.valueOf(topicId)}); } public Cursor selectMemo(long topicId) { Cursor c = db.query(MemoEntry.TABLE_NAME, null, MemoEntry.COLUMN_REF_TOPIC__ID + " = ?", new String[]{String.valueOf(topicId)}, null, null, <BUG>MemoEntry._ID + " DESC", null); </BUG> if (c != nu...
MemoEntry.COLUMN_ORDER + " ASC", null);
24,998
MemoEntry._ID + " = ?", new String[]{String.valueOf(memoId)}); } public long updateMemoContent(long memoId, String memoContent) { ContentValues values = new ContentValues(); <BUG>values.put(MemoEntry.COLUMN_CONTENT, memoContent); return db.update(</BUG> MemoEntry.TABLE_NAME, values, MemoEntry._ID + " = ?",
return db.update(
24,999
import android.widget.RelativeLayout; import android.widget.TextView; import com.kiminonawa.mydiary.R; import com.kiminonawa.mydiary.db.DBManager; import com.kiminonawa.mydiary.shared.EditMode; <BUG>import com.kiminonawa.mydiary.shared.ThemeManager; import java.util.List; public class MemoAdapter extends RecyclerView.A...
import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter; public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
25,000
private DBManager dbManager; private boolean isEditMode = false; private EditMemoDialogFragment.MemoCallback callback; private static final int TYPE_HEADER = 0; private static final int TYPE_ITEM = 1; <BUG>public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMe...
public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) { super(recyclerView); this.mActivity = activity;