id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
4,901 | 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] |
4,902 | 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;
|
4,903 | 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 {
|
4,904 | queryParams.add("includeattributes", includeAttributes.toString());
}
return wr.queryParams(queryParams).get(User.class);
}
public UserList getUsers() {
<BUG>return getBaseWebResource("users").get(UserList.class);
}</BUG>
public UserList getUsers(Integer page, Integer entries) {
WebResource wr = getBaseWebResource("use... | return getBaseWebResource("users").header("Content-Type", MediaType.TEXT_XML).accept(MediaType.TEXT_XML).get(UserList.class);
|
4,905 | 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;
|
4,906 | public void additionalItemsSchemaFailure() {
ArraySchema subject = ArraySchema.builder()
.addItemSchema(BooleanSchema.INSTANCE)
.schemaOfAdditionalItems(NullSchema.INSTANCE)
.build();
<BUG>TestSupport.expectFailure(
new TestSupport.Failure()
</BUG>
.subject(subject)
.expectedViolatedSchema(NullSchema.INSTANCE)
| TestSupport.failure()
|
4,907 | .build().validate(ARRAYS.get("doesNotRequireExplicitArray"));
}
@Test
public void maxItems() {
ArraySchema subject = ArraySchema.builder().maxItems(0).build();
<BUG>TestSupport.expectFailure(
new TestSupport.Failure()
</BUG>
.subject(subject)
.expectedPointer("#")
| TestSupport.failure()
|
4,908 | ArraySchema.builder().build().validate(ARRAYS.get("noItemSchema"));
}
@Test
public void nonUniqueArrayOfArrays() {
ArraySchema subject = ArraySchema.builder().uniqueItems(true).build();
<BUG>TestSupport.expectFailure(
new TestSupport.Failure()
</BUG>
.subject(subject)
.expectedPointer("#")
| TestSupport.failure()
|
4,909 | .build();
TestSupport.expectFailure(
new TestSupport.Failure()
.subject(subject)
.expectedKeyword("format")
<BUG>.input("string")
);</BUG>
}
@Test
| .input("string"));
|
4,910 | public void notRequiresString() {
StringSchema.builder().requiresString(false).build().validate(2);
}
@Test
public void patternFailure() {
<BUG>StringSchema subject = StringSchema.builder().pattern("^a*$").build();
TestSupport.expectFailure(new TestSupport.Failure().subject(subject).expectedKeyword("pattern").input("ab... | TestSupport.expectFailure(
|
4,911 | return structure.getNameCurrentValue();
}
@Override
protected void doExportStagedModel(
PortletDataContext portletDataContext, DDMStructure structure)
<BUG>throws Exception {
if (structure.getParentStructureId() !=</BUG>
DDMStructureConstants.DEFAULT_PARENT_STRUCTURE_ID) {
DDMStructure parentStructure =
DDMStructureLoc... | Element structureElement = portletDataContext.getExportDataElement(
structure);
if (structure.getParentStructureId() !=
|
4,912 | DDMStructureConstants.DEFAULT_PARENT_STRUCTURE_ID) {
DDMStructure parentStructure =
DDMStructureLocalServiceUtil.getStructure(
structure.getParentStructureId());
StagedModelDataHandlerUtil.exportStagedModel(
<BUG>portletDataContext, parentStructure);
}
Element structureElement = portletDataContext.getExportDataElement(... | portletDataContext.addReferenceElement(
structure, structureElement, parentStructure,
PortletDataContext.REFERENCE_TYPE_PARENT, false);
|
4,913 | userId, portletDataContext.getScopeGroupId(),
parentStructureId, structure.getClassNameId(),
structure.getStructureKey(), structure.getNameMap(),
structure.getDescriptionMap(), structure.getXsd(),
structure.getStorageType(), structure.getType(),
<BUG>serviceContext);
}</BUG>
else {
importedStructure =
DDMStructureLocal... | }
else if (portletDataContext.isCompanyStagedGroupedModel(
existingStructure)) {
return;
}
|
4,914 | import java.sql.SQLException;
import java.sql.Statement;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
<BUG>import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;</BUG>
import java.util.concurrent.locks.Lock;
| import java.util.HashMap;
import java.util.Map;
import java.util.Set;
|
4,915 | if (msgin != null) {
try {
msgin.close();
} catch (IOException e) {
}
<BUG>}
}
}
protected void updateSourceSequence(SourceSequence seq)
</BUG>
throws SQLException {
| releaseResources(stmt, null);
protected void storeMessage(Identifier sid, RMMessage msg, boolean outbound)
throws IOException, SQLException {
storeMessage(connection, sid, msg, outbound);
protected void updateSourceSequence(Connection con, SourceSequence seq)
|
4,916 | } catch (SQLException ex) {
if (!isTableExistsError(ex)) {
throw ex;
} else {
LOG.fine("Table CXF_RM_SRC_SEQUENCES already exists.");
<BUG>verifyTable(SRC_SEQUENCES_TABLE_NAME, SRC_SEQUENCES_TABLE_COLS);
</BUG>
}
} finally {
stmt.close();
| verifyTable(con, SRC_SEQUENCES_TABLE_NAME, SRC_SEQUENCES_TABLE_COLS);
|
4,917 | } catch (SQLException ex) {
if (!isTableExistsError(ex)) {
throw ex;
} else {
LOG.fine("Table CXF_RM_DEST_SEQUENCES already exists.");
<BUG>verifyTable(DEST_SEQUENCES_TABLE_NAME, DEST_SEQUENCES_TABLE_COLS);
</BUG>
}
} finally {
stmt.close();
| LOG.fine("Table CXF_RM_SRC_SEQUENCES already exists.");
verifyTable(con, SRC_SEQUENCES_TABLE_NAME, SRC_SEQUENCES_TABLE_COLS);
|
4,918 | }
} finally {
stmt.close();
}
for (String tableName : new String[] {OUTBOUND_MSGS_TABLE_NAME, INBOUND_MSGS_TABLE_NAME}) {
<BUG>stmt = connection.createStatement();
try {</BUG>
stmt.executeUpdate(MessageFormat.format(CREATE_MESSAGES_TABLE_STMT, tableName));
} catch (SQLException ex) {
if (!isTableExistsError(ex)) {
| stmt = con.createStatement();
try {
stmt.executeUpdate(CREATE_DEST_SEQUENCES_TABLE_STMT);
|
4,919 | throw ex;
} else {
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Table " + tableName + " already exists.");
}
<BUG>verifyTable(tableName, MESSAGES_TABLE_COLS);
</BUG>
}
} finally {
stmt.close();
| LOG.fine("Table CXF_RM_SRC_SEQUENCES already exists.");
verifyTable(con, SRC_SEQUENCES_TABLE_NAME, SRC_SEQUENCES_TABLE_COLS);
|
4,920 | if (newCols.size() > 0) {
if (LOG.isLoggable(Level.FINE)) {
LOG.log(Level.FINE, "Table " + tableName + " needs additional columns");
}
for (String[] newCol : newCols) {
<BUG>Statement st = connection.createStatement();
try {</BUG>
st.executeUpdate(MessageFormat.format(ALTER_TABLE_STMT_STR,
tableName, newCol[0], newCol[... | Statement st = con.createStatement();
try {
|
4,921 | if (nextReconnectAttempt < System.currentTimeMillis()) {
nextReconnectAttempt = System.currentTimeMillis() + reconnectDelay;
reconnectDelay = reconnectDelay * useExponentialBackOff;
}
}
<BUG>}
public static void deleteDatabaseFiles() {</BUG>
deleteDatabaseFiles(DEFAULT_DATABASE_NAME, true);
}
public static void deleteD... | public static void deleteDatabaseFiles() {
|
4,922 | import org.apache.commons.lang3.math.NumberUtils;
import org.json.JSONException;
import org.mariotaku.microblog.library.MicroBlog;
import org.mariotaku.microblog.library.MicroBlogException;
import org.mariotaku.microblog.library.twitter.model.RateLimitStatus;
<BUG>import org.mariotaku.microblog.library.twitter.model.St... | import org.mariotaku.pickncrop.library.PNCUtils;
import org.mariotaku.sqliteqb.library.AllColumns;
|
4,923 | 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());
|
4,924 | 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);
|
4,925 | 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);
|
4,926 | 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);
|
4,927 | import org.mariotaku.twidere.receiver.NotificationReceiver;
import org.mariotaku.twidere.service.LengthyOperationsService;
import org.mariotaku.twidere.util.ActivityTracker;
import org.mariotaku.twidere.util.AsyncTwitterWrapper;
import org.mariotaku.twidere.util.DataStoreFunctionsKt;
<BUG>import org.mariotaku.twidere.u... | import org.mariotaku.twidere.util.DebugLog;
import org.mariotaku.twidere.util.ImagePreloader;
|
4,928 | 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);
|
4,929 | 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);
|
4,930 | 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;
|
4,931 | }
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);
|
4,932 | 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);
|
4,933 | @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);
|
4,934 | 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);
|
4,935 | public static final Minecraft MINECRAFT = Minecraft.getMinecraft();
public static final File QUBBLE_DIRECTORY = new File(".", "llibrary" + File.separator + "qubble");
public static final File QUBBLE_MODEL_DIRECTORY = new File(QUBBLE_DIRECTORY, "models");
public static final File QUBBLE_TEXTURE_DIRECTORY = new File(QUBB... | public static final Map<String, ModelWrapper> GAME_MODELS = new HashMap<>();
|
4,936 | private static Field TEXTURE_QUADS_FIELD;
private static Method GET_ENTITY_TEXTURE_METHOD;
private static Gson blockGson;
public static List<String> getGameModels() {
List<String> gameModels = new LinkedList<>();
<BUG>for (Map.Entry<String, QubbleModel> entry : GAME_MODELS.entrySet()) {
</BUG>
gameModels.add(entry.getK... | for (Map.Entry<String, ModelWrapper> entry : GAME_MODELS.entrySet()) {
|
4,937 | for (Map.Entry<Class<? extends Entity>, Render<? extends Entity>> entry : map.entrySet()) {
Render<? extends Entity> renderer = entry.getValue();
if (renderer != null && entry.getKey() != null) {
String entityName = entry.getKey().getSimpleName().replaceAll("Entity", "");
bar.step(entityName);
<BUG>Entity entity = null... | Entity entity;
try {
|
4,938 | entity = entry.getKey().getConstructor(World.class).newInstance(new DummyWorld());
entityName = entity.getName();
if (entityName.startsWith("entity.") && entityName.endsWith(".name")) {
entityName = entityName.split("entity.")[1].split(".name")[0];
}
<BUG>} catch (Exception e) {
}</BUG>
for (Field field : this.getAllFi... | continue;
|
4,939 | bar.step(tileName);
for (Field field : this.getAllFields(renderer.getClass())) {
try {
if (ModelBase.class.isAssignableFrom(field.getType())) {
field.setAccessible(true);
<BUG>QubbleModel model = this.parseModel((ModelBase) field.get(renderer), entry.getKey(), tileName);
</BUG>
if (model.getCuboids().size() > 0) {
GAME... | ModelWrapper model = this.parseModel((ModelBase) field.get(renderer), entry.getKey(), tileName);
|
4,940 | if (clazz.getSuperclass() != null && clazz.getSuperclass() != Object.class) {
fields.addAll(this.getAllFields(clazz.getSuperclass()));
}
return fields;
}
<BUG>private QubbleModel parseModel(ModelBase model, Class<?> clazz, String name) {
</BUG>
QubbleModel qubbleModel = QubbleModel.create(name, "Unknown", model.texture... | private ModelWrapper parseModel(ModelBase model, Class<?> clazz, String name) {
|
4,941 | ModelBlockDefinition state = BlockStateLoader.load(new InputStreamReader(resourceManager.getResource(location).getInputStream()), blockGson);
for (VariantList variantList : state.getMultipartVariants()) {
for (Variant variant : variantList.getVariantList()) {
ResourceLocation resource = variant.getModelLocation();
Reso... | ModelWrapper model = ClientProxy.parseJsonModel(blockGson, resourceManager, importer, name, variantResource);
QubbleVanillaModel qubbleModel = QubbleVanillaModel.create(name, "Unknown");
QubbleVanillaCuboid cuboid = QubbleVanillaCuboid.create("Cube", null, 0.0F, 0.0F, 0.0F, 16.0F, 16.0F, 16.0F);
qubbleModel.addCuboid(c... |
4,942 | return this.name;
}
public int getWidth() {
return this.width;
}
<BUG>public SidebarHandler getSidebarHandler() {
return this.sidebarHandler;
</BUG>
}
public Element[] createElements(QubbleGUI create) {
| public SidebarHandler createHandler(ModelType modelType) {
return this.sidebarHandler.apply(modelType);
|
4,943 | package net.ilexiconn.qubble.client.gui;
<BUG>import net.ilexiconn.llibrary.client.model.qubble.QubbleCuboid;
import net.ilexiconn.llibrary.client.model.qubble.QubbleModel;
public class Project {
private QubbleGUI gui;
private QubbleModel model;
private QubbleCuboid selectedCube;
</BUG>
private ModelTexture baseTextur... | import net.ilexiconn.qubble.client.model.ModelType;
import net.ilexiconn.qubble.client.model.wrapper.CuboidWrapper;
import net.ilexiconn.qubble.client.model.wrapper.ModelWrapper;
public class Project<CBE extends CuboidWrapper<CBE>, MDL extends ModelWrapper<CBE>> {
private ModelType modelType;
private MDL model;
private... |
4,944 | import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.service.UserLocalServiceUtil;
import java.io.IOException;
import java.security.Principal;
<BUG>import java.util.Map;
import javax.security.auth.Subject;</BUG>
import javax.security.auth.callback... | import java.util.Set;
import javax.security.auth.Subject;
|
4,945 | import javax.security.auth.spi.LoginModule;
public class BasicLoginModule implements LoginModule {
public boolean abort() {
return true;
}
<BUG>public boolean commit() {
if (getPrincipal() != null) {
getSubject().getPrincipals().add(getPrincipal());
</BUG>
return true;
| [DELETED] |
4,946 | package com.liferay.portal.security.jaas;
import com.liferay.portal.kernel.log.Log;
<BUG>import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.util.ServerDetector;</BUG>
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.util.PropsValues;
import java.util.Map;
| import com.liferay.portal.kernel.util.InstanceFactory;
import com.liferay.portal.kernel.util.ServerDetector;
|
4,947 | 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;
|
4,948 | 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();
|
4,949 | 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: " +
|
4,950 | 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;
|
4,951 | 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()... |
4,952 | 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;
|
4,953 | private static boolean loaded;
private static final String MINFORGE = "required-after:Forge@[10.13.0.1291,);"; //was 1205/1231
public static final String dependencies = MINFORGE+"after:BuildCraft|Energy;after:IC2;after:ThermalExpansion;after:Thaumcraft;"+
"after:powersuits;after:GalacticCraft;after:Mystcraft;after:Univ... | "after:ComputerCraft;after:ThermalFoundation;after:CarpentersBlocks";
|
4,954 | import java.util.Map;
import net.minecraft.launchwrapper.Launch;
import Reika.DragonAPI.ASM.APIStripper;
import Reika.DragonAPI.ASM.DependentMethodStripper;
import Reika.DragonAPI.ASM.DragonAPIClassTransfomer;
<BUG>import Reika.DragonAPI.ASM.FMLItemBlockPatch;
import Reika.DragonAPI.ASM.InterfaceInjector;</BUG>
import ... | import Reika.DragonAPI.ASM.FluidNamePatch;
import Reika.DragonAPI.ASM.InterfaceInjector;
|
4,955 | public String[] getASMTransformerClass() {
return new String[]{
InterfaceInjector.class.getName(), //Must run before dependent method stripper
APIStripper.class.getName(),
DragonAPIClassTransfomer.class.getName(),
<BUG>FMLItemBlockPatch.class.getName(),
DependentMethodStripper.class.getName(),</BUG>
};
}
@Override
| FluidNamePatch.class.getName(),
DependentMethodStripper.class.getName(),
|
4,956 | import Reika.DragonAPI.ModInteract.ItemHandlers.AppEngHandler;
import Reika.DragonAPI.ModInteract.ItemHandlers.BCMachineHandler;
import Reika.DragonAPI.ModInteract.ItemHandlers.BCPipeHandler;
import Reika.DragonAPI.ModInteract.ItemHandlers.BerryBushHandler;
import Reika.DragonAPI.ModInteract.ItemHandlers.BloodMagicHand... | import Reika.DragonAPI.ModInteract.ItemHandlers.CarpenterBlockHandler;
import Reika.DragonAPI.ModInteract.ItemHandlers.DartItemHandler;
|
4,957 | this.registerHandler(ModList.EXTRAUTILS, ExtraUtilsHandler.class, "Handler");
this.registerHandler(ModList.MYSTCRAFT, MystCraftHandler.class, "Block Handler");
this.registerHandler(ModList.BLOODMAGIC, BloodMagicHandler.class, "Handler");
this.registerHandler(ModList.PNEUMATICRAFT, PneumaticPlantHandler.class, "Handler"... | this.registerHandler(ModList.CARPENTER, CarpenterBlockHandler.class, "Handler");
ReikaJavaLibrary.initClass(ModOreList.class);
|
4,958 | import org.objectweb.asm.tree.TypeInsnNode;
import org.objectweb.asm.tree.VarInsnNode;
import Reika.DragonAPI.Exception.ASMException;
import Reika.DragonAPI.Instantiable.Data.Maps.MultiMap;
import Reika.DragonAPI.Libraries.Java.ReikaASMHelper;
<BUG>import Reika.DragonAPI.Libraries.Java.ReikaJVMParser;
import cpw.mods.f... | import Reika.DragonAPI.Libraries.World.ReikaWorldHelper;
import cpw.mods.fml.common.FMLCommonHandler;
|
4,959 | MUSICEVENT("net.minecraft.client.audio.MusicTicker", "btg"),
SOUNDEVENTS("net.minecraft.client.audio.SoundManager", "btj"),
CLOUDRENDEREVENT1("net.minecraft.client.settings.GameSettings", "bbj"),
CLOUDRENDEREVENT2("net.minecraft.client.renderer.EntityRenderer", "blt"),
PROFILER("net.minecraft.profiler.Profiler", "qi"),... | MOBTARGETEVENT("net.minecraft.world.World", "ahb"),
|
4,960 | m.instructions.insert(pos, new VarInsnNode(Opcodes.ALOAD, 0));
m.instructions.insert(pos, new InsnNode(Opcodes.DUP));
m.instructions.insert(pos, new TypeInsnNode(Opcodes.NEW, "Reika/DragonAPI/Instantiable/Event/CreeperExplodeEvent"));
m.instructions.insert(pos, new FieldInsnNode(Opcodes.GETSTATIC, "net/minecraftforge/c... | case ITEMRENDEREVENT: {
|
4,961 | m.instructions.insertBefore(pos, new VarInsnNode(Opcodes.ALOAD, 1));
m.instructions.insertBefore(pos, new MethodInsnNode(Opcodes.INVOKESPECIAL, "Reika/DragonAPI/Instantiable/Event/Client/RenderItemInSlotEvent", "<init>", "(Lnet/minecraft/client/gui/inventory/GuiContainer;Lnet/minecraft/inventory/Slot;)V", false));
m.in... | case SLOTCLICKEVENT: {
|
4,962 | package Reika.DragonAPI.Base;
import net.minecraft.block.Block;
<BUG>import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;</BUG>
import net.minecraft.world.World;
import Reika.DragonAPI.DragonAPICore;
import Reika.DragonAPI.Interfaces.Registry.OreEnum;
| import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.player.EntityPlayer;
|
4,963 | {
OreEnum ore = this.getOre(world, x, y, z);
boolean flag = super.removedByPlayer(world, player, x, y, z, harv);
if (harv && flag) {
this.onHarvested(world, x, y, z, player);
<BUG>if (!ore.dropsSelf(world, x, y, z))
ReikaWorldHelper.splitAndSpawnXP(world, x+0.5F, y+0.5F, z+0.5F, this.droppedXP(ore, world, x, y, z));</B... | if (!ore.dropsSelf(world, x, y, z) && !EnchantmentHelper.getSilkTouchModifier(player))
ReikaWorldHelper.splitAndSpawnXP(world, x+0.5F, y+0.5F, z+0.5F, this.droppedXP(ore, world, x, y, z));
|
4,964 | package Reika.DragonAPI.Auxiliary;
import java.util.ArrayList;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
<BUG>import net.minecraft.client.gui.Gui;
import net.minecraft.client.renderer.Tessellator;</BUG>
import net.minecraftforge.client.event.MouseEvent;
import net.minecraftfor... | import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.renderer.Tessellator;
|
4,965 | INVENTORY(Minecraft.getMinecraft().gameSettings.keyBindInventory),
DROPITEM(Minecraft.getMinecraft().gameSettings.keyBindDrop),
ATTACK(Minecraft.getMinecraft().gameSettings.keyBindAttack),
USE(Minecraft.getMinecraft().gameSettings.keyBindUseItem),
CHAT(Minecraft.getMinecraft().gameSettings.keyBindChat),
<BUG>LCTRL(Keyb... | LCTRL(Minecraft.isRunningOnMac ? Keyboard.KEY_LMETA : Keyboard.KEY_LCONTROL),
PGUP(Keyboard.KEY_PRIOR),
|
4,966 | package com.eucalyptus.crypto.util;
import java.io.File;
<BUG>import java.net.Socket;
import java.security.InvalidAlgorithmParameterException;</BUG>
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
| import java.security.GeneralSecurityException;
import java.security.InvalidAlgorithmParameterException;
|
4,967 | import java.security.NoSuchAlgorithmException;
import java.security.Principal;
import java.security.PrivateKey;
import java.security.UnrecoverableKeyException;
import java.security.cert.CertificateException;
<BUG>import java.security.cert.X509Certificate;
import javax.net.ssl.KeyManager;</BUG>
import javax.net.ssl.KeyM... | import java.util.concurrent.TimeUnit;
import javax.net.ssl.KeyManager;
|
4,968 | import javax.net.ssl.X509ExtendedKeyManager;
import org.apache.log4j.Logger;
import com.eucalyptus.component.ComponentIds;
import com.eucalyptus.component.auth.SystemCredentials;
import com.eucalyptus.component.id.Eucalyptus;
<BUG>import com.eucalyptus.system.SubDirectory;
import com.sun.net.ssl.internal.ssl.X509Extend... | import com.google.common.base.Supplier;
import com.google.common.base.Suppliers;
import com.google.common.collect.ObjectArrays;
import com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager;
|
4,969 | SSLContext clientContext = null;
System.setProperty( "javax.net.ssl.trustStore", SubDirectory.KEYS.toString( ) + File.separator + "euca.p12" );
System.setProperty( "javax.net.ssl.keyStore", SubDirectory.KEYS.toString( ) + File.separator + "euca.p12" );
System.setProperty( "javax.net.ssl.trustStoreType", "PKCS12" );
Sys... | System.setProperty( "javax.net.ssl.trustStorePassword", ComponentIds.lookup( Eucalyptus.class ).name( ) );
System.setProperty( "javax.net.ssl.keyStorePassword", ComponentIds.lookup( Eucalyptus.class ).name( ) );
|
4,970 | System.setProperty( "javax.net.ssl.keyStorePassword", ComponentIds.lookup(Eucalyptus.class).name( ) );
System.setProperty( "javax.net.debug", "ssl" );//set this to "ssl" for debugging.</BUG>
try {
serverContext = SSLContext.getInstance( "TLS" );
<BUG>serverContext.init( SslSetup.SimpleKeyManager.getKeyManagers( ), Ssl... | SSLContext clientContext = null;
System.setProperty( "javax.net.ssl.trustStore", SubDirectory.KEYS.toString( ) + File.separator + "euca.p12" );
System.setProperty( "javax.net.ssl.keyStore", SubDirectory.KEYS.toString( ) + File.separator + "euca.p12" );
System.setProperty( "javax.net.ssl.trustStoreType", "PKCS12" );
Sys... |
4,971 | LOG.debug( e, e );
throw new Error( "Failed to initialize the server-side SSLContext", e );
}
try {
clientContext = SSLContext.getInstance( "TLS" );
<BUG>clientContext.init( SslSetup.SimpleKeyManager.getKeyManagers( ), SslSetup.SimpleTrustManager.getTrustManagers( ), null );
</BUG>
} catch ( Exception e ) {
LOG.debug( ... | clientContext.init( SslSetup.ClientKeyManager.getKeyManagers( ), SslSetup.ClientTrustManager.getTrustManagers( ), null );
|
4,972 | CLIENT_CONTEXT = clientContext;
}
public static SSLContext getServerContext( ) {
return SERVER_CONTEXT;
}
<BUG>public static SSLEngine getServerEngine() {//TODO:GRZE: @Configurability
</BUG>
SSLEngine engine = SslSetup.getServerContext( ).createSSLEngine( );
engine.setUseClientMode( false );
return engine;
| public static SSLEngine getServerEngine( ) {//TODO:GRZE: @Configurability
|
4,973 | return engine;
}
public static SSLContext getClientContext( ) {
return CLIENT_CONTEXT;
}
<BUG>public static class SimpleKeyManager extends KeyManagerFactorySpi {
private static KeyManager singleton = new SimplePKCS12KeyManager( );
</BUG>
public static KeyManager[] getKeyManagers( ) {
| static class ClientKeyManager extends KeyManagerFactorySpi {
private static KeyManager singleton = new ClientPKCS12KeyManager( );
|
4,974 | </BUG>
}
@Override
public PrivateKey getPrivateKey( String arg0 ) {
<BUG>if ( ComponentIds.lookup(Eucalyptus.class).name( ).equals( arg0 ) ) {
</BUG>
return trustedKey;
} else {
return null;
}
| public String[] getClientAliases( String arg0, Principal[] arg1 ) {
return new String[] { ComponentIds.lookup( Eucalyptus.class ).name( ) };
if ( ComponentIds.lookup( Eucalyptus.class ).name( ).equals( arg0 ) ) {
|
4,975 | import org.opennms.netmgt.provision.persist.requisition.RequisitionInterface;
import org.opennms.netmgt.provision.persist.requisition.RequisitionMonitoredService;
import org.opennms.netmgt.provision.persist.requisition.RequisitionNode;
import org.opennms.netmgt.xml.event.Event;
import org.springframework.beans.factory.... | import org.springframework.util.Assert;
import org.springframework.web.servlet.ModelAndView;
|
4,976 | } catch (ForeignSourceRepositoryException e) {
throw new RuntimeException("unable to retrieve foreign source '" + foreignSource + "'", e);
}
log().debug("creating database node");
OnmsDistPoller dp = m_distPollerDao.get("localhost");
<BUG>OnmsNode node = new OnmsNode();
node.setDistPoller(dp);</BUG>
node.setType("A");... | OnmsNode node = new OnmsNode(dp);
|
4,977 | import java.io.InputStream;
import java.net.URL;
import static org.assertj.core.api.Assertions.assertThat;
public class TomcatWebServerTest {
@Test
<BUG>public void shouldBootWebServer() throws Exception {
try(WeldContainer weldContainer = new Weld().disableDiscovery()</BUG>
.extensions(new ConfigurationExtension())
.b... | SSLBypass.disableSSLChecks();
try(WeldContainer weldContainer = new Weld().disableDiscovery()
|
4,978 | tomcat.start();
try(InputStream stream = new URL("http://localhost:8080/").openStream()) {
String data = IOUtils.toString(stream).trim();
assertThat(data).isEqualTo(MessageProvider.DATA);
}
<BUG>try(InputStream stream = new URL("http://localhost:8080/rest").openStream()) {
</BUG>
String data = IOUtils.toString(stream).... | try(InputStream stream = new URL("https://localhost:8443/rest").openStream()) {
|
4,979 | import java.io.InputStream;
import java.net.URL;
import static org.assertj.core.api.Assertions.assertThat;
public class JettyBootTest {
@Test
<BUG>public void shouldBootWebServer() throws Exception {
try(WeldContainer weldContainer = new Weld().disableDiscovery()</BUG>
.extensions(new ConfigurationExtension())
.beanCla... | SSLBypass.disableSSLChecks();
try(WeldContainer weldContainer = new Weld().disableDiscovery()
|
4,980 | webServer.start();
try(InputStream stream = new URL("http://localhost:8080/").openStream()) {
String data = IOUtils.toString(stream).trim();
assertThat(data).isEqualTo(MessageProvider.DATA);
}
<BUG>try(InputStream stream = new URL("http://localhost:8080/").openStream()) {
</BUG>
String data = IOUtils.toString(stream).t... | try(InputStream stream = new URL("https://localhost:8443/").openStream()) {
|
4,981 | }
public String getAddress() {
return address;
}
public boolean isSecuredConfigured(){
<BUG>return securedPort != 0 && keystorePath != null && truststorePassword != null;
}</BUG>
public int getSecuredPort(){
return securedPort;
}
| public int getPort() {
return port;
return securedPort != 0;
|
4,982 | import java.sql.SQLException;
import java.sql.Statement;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
<BUG>import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;</BUG>
import java.util.concurrent.locks.Lock;
| import java.util.HashMap;
import java.util.Map;
import java.util.Set;
|
4,983 | if (msgin != null) {
try {
msgin.close();
} catch (IOException e) {
}
<BUG>}
}
}
protected void updateSourceSequence(SourceSequence seq)
</BUG>
throws SQLException {
| releaseResources(stmt, null);
protected void storeMessage(Identifier sid, RMMessage msg, boolean outbound)
throws IOException, SQLException {
storeMessage(connection, sid, msg, outbound);
protected void updateSourceSequence(Connection con, SourceSequence seq)
|
4,984 | } catch (SQLException ex) {
if (!isTableExistsError(ex)) {
throw ex;
} else {
LOG.fine("Table CXF_RM_SRC_SEQUENCES already exists.");
<BUG>verifyTable(SRC_SEQUENCES_TABLE_NAME, SRC_SEQUENCES_TABLE_COLS);
</BUG>
}
} finally {
stmt.close();
| verifyTable(con, SRC_SEQUENCES_TABLE_NAME, SRC_SEQUENCES_TABLE_COLS);
|
4,985 | } catch (SQLException ex) {
if (!isTableExistsError(ex)) {
throw ex;
} else {
LOG.fine("Table CXF_RM_DEST_SEQUENCES already exists.");
<BUG>verifyTable(DEST_SEQUENCES_TABLE_NAME, DEST_SEQUENCES_TABLE_COLS);
</BUG>
}
} finally {
stmt.close();
| LOG.fine("Table CXF_RM_SRC_SEQUENCES already exists.");
verifyTable(con, SRC_SEQUENCES_TABLE_NAME, SRC_SEQUENCES_TABLE_COLS);
|
4,986 | }
} finally {
stmt.close();
}
for (String tableName : new String[] {OUTBOUND_MSGS_TABLE_NAME, INBOUND_MSGS_TABLE_NAME}) {
<BUG>stmt = connection.createStatement();
try {</BUG>
stmt.executeUpdate(MessageFormat.format(CREATE_MESSAGES_TABLE_STMT, tableName));
} catch (SQLException ex) {
if (!isTableExistsError(ex)) {
| stmt = con.createStatement();
try {
stmt.executeUpdate(CREATE_DEST_SEQUENCES_TABLE_STMT);
|
4,987 | throw ex;
} else {
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Table " + tableName + " already exists.");
}
<BUG>verifyTable(tableName, MESSAGES_TABLE_COLS);
</BUG>
}
} finally {
stmt.close();
| LOG.fine("Table CXF_RM_SRC_SEQUENCES already exists.");
verifyTable(con, SRC_SEQUENCES_TABLE_NAME, SRC_SEQUENCES_TABLE_COLS);
|
4,988 | if (newCols.size() > 0) {
if (LOG.isLoggable(Level.FINE)) {
LOG.log(Level.FINE, "Table " + tableName + " needs additional columns");
}
for (String[] newCol : newCols) {
<BUG>Statement st = connection.createStatement();
try {</BUG>
st.executeUpdate(MessageFormat.format(ALTER_TABLE_STMT_STR,
tableName, newCol[0], newCol[... | Statement st = con.createStatement();
try {
|
4,989 | if (nextReconnectAttempt < System.currentTimeMillis()) {
nextReconnectAttempt = System.currentTimeMillis() + reconnectDelay;
reconnectDelay = reconnectDelay * useExponentialBackOff;
}
}
<BUG>}
public static void deleteDatabaseFiles() {</BUG>
deleteDatabaseFiles(DEFAULT_DATABASE_NAME, true);
}
public static void deleteD... | public static void deleteDatabaseFiles() {
|
4,990 | 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.*;
|
4,991 | .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);
|
4,992 | </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... |
4,993 | 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)
|
4,994 | .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))
|
4,995 | .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))
|
4,996 | @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;
|
4,997 | 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;
}
|
4,998 | return configDirectory;
}
public boolean isLoaded() {
return loaded;
}
<BUG>public static Cause getCause() {
return instance().pluginCause;
}</BUG>
public EconomyService getEconomyService() {
return economyService;
| [DELETED] |
4,999 | 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.*;
|
5,000 | .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))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.