id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
23,501 | 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);
|
23,502 | import android.content.Context;
import android.content.SharedPreferences;
import android.location.Location;
import android.os.AsyncTask;
import android.support.annotation.NonNull;
<BUG>import android.util.Log;
import org.mariotaku.twidere.BuildConfig;
import org.mariotaku.twidere.Constants;
import org.mariotaku.twidere... | import org.mariotaku.twidere.util.DebugLog;
import org.mariotaku.twidere.util.JsonSerializer;
|
23,503 | }
public static LatLng getCachedLatLng(@NonNull final Context context) {
final Context appContext = context.getApplicationContext();
final SharedPreferences prefs = DependencyHolder.Companion.get(context).getPreferences();
if (!prefs.getBoolean(KEY_USAGE_STATISTICS, false)) return null;
<BUG>if (BuildConfig.DEBUG) {
Lo... | DebugLog.d(HotMobiLogger.LOGTAG, "getting cached location", null);
|
23,504 | public int destroySavedSearchAsync(final UserKey accountKey, final long searchId) {
final DestroySavedSearchTask task = new DestroySavedSearchTask(accountKey, searchId);
return asyncTaskManager.add(task, true);
}
public int destroyStatusAsync(final UserKey accountKey, final String statusId) {
<BUG>final DestroyStatusTa... | final DestroyStatusTask task = new DestroyStatusTask(context, accountKey, statusId);
|
23,505 | @Override
public void afterExecute(Bus handler, SingleResponse<Relationship> result) {
if (result.hasData()) {
handler.post(new FriendshipUpdatedEvent(accountKey, userKey, result.getData()));
} else if (result.hasException()) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, "Unable to update friendship", result.getExcepti... | public UserKey[] getAccountKeys() {
return DataStoreUtils.getActivatedAccountKeys(context);
|
23,506 | MicroBlog microBlog = MicroBlogAPIFactory.getInstance(context, accountId);
if (!Utils.isOfficialCredentials(context, accountId)) continue;
try {
microBlog.setActivitiesAboutMeUnread(cursor);
} catch (MicroBlogException e) {
<BUG>if (BuildConfig.DEBUG) {
Log.w(LOGTAG, e);
}</BUG>
}
| DebugLog.w(LOGTAG, null, e);
|
23,507 | 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;
|
23,508 | 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();
|
23,509 | 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: " +
|
23,510 | 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;
|
23,511 | 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()... |
23,512 | 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;
|
23,513 | EditorCell_Collection result = jetbrains.mps.nodeEditor.cells.EditorCell_Collection.createIndent2(editorContext, node);
result.setBig(true);
result.getStyle().putAll(StyleRegistry.getInstance().getStyle("LINE_COMMENT"), 1);
result.addEditorCell(createCommentConstantCell(editorContext, node, true));
result.addEditorCell... | result.setCellId("main_comment_collection");
return result;
|
23,514 | }
private EditorCell_Constant createCommentConstantCell(jetbrains.mps.openapi.editor.EditorContext editorContext, SNode node, boolean left) {
EditorCell_Constant cell = new EditorCell_Constant(editorContext, node, left ? "/*" : "*/", false);
StyleImpl style = new StyleImpl();
style.set(left ? StyleAttributes.PUNCTUATIO... | cell.setCellId(left ? "left_comment_constant" : "right_comment_constant");
return cell;
|
23,515 | import org.jetbrains.annotations.NotNull;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
import jetbrains.mps.openapi.editor.EditorContext;
import jetbrains.mps.openapi.editor.selection.Selection;
import jetbrains.mps.openapi.editor.selection.SingularSelection;
<BUG>import jetbrains.mps.opena... | import jetbrains.mps.openapi.editor.cells.EditorCell_Label;
import jetbrains.mps.nodeEditor.cells.CellFinderUtil;
|
23,516 | import jetbrains.mps.editor.runtime.cells.AbstractCellAction;
import org.jetbrains.mps.openapi.model.SNode;
import org.jetbrains.annotations.NotNull;
import jetbrains.mps.openapi.editor.EditorContext;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
<BUG>import jetbrains.mps.openapi.editor.cell... | import jetbrains.mps.openapi.editor.cells.EditorCell_Label;
import jetbrains.mps.nodeEditor.cells.CellFinderUtil;
|
23,517 | package io.reactivex.netty.examples.http.secure;
<BUG>import io.netty.buffer.ByteBuf;
import io.reactivex.netty.examples.AbstractClientExample;
import io.reactivex.netty.examples.http.helloworld.HelloWorldServer;</BUG>
import io.reactivex.netty.protocol.http.client.HttpClient;
import io.reactivex.netty.protocol.http.cl... | import io.netty.handler.logging.LogLevel;
|
23,518 | import java.net.SocketAddress;
import java.nio.charset.Charset;
public class SecureHelloWorldClient extends AbstractClientExample {
public static void main(String[] args) {
SocketAddress serverAddress = getServerAddress(SecureHelloWorldServer.class, args);
<BUG>HttpClient.newClient(serverAddress)
.unsafeSecure()</BUG>
... | .enableWireLogging(LogLevel.DEBUG)
.unsafeSecure()
|
23,519 | package io.reactivex.netty.examples.http.sse;
<BUG>import io.netty.buffer.ByteBuf;
import io.reactivex.netty.examples.AbstractServerExample;</BUG>
import io.reactivex.netty.protocol.http.server.HttpServer;
import rx.Observable;
import java.util.concurrent.TimeUnit;
| import io.netty.handler.logging.LogLevel;
import io.reactivex.netty.examples.AbstractServerExample;
|
23,520 | package io.reactivex.netty.examples.http.secure;
<BUG>import io.netty.buffer.ByteBuf;
import io.reactivex.netty.examples.AbstractServerExample;</BUG>
import io.reactivex.netty.protocol.http.server.HttpServer;
import static rx.Observable.*;
public final class SecureHelloWorldServer extends AbstractServerExample {
| import io.netty.handler.logging.LogLevel;
import io.reactivex.netty.examples.AbstractServerExample;
|
23,521 | import io.reactivex.netty.protocol.http.server.HttpServer;
import static rx.Observable.*;
public final class SecureHelloWorldServer extends AbstractServerExample {
public static void main(final String[] args) {
HttpServer<ByteBuf, ByteBuf> server;
<BUG>server = HttpServer.newServer()
.unsafeSecure()</BUG>
.start((req, ... | .enableWireLogging(LogLevel.DEBUG)
.unsafeSecure()
|
23,522 | package io.reactivex.netty.examples.http.ws.echo;
import io.netty.handler.codec.http.websocketx.CloseWebSocketFrame;
import io.netty.handler.codec.http.websocketx.TextWebSocketFrame;
<BUG>import io.netty.handler.codec.http.websocketx.WebSocketFrame;
import io.reactivex.netty.examples.AbstractClientExample;</BUG>
import... | import io.netty.handler.logging.LogLevel;
import io.reactivex.netty.examples.AbstractClientExample;
|
23,523 | import java.net.SocketAddress;
import java.nio.charset.Charset;
public class WebSocketEchoClient extends AbstractClientExample {
public static void main(String[] args) {
SocketAddress socketAddress = getServerAddress(WebSocketEchoServer.class, args);
<BUG>HttpClient.newClient(socketAddress)
.createGet("/ws")</BUG>
.req... | .enableWireLogging(LogLevel.DEBUG)
.createGet("/ws")
|
23,524 | package io.reactivex.netty.examples.http.proxy;
<BUG>import io.netty.buffer.ByteBuf;
import io.reactivex.netty.examples.AbstractServerExample;</BUG>
import io.reactivex.netty.protocol.http.client.HttpClient;
import io.reactivex.netty.protocol.http.client.HttpClientRequest;
import io.reactivex.netty.protocol.http.server... | import io.netty.handler.logging.LogLevel;
import io.reactivex.netty.examples.AbstractServerExample;
|
23,525 | public final class ProxyServer extends AbstractServerExample {
public static void main(final String[] args) {
int targetServerPort = startTargetServer();
final HttpClient<ByteBuf, ByteBuf> targetClient = HttpClient.newClient("127.0.0.1", targetServerPort);
HttpServer<ByteBuf, ByteBuf> server;
<BUG>server = HttpServer.n... | .enableWireLogging(LogLevel.DEBUG)
.start((serverReq, serverResp) -> {
|
23,526 | package io.reactivex.netty.examples.http.loadbalancing;
import io.netty.buffer.ByteBuf;
<BUG>import io.netty.handler.codec.http.HttpResponseStatus;
import io.reactivex.netty.client.ConnectionProvider;</BUG>
import io.reactivex.netty.examples.AbstractClientExample;
import io.reactivex.netty.examples.tcp.loadbalancing.Ro... | import io.netty.handler.logging.LogLevel;
import io.reactivex.netty.client.ConnectionProvider;
|
23,527 | import static io.netty.handler.codec.http.HttpResponseStatus.*;
public final class HttpLoadBalancingClient extends AbstractClientExample {
public static void main(String[] args) {
final Observable<SocketAddress> hosts = Observable.just(startNewServer(OK), startNewServer(OK),
startNewServer(SERVICE_UNAVAILABLE));
<BUG>H... | .enableWireLogging(LogLevel.DEBUG)
.createGet("/hello")
|
23,528 | package io.reactivex.netty.examples.http.proxy;
<BUG>import io.netty.buffer.ByteBuf;
import io.reactivex.netty.examples.AbstractClientExample;</BUG>
import io.reactivex.netty.examples.http.helloworld.HelloWorldClient;
import io.reactivex.netty.protocol.http.client.HttpClient;
import io.reactivex.netty.protocol.http.cli... | import io.netty.handler.logging.LogLevel;
import io.reactivex.netty.examples.AbstractClientExample;
|
23,529 | import java.net.SocketAddress;
import java.nio.charset.Charset;
public class ProxyClient extends AbstractClientExample {
public static void main(String[] args) {
SocketAddress serverAddress = getServerAddress(ProxyServer.class, args);
<BUG>HttpClient.newClient(serverAddress)
.createGet("/hello")</BUG>
.doOnNext(resp ->... | .enableWireLogging(LogLevel.DEBUG)
.createGet("/hello")
|
23,530 | import io.reactivex.netty.protocol.http.client.HttpClientResponse;
import java.net.SocketAddress;
public final class HelloSseClient extends AbstractClientExample {
public static void main(String[] args) {
SocketAddress serverAddress = getServerAddress(HelloSseServer.class, args);
<BUG>HttpClient.newClient(serverAddress... | .enableWireLogging(LogLevel.DEBUG)
.createGet("/sse")
|
23,531 | package io.reactivex.netty.examples.http.perf;
import io.netty.buffer.ByteBuf;
<BUG>import io.netty.buffer.Unpooled;
import io.reactivex.netty.RxNetty;</BUG>
import io.reactivex.netty.examples.AbstractServerExample;
import io.reactivex.netty.examples.http.helloworld.HelloWorldServer;
import io.reactivex.netty.protocol.... | import io.netty.handler.logging.LogLevel;
import io.reactivex.netty.RxNetty;
|
23,532 | import io.reactivex.netty.examples.AbstractServerExample;
import io.reactivex.netty.examples.http.helloworld.HelloWorldServer;
import io.reactivex.netty.protocol.http.server.HttpServer;
import io.reactivex.netty.protocol.http.server.HttpServerResponse;
import rx.Observable;
<BUG>import static io.netty.handler.codec.htt... | import static io.netty.handler.codec.http.HttpHeaderNames.*;
|
23,533 | .doOnSubscribe(WELCOME_MSG_BUFFER::retain);
private static final String CONTENT_LENGTH_HEADER_VAL = String.valueOf(WELCOME_MSG_BUFFER.readableBytes());
public static void main(final String[] args) {
RxNetty.disableEventPublishing();
HttpServer<ByteBuf, ByteBuf> server;
<BUG>server = HttpServer.newServer()
.start((req, ... | .enableWireLogging(LogLevel.DEBUG)
.start((req, resp) ->
|
23,534 | package io.reactivex.netty.examples.http.helloworld;
<BUG>import io.netty.buffer.ByteBuf;
import io.reactivex.netty.examples.AbstractServerExample;</BUG>
import io.reactivex.netty.protocol.http.server.HttpServer;
import static rx.Observable.*;
public final class HelloWorldServer extends AbstractServerExample {
| import io.netty.handler.logging.LogLevel;
import io.reactivex.netty.examples.AbstractServerExample;
|
23,535 | import io.reactivex.netty.protocol.http.server.HttpServer;
import static rx.Observable.*;
public final class HelloWorldServer extends AbstractServerExample {
public static void main(final String[] args) {
HttpServer<ByteBuf, ByteBuf> server;
<BUG>server = HttpServer.newServer()
.start((req, resp) -></BUG>
resp.writeStr... | .enableWireLogging(LogLevel.DEBUG)
.start((req, resp) ->
|
23,536 | package io.reactivex.netty.examples.http.helloworld;
<BUG>import io.netty.buffer.ByteBuf;
import io.reactivex.netty.examples.AbstractClientExample;</BUG>
import io.reactivex.netty.protocol.http.client.HttpClient;
import io.reactivex.netty.protocol.http.client.HttpClientResponse;
import java.net.SocketAddress;
| import io.netty.handler.logging.LogLevel;
import io.reactivex.netty.examples.AbstractClientExample;
|
23,537 | import java.net.SocketAddress;
import java.nio.charset.Charset;
public class HelloWorldClient extends AbstractClientExample {
public static void main(String[] args) {
SocketAddress serverAddress = getServerAddress(HelloWorldServer.class, args);
<BUG>HttpClient.newClient(serverAddress)
.createGet("/hello")</BUG>
.doOnNe... | .enableWireLogging(LogLevel.DEBUG)
.createGet("/hello")
|
23,538 | package io.reactivex.netty.examples.http.streaming;
<BUG>import io.netty.buffer.ByteBuf;
import io.reactivex.netty.examples.AbstractClientExample;</BUG>
import io.reactivex.netty.protocol.http.client.HttpClient;
import io.reactivex.netty.protocol.http.client.HttpClientResponse;
import java.net.SocketAddress;
| import io.netty.handler.logging.LogLevel;
import io.reactivex.netty.examples.AbstractClientExample;
|
23,539 | import java.net.SocketAddress;
import java.nio.charset.Charset;
public class StreamingClient extends AbstractClientExample {
public static void main(String[] args) {
SocketAddress serverAddress = getServerAddress(StreamingServer.class, args);
<BUG>HttpClient.newClient(serverAddress)
.createGet("/stream")</BUG>
.doOnNex... | .enableWireLogging(LogLevel.DEBUG)
.createGet("/stream")
|
23,540 | package io.reactivex.netty.examples.http.streaming;
<BUG>import io.netty.buffer.ByteBuf;
import io.reactivex.netty.examples.AbstractServerExample;</BUG>
import io.reactivex.netty.protocol.http.server.HttpServer;
import rx.Observable;
import java.util.concurrent.TimeUnit;
| import io.netty.handler.logging.LogLevel;
import io.reactivex.netty.examples.AbstractServerExample;
|
23,541 | import rx.Observable;
import java.util.concurrent.TimeUnit;
public final class StreamingServer extends AbstractServerExample {
public static void main(final String[] args) {
HttpServer<ByteBuf, ByteBuf> server;
<BUG>server = HttpServer.newServer()
.start((req, resp) -></BUG>
resp.writeStringAndFlushOnEach(
Observable.i... | .enableWireLogging(LogLevel.DEBUG)
.start((req, resp) ->
|
23,542 | 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;
|
23,543 | 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;
|
23,544 | 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"),
|
23,545 | 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] |
23,546 | 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) {
|
23,547 | 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;
|
23,548 | @Override
protected Class<UndertowResponse> _impl() {
return UndertowResponse.class;
}
private HttpServerExchange hse;
<BUG>private ActionContext ctx;
private volatile OutputStream os;
private volatile Writer w;</BUG>
public UndertowResponse(HttpServerExchange exchange, AppConfig config) {
super(config);
| [DELETED] |
23,549 | if (responseStarted()) {
return;
}
locale = loc;
hse.getResponseHeaders().put(Headers.CONTENT_LANGUAGE, loc.getLanguage() + "-" + loc.getCountry());
<BUG>if (null != charset && null == w) {
}</BUG>
}
@Override
public Locale locale() {
| [DELETED] |
23,550 | package act.handler.builtin;
import act.app.ActionContext;
import act.handler.builtin.controller.FastRequestHandler;
import org.osgl.http.H;
<BUG>public class Redirect extends FastRequestHandler {
</BUG>
private String url;
public Redirect(String url) {
this.url = url;
| public class Redirect extends FastRequestHandler implements DirectIO {
|
23,551 | package act.handler.builtin;
import act.app.ActionContext;
import act.handler.builtin.controller.FastRequestHandler;
import org.osgl.mvc.result.BadRequest;
<BUG>public class AlwaysBadRequest extends FastRequestHandler {
</BUG>
public static AlwaysBadRequest INSTANCE = new AlwaysBadRequest();
@Override
public void handl... | public class AlwaysBadRequest extends FastRequestHandler implements DirectIO {
|
23,552 | package act.handler.builtin;
import act.app.ActionContext;
<BUG>import act.handler.builtin.controller.FastRequestHandler;
import org.osgl.http.H;
import org.osgl.util.S;
public class Echo extends FastRequestHandler {
private String msg;
</BUG>
private String contentType;
| import org.apache.commons.codec.Charsets;
import java.nio.ByteBuffer;
public class Echo extends FastRequestHandler implements DirectIO {
private ByteBuffer buffer;
private String toString;
|
23,553 | private String contentType;
public Echo(String msg) {
this(msg, H.Format.TXT.contentType());
}
public Echo(String msg, String contentType) {
<BUG>this.msg = msg;
this.contentType = contentType;
}</BUG>
@Override
public void handle(ActionContext context) {
| this.buffer = wrap(msg);
this.toString = "echo: " + msg;
|
23,554 | package act.handler.builtin;
import act.app.ActionContext;
import act.handler.builtin.controller.FastRequestHandler;
import org.osgl.mvc.result.NotImplemented;
<BUG>public class AlwaysNotImplemented extends FastRequestHandler {
</BUG>
public static AlwaysNotImplemented INSTANCE = new AlwaysNotImplemented();
@Override
p... | public class AlwaysNotImplemented extends FastRequestHandler implements DirectIO {
|
23,555 | import org.osgl.exception.UnexpectedIOException;
import org.osgl.http.H;
import org.osgl.util.E;
import java.io.ByteArrayOutputStream;
import java.io.OutputStream;
<BUG>import java.io.Writer;
import java.util.Locale;</BUG>
public class MockResponse extends H.Response<MockResponse> {
private String contentType;
private ... | import java.nio.ByteBuffer;
import java.util.Locale;
|
23,556 | this.encoding = encoding;
return this;
}
@Override
public MockResponse contentLength(long len) {
<BUG>this.len = len;
return this;</BUG>
}
@Override
public void commit() {
| public MockResponse writeContent(ByteBuffer byteBuffer) {
|
23,557 | package act.handler.builtin;
import act.app.ActionContext;
import act.handler.builtin.controller.FastRequestHandler;
import org.osgl.mvc.result.NotFound;
<BUG>public class AlwaysNotFound extends FastRequestHandler {
</BUG>
public static AlwaysNotFound INSTANCE = new AlwaysNotFound();
@Override
public void handle(Action... | public class AlwaysNotFound extends FastRequestHandler implements DirectIO {
|
23,558 | return _DEL;
default:
throw E.unexpected("HTTP Method not supported: %s", method);
}
}
<BUG>private static Result notFound() {
throw NotFound.get();
}</BUG>
public final class f {
| private static AlwaysNotFound notFound() {
return AlwaysNotFound.INSTANCE;
|
23,559 | package act.handler.builtin;
import act.app.ActionContext;
import act.handler.builtin.controller.FastRequestHandler;
import org.osgl.mvc.result.MethodNotAllowed;
<BUG>public class AlwaysMethodNotAllowed extends FastRequestHandler {
</BUG>
public static AlwaysMethodNotAllowed INSTANCE = new AlwaysMethodNotAllowed();
@Ov... | public class AlwaysMethodNotAllowed extends FastRequestHandler implements DirectIO {
|
23,560 | package act.handler.builtin;
import act.app.ActionContext;
import act.handler.builtin.controller.FastRequestHandler;
import org.osgl.mvc.result.Forbidden;
<BUG>public class AlwaysForbidden extends FastRequestHandler {
</BUG>
public static AlwaysForbidden INSTANCE = new AlwaysForbidden();
@Override
public void handle(Ac... | public class AlwaysForbidden extends FastRequestHandler implements DirectIO {
|
23,561 | private ActionContext createActionContext(HttpServerExchange exchange) {
App app = client.app();
AppConfig config = app.config();
ActionContext ctx = ActionContext.create(app, req(exchange, config), resp(exchange, config));
exchange.putAttachment(ActBlockingExchange.KEY_APP_CTX, ctx);
<BUG>exchange.startBlocking(new Ac... | [DELETED] |
23,562 | package org.nodel.jyhost;
import java.io.File;
<BUG>import java.io.FileFilter;
import java.io.IOException;</BUG>
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
| import java.io.FileNotFoundException;
import java.io.IOException;
|
23,563 | op.waitForResultOrThrowException();
} finally {
_busy.unlock();
}
} // (method)
<BUG>private void applyConfig0(NodeConfig config) throws Exception {
cleanupInterpreter();</BUG>
long startTime = System.nanoTime();
_logger.info("Initialising new Python interpreter...");
PySystemState pySystemState = new PySystemState();
| boolean hasErrors = false;
cleanupInterpreter();
|
23,564 | _started = DateTime.now();
_desc = _bindings.desc;
_signal.notifyAll();
}
} catch (Exception exc) {
<BUG>logMessage = "'main' completed with errors - " + exc;
_logger.warn(logMessage);
_errReader.inject(logMessage);
</BUG>
}
| msg = "'main' completed with errors - " + exc;
_logger.warn(msg);
_errReader.inject(msg);
|
23,565 | import com.hazelcast.client.impl.HazelcastClientProxy;
import com.hazelcast.client.spi.ClientContext;
import com.hazelcast.client.test.TestHazelcastFactory;
import com.hazelcast.config.CacheConfig;
import com.hazelcast.config.NearCacheConfig;
<BUG>import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.intern... | import com.hazelcast.internal.nearcache.impl.invalidation.MetaDataContainer;
import com.hazelcast.internal.nearcache.impl.invalidation.MetaDataFetcher;
|
23,566 | UUID givenUuid = UuidUtil.newSecureUUID();
RepairingTask repairingTask = getRepairingTask(cacheName, partition, givenSequence, givenUuid);
MetaDataFetcher metaDataFetcher = repairingTask.getMetaDataFetcher();
ConcurrentMap<String, RepairingHandler> handlers = repairingTask.getHandlers();
metaDataFetcher.fetchMetadata(h... | MetaDataContainer metaDataContainer = repairingHandler.getMetaDataContainer(partition);
UUID foundUuid = metaDataContainer.getUuid();
long foundSequence = metaDataContainer.getSequence();
|
23,567 | import com.hazelcast.nio.ObjectDataOutput;
import com.hazelcast.nio.serialization.IdentifiedDataSerializable;
import com.hazelcast.spi.Operation;
import com.hazelcast.spi.ReadonlyOperation;
import com.hazelcast.spi.partition.IPartitionService;
<BUG>import java.io.IOException;
import java.util.ArrayList;
import java.uti... | import java.util.AbstractMap;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
|
23,568 | import com.hazelcast.client.spi.ClientContext;
import com.hazelcast.client.test.TestHazelcastFactory;
import com.hazelcast.config.NearCacheConfig;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.core.IMap;
<BUG>import com.hazelcast.internal.nearcache.impl.invalidation.Invalidator;
import com.hazelcast... | import com.hazelcast.internal.nearcache.impl.invalidation.MetaDataContainer;
import com.hazelcast.internal.nearcache.impl.invalidation.MetaDataFetcher;
|
23,569 | UUID givenUuid = UuidUtil.newSecureUUID();
RepairingTask repairingTask = getRepairingTask(mapName, partition, givenSequence, givenUuid);
MetaDataFetcher metaDataFetcher = repairingTask.getMetaDataFetcher();
ConcurrentMap<String, RepairingHandler> handlers = repairingTask.getHandlers();
metaDataFetcher.fetchMetadata(han... | MetaDataContainer metaDataContainer = repairingHandler.getMetaDataContainer(partition);
UUID foundUuid = metaDataContainer.getUuid();
long foundSequence = metaDataContainer.getSequence();
|
23,570 | package com.hazelcast.client.map.impl.nearcache.invalidation;
import com.hazelcast.client.impl.HazelcastClientInstanceImpl;
import com.hazelcast.client.impl.protocol.ClientMessage;
<BUG>import com.hazelcast.client.impl.protocol.codec.MapAssignAndGetUuidsCodec;
import com.hazelcast.client.spi.ClientClusterService;</BUG>... | import com.hazelcast.client.impl.protocol.codec.MapFetchNearCacheInvalidationMetadataCodec;
import com.hazelcast.client.spi.ClientClusterService;
|
23,571 | return futures;
}
@Override
protected void process(InternalCompletableFuture future, ConcurrentMap<String, RepairingHandler> handlers) {
try {
<BUG>MapGetInvalidationMetaDataOperation.MetaDataResponse response = extractResponse(future);
repairUuids(response.getPartitionUuidList(), handlers);
repairSequences(response.... | MapFetchNearCacheInvalidationMetadataCodec.ResponseParameters response = extractResponse(future);
repairUuids(response.partitionUuidList, handlers);
repairSequences(response.namePartitionSequenceList, handlers);
|
23,572 | return futures;
}
@Override
protected void process(InternalCompletableFuture future, ConcurrentMap<String, RepairingHandler> handlers) {
try {
<BUG>CacheGetInvalidationMetaDataOperation.MetaDataResponse response = extractResponse(future);
repairUuids(response.getPartitionUuidList(), handlers);
repairSequences(respons... | CacheFetchNearCacheInvalidationMetadataCodec.ResponseParameters response = extractResponse(future);
repairUuids(response.partitionUuidList, handlers);
repairSequences(response.namePartitionSequenceList, handlers);
|
23,573 | ClientMessage request = CacheAssignAndGetUuidsCodec.encodeRequest();
</BUG>
ClientInvocation invocation = new ClientInvocation(clientImpl, request);
CacheAssignAndGetUuidsCodec.ResponseParameters responseParameters
<BUG>= CacheAssignAndGetUuidsCodec.decodeResponse(invocation.invoke().get());
List<Data> response = respo... | ClientMessage message = ((ClientMessage) future.get(1, MINUTES));
return decodeResponse(message);
@Override
public List<Map.Entry<Integer, UUID>> assignAndGetUuids() throws Exception {
ClientMessage request = MapAssignAndGetUuidsCodec.encodeRequest();
return responseParameters.partitionUuidList;
|
23,574 | protected CacheAssignAndGetUuidsCodec.RequestParameters decodeClientMessage(ClientMessage clientMessage) {
return CacheAssignAndGetUuidsCodec.decodeRequest(clientMessage);
}
@Override
protected ClientMessage encodeResponse(Object response) {
<BUG>return CacheAssignAndGetUuidsCodec.encodeResponse(((List<Data>) response)... | return CacheAssignAndGetUuidsCodec.encodeResponse(((Map<Integer, UUID>) response).entrySet());
|
23,575 | @Override
protected OperationFactory createOperationFactory() {
return new CacheAssignAndGetUuidsOperationFactory();
}
@Override
<BUG>protected Object reduce(Map<Integer, Object> map) {
List<Data> objects = new ArrayList<Data>(2 * map.size());
for (Map.Entry<Integer, Object> entry : map.entrySet()) {
objects.add(serial... | protected CacheAssignAndGetUuidsCodec.RequestParameters decodeClientMessage(ClientMessage clientMessage) {
return CacheAssignAndGetUuidsCodec.decodeRequest(clientMessage);
|
23,576 | import java.util.ArrayList;
import java.util.Date;
import java.util.LinkedList;
import org.apache.commons.lang3.StringUtils;
public class Log {
<BUG>private final static String FEHLER = "Fehler(" + Const.PROGRAMMNAME + "): ";
private static class Error {</BUG>
String cl = "";
int nr = 0;
int count = 0;
| public final static String LILNE = "################################################################################";
private static class Error {
|
23,577 | sysLog("ImportOLD: " + Config.importOld);
if (Config.nurSenderLaden != null) {
sysLog("Nur Sender laden: " + StringUtils.join(Config.nurSenderLaden, ','));
}
sysLog("");
<BUG>sysLog("##################################################################################");
}</BUG>
public static synchronized void endMsg() ... | [DELETED] |
23,578 | strEx = " ";
}
retList.add(strEx + e.cl + " Fehlernummer: " + e.nr + " Anzahl: " + e.count);
}
}
<BUG>retList.add("##################################################################################");
return retList;</BUG>
}
public static synchronized void errorLog(int fehlerNummer, Exception ex) {
fehlermeldung_(fehle... | retList.add(LILNE);
return retList;
|
23,579 | public final static int VON_NR = 0;
public final static String NACH = "nach";
public final static int NACH_NR = 1;
public final static String[] COLUMN_NAMES = {VON, NACH};
public static final int MAX_ELEM = 2;
<BUG>public LinkedList<String[]> list = new LinkedList<>();
public void init() {
</BUG>
list.clear();
| public static LinkedList<String[]> list = new LinkedList<>();
public static void init() {
|
23,580 | public void init() {
</BUG>
list.clear();
list.add(new String[]{" ", "_"});
}
<BUG>public String replace(String strCheck, boolean pfad) {
</BUG>
Iterator<String[]> it = list.iterator();
while (it.hasNext()) {
String[] strReplace = it.next();
| public final static int VON_NR = 0;
public final static String NACH = "nach";
public final static int NACH_NR = 1;
public final static String[] COLUMN_NAMES = {VON, NACH};
public static final int MAX_ELEM = 2;
public static LinkedList<String[]> list = new LinkedList<>();
public static void init() {
public static String... |
23,581 | import org.spongepowered.api.world.Locatable;
import org.spongepowered.api.world.Location;
import org.spongepowered.api.world.World;
import javax.annotation.Nullable;
import java.util.List;
<BUG>import java.util.Optional;
import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;</BUG>
public class CommandDel... | import java.util.stream.Stream;
import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;
|
23,582 | .append(Text.of(TextColors.GREEN, "Usage: "))
.append(getUsage(source))
.build());
return CommandResult.empty();
} else if (isIn(REGIONS_ALIASES, parse.args[0])) {
<BUG>if (parse.args.length < 2) throw new CommandException(Text.of("Must specify a name!"));
IRegion region = FGManager.getInstance().getRegion(parse.args[1... | String regionName = parse.args[1];
IRegion region = FGManager.getInstance().getRegion(regionName).orElse(null);
|
23,583 | </BUG>
isWorldRegion = true;
}
if (region == null)
<BUG>throw new CommandException(Text.of("No region exists with the name \"" + parse.args[1] + "\"!"));
if (region instanceof GlobalWorldRegion) {
</BUG>
throw new CommandException(Text.of("You may not delete the global region!"));
}
| if (world == null)
throw new CommandException(Text.of("No world exists with name \"" + worldName + "\"!"));
if (world == null) throw new CommandException(Text.of("Must specify a world!"));
region = FGManager.getInstance().getWorldRegion(world, regionName).orElse(null);
throw new CommandException(Text.of("No region exis... |
23,584 | source.getName() + " deleted " + (isWorldRegion ? "world" : "") + "region"
);
return CommandResult.success();
} else if (isIn(HANDLERS_ALIASES, parse.args[0])) {
if (parse.args.length < 2) throw new CommandException(Text.of("Must specify a name!"));
<BUG>IHandler handler = FGManager.getInstance().gethandler(parse.args[... | Optional<IHandler> handlerOpt = FGManager.getInstance().gethandler(parse.args[1]);
if (!handlerOpt.isPresent())
IHandler handler = handlerOpt.get();
if (handler instanceof GlobalHandler)
|
23,585 | .excludeCurrent(true)
.autoCloseQuotes(true)
.parse();
if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) {
if (parse.current.index == 0)
<BUG>return ImmutableList.of("region", "handler").stream()
.filter(new StartsWithPredicate(parse.current.token))</BUG>
.map(args -> parse.current.prefix... | return Stream.of("region", "handler")
.filter(new StartsWithPredicate(parse.current.token))
|
23,586 | .excludeCurrent(true)
.autoCloseQuotes(true)
.parse();
if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) {
if (parse.current.index == 0)
<BUG>return ImmutableList.of("region", "handler").stream()
.filter(new StartsWithPredicate(parse.current.token))</BUG>
.map(args -> parse.current.prefix... | return Stream.of("region", "handler")
.filter(new StartsWithPredicate(parse.current.token))
|
23,587 | @Dependency(id = "foxcore")
},
description = "A world protection plugin built for SpongeAPI. Requires FoxCore.",
authors = {"gravityfox"},
url = "https://github.com/FoxDenStudio/FoxGuard")
<BUG>public final class FoxGuardMain {
public final Cause pluginCause = Cause.builder().named("plugin", this).build();
private stat... | private static FoxGuardMain instanceField;
|
23,588 | private UserStorageService userStorage;
private EconomyService economyService = null;
private boolean loaded = false;
private FCCommandDispatcher fgDispatcher;
public static FoxGuardMain instance() {
<BUG>return instanceField;
}</BUG>
@Listener
public void construct(GameConstructionEvent event) {
instanceField = this;
| }
public static Cause getCause() {
return instance().pluginCause;
}
|
23,589 | return configDirectory;
}
public boolean isLoaded() {
return loaded;
}
<BUG>public static Cause getCause() {
return instance().pluginCause;
}</BUG>
public EconomyService getEconomyService() {
return economyService;
| [DELETED] |
23,590 | import org.spongepowered.api.world.Locatable;
import org.spongepowered.api.world.Location;
import org.spongepowered.api.world.World;
import javax.annotation.Nullable;
import java.util.*;
<BUG>import java.util.stream.Collectors;
import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;</BUG>
public class Comm... | import java.util.stream.Stream;
import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;
|
23,591 | .excludeCurrent(true)
.autoCloseQuotes(true)
.parse();
if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) {
if (parse.current.index == 0)
<BUG>return ImmutableList.of("region", "handler").stream()
.filter(new StartsWithPredicate(parse.current.token))</BUG>
.map(args -> parse.current.prefix... | return Stream.of("region", "handler")
.filter(new StartsWithPredicate(parse.current.token))
|
23,592 | private static FGStorageManager instance;
private final Logger logger = FoxGuardMain.instance().getLogger();</BUG>
private final Set<LoadEntry> loaded = new HashSet<>();
private final Path directory = getDirectory();
private final Map<String, Path> worldDirectories;
<BUG>private FGStorageManager() {
defaultModifiedMap ... | public final HashMap<IFGObject, Boolean> defaultModifiedMap;
private final UserStorageService userStorageService;
private final Logger logger = FoxGuardMain.instance().getLogger();
userStorageService = FoxGuardMain.instance().getUserStorage();
defaultModifiedMap = new CacheMap<>((k, m) -> {
|
23,593 | String name = fgObject.getName();
Path singleDir = dir.resolve(name.toLowerCase());
</BUG>
boolean shouldSave = fgObject.shouldSave();
if (force || shouldSave) {
<BUG>logger.info((shouldSave ? "S" : "Force s") + "aving handler \"" + name + "\" in directory: " + singleDir);
</BUG>
constructDirectory(singleDir);
try {
fg... | UUID owner = fgObject.getOwner();
boolean isOwned = !owner.equals(SERVER_UUID);
Optional<User> userOwner = userStorageService.get(owner);
String logName = (userOwner.isPresent() ? userOwner.get().getName() + ":" : "") + (isOwned ? owner + ":" : "") + name;
if (fgObject.autoSave()) {
Path singleDir = serverDir.resolve(n... |
23,594 | if (fgObject.autoSave()) {
Path singleDir = dir.resolve(name.toLowerCase());
</BUG>
boolean shouldSave = fgObject.shouldSave();
if (force || shouldSave) {
<BUG>logger.info((shouldSave ? "S" : "Force s") + "aving world region \"" + name + "\" in directory: " + singleDir);
</BUG>
constructDirectory(singleDir);
try {
fgOb... | Path singleDir = serverDir.resolve(name.toLowerCase());
logger.info((shouldSave ? "S" : "Force s") + "aving world region " + logName + " in directory: " + singleDir);
|
23,595 | 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(... | Optional<IRegion> regionOpt = FGManager.getInstance().getRegion(entry.getKey());
if (regionOpt.isPresent()) {
IRegion region = regionOpt.get();
logger.info("Loading links for region \"" + region.getName() + "\"");
|
23,596 | 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("l... | 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() + "\"");
|
23,597 | 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
|
23,598 | .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))
.co... | return Stream.of("region", "worldregion", "handler", "controller")
|
23,599 | import ml.puredark.hviewer.ui.activities.BaseActivity;
import ml.puredark.hviewer.ui.dataproviders.ListDataProvider;
import ml.puredark.hviewer.ui.fragments.SettingFragment;
import ml.puredark.hviewer.ui.listeners.OnItemLongClickListener;
import ml.puredark.hviewer.utils.SharedPreferencesUtil;
<BUG>import static androi... | import static ml.puredark.hviewer.R.id.container;
public class PictureViewerAdapter extends RecyclerView.Adapter<PictureViewerAdapter.PictureViewerViewHolder> {
|
23,600 | final PictureViewHolder viewHolder = new PictureViewHolder(view);
if (pictures != null && position < pictures.size()) {
final Picture picture = pictures.get(getPicturePostion(position));
if (picture.pic != null) {
loadImage(container.getContext(), picture, viewHolder);
<BUG>} else if (site.hasFlag(Site.FLAG_SINGLE_PAGE... | } else if (site.hasFlag(Site.FLAG_SINGLE_PAGE_BIG_PICTURE) && site.extraRule != null) {
if(site.extraRule.pictureRule != null && site.extraRule.pictureRule.url != null)
getPictureUrl(container.getContext(), viewHolder, picture, site, site.extraRule.pictureRule.url, site.extraRule.pictureRule.highRes);
else if(site.extr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.