id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
44,701 | package mage.filter.predicate.mageobject;
import mage.MageObject;
import mage.abilities.Abilities;
<BUG>import mage.abilities.Ability;
import mage.filter.predicate.Predicate;</BUG>
import mage.game.Game;
public class AbilityPredicate implements Predicate<MageObject> {
private final Class<?> abilityClass;
| import mage.cards.Card;
import mage.filter.predicate.Predicate;
|
44,702 | private final Class<?> abilityClass;
public AbilityPredicate(Class<?> abilityClass) {
this.abilityClass = abilityClass;
}
@Override
<BUG>public boolean apply(MageObject input, Game game) {
Abilities<Ability> abilities = input.getAbilities();
for (int i = 0; i < abilities.size(); i++) {
if (abilityClass.equals(abilities.get(i).getClass())) {
</BUG>
return true;
| Abilities<Ability> abilities;
if (input instanceof Card){
abilities = ((Card)input).getAbilities(game);
} else {
for (Ability ability : abilities) {
if (abilityClass.equals(ability.getClass())) {
|
44,703 | resourcePrimKey, permissionsElement, true);
}
}
protected void readPortletDataPermissions(
PortletDataContext portletDataContext)
<BUG>throws Exception {
String xml = portletDataContext.getZipEntryAsString(
ExportImportPathUtil.getSourceRootPath(portletDataContext) +
"/portlet-data-permissions.xml");</BUG>
if (xml == null) {
| String sourceRootPath = ExportImportPathUtil.getSourceRootPath(
portletDataContext);
sourceRootPath.concat("/portlet-data-permissions.xml"));
|
44,704 | portletDataContext.addAssetCategories(
className, classPK, assetCategoryIds);
}
}
protected void readAssetLinks(PortletDataContext portletDataContext)
<BUG>throws Exception {
String xml = portletDataContext.getZipEntryAsString(
ExportImportPathUtil.getSourceRootPath(portletDataContext) +
"/links.xml");</BUG>
if (xml == null) {
| String sourceRootPath = ExportImportPathUtil.getSourceRootPath(
portletDataContext);
sourceRootPath.concat("/links.xml"));
|
44,705 | portletDataContext.addAssetTags(
className, classPK, StringUtil.split(assetTagNames));
}
}
protected void readComments(PortletDataContext portletDataContext)
<BUG>throws Exception {
String xml = portletDataContext.getZipEntryAsString(
ExportImportPathUtil.getSourceRootPath(portletDataContext) +
"/comments.xml");</BUG>
if (xml == null) {
| String sourceRootPath = ExportImportPathUtil.getSourceRootPath(
portletDataContext);
sourceRootPath.concat("/comments.xml"));
|
44,706 | }
portletDataContext.addComments(className, classPK, mbMessages);
}
}
protected void readExpandoTables(PortletDataContext portletDataContext)
<BUG>throws Exception {
String xml = portletDataContext.getZipEntryAsString(
ExportImportPathUtil.getSourceRootPath(portletDataContext) +
"/expando-tables.xml");</BUG>
if (xml == null) {
| protected void readComments(PortletDataContext portletDataContext)
String sourceRootPath = ExportImportPathUtil.getSourceRootPath(
portletDataContext);
sourceRootPath.concat("/comments.xml"));
|
44,707 | ExpandoColumn.class, columnId, expandoColumn.getColumnId());
}
}
}
protected void readLocks(PortletDataContext portletDataContext)
<BUG>throws Exception {
String xml = portletDataContext.getZipEntryAsString(
ExportImportPathUtil.getSourceRootPath(portletDataContext) +
"/locks.xml");</BUG>
if (xml == null) {
| String sourceRootPath = ExportImportPathUtil.getSourceRootPath(
portletDataContext);
sourceRootPath.concat("/locks.xml"));
|
44,708 | portletDataContext.addLocks(className, key, lock);
}
}
}
protected void readRatingsEntries(PortletDataContext portletDataContext)
<BUG>throws Exception {
String xml = portletDataContext.getZipEntryAsString(
ExportImportPathUtil.getSourceRootPath(portletDataContext) +
"/ratings.xml");</BUG>
if (xml == null) {
| String sourceRootPath = ExportImportPathUtil.getSourceRootPath(
portletDataContext);
sourceRootPath.concat("/ratings.xml"));
|
44,709 | Element permissionsElement = portletDataElement.addElement(
"permissions");
permissionsElement.addAttribute("role-name", roleName);
permissionsElement.addAttribute("actions", actions);
}
<BUG>}
portletDataContext.addZipEntry(
ExportImportPathUtil.getRootPath(portletDataContext) +
"/portlet-data-permissions.xml",
</BUG>
document.formattedString());
| String rootPath = ExportImportPathUtil.getRootPath(portletDataContext);
rootPath.concat("/portlet-data-permissions.xml"),
|
44,710 | Element assetElement = rootElement.addElement("asset-link");
assetElement.addAttribute("source-uuid", sourceAssetEntryUuid);
assetElement.addAttribute(
"target-uuids", StringUtil.merge(targetAssetEntryUuids));
assetElement.addAttribute("type", assetLinkType);
<BUG>}
portletDataContext.addZipEntry(
ExportImportPathUtil.getRootPath(portletDataContext) + "/links.xml",
document.formattedString());</BUG>
}
| String rootPath = ExportImportPathUtil.getRootPath(portletDataContext);
rootPath.concat("/links.xml"), document.formattedString());
|
44,711 | portletDataContext, className, classPK, mbMessage);
if (portletDataContext.isPathNotProcessed(commentPath)) {
portletDataContext.addZipEntry(commentPath, mbMessage);
}
}
<BUG>}
portletDataContext.addZipEntry(
ExportImportPathUtil.getRootPath(portletDataContext) +
"/comments.xml",
document.formattedString());</BUG>
}
| String rootPath = ExportImportPathUtil.getRootPath(portletDataContext);
rootPath.concat("/comments.xml"), document.formattedString());
|
44,712 | "type-settings");
UnicodeProperties typeSettingsProperties =
expandoColumn.getTypeSettingsProperties();
typeSettingsElement.addCDATA(typeSettingsProperties.toString());
}
<BUG>}
portletDataContext.addZipEntry(
ExportImportPathUtil.getRootPath(portletDataContext) +
"/expando-tables.xml",
document.formattedString());</BUG>
}
| String rootPath = ExportImportPathUtil.getRootPath(portletDataContext);
rootPath.concat("/expando-tables.xml"), document.formattedString());
|
44,713 | assetElement.addAttribute("class-name", className);
assetElement.addAttribute("key", key);
if (portletDataContext.isPathNotProcessed(path)) {
portletDataContext.addZipEntry(path, lock);
}
<BUG>}
portletDataContext.addZipEntry(
ExportImportPathUtil.getRootPath(portletDataContext) + "/locks.xml",
document.formattedString());</BUG>
}
| String rootPath = ExportImportPathUtil.getRootPath(portletDataContext);
rootPath.concat("/locks.xml"), document.formattedString());
|
44,714 | for (RatingsEntry ratingsEntry : ratingsEntries) {
String ratingsEntryPath = getRatingsEntryPath(
portletDataContext, className, classPK, ratingsEntry);
portletDataContext.addZipEntry(ratingsEntryPath, ratingsEntry);
}
<BUG>}
portletDataContext.addZipEntry(
ExportImportPathUtil.getRootPath(portletDataContext) +
"/ratings.xml",
document.formattedString());</BUG>
}
| String rootPath = ExportImportPathUtil.getRootPath(portletDataContext);
rootPath.concat("/ratings.xml"), document.formattedString());
|
44,715 | 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 + "samples";
String events_str = dataDir + "events";
| @Override public boolean isrunning(){ if ( filePlayback!=null ) return filePlayback.isrunning(); return false; }
void initFiles() throws FileNotFoundException {
|
44,716 | 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 final BroadcastReceiver mMessageReceiver = new BroadcastReceiver() {
@Override
public void onReceive(final Context context, final Intent intent) {
if (intent.getIntExtra(C.MESSAGE_TYPE, -1) == C.UPDATE_REQUEST) {
Log.i(TAG, "Received update request.");
sendAllInfo();
}
}
};</BUG>
private boolean run = true;
| [DELETED] |
44,717 | 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>public static final int UPDATE_REQUEST = 0;
</BUG>
public static final int UPDATE = 1;
public static final int REQUEST_PUT_HEADER = 2;
public static final int REQUEST_FLUSH_HEADER = 3;
| public static final int THREAD_INFO_TYPE = 0;
|
44,718 | package com.example.mapdemo;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
<BUG>import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.Polygon;</BUG>
import com.google.android.gms.maps.model.PolygonOptions;
import android.graphics.Color;
| import com.google.android.gms.maps.model.Dash;
import com.google.android.gms.maps.model.Dot;
import com.google.android.gms.maps.model.Gap;
import com.google.android.gms.maps.model.JointType;
import com.google.android.gms.maps.model.PatternItem;
import com.google.android.gms.maps.model.Polygon;
|
44,719 | 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.Status;
import org.mariotaku.sqliteqb.library.AllColumns;</BUG>
import org.mariotaku.sqliteqb.library.Columns;
import org.mariotaku.sqliteqb.library.Columns.Column;
import org.mariotaku.sqliteqb.library.Expression;
| import org.mariotaku.pickncrop.library.PNCUtils;
import org.mariotaku.sqliteqb.library.AllColumns;
|
44,720 | 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());
|
44,721 | 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.format("Unable to delete %s", file));
}</BUG>
}
| if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
44,722 | 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, String.format("Unable to delete %s", file));
}</BUG>
}
| twitter.updateProfileBannerImage(fileBody);
if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
44,723 | 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.format("Unable to delete %s", file));
}</BUG>
}
| twitter.updateProfileBannerImage(fileBody);
if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
44,724 | 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.util.DataStoreUtils;
import org.mariotaku.twidere.util.ImagePreloader;</BUG>
import org.mariotaku.twidere.util.InternalTwitterContentUtils;
import org.mariotaku.twidere.util.JsonSerializer;
import org.mariotaku.twidere.util.NotificationManagerWrapper;
| import org.mariotaku.twidere.util.DebugLog;
import org.mariotaku.twidere.util.ImagePreloader;
|
44,725 | 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);
|
44,726 | 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);
|
44,727 | 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.util.JsonSerializer;</BUG>
import org.mariotaku.twidere.util.Utils;
| import org.mariotaku.twidere.util.DebugLog;
import org.mariotaku.twidere.util.JsonSerializer;
|
44,728 | }
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) {
Log.d(HotMobiLogger.LOGTAG, "getting cached location");
}</BUG>
final Location location = Utils.getCachedLocation(appContext);
| DebugLog.d(HotMobiLogger.LOGTAG, "getting cached location", null);
|
44,729 | 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 DestroyStatusTask task = new DestroyStatusTask(context,accountKey, statusId);
</BUG>
return asyncTaskManager.add(task, true);
}
public int destroyUserListAsync(final UserKey accountKey, final String listId) {
| final DestroyStatusTask task = new DestroyStatusTask(context, accountKey, statusId);
|
44,730 | @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.getException());
}</BUG>
}
| public UserKey[] getAccountKeys() {
return DataStoreUtils.getActivatedAccountKeys(context);
|
44,731 | 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);
|
44,732 | package org.mule.extension.http.internal.listener;
import static org.mule.extension.http.api.HttpStreamingType.ALWAYS;
<BUG>import static org.mule.extension.http.api.HttpStreamingType.AUTO;
import static org.mule.runtime.module.http.api.HttpConstants.HttpStatus.getReasonPhraseForStatusCode;</BUG>
import static org.mule.runtime.module.http.api.HttpHeaders.Names.CONTENT_LENGTH;
import static org.mule.runtime.module.http.api.HttpHeaders.Names.CONTENT_TYPE;
import static org.mule.runtime.module.http.api.HttpHeaders.Names.TRANSFER_ENCODING;
| import static org.mule.runtime.api.metadata.DataType.BYTE_ARRAY;
import static org.mule.runtime.api.metadata.DataType.OBJECT;
import static org.mule.runtime.module.http.api.HttpConstants.HttpStatus.getReasonPhraseForStatusCode;
|
44,733 | throws MessagingException {
if (logger.isDebugEnabled()) {
logger.debug("Message contains attachments. Ignoring payload and trying to generate multipart response.");
}
final MultipartHttpEntity multipartEntity;
<BUG>try {
multipartEntity = new MultipartHttpEntity(HttpPartDataSource.createFrom(parts));
</BUG>
return new ByteArrayHttpEntity(HttpMultipartEncoder.createMultipartContent(multipartEntity, contentType));
} catch (Exception e) {
| Transformer objectToByteArray = muleContext.getRegistry().lookupTransformer(OBJECT, BYTE_ARRAY);
multipartEntity = new MultipartHttpEntity(HttpPartDataSource.createFrom(partPayload, objectToByteArray));
|
44,734 | @Optional
private Function<Event, String> reasonPhrase;
@Parameter
@Optional
private Function<Event, Map> headersRef;
<BUG>@Parameter
@Optional
private Function<Event, List> partsRef;</BUG>
public Integer getStatusCode(Event event) {
return statusCode != null ? statusCode.apply(event) : null;
| private Function<Event, Integer> statusCode;
|
44,735 | package org.mule.extension.http.api;
<BUG>import static org.mule.runtime.core.config.i18n.I18nMessageFactory.createStaticMessage;
import static org.mule.runtime.core.util.IOUtils.toDataHandler;
import org.mule.runtime.core.api.MuleRuntimeException;</BUG>
import org.mule.runtime.extension.api.annotation.Parameter;
import org.mule.runtime.extension.api.annotation.param.Optional;
| [DELETED] |
44,736 | <BUG>package org.jboss.as.naming;
import org.jboss.as.naming.util.NameParser;</BUG>
import org.jboss.as.naming.util.NamingUtils;
import javax.naming.Binding;
import javax.naming.CannotProceedException;
| import javax.naming.spi.ObjectFactory;
import static org.jboss.as.naming.SecurityActions.getContextClassLoader;
import org.jboss.as.naming.context.ModularReference;
import org.jboss.as.naming.context.ObjectFactoryBuilder;
import org.jboss.as.naming.context.ReferenceWithClassLoader;
import org.jboss.as.naming.util.NameParser;
|
44,737 | object = NamingManager.getStateToBind(object, absoluteName, this, environment);
if(object instanceof Referenceable) {
object = asReferenceable(object).getReference();
}
String className = object.getClass().getName();
<BUG>if(object instanceof Reference) {
className = asReference(object).getClassName();
}</BUG>
try {
| final Reference reference = asReference(object);
className = reference.getClassName();
object = getReferenceBindObject(reference);
|
44,738 | private QueueConnection conn;
private Queue queue;
private QueueSession session;
private final List<String> receivedMessages = new ArrayList<String>();
public void start() throws Exception {
<BUG>ClassLoader cl = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
try {</BUG>
InitialContext ctx = new InitialContext();
Module module = Module.forClass(Test.class);
| [DELETED] |
44,739 | conn.start();
queue = (Queue)ctx.lookup("queue/test");
session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
QueueReceiver recv = session.createReceiver(queue);
recv.setMessageListener(new ExampeMessageListener());
<BUG>} finally {
Thread.currentThread().setContextClassLoader(cl);
}</BUG>
}
public void stop() throws Exception {
| [DELETED] |
44,740 | package org.jboss.as.naming.context;
<BUG>import java.security.AccessController;
import java.security.PrivilegedAction;</BUG>
import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.Name;
| [DELETED] |
44,741 | package guru.nidi.ramltester;
import edu.umd.cs.findbugs.Priorities;
<BUG>import guru.nidi.codeassert.AnalyzerConfig;
import guru.nidi.codeassert.PackageCollector;
</BUG>
import guru.nidi.codeassert.dependency.DependencyRule;
| import guru.nidi.codeassert.config.AnalyzerConfig;
import guru.nidi.codeassert.config.In;
import guru.nidi.codeassert.config.PackageCollector;
|
44,742 | 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.SCALE_FACTOR).padTop(3 * GlobalConf.SCALE_FACTOR);
</BUG>
HorizontalGroup dateGroup = new HorizontalGroup();
dateGroup.space(4 * GlobalConf.SCALE_FACTOR);
dateGroup.addActor(date);
| VerticalGroup timeGroup = new VerticalGroup().align(Align.left).columnAlign(Align.left).space(3 * GlobalConf.SCALE_FACTOR).padTop(3 * GlobalConf.SCALE_FACTOR);
|
44,743 | 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 * GlobalConf.SCALE_FACTOR);
</BUG>
objectsGroup.addActor(searchBox);
if (focusListScrollPane != null) {
objectsGroup.addActor(focusListScrollPane);
| VerticalGroup objectsGroup = new VerticalGroup().align(Align.left).columnAlign(Align.left).space(3 * GlobalConf.SCALE_FACTOR);
|
44,744 | 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() {
|
44,745 | </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() {
|
44,746 | });
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.add(time);</BUG>
panes.put(timeComponent.getClass().getSimpleName(), time);
if (Constants.desktop) {
recCamera = new OwnImageButton(skin, "rec");
| time.align(Align.left).columnAlign(Align.left);
mainActors.add(time);
|
44,747 | 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, false);
<BUG>objects.align(Align.left);
mainActors.add(objects);</BUG>
panes.put(objectsComponent.getClass().getSimpleName(), objects);
GaiaComponent gaiaComponent = new GaiaComponent(skin, ui);
gaiaComponent.initialize();
| objects.align(Align.left).columnAlign(Align.left);
mainActors.add(objects);
|
44,748 | 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"), musicComponent.getActor(), skin, true, musicActors);
<BUG>music.align(Align.left);
mainActors.add(music);</BUG>
panes.put(musicComponent.getClass().getSimpleName(), music);
}
Button switchWebgl = new OwnTextButton(txt("gui.webgl.back"), skin, "link");
| music.align(Align.left).columnAlign(Align.left);
mainActors.add(music);
|
44,749 | package com.facebook.presto.accumulo;
<BUG>import com.facebook.presto.spi.Connector;
import com.facebook.presto.spi.ConnectorFactory;
import com.facebook.presto.spi.ConnectorHandleResolver;
import com.facebook.presto.spi.type.TypeManager;</BUG>
import com.google.common.base.Throwables;
| import com.facebook.presto.spi.connector.Connector;
import com.facebook.presto.spi.connector.ConnectorFactory;
import com.facebook.presto.spi.type.TypeManager;
|
44,750 | public String getName()
{
return CONNECTOR_NAME;
}
@Override
<BUG>public Connector create(final String connectorId, Map<String, String> requiredConfig)
{
requireNonNull(requiredConfig, "requiredConfig is null");
requireNonNull(optionalConfig, "optionalConfig is null");</BUG>
try {
| public Connector create(String connectorId, Map<String, String> requiredConfig)
requireNonNull(connectorId, "connectorId is null");
|
44,751 | import static com.facebook.presto.accumulo.AccumuloErrorCode.VIEW_ALREADY_EXISTS;
import static com.facebook.presto.accumulo.AccumuloErrorCode.VIEW_IS_TABLE;
import static java.lang.String.format;
import static java.util.Objects.requireNonNull;
public class AccumuloClient
<BUG>{
private static final Logger LOG = Logger.get(AccumuloClient.class);
private static final String DUMMY_LOCATION = "localhost:9997";</BUG>
private static final String MAC_PASSWORD = "secret";
private static final String MAC_USER = "root";
| public static final String DUMMY_LOCATION = "localhost:9997";
|
44,752 | throws AccumuloException, AccumuloSecurityException, IOException, InterruptedException
{
this.conf = requireNonNull(config, "config is null");
this.metaManager = config.getMetadataManager();
this.tableManager = new AccumuloTableManager(config);
<BUG>this.auths = getAccumuloConnector(this.conf).securityOperations().getUserAuthorizations(conf.getUsername());
}</BUG>
public AccumuloTable createTable(ConnectorTableMetadata meta)
{
validateCreateTable(meta);
| this.sIndexLookup = new IndexLookup(conn, conf, this.auths);
}
|
44,753 | List<String> indexedColumns = AccumuloTableProperties.getIndexColumns(meta.getProperties());
ImmutableList.Builder<AccumuloColumnHandle> cBuilder = ImmutableList.builder();
for (int ordinal = 0; ordinal < meta.getColumns().size(); ++ordinal) {
ColumnMetadata cm = meta.getColumns().get(ordinal);
if (cm.getName().toLowerCase().equals(rowIdColumn)) {
<BUG>cBuilder.add(new AccumuloColumnHandle(rowIdColumn, null, null,
</BUG>
cm.getType(), ordinal, "Accumulo row ID", false));
}
else {
| cBuilder.add(new AccumuloColumnHandle(rowIdColumn, Optional.empty(), Optional.empty(),
|
44,754 | for (Map.Entry<String, Set<String>> g : groups.get().entrySet()) {
ImmutableSet.Builder<Text> famBldr = ImmutableSet.builder();
for (String col : g.getValue()) {
famBldr.add(new Text(table.getColumns().stream()
.filter(x -> x.getName().equals(col)).collect(Collectors.toList())
<BUG>.get(0).getFamily()));
</BUG>
}
localityGroupsBldr.put(g.getKey(), famBldr.build());
}
| .get(0).getFamily().get()));
|
44,755 | String tableName = AccumuloTable.getFullTableName(schema, table);
LOG.info("Getting tablet splits for table %s", tableName);
Collection<Range> rowIdRanges = getRangesFromDomain(rowIdDom, serializer);
List<TabletSplitMetadata> tabletSplits = new ArrayList<>();
if (AccumuloSessionProperties.isOptimizeIndexEnabled(session)) {
<BUG>Authorizations scanAuths = getScanAuthorizations(session, schema, table);
IndexLookup sIndexLookup = new IndexLookup(conn, conf, scanAuths);</BUG>
if (sIndexLookup.applyIndex(schema, table, session, constraints, rowIdRanges,
tabletSplits, serializer)) {
| sIndexLookup.setAuths(getScanAuthorizations(session, schema, table));
|
44,756 | Authorizations scanAuths =
conn.securityOperations().getUserAuthorizations(sessionScanUser);
LOG.info("Using session scan auths for user %s: %s", sessionScanUser, scanAuths);
return scanAuths;
}
<BUG>String strAuths = this.getTable(new SchemaTableName(schema, table)).getScanAuthorizations();
if (strAuths != null) {
Authorizations scanAuths = new Authorizations(Iterables.toArray(COMMA_SPLITTER.split(strAuths), String.class));
</BUG>
LOG.info("scan_auths table property set, using: %s", scanAuths);
| Optional<String> strAuths = this.getTable(new SchemaTableName(schema, table)).getScanAuthorizations();
if (strAuths.isPresent()) {
Authorizations scanAuths = new Authorizations(Iterables.toArray(COMMA_SPLITTER.split(strAuths.get()), String.class));
|
44,757 | rangeBuilder.add(new Range(new Text(serializer.encode(t, o))));
}
}
}
else {
<BUG>for (com.facebook.presto.spi.predicate.Range r : dom.getValues().getRanges()
</BUG>
.getOrderedRanges()) {
rangeBuilder.add(getRangeFromPrestoRange(r, serializer));
}
| for (com.facebook.presto.spi.predicate.Range r : dom.get().getValues().getRanges()
|
44,758 | public class AccumuloConnector
implements Connector
{
private static final Logger LOG = Logger.get(AccumuloConnector.class);
private final LifeCycleManager lifeCycleManager;
<BUG>private final AccumuloMetadata metadata;
private final AccumuloSplitManager splitManager;</BUG>
private final AccumuloRecordSetProvider recordSetProvider;
private final AccumuloHandleResolver handleResolver;
private final AccumuloPageSinkProvider pageSinkProvider;
| private final AccumuloMetadataFactory metadataFactory;
private final AccumuloSplitManager splitManager;
|
44,759 | import wycc.util.Pair;
import wycc.util.Triple;
import wyfs.lang.Path;
import wyil.lang.*;
import wyil.lang.Bytecode.AliasDeclaration;
<BUG>import wyil.lang.SyntaxTree.Location;
public final class CodeGenerator {
public CodeGenerator(CompileTask builder, FlowTypeChecker resolver) {
}</BUG>
public WyilFile generate(WhileyFile whileyFile, Path.Entry<WyilFile> target) {
| import wyil.util.TypeSystem;
private final TypeSystem typeSystem;
public CodeGenerator(CompileTask builder) {
this.typeSystem = builder.getTypeSystem();
}
|
44,760 | EnclosingScope falseScope = scope.clone();
if (condition.lhs instanceof Expr.LocalVariable) {
Expr.LocalVariable var = (Expr.LocalVariable) condition.lhs;
Nominal varType = var.result();
Expr.TypeVal typeTest = (Expr.TypeVal) condition.rhs;
<BUG>Nominal trueBranchType = Nominal.intersect(varType, typeTest.type);
Nominal falseBranchType = Nominal.intersect(varType, Nominal.Negation(typeTest.type));
</BUG>
trueScope.createAlias(trueBranchType, var.var, condition.attributes());
| Nominal trueBranchType = Nominal.intersect(varType, typeTest.type, typeSystem);
Nominal falseBranchType = Nominal.intersect(varType, Nominal.Negation(typeTest.type), typeSystem);
|
44,761 | Location<?> rhsDecl = rightChild.getLocation(var);
Type type = Type.Union(lhsDecl.getType(), rhsDecl.getType());
if (type.equals(origDecl.getType())) {
result.environment.put(var, origDecl.getIndex());
} else {
<BUG>Nominal nominal = Nominal.construct(type, type);
int newDecl = result.createAlias(nominal, var, Collections.EMPTY_LIST);</BUG>
result.environment.put(var, newDecl);
}
}
| Nominal nominal = Nominal.construct(type);
int newDecl = result.createAlias(nominal, var, Collections.EMPTY_LIST);
|
44,762 | int[] result = new int[modified.size()];
int index = 0;
for(Integer i : modified) {
Bytecode.VariableAccess va = new Bytecode.VariableAccess(i);
Location<?> location = tree.getLocation(i);
<BUG>Nominal type = Nominal.construct(location.getType(),location.getType());
result[index++] = scope.add(type,va);</BUG>
}
return result;
}
| Nominal type = Nominal.construct(location.getType());
result[index++] = scope.add(type,va);
|
44,763 | public int declare(Nominal type, String name, List<Attribute> attributes) {
List<SyntaxTree.Location<?>> locations = enclosing.getLocations();
int index = locations.size();
environment.put(name, index);
Bytecode.VariableDeclaration decl = new Bytecode.VariableDeclaration(name);
<BUG>Type locationType = normalise(type);
locations.add(new SyntaxTree.Location<Bytecode>(enclosing, locationType, decl, attributes));</BUG>
return index;
}
public int createAlias(Nominal type, String name, List<Attribute> attributes) {
| Type locationType = type.nominal();
locations.add(new SyntaxTree.Location<Bytecode>(enclosing, locationType, decl, attributes));
|
44,764 | return add(types,operand,attributes);
}
public int add(List<Nominal> types, Bytecode operand, List<Attribute> attributes) {
Type[] nominals = new Type[types.size()];
for (int i = 0; i != nominals.length; ++i) {
<BUG>nominals[i] = normalise(types.get(i));
</BUG>
}
return add(nominals,operand,attributes);
}
| nominals[i] = types.get(i).nominal();
|
44,765 | System.out.println(change);
}
}
};
@Override
<BUG>protected Callback<VChild, Void> copyChildCallback()
</BUG>
{
return (child) ->
{
| protected Callback<VChild, Void> copyIntoCallback()
|
44,766 | package jfxtras.labs.icalendarfx.components;
import jfxtras.labs.icalendarfx.properties.component.descriptive.Comment;
<BUG>import jfxtras.labs.icalendarfx.properties.component.misc.IANAProperty;
import jfxtras.labs.icalendarfx.properties.component.misc.UnknownProperty;</BUG>
import jfxtras.labs.icalendarfx.properties.component.recurrence.RecurrenceDates;
import jfxtras.labs.icalendarfx.properties.component.recurrence.RecurrenceRule;
| import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty;
|
44,767 | VEVENT ("VEVENT",
Arrays.asList(PropertyType.ATTACHMENT, PropertyType.ATTENDEE, PropertyType.CATEGORIES,
PropertyType.CLASSIFICATION, PropertyType.COMMENT, PropertyType.CONTACT, PropertyType.DATE_TIME_CREATED,
PropertyType.DATE_TIME_END, PropertyType.DATE_TIME_STAMP, PropertyType.DATE_TIME_START,
PropertyType.DESCRIPTION, PropertyType.DURATION, PropertyType.EXCEPTION_DATE_TIMES,
<BUG>PropertyType.GEOGRAPHIC_POSITION, PropertyType.IANA_PROPERTY, PropertyType.LAST_MODIFIED,
PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER, PropertyType.PRIORITY,</BUG>
PropertyType.RECURRENCE_DATE_TIMES, PropertyType.RECURRENCE_IDENTIFIER, PropertyType.RELATED_TO,
PropertyType.RECURRENCE_RULE, PropertyType.REQUEST_STATUS, PropertyType.RESOURCES, PropertyType.SEQUENCE,
PropertyType.STATUS, PropertyType.SUMMARY, PropertyType.TIME_TRANSPARENCY, PropertyType.UNIQUE_IDENTIFIER,
| PropertyType.GEOGRAPHIC_POSITION, PropertyType.LAST_MODIFIED,
PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER, PropertyType.PRIORITY,
|
44,768 | VTODO ("VTODO",
Arrays.asList(PropertyType.ATTACHMENT, PropertyType.ATTENDEE, PropertyType.CATEGORIES,
PropertyType.CLASSIFICATION, PropertyType.COMMENT, PropertyType.CONTACT, PropertyType.DATE_TIME_COMPLETED,
PropertyType.DATE_TIME_CREATED, PropertyType.DATE_TIME_DUE, PropertyType.DATE_TIME_STAMP,
PropertyType.DATE_TIME_START, PropertyType.DESCRIPTION, PropertyType.DURATION,
<BUG>PropertyType.EXCEPTION_DATE_TIMES, PropertyType.GEOGRAPHIC_POSITION, PropertyType.IANA_PROPERTY,
PropertyType.LAST_MODIFIED, PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER,</BUG>
PropertyType.PERCENT_COMPLETE, PropertyType.PRIORITY, PropertyType.RECURRENCE_DATE_TIMES,
PropertyType.RECURRENCE_IDENTIFIER, PropertyType.RELATED_TO, PropertyType.RECURRENCE_RULE,
PropertyType.REQUEST_STATUS, PropertyType.RESOURCES, PropertyType.SEQUENCE, PropertyType.STATUS,
| PropertyType.EXCEPTION_DATE_TIMES, PropertyType.GEOGRAPHIC_POSITION,
PropertyType.LAST_MODIFIED, PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER,
|
44,769 | throw new RuntimeException("not implemented");
}
},
DAYLIGHT_SAVING_TIME ("DAYLIGHT",
Arrays.asList(PropertyType.COMMENT, PropertyType.DATE_TIME_START,
<BUG>PropertyType.IANA_PROPERTY, PropertyType.NON_STANDARD, PropertyType.RECURRENCE_DATE_TIMES,
PropertyType.RECURRENCE_RULE, PropertyType.TIME_ZONE_NAME, PropertyType.TIME_ZONE_OFFSET_FROM,</BUG>
PropertyType.TIME_ZONE_OFFSET_TO),
DaylightSavingTime.class)
{
| PropertyType.RECURRENCE_RULE, PropertyType.TIME_ZONE_NAME, PropertyType.TIME_ZONE_OFFSET_FROM,
|
44,770 | throw new RuntimeException("not implemented");
}
},
VALARM ("VALARM",
Arrays.asList(PropertyType.ACTION, PropertyType.ATTACHMENT, PropertyType.ATTENDEE, PropertyType.DESCRIPTION,
<BUG>PropertyType.DURATION, PropertyType.IANA_PROPERTY, PropertyType.NON_STANDARD, PropertyType.REPEAT_COUNT,
PropertyType.SUMMARY, PropertyType.TRIGGER),</BUG>
VAlarm.class)
{
@Override
| DAYLIGHT_SAVING_TIME ("DAYLIGHT",
Arrays.asList(PropertyType.COMMENT, PropertyType.DATE_TIME_START,
PropertyType.NON_STANDARD, PropertyType.RECURRENCE_DATE_TIMES,
PropertyType.RECURRENCE_RULE, PropertyType.TIME_ZONE_NAME, PropertyType.TIME_ZONE_OFFSET_FROM,
PropertyType.TIME_ZONE_OFFSET_TO),
DaylightSavingTime.class)
|
44,771 | private ContentLineStrategy contentLineGenerator;
protected void setContentLineGenerator(ContentLineStrategy contentLineGenerator)
{
this.contentLineGenerator = contentLineGenerator;
}
<BUG>protected Callback<VChild, Void> copyChildCallback()
</BUG>
{
throw new RuntimeException("Can't copy children. copyChildCallback isn't overridden in subclass." + this.getClass());
};
| protected Callback<VChild, Void> copyIntoCallback()
|
44,772 | import jfxtras.labs.icalendarfx.properties.calendar.Version;
import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty;
public enum CalendarProperty
{
CALENDAR_SCALE ("CALSCALE",
<BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER),
CalendarScale.class)</BUG>
{
@Override
public VChild parse(VCalendar vCalendar, String contentLine)
| Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD),
CalendarScale.class)
|
44,773 | CalendarScale calendarScale = (CalendarScale) child;
destination.setCalendarScale(calendarScale);
}
},
METHOD ("METHOD",
<BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER),
Method.class)</BUG>
{
@Override
public VChild parse(VCalendar vCalendar, String contentLine)
| Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD),
Method.class)
|
44,774 | }
list.add(new NonStandardProperty((NonStandardProperty) child));
}
},
PRODUCT_IDENTIFIER ("PRODID",
<BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER),
ProductIdentifier.class)</BUG>
{
@Override
public VChild parse(VCalendar vCalendar, String contentLine)
| public void copyChild(VChild child, VCalendar destination)
CalendarScale calendarScale = (CalendarScale) child;
destination.setCalendarScale(calendarScale);
METHOD ("METHOD",
Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD),
Method.class)
|
44,775 | ProductIdentifier productIdentifier = (ProductIdentifier) child;
destination.setProductIdentifier(productIdentifier);
}
},
VERSION ("VERSION",
<BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER),
Version.class)</BUG>
{
@Override
public VChild parse(VCalendar vCalendar, String contentLine)
| Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD),
Version.class)
|
44,776 | package jfxtras.labs.icalendarfx.components;
import jfxtras.labs.icalendarfx.properties.component.descriptive.Comment;
<BUG>import jfxtras.labs.icalendarfx.properties.component.misc.IANAProperty;
import jfxtras.labs.icalendarfx.properties.component.misc.UnknownProperty;</BUG>
import jfxtras.labs.icalendarfx.properties.component.recurrence.RecurrenceDates;
import jfxtras.labs.icalendarfx.properties.component.recurrence.RecurrenceRule;
| import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty;
|
44,777 | package org.basex;
import static org.basex.core.Text.*;
<BUG>import java.io.IOException;
import org.basex.core.MainProp;</BUG>
import org.basex.core.Main;
import org.basex.core.Prop;
import org.basex.core.cmd.Check;
| import java.util.HashMap;
import java.util.Map;
import org.basex.core.MainProp;
|
44,778 | if(arg.dash()) {
final char c = arg.next();
if(c == 'b') {
if(bind.length() != 0) bind.append(',');
bind.append(arg.string());
<BUG>arg.check(set(Prop.BINDINGS, bind));
} else if(c == 'c') {</BUG>
commands = arg.remaining();
} else if(c == 'd') {
context.mprop.set(MainProp.DEBUG, true);
| options.put(Prop.BINDINGS, bind);
} else if(c == 'c') {
|
44,779 | user = arg.string();
} else if(c == 'v') {
verbose = true;
} else if(c == 'V') {
verbose = true;
<BUG>arg.check(set(Prop.QUERYINFO, true));
} else if(c == 'w') {
arg.check(set(Prop.CHOP, false));
} else if(c == 'W') {</BUG>
writeProps = true;
| options.put(Prop.QUERYINFO, true);
options.put(Prop.CHOP, false);
} else if(c == 'W') {
|
44,780 | }
} else {
file = file == null ? arg.string() : file + " " + arg.string();
}
}
<BUG>console = file == null && commands == null && query == null;
return arg.finish();</BUG>
} catch(final IOException ex) {
Util.errln(Util.server(ex));
return false;
| for(final Map.Entry<Object[], Object> entry : options.entrySet()) {
if(!arg.ok(set(entry.getKey(), entry.getValue()))) break;
return arg.finish();
|
44,781 | " -v/V Show (all) process info" + NL +
" -w Retain whitespaces from source files" + NL +
" -z Skip output of results";
String CLIENTMODE = "Client";
String CLIENTINFO =
<BUG>" [-npPU] [-dosvVwz] [-cq] [file]" + NL +
</BUG>
" [file] Execute XQuery file" + NL +
" -b<pars> Bind external XQuery variables" + NL +
" -c<cmd> Execute database command(s)" + NL +
| " [-dnopPsUvVwz] [-cq] [file]" + NL +
|
44,782 | for (MetaDataEntry m : reply.getMetaData()) {
httpResponse.addHeader(ObjectStorageProperties.AMZ_META_HEADER_PREFIX + m.getName(), m.getValue());
}
OSGUtil.addCopiedHeadersToResponse(httpResponse, reply);
if (reply.getByteRangeEnd() != null) {
<BUG>httpResponse.addHeader("Content-Range", reply.getByteRangeStart() + "-" + reply.getByteRangeEnd() + "/" + reply.getSize());
</BUG>
}
overrideHeaders(reply, httpResponse);
return httpResponse;
| httpResponse.addHeader(HttpHeaders.Names.CONTENT_RANGE, reply.getByteRangeStart() + "-" + reply.getByteRangeEnd() + "/" + reply.getSize());
|
44,783 | import com.eucalyptus.util.EucalyptusCloudException;
import com.google.common.base.Strings;
import com.google.common.collect.Maps;
import com.google.common.net.HttpHeaders;
import edu.ucsb.eucalyptus.msgs.ComponentProperty;
<BUG>import edu.ucsb.eucalyptus.util.SystemUtil;
import org.apache.log4j.Logger;</BUG>
import org.jboss.netty.handler.codec.http.HttpResponseStatus;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
| import org.apache.commons.lang.ObjectUtils;
import org.apache.log4j.Logger;
|
44,784 | Long lastIndex = (objectSize - 1) < 0 ? 0 : (objectSize - 1);
Long byteRangeStart = request.getByteRangeStart();
Long byteRangeEnd = request.getByteRangeEnd();
if (byteRangeStart != null && byteRangeEnd != null) { // both start and end represent some value
if (byteRangeEnd < byteRangeStart) { // check if end is greater than start
<BUG>byteRangeStart = 0L;
byteRangeEnd = lastIndex;
</BUG>
}
| byteRangeStart = null;
byteRangeEnd = null;
|
44,785 | 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.TangoCoordinateFramePair;
import com.google.atap.tangoservice.TangoEvent;</BUG>
import com.google.atap.tangoservice.TangoOutOfDateException;
import com.google.atap.tangoservice.TangoPoseData;
import com.google.atap.tangoservice.TangoXyzIjData;
| import com.google.atap.tangoservice.TangoErrorException;
import com.google.atap.tangoservice.TangoEvent;
|
44,786 | 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();
|
44,787 | 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: " +
|
44,788 | 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.math.vector.Vector3;</BUG>
import org.rajawali3d.primitives.ScreenQuad;
import org.rajawali3d.primitives.Sphere;
import org.rajawali3d.renderer.RajawaliRenderer;
| import org.rajawali3d.math.Quaternion;
import org.rajawali3d.math.vector.Vector3;
|
44,789 | translationMoon.setRepeatMode(Animation.RepeatMode.INFINITE);
translationMoon.setTransformable3D(moon);
getCurrentScene().registerAnimation(translationMoon);
translationMoon.play();
}
<BUG>public void updateRenderCameraPose(TangoPoseData devicePose, DeviceExtrinsics extrinsics) {
Pose cameraPose = ScenePoseCalculator.toOpenGlCameraPose(devicePose, extrinsics);
getCurrentCamera().setRotation(cameraPose.getOrientation());
getCurrentCamera().setPosition(cameraPose.getPosition());
}</BUG>
public int getTextureId() {
| 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());
getCurrentCamera().setPosition(translation[0], translation[1], translation[2]);
|
44,790 | 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.tangoservice.TangoErrorException;
import com.google.atap.tangoservice.TangoEvent;
| import com.google.atap.tangoservice.TangoAreaDescriptionMetaData;
import com.google.atap.tangoservice.TangoConfig;
|
44,791 | return sw.toString();
}
public static void captureEvent(SentryEventBuilder builder) {
final SentryEventRequest request;
if (Sentry.getInstance().captureListener != null) {
<BUG>request = new SentryEventRequest(Sentry.getInstance().captureListener.beforeCapture(builder));
} else {</BUG>
request = new SentryEventRequest(builder);
}
| builder = Sentry.getInstance().captureListener.beforeCapture(builder);
if (builder == null) {
Log.e(Sentry.TAG, "SentryEventBuilder in captureEvent is null");
return;
} else {
|
44,792 | package com.continuuity.security.server;
import com.continuuity.common.conf.CConfiguration;
<BUG>import com.continuuity.common.conf.Constants;
import com.google.common.base.Throwables;
import com.google.common.util.concurrent.AbstractExecutionThreadService;
import com.google.inject.Inject;
import com.google.inject.name.Named;</BUG>
import org.apache.twill.common.Cancellable;
| import com.continuuity.common.guice.ConfigModule;
import com.continuuity.common.guice.DiscoveryRuntimeModule;
import com.continuuity.common.guice.IOModule;
import com.continuuity.security.guice.SecurityModules;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.name.Named;
|
44,793 | import org.apache.twill.discovery.DiscoveryService;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.handler.ContextHandler;
import org.eclipse.jetty.server.handler.HandlerList;
<BUG>import org.eclipse.jetty.server.nio.SelectChannelConnector;
import org.eclipse.jetty.util.thread.QueuedThreadPool;</BUG>
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.net.InetAddress;
| import org.eclipse.jetty.server.ssl.SslSelectChannelConnector;
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.eclipse.jetty.util.thread.QueuedThreadPool;
|
44,794 | import java.util.concurrent.atomic.AtomicInteger;
public class ExternalAuthenticationServer extends AbstractExecutionThreadService {
private final int port;
private final int maxThreads;
private final HandlerList handlers;
<BUG>private final DiscoveryService discoveryService;
private Cancellable serviceCancellable;</BUG>
private InetSocketAddress socketAddress;
private static final Logger LOG = LoggerFactory.getLogger(ExternalAuthenticationServer.class);
private Server server;
| private final CConfiguration configuration;
private Cancellable serviceCancellable;
|
44,795 | public ExternalAuthenticationServer(CConfiguration configuration, DiscoveryService discoveryService,
@Named("security.handlers") HandlerList handlers) {
this.port = configuration.getInt(Constants.Security.AUTH_SERVER_PORT);
this.maxThreads = configuration.getInt(Constants.Security.MAX_THREADS);
this.handlers = handlers;
<BUG>this.discoveryService = discoveryService;
}</BUG>
public InetSocketAddress getSocketAddress() {
return this.socketAddress;
}
| this.configuration = configuration;
|
44,796 | import org.eclipse.jetty.security.authentication.BasicAuthenticator;
import org.eclipse.jetty.util.security.Constraint;
import java.net.URL;
public class BasicAuthenticationHandler extends ConstraintSecurityHandler {
@Inject
<BUG>public BasicAuthenticationHandler() throws Exception {
</BUG>
super();
String[] roles = Constants.Security.BASIC_USER_ROLES;
Constraint constraint = new Constraint();
| public BasicAuthenticationHandler(CConfiguration configuration) throws Exception {
|
44,797 | super();
String[] roles = Constants.Security.BASIC_USER_ROLES;
Constraint constraint = new Constraint();
constraint.setName(Constraint.__BASIC_AUTH);
constraint.setRoles(roles);
<BUG>constraint.setAuthenticate(true);
ConstraintMapping constraintMapping = new ConstraintMapping();</BUG>
constraintMapping.setConstraint(constraint);
constraintMapping.setPathSpec("/*");
URL realmFile = getClass().getResource("/realm.properties");
| if (configuration.getBoolean(Constants.Security.SSL_ENABLED, false)) {
constraint.setDataConstraint(Constraint.DC_CONFIDENTIAL);
}
ConstraintMapping constraintMapping = new ConstraintMapping();
|
44,798 | public static final String CFG_FILE_BASED_KEYFILE_PATH = "security.data.keyfile.path";
public static final String CFG_SECURITY_ENABLED = "security.enabled";
public static final String CFG_REALM = "security.realm";
public static final String AUTH_HANDLER_CLASS = "security.authentication.handlerClassName";
public static final String AUTH_HANDLER_CONFIG_BASE = "security.authentication.handler.";
<BUG>public static final String LOGIN_MODULE_CLASS_NAME = "security.authentication.loginmodule.className";
}</BUG>
public static final String CFG_LOCAL_DATA_DIR = "local.data.dir";
public static final String CFG_YARN_USER = "yarn.user";
public static final String CFG_HDFS_USER = "hdfs.user";
| public static final String SSL_ENABLED = "security.server.ssl.enabled";
public static final String SSL_PROTECTED_PORT = "security.server.ssl.port";
}
|
44,799 | chart.addYAxisLabels(AxisLabelsFactory.newAxisLabels(labels));
chart.addXAxisLabels(AxisLabelsFactory.newNumericRangeAxisLabels(0, max));
chart.setBarWidth(BarChart.AUTO_RESIZE);
chart.setSize(600, 500);
chart.setHorizontal(true);
<BUG>chart.setTitle("Total Evaluations by User");
showChartImg(resp, chart.toURLString());
}</BUG>
private List<Entry<String, Integer>> sortEntries(Collection<Entry<String, Integer>> entries) {
List<Entry<String, Integer>> result = new ArrayList<Entry<String, Integer>>(entries);
| chart.setDataEncoding(DataEncoding.TEXT);
return chart;
}
|
44,800 | checkEvaluationsEqual(eval4, foundissueProto.getEvaluations(0));
checkEvaluationsEqual(eval5, foundissueProto.getEvaluations(1));
}
public void testGetRecentEvaluationsNoneFound() throws Exception {
DbIssue issue = createDbIssue("fad", persistenceHelper);
<BUG>DbEvaluation eval1 = createEvaluation(issue, "someone", 100);
DbEvaluation eval2 = createEvaluation(issue, "someone", 200);
DbEvaluation eval3 = createEvaluation(issue, "someone", 300);
issue.addEvaluations(eval1, eval2, eval3);</BUG>
getPersistenceManager().makePersistent(issue);
| [DELETED] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.