id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
37,301 | public class UserControllerTest
{
private static final Logger LOGGER = Logger.getLogger( UserControllerTest.class.getName() );
Properties properties = new Properties();
InputStream input = null;
<BUG>private String neo4jServerPort = System.getProperty( "neo4j.server.port" );
private String neo4jRemoteShellPort = System... | private String dbmsConnectorHttpPort = System.getProperty( "dbms.connector.http.port" );
private String dbmsConnectorBoltPort = System.getProperty( "dbms.connector.bolt.port" );
private String dbmsShellPort = System.getProperty( "dbms.shell.port" );
private String dbmsDirectoriesData = System.getProperty( "dbms.directo... |
37,302 | public class DefaultDaemonStarter implements DaemonStarter {
private static final Logger LOGGER = Logging.getLogger(DefaultDaemonStarter.class);
private final DaemonDir daemonDir;
private final DaemonParameters daemonParameters;
private final DaemonGreeter daemonGreeter;
<BUG>private final DaemonStartListener listener;... | private final JvmVersionValidator versionValidator;
public DefaultDaemonStarter(DaemonDir daemonDir, DaemonParameters daemonParameters, DaemonGreeter daemonGreeter, DaemonStartListener listener, JvmVersionValidator versionValidator) {
|
37,303 | bootstrapClasspath.addAll(registry.getFullClasspath());
}
if (bootstrapClasspath.isEmpty()) {
throw new IllegalStateException("Unable to construct a bootstrap classpath when starting the daemon");
}
<BUG>new JvmVersionValidator().validate(daemonParameters);
List<String> daemonArgs = new ArrayList<String>();
daemonArgs.... | versionValidator.validate(daemonParameters);
daemonArgs.add(daemonParameters.getEffectiveJavaExecutable().getAbsolutePath());
|
37,304 | package org.gradle.process.internal;
import net.rubygrapefruit.platform.ProcessLauncher;
import org.gradle.api.logging.Logger;
<BUG>import org.gradle.api.logging.Logging;
import org.gradle.process.internal.streams.StreamsHandler;</BUG>
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantL... | import org.gradle.internal.concurrent.ExecutorFactory;
import org.gradle.process.internal.streams.StreamsHandler;
|
37,305 | private final String command;
private final List<String> arguments;
private final Map<String, String> environment;
private final StreamsHandler streamsHandler;
private final boolean redirectErrorStream;
<BUG>private final ProcessLauncher processLauncher;
private int timeoutMillis;</BUG>
private boolean daemon;
private ... | private final DefaultExecutorFactory executorFactory = new DefaultExecutorFactory();
private int timeoutMillis;
|
37,306 | this.timeoutMillis = timeoutMillis;
this.daemon = daemon;
this.lock = new ReentrantLock();
this.condition = lock.newCondition();
this.state = ExecHandleState.INIT;
<BUG>executor = new DefaultExecutorFactory().create(String.format("Run %s", displayName));
processLauncher = NativeServices.getInstance().get(ProcessLaunche... | executor = executorFactory.create(String.format("Run %s", displayName));
processLauncher = NativeServices.getInstance().get(ProcessLauncher.class);
|
37,307 | import org.gradle.launcher.daemon.server.Daemon;
import org.gradle.launcher.daemon.server.DaemonServices;
import org.gradle.logging.LoggingManagerInternal;
import org.gradle.logging.LoggingServiceRegistry;
import org.gradle.messaging.remote.Address;
<BUG>import java.io.ByteArrayInputStream;
import java.io.File;
import... | import org.gradle.process.internal.child.EncodedStream;
import java.io.*;
|
37,308 | package org.gradle.launcher.daemon.bootstrap;
import org.gradle.api.logging.Logger;
import org.gradle.api.logging.Logging;
<BUG>import org.gradle.internal.concurrent.DefaultExecutorFactory;
import org.gradle.internal.concurrent.StoppableExecutor;
import org.gradle.process.internal.streams.StreamsHandler;
import java.io... | import org.gradle.internal.concurrent.ExecutorFactory;
import org.gradle.process.internal.streams.ExecOutputHandleRunner;
import java.io.IOException;
import java.io.InputStream;
|
37,309 | private final DaemonParameters daemonParameters;
public DaemonClientServices(ServiceRegistry parent, DaemonParameters daemonParameters, InputStream buildStandardInput) {
super(parent, buildStandardInput);
this.daemonParameters = daemonParameters;
addProvider(new DaemonRegistryServices(daemonParameters.getBaseDir()));
<... | JvmVersionValidator createJvmVersionValidator() {
return new JvmVersionValidator();
DaemonStarter createDaemonStarter(DaemonDir daemonDir, DaemonParameters daemonParameters, ListenerManager listenerManager, DaemonGreeter daemonGreeter, JvmVersionValidator jvmVersionValidator) {
return new DefaultDaemonStarter(daemonDir... |
37,310 | package org.gradle.process.internal.streams;
<BUG>import org.gradle.internal.concurrent.DefaultExecutorFactory;
import org.gradle.internal.concurrent.StoppableExecutor;</BUG>
import org.gradle.util.DisconnectableInputStream;
import java.io.IOException;
import java.io.InputStream;
| import org.gradle.internal.concurrent.ExecutorFactory;
import org.gradle.internal.concurrent.StoppableExecutor;
|
37,311 | this.standardOutput = standardOutput;
this.errorOutput = errorOutput;
this.input = input;
this.readErrorStream = readErrorStream;
}
<BUG>public void connectStreams(Process process, String processName) {
</BUG>
InputStream instr = new DisconnectableInputStream(input);
standardOutputRunner = new ExecOutputHandleRunner("r... | public void connectStreams(Process process, String processName, ExecutorFactory executorFactory) {
|
37,312 | process.getInputStream(), standardOutput);
errorOutputRunner = new ExecOutputHandleRunner("read error output of: " + processName, process.getErrorStream(),
errorOutput);
standardInputRunner = new ExecOutputHandleRunner("write standard input into: " + processName,
instr, process.getOutputStream());
<BUG>this.executor = ... | this.executor = executorFactory.create(String.format("Forward streams with process: %s", processName));
}
|
37,313 | 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 ... | import java.text.DateFormat;
import java.util.Date;
import java.util.List;
|
37,314 | 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;
|
37,315 | 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"),
MIS... | APPLIES_TO_VERSION("applies-to-version"),
BUNDLES("bundles"),
|
37,316 | 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_VE... | [DELETED] |
37,317 | 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, bytesToHex... | if (item.isDirectory()) {
writer.writeAttribute(Attribute.DIRECTORY.name, "true");
if(type != ModificationType.REMOVE) {
|
37,318 | 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>
impor... | import org.jboss.logging.annotations.Cause;
import java.io.IOException;
|
37,319 | package org.camunda.bpm.extension.example.reactor;
<BUG>import org.camunda.bpm.engine.delegate.DelegateTask;
import org.camunda.bpm.engine.delegate.TaskListener;</BUG>
import org.camunda.bpm.engine.runtime.ProcessInstance;
import org.camunda.bpm.engine.task.Task;
import org.camunda.bpm.engine.test.Deployment;
| [DELETED] |
37,320 | import org.camunda.bpm.extension.reactor.bus.CamundaSelector;
import org.camunda.bpm.extension.reactor.listener.SubscriberTaskListener;</BUG>
import reactor.bus.EventBus;
@CamundaSelector(type = "userTask", event = TaskListener.EVENTNAME_CREATE)
<BUG>public class TaskCreateListener extends SubscriberTaskListener {
pub... | public class TaskCreateListener implements TaskListener {
public TaskCreateListener(CamundaEventBus eventBus) {
eventBus.register(this);
}
|
37,321 | package org.camunda.bpm.extension.example.reactor;
import org.camunda.bpm.engine.ProcessEngineConfiguration;
import org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration;
<BUG>import org.camunda.bpm.extension.reactor.CamundaReactor;
import org.camunda.bpm.extension.reactor.plugin.ReactorProcessEngin... | import org.camunda.bpm.extension.reactor.bus.CamundaEventBus;
import org.camunda.bpm.extension.reactor.plugin.ReactorProcessEnginePlugin;
|
37,322 | </BUG>
this.jobExecutorActivate = false;
}
};
<BUG>private final EventBus eventBus = CamundaReactor.eventBus();
</BUG>
public void init() {
new TaskCreateListener(eventBus);
new TaskAssignListener();
}
| public static final String GROUP_2 = "group2";
public static final String GROUP_3 = "group3";
public static ProcessEngineConfiguration CONFIGURATION = new StandaloneInMemProcessEngineConfiguration() {
this.databaseSchemaUpdate = DB_SCHEMA_UPDATE_TRUE;
this.getProcessEnginePlugins().add(CamundaReactor.plugin());
private... |
37,323 | import net.minecraftforge.fml.common.FMLCommonHandler;
public class Teleport
{
public static boolean teleportEntity(Entity entity, int destinationDimension, ITeleporter teleporter, BlockPos dest)
{
<BUG>return teleportEntity(entity, destinationDimension, teleporter, dest.getX(), dest.getY(), dest.getZ());
</BUG>
}
publ... | return teleportEntity(entity, destinationDimension, teleporter, dest.getX() + 0.5, dest.getY(), dest.getZ() + 0.5);
|
37,324 | public static boolean teleportEntity(Entity entity, int destinationDimension, ITeleporter teleporter)
{
return teleportEntity(entity, destinationDimension, teleporter, entity.posX, entity.posY, entity.posZ);
}
public static boolean teleportEntity(Entity entity, int destinationDimension, ITeleporter teleporter, double x... | if(destinationDimension == entity.dimension)
return localTeleport(entity, teleporter, x, y, z);
if(entity.worldObj.isRemote)
throw new IllegalArgumentException("Shouldn't do teleporting with a clientside entity.");
if(!ForgeHooks.onTravelToDimension(entity, destinationDimension))
|
37,325 | player.setWorld(worldDest);
playerList.preparePlayer(player, worldFrom);
player.connection.setPlayerLocation(player.posX, player.posY, player.posZ, player.rotationYaw, player.rotationPitch);
player.interactionManager.setWorld(worldDest);
player.connection.sendPacket(new SPacketPlayerAbilities(player.capabilities));
<BU... | playerList.updateTimeAndWeatherForPlayer(player, worldDest);
playerList.syncPlayerInventory(player);
|
37,326 | player.connection.sendPacket(new SPacketEntityEffect(player.getEntityId(), potioneffect));
}
FMLCommonHandler.instance().firePlayerChangedDimensionEvent(player, prevDimension, destinationDimension);
return true;
}
<BUG>else if (!entity.worldObj.isRemote && !entity.isDead)
{</BUG>
Entity newEntity = EntityList.createEnt... | else if (!entity.isDead)
{
|
37,327 | import java.util.Map;
import javax.ejb.Local;
import javax.inject.Inject;
import javax.naming.ConfigurationException;
import org.apache.log4j.Logger;
<BUG>import com.cloud.agent.AgentManager;
import com.cloud.agent.api.FenceAnswer;</BUG>
import com.cloud.agent.api.FenceCommand;
import com.cloud.exception.AgentUnavailab... | import com.cloud.alert.AlertManager;
import com.cloud.agent.api.FenceAnswer;
|
37,328 | private static final Logger s_logger = Logger.getLogger(KVMFencer.class);
@Inject
HostDao _hostDao;
@Inject
AgentManager _agentMgr;
<BUG>@Inject
ResourceManager _resourceMgr;</BUG>
@Override
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
return true;
| AlertManager _alertMgr;
ResourceManager _resourceMgr;
|
37,329 | import org.junit.runner.RunWith;
import org.mockito.Matchers;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.runners.MockitoJUnitRunner;
<BUG>import com.cloud.agent.AgentManager;
import com.cloud.agent.api.FenceAnswer;</BUG>
import com.cloud.agent.api.FenceCommand;
import com.cloud.exception.Ag... | import com.cloud.alert.AlertManager;
import com.cloud.agent.api.FenceAnswer;
|
37,330 | public class KVMFencerTest {
@Mock
HostDao hostDao;
@Mock
AgentManager agentManager;
<BUG>@Mock
ResourceManager resourceManager;</BUG>
KVMFencer fencer;
@Before
public void setup() {
| AlertManager alertMgr;
ResourceManager resourceManager;
|
37,331 | }
@Test
public void testWithSingleHost() {
HostVO host = Mockito.mock(HostVO.class);
Mockito.when(host.getClusterId()).thenReturn(1l);
<BUG>Mockito.when(host.getHypervisorType()).thenReturn(HypervisorType.KVM);
Mockito.when(host.getStatus()).thenReturn(Status.Up);</BUG>
Mockito.when(host.getId()).thenReturn(1l);
Virtua... | Mockito.when(host.getDataCenterId()).thenReturn(1l);
Mockito.when(host.getPodId()).thenReturn(1l);
Mockito.when(host.getStatus()).thenReturn(Status.Up);
|
37,332 | }
@Test
public void testWithSingleHostDown() {
HostVO host = Mockito.mock(HostVO.class);
Mockito.when(host.getClusterId()).thenReturn(1l);
<BUG>Mockito.when(host.getHypervisorType()).thenReturn(HypervisorType.KVM);
Mockito.when(host.getStatus()).thenReturn(Status.Down);</BUG>
Mockito.when(host.getId()).thenReturn(1l);
... | public void testWithSingleHost() {
Mockito.when(host.getDataCenterId()).thenReturn(1l);
Mockito.when(host.getPodId()).thenReturn(1l);
Mockito.when(host.getStatus()).thenReturn(Status.Up);
|
37,333 | public void testWithSingleNotKVM() {
HostVO host = Mockito.mock(HostVO.class);
Mockito.when(host.getClusterId()).thenReturn(1l);
Mockito.when(host.getHypervisorType()).thenReturn(HypervisorType.Any);
Mockito.when(host.getStatus()).thenReturn(Status.Down);
<BUG>Mockito.when(host.getId()).thenReturn(1l);
VirtualMachine v... | Mockito.when(host.getDataCenterId()).thenReturn(1l);
Mockito.when(host.getPodId()).thenReturn(1l);
VirtualMachine virtualMachine = Mockito.mock(VirtualMachine.class);
|
37,334 | import static net.bull.javamelody.HttpParameters.GRAPH_PART;
import static net.bull.javamelody.HttpParameters.HEIGHT_PARAMETER;
import static net.bull.javamelody.HttpParameters.JMX_VALUE;
import static net.bull.javamelody.HttpParameters.JNDI_PART;
import static net.bull.javamelody.HttpParameters.JNLP_PART;
<BUG>import ... | import static net.bull.javamelody.HttpParameters.JVM_PART;
import static net.bull.javamelody.HttpParameters.LAST_VALUE_PART;
|
37,335 | import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.replay;
import static org.easymock.EasyMock.verify;
import static org.junit.Assert.assertTrue;
import java.io.IOException;
<BUG>import java.io.StringWriter;
import java.util.List;</BUG>
import javax.naming.Binding;
import javax.naming.Conte... | import java.util.Arrays;
import java.util.List;
|
37,336 | expect(context.listBindings(JNDI_PREFIX + contextPath)).andReturn(enumeration)
.anyTimes();
expect(context.listBindings(JNDI_PREFIX + contextPath + '/')).andReturn(enumeration)
.anyTimes();
}
<BUG>expect(enumeration.hasMore()).andReturn(true).times(6);
expect(enumeration.next()).andReturn(new Binding("test value", "te... | expect(enumeration.hasMore()).andReturn(true).times(7);
expect(enumeration.next()).andReturn(
new Binding("test value collection", Arrays.asList("test collection",
"test collection"))).once();
expect(enumeration.next()).andReturn(
|
37,337 | new Binding("java:/test context", createNiceMock(Context.class))).once();
expect(enumeration.next()).andReturn(new Binding("test null classname", null, null)).once();
expect(enumeration.next()).andThrow(new NamingException("test")).once();
replay(context);
replay(enumeration);
<BUG>final List<JndiBinding> bindings = Jn... | for (final JndiBinding binding : bindings) {
binding.toString();
}
final HtmlJndiTreeReport htmlJndiTreeReport = new HtmlJndiTreeReport(bindings, contextPath,
|
37,338 | return ThriftUtilities.rowResultFromHBase(result.getRowResult());
}
byte[][] columnArr = columns.toArray(new byte[columns.size()][]);
Get get = new Get(row);
for(byte [] column : columnArr) {
<BUG>byte [][] famAndQf = KeyValue.parseColumn(column);
get.addColumn(famAndQf[0], famAndQf[1]);
}</BUG>
get.setTimeRange(Long.M... | if (famAndQf[1] == null || famAndQf[1].length == 0) {
get.addFamily(famAndQf[0]);
} else {
|
37,339 | int roomLeft = roomLeftFirstLevel.incrementAndGet();
}
assert !firstLevelCache.containsKey(cached);</BUG>
if (roomLeftSecondLevel.decrementAndGet() <= 0) {
<BUG>K toRemove = secondLevelQueue.peek();
assert toRemove != null;
if (transitionalCache.putIfAbsent(toRemove, toRemove) == null) {
if (secondLevelQueue.remove(... | if (alreadyPromoted != null) {
boolean removed = transitionalCache.remove(cached, toCache);
assert removed;
return alreadyPromoted;
|
37,340 | 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);
|
37,341 | 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);
|
37,342 | 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() {
|
37,343 | </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() {
|
37,344 | });
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);
|
37,345 | 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);
|
37,346 | 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);
|
37,347 | private void addBuffer() {
try {
if (!isClosed && bufferQueue.size() <= BUFFER_QUEUE_SIZE)
bufferQueue.put(new byte[size]);
} catch (InterruptedException e) {
<BUG>LOGGER.log(LogLevel.INFO, "Unable to add buffer to buffer queue", e);
}</BUG>
}
}
public AsyncBufferWriter(OutputStream outputStream, int size, ThreadFactor... | LOGGER.log(LogLevel.INFO, Messages.getString("HDFS_ASYNC_UNABLE_ADD_TO_QUEUE"), e);
|
37,348 | isClosed = true;
exService.shutdown();
try {
exService.awaitTermination(Integer.MAX_VALUE, TimeUnit.SECONDS);
} catch (InterruptedException e) {
<BUG>LOGGER.log(LogLevel.WARN, "Execution Service shutdown is interrupted.", e);
}finally {</BUG>
flushNow();
out.close();
bufferQueue.clear();
| LOGGER.log(LogLevel.WARN, Messages.getString("HDFS_ASYNC_SERVICE_SHUTDOWN_INTERRUPTED"), e);
}finally {
|
37,349 | e.printStackTrace();
}
filePlayback=null;
}
@Override
<BUG>public void stop() { if ( filePlayback!=null ) filePlayback.stop(); }
void initFiles() throws FileNotFoundException {</BUG>
if ((dataDir.length() != 0) && !dataDir.endsWith("/")) { dataDir = dataDir + "/"; } // guard path if needed
String samples_str = dataDir ... | @Override public boolean isrunning(){ if ( filePlayback!=null ) return filePlayback.isrunning(); return false; }
void initFiles() throws FileNotFoundException {
|
37,350 | public class BufferMonitor extends Thread implements FieldtripBufferMonitor {
public static final String TAG = BufferMonitor.class.toString();
private final Context context;
private final SparseArray<BufferConnectionInfo> clients = new SparseArray<BufferConnectionInfo>();
private final BufferInfo info;
<BUG>private fin... | [DELETED] |
37,351 | public static final String CLIENT_INFO_TIME = "c_time";
public static final String CLIENT_INFO_WAITTIMEOUT = "c_waitTimeout";
public static final String CLIENT_INFO_CONNECTED = "c_connected";
public static final String CLIENT_INFO_CHANGED = "c_changed";
public static final String CLIENT_INFO_DIFF = "c_diff";
<BUG>publi... | public static final int THREAD_INFO_TYPE = 0;
|
37,352 | package nl.dcc.buffer_bci.bufferclientsservice;
import android.os.Parcel;
import android.os.Parcelable;
<BUG>import nl.dcc.buffer_bci.bufferservicecontroller.C;
public class ThreadInfo implements Parcelable {</BUG>
public static final Creator<ThreadInfo> CREATOR = new Creator<ThreadInfo>() {
@Override
public ThreadInfo... | import nl.dcc.buffer_bci.C;
public class ThreadInfo implements Parcelable {
|
37,353 | public void do_call_compiler(Configuration cfg, String... options) {
CCompilerContext ctx = new CCompilerContextArduino(this);
processDebug(cfg);
ctx.setCurrentConfiguration(cfg);
this.checker.do_check(cfg);
<BUG>this.checker.printErrors();
this.checker.printWarnings();
this.checker.printNotices();</BUG>
for (Thing th... | this.checker.printReport();
|
37,354 | return "Generates plain Java code.";
}
@Override
public void do_call_compiler(Configuration cfg, String... options) {
this.checker.do_check(cfg);
<BUG>this.checker.printErrors();
this.checker.printWarnings();
this.checker.printNotices();</BUG>
Context ctx = new Context(this, "match", "requires", "type", "abstract", "d... | this.checker.printReport();
|
37,355 | return "Generates UML diagrams in PlantUML";
}
@Override
public void do_call_compiler(final Configuration cfg, String... options) {
this.checker.do_check(cfg);
<BUG>this.checker.printErrors();
this.checker.printWarnings();
this.checker.printNotices();</BUG>
new File(ctx.getOutputDirectory() + "/" + cfg.getName()).mkdi... | this.checker.printReport();
|
37,356 | public void do_call_compiler(Configuration cfg, String... options) {
CCompilerContext ctx = new CCompilerContextPosix(this);
processDebug(cfg);
ctx.setCurrentConfiguration(cfg);
this.checker.do_check(cfg);
<BUG>this.checker.printErrors();
this.checker.printWarnings();
this.checker.printNotices();</BUG>
for (Thing thin... | this.checker.printReport();
|
37,357 | public void do_call_compiler(Configuration cfg, String... options) {
CCompilerContext ctx = new PosixMTCompilerContext(this);
processDebug(cfg);
ctx.setCurrentConfiguration(cfg);
this.checker.do_check(cfg);
<BUG>this.checker.printErrors();
this.checker.printWarnings();
this.checker.printNotices();</BUG>
for (Thing thi... | this.checker.printReport();
|
37,358 | package org.thingml.compilers.checker;
import org.eclipse.emf.ecore.EObject;
<BUG>import org.fusesource.jansi.Ansi;
import org.sintef.thingml.Configuration;</BUG>
import org.sintef.thingml.ThingMLElement;
import org.sintef.thingml.ThingMLModel;
import org.sintef.thingml.helpers.AnnotatedElementHelper;
| import org.fusesource.jansi.AnsiConsole;
import org.sintef.thingml.Configuration;
|
37,359 | checker.Errors.clear();
checker.Warnings.clear();
checker.Notices.clear();
ThingMLModel model = (ThingMLModel) resource.getContents().get(0);
checker.do_generic_check(model);
<BUG>checker.printErrors();
checker.printWarnings();</BUG>
if (resource.getErrors().isEmpty())
org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(r... | checker.printReport();
|
37,360 | return "Generates Javascript code for the NodeJS platform.";
}
@Override
public void do_call_compiler(Configuration cfg, String... options) {
this.checker.do_check(cfg);
<BUG>this.checker.printErrors();
this.checker.printWarnings();
this.checker.printNotices();</BUG>
ctx.addContextAnnotation("thisRef", "this.");
| this.checker.printReport();
|
37,361 | linkedAccount = model.getAccountWithType(BLinkedAccount.Type.FACEBOOK);
if (linkedAccount == null)
{
linkedAccount = new BLinkedAccount();
linkedAccount.setType(BLinkedAccount.Type.FACEBOOK);
<BUG>linkedAccount.setUser(model.getId());
</BUG>
DaoCore.createEntity(linkedAccount);
}
linkedAccount.setToken(token);
| linkedAccount.setBUserDaoId(model.getId());
|
37,362 | linkedAccount = model.getAccountWithType(BLinkedAccount.Type.TWITTER);
if (linkedAccount == null)
{
linkedAccount = new BLinkedAccount();
linkedAccount.setType(BLinkedAccount.Type.TWITTER);
<BUG>linkedAccount.setUser(model.getId());
</BUG>
DaoCore.createEntity(linkedAccount);
}
linkedAccount.setToken(token);
| linkedAccount.setBUserDaoId(model.getId());
|
37,363 | if (DEBUG) Timber.v("deleteThread");
final Deferred<Void, BError, Void> deferred = new DeferredObject<>();
BUser user = getNetworkAdapter().currentUserModel();
if (model.getTypeSafely() == BThreadEntity.Type.Private)
{
<BUG>List<BMessage> messages = DaoCore.fetchEntitiesWithProperty(BMessage.class, BMessageDao.Properti... | List<BMessage> messages = DaoCore.fetchEntitiesWithProperty(BMessage.class, BMessageDao.Properties.BThreadDaoId, model.getId());
|
37,364 | DatabaseReference threadUserRef = FirebasePaths.threadRef(entityId)
.child(BFirebaseDefines.Path.BUsersPath)
.child(getNetworkAdapter().currentUserModel().getEntityID())
.child(BDefines.Keys.BLeaved);
threadUserRef.setValue(true);
<BUG>List<BLinkData> list = DaoCore.fetchEntitiesWithProperty(BLinkData.class, BLinkDataD... | List<BLinkData> list = DaoCore.fetchEntitiesWithProperty(BLinkData.class, BLinkDataDao.Properties.BThreadDaoId, model.getId());
|
37,365 | messageDate = earliestMessage.getDate();
}
else messageDate = new Date();
List<BMessage> list ;
QueryBuilder<BMessage> qb = DaoCore.daoSession.queryBuilder(BMessage.class);
<BUG>qb.where(BMessageDao.Properties.OwnerThread.eq(model.getId()));
</BUG>
qb.where(BMessageDao.Properties.Date.isNotNull());
qb.where(BMessageDao... | qb.where(BMessageDao.Properties.BThreadDaoId.eq(model.getId()));
|
37,366 | List<BMessage> msgs = new ArrayList<BMessage>();
BMessageWrapper msg;
for (String key : ((Map<String, Object>) snapshot.getValue()).keySet())
{
msg = new BMessageWrapper(snapshot.child(key));
<BUG>msg.model.setBThreadOwner(BThreadWrapper.this.model);
DaoCore.updateEntity(msg.model);</BUG>
msgs.add(msg.model);
}
deferre... | msg.model.setBThread(BThreadWrapper.this.model);
DaoCore.updateEntity(msg.model);
|
37,367 | });
return deferred.promise();
}
public Promise<BMessage, BError, BMessage> send(){
if (DEBUG) Timber.v("send");
<BUG>if (model.getBThreadOwner() != null)
{</BUG>
return push();
}else
{
| if (model.getBThread() != null)
|
37,368 | if (thread.getTypeSafely() != BThread.Type.Public) {
if (values != null && values.containsKey(BDefines.Keys.BLeaved))
{
BLinkData data =
DaoCore.fetchEntityWithProperties(BLinkData.class,
<BUG>new Property[]{BLinkDataDao.Properties.ThreadID, BLinkDataDao.Properties.UserID}, thread.getId(), bUser.getId());
</BUG>
if (d... | new Property[]{BLinkDataDao.Properties.BThreadDaoId, BLinkDataDao.Properties.BUserDaoId}, thread.getId(), bUser.getId());
|
37,369 | public Promise<BMessage, BError, BMessage> sendMessage(final BMessage message){
if (DEBUG) Timber.v("sendMessage");
return new BMessageWrapper(message).send().done(new DoneCallback<BMessage>() {
@Override
public void onDone(BMessage message) {
<BUG>DatabaseReference threadRef = FirebasePaths.threadRef(message.getBThrea... | DatabaseReference threadRef = FirebasePaths.threadRef(message.getBThread().getEntityID()).child(BFirebaseDefines.Path.BDetailsPath);
threadRef.updateChildren(FirebasePaths.getMap(new String[]{Keys.BLastMessageAdded}, ServerValue.TIMESTAMP));
|
37,370 | if (sender != null && thread != null)
{
thread.setDeleted(false);
DaoCore.updateEntity(thread);
message.setBUserSender(sender);
<BUG>message.setBThreadOwner(thread);
message = DaoCore.createEntity(message);</BUG>
postMessageNotification(context, json, thread, message, true);
} else {
if (DEBUG) Timber.d("Entity is null... | message.setBThread(thread);
message = DaoCore.createEntity(message);
|
37,371 | if (!threadWrapper.getModel().hasUser(currentUser)) {
threadWrapper.addUser(BUserWrapper.initWithModel(currentUser));
DaoCore.connectUserAndThread(currentUser, threadWrapper.getModel());
DaoCore.connectUserAndThread(bUser, threadWrapper.getModel());
}
<BUG>finalMessage.setBThreadOwner(bThread);
postMessageNotification(... | finalMessage.setBThread(bThread);
postMessageNotification(context, json, bThread, DaoCore.createEntity(finalMessage), true);
|
37,372 | if (DEBUG) Timber.i("onMessageReceived");
for (Event e : events.values())
{
if (e == null)
continue;
<BUG>if (StringUtils.isNotEmpty(e.getEntityId()) && message.getBThreadOwner() != null
&& message.getBThreadOwner().getEntityID() != null
&& !message.getBThreadOwner().getEntityID().equals(e.getEntityId()))
continue;</BU... | if (StringUtils.isNotEmpty(e.getEntityId()) && message.getBThread() != null
&& message.getBThread().getEntityID() != null
&& !message.getBThread().getEntityID().equals(e.getEntityId()))
|
37,373 | JSONObject data = new JSONObject();
try {
data.put(BDefines.Keys.ACTION, ChatSDKReceiver.ACTION_MESSAGE);
data.put(BDefines.Keys.CONTENT, fullText);
data.put(BDefines.Keys.MESSAGE_ENTITY_ID, message.getEntityID());
<BUG>data.put(BDefines.Keys.THREAD_ENTITY_ID, message.getBThreadOwner().getEntityID());
data.put(BDefines... | data.put(BDefines.Keys.THREAD_ENTITY_ID, message.getBThread().getEntityID());
data.put(BDefines.Keys.MESSAGE_DATE, message.getDate().getTime());
|
37,374 | package jetbrains.mps.baseLanguage.javadoc.textGen;
import jetbrains.mps.textGen.SNodeTextGen;
<BUG>import org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations;</BUG>
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import jetbrains.mps.smodel.... | import jetbrains.mps.internal.collections.runtime.ListSequence;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations;
|
37,375 | textGen.indentBuffer();
textGen.append(" * ");
}
public static void docCommentStart(SNode node, final SNodeTextGen textGen) {
textGen.indentBuffer();
<BUG>textGen.append("/**");
textGen.appendNewLine();</BUG>
DocCommentTextGen.javadocIndent(textGen);
{
Iterable<SNode> collection = SLinkOperations.getChildren(node, Meta... | if (ListSequence.fromList(SLinkOperations.getChildren(node, MetaAdapterFactory.getContainmentLink(0xf280165065d5424eL, 0xbb1b463a8781b786L, 0x4a3c146b7fae70d3L, 0x757ba20a4c87f96eL, "body"))).isNotEmpty()) {
textGen.appendNewLine();
|
37,376 | Debug.checkNull("mysql_connection", this.mysql_connection);
return this.mysql_connection;
}
@Override
public String toString () {
<BUG>return "MySQLConnection[" + this.dataSource.getUrl() + " : " + this.dataSource.getURL() + "]";
}</BUG>
@Override
protected void finalize () throws Throwable {
super.finalize();
| return "MySQLConnection[" + this.mySQL.getUrl() + "]";
|
37,377 | package com.jfixby.cmns.adopted.gdx.log;
import com.badlogic.gdx.Application;
import com.badlogic.gdx.Gdx;
import com.jfixby.cmns.api.collections.EditableCollection;
<BUG>import com.jfixby.cmns.api.collections.Map;
import com.jfixby.cmns.api.log.LoggerComponent;</BUG>
import com.jfixby.cmns.api.util.JUtils;
public clas... | import com.jfixby.cmns.api.err.Err;
import com.jfixby.cmns.api.log.LoggerComponent;
|
37,378 | package com.jfixby.red.collections;
<BUG>import com.jfixby.cmns.api.java.IntValue;
import com.jfixby.cmns.api.math.FloatMath;</BUG>
public class RedHistogrammValue {
private RedHistogramm master;
public RedHistogrammValue (RedHistogramm redHistogramm) {
| import com.jfixby.cmns.api.java.Int;
import com.jfixby.cmns.api.math.FloatMath;
|
37,379 | public static final String PackageName = "app.version.package_name";
}
public static final String VERSION_FILE_NAME = "version.json";
private static final long serialVersionUID = 6662721574596241247L;
public String packageName;
<BUG>public int major = -1;
public int minor = -1;
public VERSION_STAGE stage = null;
publ... | public String major = "";
public String minor = "";
public String build = "";
|
37,380 | <BUG>package com.jfixby.cmns.db.mysql;
import com.jfixby.cmns.api.debug.Debug;</BUG>
import com.jfixby.cmns.api.log.L;
import com.jfixby.cmns.db.api.DBComponent;
import com.mysql.jdbc.jdbc2.optional.MysqlDataSource;
| import java.sql.Connection;
import java.sql.SQLException;
import com.jfixby.cmns.api.debug.Debug;
|
37,381 | }
public MySQLTable getTable (final String name) {
return new MySQLTable(this, name);
}
public MySQLConnection obtainConnection () {
<BUG>final MySQLConnection connection = new MySQLConnection(this.dataSource);
connection.open();</BUG>
return connection;
}
public void releaseConnection (final MySQLConnection connection... | public String getDBName () {
return this.dbName;
final MySQLConnection connection = new MySQLConnection(this);
connection.open();
|
37,382 | msg.getStringProperty(HttpConnector.HTTP_GET_BODY_PARAM_PROPERTY, PropertyScope.OUTBOUND,
HttpConnector.DEFAULT_HTTP_GET_BODY_PARAM_PROPERTY);
}
String paramName = URLEncoder.encode(getBodyParam, outputEncoding);
String paramValue;
<BUG>Boolean encode = msg.getProperty(HttpConnector.HTTP_ENCODE_PARAMVALUE, PropertySco... | Boolean encode = msg.getInvocationProperty(HttpConnector.HTTP_ENCODE_PARAMVALUE);
|
37,383 | resultEvent = service.getComponent().process(event);
resultEvent = processNext(resultEvent);
resultEvent = receiveAsyncReplyMessageProcessor.process(resultEvent);
if (resultEvent != null)
{
<BUG>String replyToStop = (String) resultEvent.getMessage().getProperty(MuleProperties.MULE_REPLY_TO_STOP_PROPERTY, PropertyScope.... | String replyToStop = resultEvent.getMessage().getInvocationProperty(MuleProperties.MULE_REPLY_TO_STOP_PROPERTY);
|
37,384 | processVariables.put(ProcessConnector.PROCESS_VARIABLE_INCOMING_SOURCE,
originatingEndpoint);
}
}
}
<BUG>Object processType = event.getMessage().getProperty(ProcessConnector.PROPERTY_PROCESS_TYPE, PropertyScope.INVOCATION);
</BUG>
processVariables.remove(ProcessConnector.PROPERTY_PROCESS_TYPE);
Object processId;
String... | Object processType = event.getMessage().getInvocationProperty(ProcessConnector.PROPERTY_PROCESS_TYPE);
|
37,385 | throw new DispatchException(
RmiMessages.messageParamServiceMethodNotSet(),
event.getMessage(), event.getEndpoint());
}
}
<BUG>Class[] argTypes = getArgTypes(event.getMessage().getProperty(RmiConnector.PROPERTY_SERVICE_METHOD_PARAM_TYPES, PropertyScope.INVOCATION), event);
</BUG>
try
{
return remoteObject.getClass().ge... | Class[] argTypes = getArgTypes(event.getMessage().getInvocationProperty(RmiConnector.PROPERTY_SERVICE_METHOD_PARAM_TYPES), event);
|
37,386 | message.setExceptionPayload(ep);
return message;
}
protected boolean returnException(MuleEvent event, HttpMethod httpMethod)
{
<BUG>String disableCheck = (String) event.getMessage().getProperty(HttpConnector.HTTP_DISABLE_STATUS_CODE_EXCEPTION_CHECK, PropertyScope.INVOCATION);
</BUG>
if (disableCheck == null)
{
disableC... | String disableCheck = event.getMessage().getInvocationProperty(HttpConnector.HTTP_DISABLE_STATUS_CODE_EXCEPTION_CHECK);
|
37,387 | jobDetail.setName(event.getEndpoint().getEndpointURI().getAddress() + "-" + event.getId());
JobDataMap jobDataMap = new JobDataMap();
MuleMessage msg = event.getMessage();
for (String key : msg.getPropertyNames(PropertyScope.INVOCATION))
{
<BUG>jobDataMap.put(key, msg.getProperty(key, PropertyScope.INVOCATION));
}</BUG... | jobDataMap.put(key, msg.getInvocationProperty(key));
}
|
37,388 | msg = (MuleMessage) result;
assertEquals("test", msg.getPayloadAsString());
assertEquals(new Apple(), msg.getProperty("object", PropertyScope.OUTBOUND));
assertEquals(new Apple(), msg.getProperty("oBjeCt", PropertyScope.OUTBOUND));
assertNull(msg.getProperty("oBjeCt", PropertyScope.INBOUND));
<BUG>assertNull(msg.getPro... | assertNull(msg.getInvocationProperty("oBjeCt"));
assertNull(msg.getProperty("oBjeCt", PropertyScope.SESSION));
|
37,389 | } else {
updateMemo();
callback.updateMemo();
}
dismiss();
<BUG>}else{
</BUG>
Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show();
}
}
| [DELETED] |
37,390 | }
@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);
|
37,391 | 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);
|
37,392 | 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(
|
37,393 | 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 {
|
37,394 | 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;
|
37,395 | this.memoList = memoList;
this.dbManager = dbManager;
this.callback = callback;
}
@Override
<BUG>public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
</BUG>
View view;
if (isEditMode) {
if (viewType == TYPE_HEADER) {
| public DragSortAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
37,396 | editMemoDialogFragment.show(mActivity.getSupportFragmentManager(), "editMemoDialogFragment");
}
});
}
}
<BUG>protected class MemoViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
private View rootView;
private TextView TV_memo_item_content;</BUG>
private ImageView IV_memo_item_delete;
| protected class MemoViewHolder extends DragSortAdapter.ViewHolder implements View.OnClickListener, View.OnLongClickListener {
private ImageView IV_memo_item_dot;
private TextView TV_memo_item_content;
|
37,397 | package com.superbug.moi.cquptlife.app;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
<BUG>import android.view.Window;
import android.view.WindowManager;
public abstract class BaseActivity extends AppCompatActivity {</BUG>
@Override
protected void onCreate(Bundle sa... | import com.readystatesoftware.systembartint.SystemBarTintManager;
import com.superbug.moi.cquptlife.R;
public abstract class BaseActivity extends AppCompatActivity {
|
37,398 | package com.superbug.moi.cquptlife.ui.activity;
<BUG>import android.os.Build;
import android.os.Bundle;
import android.support.v7.widget.CardView;
import android.support.v7.widget.Toolbar;</BUG>
import android.view.KeyEvent;
| import android.support.design.widget.CoordinatorLayout;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
|
37,399 | import com.superbug.moi.cquptlife.util.Utils;
import com.superbug.moi.cquptlife.util.listener.OnAnimationEndListener;
import java.util.ArrayList;
import butterknife.ButterKnife;
import butterknife.InjectView;
<BUG>public class StudentActivity extends BaseActivity implements View.OnClickListener,
IStudentView {</BUG>
@... | public class StudentActivity extends BaseActivity implements View.OnClickListener, IStudentView {
|
37,400 | searchLayout.setVisibility(View.VISIBLE);
SearchAnimation.start(searchLayout, SearchAnimation.SEARCH_OPEN, null);
Utils.editShowSoftInput(search);
}
private void closeSearchLayout() {
<BUG>search.setText("");
SearchAnimation.start(searchLayout, SearchAnimation.SEARCH_CLOSE, new OnAnimationEndListener() {
@Override</BUG... | SearchAnimation
@Override
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.