id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
3,601 | public boolean isPublishButtonVisible() {
return true;
}
@Override
public boolean isSaveButtonDisabled() {
<BUG>if (_fileEntryDisplayContextHelper.isCheckedOut() &&
!_fileEntryDisplayContextHelper.isLockedByMe()) {</BUG>
return true;
}
| if (_fileEntryDisplayContextHelper.isCheckedOutByOther()) {
|
3,602 | import javax.servlet.http.HttpServletResponse;
public class DLEditFileEntryDisplayContextUtil {
public static DLEditFileEntryDisplayContext
getDLEditFileEntryDisplayContext(
HttpServletRequest request, HttpServletResponse response,
<BUG>DLFileEntryType dlFileEntryType) {
DLEditFileEntryDisplayContext dlEditFileEntryDisplayContext =</BUG>
new DefaultDLEditFileEntryDisplayContext(
request, response, dlFileEntryType);
return _chainDLEditFileEntryDisplayContexts(
| DLFileEntryType dlFileEntryType)
throws PortalException {
DLEditFileEntryDisplayContext dlEditFileEntryDisplayContext =
|
3,603 | dlEditFileEntryDisplayContext, request, response, dlFileEntryType);
}
public static DLEditFileEntryDisplayContext
getDLEditFileEntryDisplayContext(
HttpServletRequest request, HttpServletResponse response,
<BUG>FileEntry fileEntry) {
DLEditFileEntryDisplayContext dlEditFileEntryDisplayContext =</BUG>
new DefaultDLEditFileEntryDisplayContext(
request, response, fileEntry);
return _chainDLEditFileEntryDisplayContexts(
| FileEntry fileEntry)
throws PortalException {
DLEditFileEntryDisplayContext dlEditFileEntryDisplayContext =
|
3,604 | import com.intellij.notification.Notifications;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.LangDataKeys;
import com.intellij.openapi.project.DumbAware;
<BUG>import com.intellij.openapi.project.Project;
import com.intellij.psi.PsiDirectory;</BUG>
import com.intellij.psi.PsiFile;
import mobi.hsz.idea.gitignore.IgnoreBundle;
import mobi.hsz.idea.gitignore.command.CreateFileCommandAction;
| import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.PsiDirectory;
|
3,605 | final PsiDirectory directory = view.getOrChooseDirectory();
if (directory == null) {
return;
}
GeneratorDialog dialog;
<BUG>PsiFile file = directory.findFile(fileType.getIgnoreLanguage().getFilename());
if (file == null) {
CreateFileCommandAction action = new CreateFileCommandAction(project, directory, fileType);</BUG>
dialog = new GeneratorDialog(project, action);
| String filename = fileType.getIgnoreLanguage().getFilename();
PsiFile file = directory.findFile(filename);
VirtualFile virtualFile = file == null ? directory.getVirtualFile().findChild(filename) : file.getVirtualFile();
if (file == null && virtualFile == null) {
CreateFileCommandAction action = new CreateFileCommandAction(project, directory, fileType);
|
3,606 | package mobi.hsz.idea.gitignore;
import com.intellij.CommonBundle;
<BUG>import com.intellij.openapi.util.text.StringUtil;
import mobi.hsz.idea.gitignore.file.type.IgnoreFileType;</BUG>
import mobi.hsz.idea.gitignore.lang.IgnoreLanguage;
import mobi.hsz.idea.gitignore.lang.kind.*;
import org.jetbrains.annotations.NonNls;
| import com.intellij.openapi.vfs.VirtualFile;
import mobi.hsz.idea.gitignore.file.type.IgnoreFileType;
|
3,607 | import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.ModifiableRootModel;
import com.intellij.openapi.roots.ModuleRootManager;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.VfsUtilCore;
<BUG>import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.PsiDirectory;</BUG>
import com.intellij.psi.PsiFile;
import com.intellij.psi.PsiManager;
import com.intellij.util.containers.ContainerUtil;
| import com.intellij.psi.FileViewProvider;
import com.intellij.psi.PsiDirectory;
|
3,608 | public static PsiFile getIgnoreFile(@NotNull Project project, @NotNull IgnoreFileType fileType, @Nullable PsiDirectory directory, boolean createIfMissing) {
if (directory == null) {
directory = PsiManager.getInstance(project).findDirectory(project.getBaseDir());
}
assert directory != null;
<BUG>PsiFile file = directory.findFile(fileType.getIgnoreLanguage().getFilename());
if (file == null && createIfMissing) {
</BUG>
file = new CreateFileCommandAction(project, directory, fileType).execute().getResultObject();
| [DELETED] |
3,609 | 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;
|
3,610 | 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();
|
3,611 | 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: " +
|
3,612 | 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;
|
3,613 | 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]);
|
3,614 | 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;
|
3,615 | 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;
|
3,616 | 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());
|
3,617 | 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);
|
3,618 | 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);
|
3,619 | 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);
|
3,620 | 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;
|
3,621 | 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);
|
3,622 | 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);
|
3,623 | 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;
|
3,624 | }
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);
|
3,625 | 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);
|
3,626 | @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);
|
3,627 | 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);
|
3,628 | import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
<BUG>import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.filefilter.AndFileFilter;
import org.apache.commons.io.filefilter.TrueFileFilter;</BUG>
import org.fedorahosted.openprops.Properties;
| import java.util.List;
import org.apache.commons.io.FilenameUtils;
import org.apache.tools.ant.DirectoryScanner;
|
3,629 | 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;
|
3,630 | 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());
|
3,631 | 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);
|
3,632 | 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);
|
3,633 | 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);
|
3,634 | 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;
|
3,635 | 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);
|
3,636 | 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);
|
3,637 | 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;
|
3,638 | }
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);
|
3,639 | 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);
|
3,640 | @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);
|
3,641 | 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);
|
3,642 | import org.mapsforge.map.android.graphics.AndroidGraphicFactory;
import org.mapsforge.map.android.view.MapView;
import org.mapsforge.map.layer.Layers;
import org.mapsforge.map.layer.overlay.Marker;
import java.lang.reflect.Type;
<BUG>import java.util.ArrayList;
import java.util.List;
import io.fabric.sdk.android.Fabric;</BUG>
public class HomeActivity extends BaseActivity {
private MapView mapView;
| import java.util.HashMap;
import java.util.Map;
import io.fabric.sdk.android.Fabric;
|
3,643 | public class HomeActivity extends BaseActivity {
private MapView mapView;
public static final String EXTRA_COUNTRY = "country";
private PopupWindow popupWindow;
private RelativeLayout homeContextRL;
<BUG>private List<String> countryList;
</BUG>
private final String COUNTRY_FILE_NAME = "countries.json";
private List<Country> countryLatLonList = null;
@Override
| private List<Country> countryList;
|
3,644 | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
homeContextRL = (RelativeLayout) findViewById(R.id.homeContextRL);
<BUG>countryList = dbHelper.getCountries();
</BUG>
long totalServ = dbHelper.getCount();
if (!BuildConfig.DEBUG)
Answers.getInstance().logCustom(new CustomEvent("Total servers")
| countryList = dbHelper.getUniqueCountries();
|
3,645 | import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteStatement;
<BUG>import android.util.Log;
import com.vasilkoff.easyvpnfree.model.Server;</BUG>
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
| import com.vasilkoff.easyvpnfree.model.Country;
import com.vasilkoff.easyvpnfree.model.Server;
|
3,646 | + KEY_MESSAGE + " text,"
+ KEY_CONFIG_DATA + " text,"
+ KEY_PREMIUM + " integer,"
+ "UNIQUE ("
+ KEY_HOST_NAME
<BUG>+ ") ON CONFLICT REPLACE"
</BUG>
+ ")");
}
@Override
| + ") ON CONFLICT IGNORE"
|
3,647 | + " = 1");
long count = statement.simpleQueryForLong();
db.close();
return count;
}
<BUG>public List<String> getCountries() {
List<String> countryList = new ArrayList<String>();
</BUG>
SQLiteDatabase db = this.getWritableDatabase();
| public List<Country> getUniqueCountries() {
List<Country> countryList = new ArrayList<Country>();
|
3,648 | + " ORDER BY "
+ KEY_COUNTRY_LONG
+ " ASC", null);
if (cursor.moveToFirst()) {
do {
<BUG>countryList.add(cursor.getString(0));
} while (cursor.moveToNext());</BUG>
} else {
Log.d(TAG ,"0 rows");
}
| countryList.add(new Country(cursor.getString(0), null, 0, 0, cursor.getString(1)));
} while (cursor.moveToNext());
|
3,649 | private TextView lastLog;
private ProgressBar connectingProgress;
private PopupWindow popupWindow;
private LinearLayout parentLayout;
private TextView trafficInTotally;
<BUG>private TextView trafficOutTotally;
private static boolean filterAds = false;</BUG>
private static boolean defaultFilterAds = true;
private boolean autoConnection;
private boolean fastConnection;
| private TextView trafficIn;
private TextView trafficOut;
private static boolean filterAds = false;
|
3,650 | trafficInTotally = (TextView) findViewById(R.id.serverTrafficInTotally);
trafficInTotally.setText(totalIn);
String totalOut = String.format(getResources().getString(R.string.traffic_out),
TotalTraffic.getTotalTraffic().get(1));
trafficOutTotally = (TextView) findViewById(R.id.serverTrafficOutTotally);
<BUG>trafficOutTotally.setText(totalOut);
((ImageView) findViewById(R.id.serverFlag))</BUG>
.setImageResource(
getResources().getIdentifier(currentServer.getCountryShort().toLowerCase(),
"drawable",
| trafficIn = (TextView) findViewById(R.id.serverTrafficIn);
trafficIn.setText("");
trafficOut = (TextView) findViewById(R.id.serverTrafficOut);
trafficOut.setText("");
((ImageView) findViewById(R.id.serverFlag))
|
3,651 | if (fastConnection) {
startActivity(new Intent(getApplicationContext(), HomeActivity.class));
finish();
} else {
Intent intent = new Intent(getApplicationContext(), ServersListActivity.class);
<BUG>intent.putExtra(HomeActivity.EXTRA_COUNTRY, currentServer.getCountryLong());
</BUG>
startActivity(intent);
finish();
}
| intent.putExtra(HomeActivity.EXTRA_COUNTRY, currentServer.getCountryShort());
|
3,652 | import android.preference.PreferenceActivity;
import android.preference.PreferenceFragment;
import android.support.v7.widget.Toolbar;
import android.view.View;
import com.vasilkoff.easyvpnfree.R;
<BUG>import com.vasilkoff.easyvpnfree.database.DBHelper;
import java.util.List;</BUG>
import static com.vasilkoff.easyvpnfree.R.id.toolbar;
public class MyPreferencesActivity extends PreferenceActivity {
private Toolbar toolbar;
| import com.vasilkoff.easyvpnfree.model.Country;
import java.util.List;
|
3,653 | if (this == o) {
return true;
} else if (o instanceof SimpleBigDecimalScore) {
SimpleBigDecimalScore other = (SimpleBigDecimalScore) o;
return initScore == other.getInitScore()
<BUG>&& score.equals(other.getScore());
} else {</BUG>
return false;
}
}
| && score.stripTrailingZeros().equals(other.getScore().stripTrailingZeros());
} else {
|
3,654 | if (this == o) {
return true;
} else if (o instanceof HardSoftBigDecimalScore) {
HardSoftBigDecimalScore other = (HardSoftBigDecimalScore) o;
return initScore == other.getInitScore()
<BUG>&& hardScore.equals(other.getHardScore())
&& softScore.equals(other.getSoftScore());
} else {</BUG>
return false;
}
| && hardScore.stripTrailingZeros().equals(other.getHardScore().stripTrailingZeros())
&& softScore.stripTrailingZeros().equals(other.getSoftScore().stripTrailingZeros());
} else {
|
3,655 | if (this == o) {
return true;
} else if (o instanceof HardMediumSoftBigDecimalScore) {
HardMediumSoftBigDecimalScore other = (HardMediumSoftBigDecimalScore) o;
return initScore == other.getInitScore()
<BUG>&& hardScore.equals(other.getHardScore())
&& mediumScore.equals(other.getMediumScore())
&& softScore.equals(other.getSoftScore());
} else {</BUG>
return false;
| && hardScore.stripTrailingZeros().equals(other.getHardScore().stripTrailingZeros())
&& mediumScore.stripTrailingZeros().equals(other.getMediumScore().stripTrailingZeros())
&& softScore.stripTrailingZeros().equals(other.getSoftScore().stripTrailingZeros());
} else {
|
3,656 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
3,657 | final int lineStride = dst.getScanlineStride();
final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final byte[][] data = dst.getByteDataArrays();
final float[] warpData = new float[2 * dstWidth];
<BUG>int lineOffset = 0;
if (ctable == null) { // source does not have IndexColorModel
if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
3,658 | pixelOffset += pixelStride;
} // COLS LOOP
} // ROWS LOOP
}
} else {// source has IndexColorModel
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| } else if (caseB) {
for (int h = 0; h < dstHeight; h++) {
|
3,659 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
3,660 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final short[][] data = dst.getShortDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
3,661 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
3,662 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final short[][] data = dst.getShortDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
3,663 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
3,664 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final int[][] data = dst.getIntDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
3,665 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
3,666 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final float[][] data = dst.getFloatDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
3,667 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
3,668 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final double[][] data = dst.getDoubleDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
3,669 | public Icon getIcon() {
return GantIcons.GANT_SDK_ICON;
}
public Library createLibrary(@NotNull ProjectSettingsContext context) {
return createLibrary(context, new GroovyLibraryConfigurer() {
<BUG>@NotNull
public String getSDKLibPrefix() {
return "gant-";
}</BUG>
public boolean isSDKHome(VirtualFile file) {
| [DELETED] |
3,670 | package org.jetbrains.plugins.groovy.config;
import com.intellij.facet.ui.ProjectSettingsContext;
import com.intellij.openapi.roots.libraries.Library;
<BUG>import com.intellij.openapi.roots.ui.configuration.projectRoot.LibrariesContainer;
import org.jetbrains.annotations.Nls;</BUG>
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
| import com.intellij.openapi.util.text.StringUtil;
import org.jetbrains.annotations.Nls;
|
3,671 | import java.util.List;
import java.util.Set;
public abstract class AbstractGroovyLibraryManager extends LibraryManager {
public static final ExtensionPointName<LibraryManager> EP_NAME = ExtensionPointName.create("org.intellij.groovy.libraryManager");
@NotNull
<BUG>protected static String generatePointerName(ProjectSettingsContext context, String version, GroovyLibraryConfigurer configUtils) {
</BUG>
final Set<String> usedLibraryNames = CollectionFactory.newTroveSet();
for (Library library : getAllDefinedLibraries(((ProjectConfigurableContext)context).getContainer())) {
usedLibraryNames.add(library.getName());
| protected static String generatePointerName(ProjectSettingsContext context, String version, final String libPrefix) {
|
3,672 | String newVersion = configUtils.getSDKVersion(path);
boolean addVersion = !versions.contains(newVersion) ||
Messages.showOkCancelDialog("Add one more " + libraryKind + " library of version " + newVersion + "?",
"Duplicate library version", bigIcon) == 0;
if (addVersion && !AbstractConfigUtils.UNDEFINED_VERSION.equals(newVersion)) {
<BUG>final String name = generatePointerName(context, newVersion, configUtils);
</BUG>
final CreateLibraryDialog dialog = new CreateLibraryDialog(project, "Create " + libraryKind + " library",
"Create Project " + libraryKind + " library '" + name + "'",
"Create Global " + libraryKind + " library '" + name + "'");
| final String name = generatePointerName(context, newVersion, getLibraryPrefix());
|
3,673 | @NonNls public static final String UNDEFINED_VERSION = "undefined";
@NonNls public static final String MANIFEST_PATH = "META-INF/MANIFEST.MF";
public abstract boolean isSDKHome(final VirtualFile file);
@NotNull
public abstract String getSDKVersion(@NotNull String path);
<BUG>public String getSDKLibPrefix() {
return SDK_LIB_PREFIX;
}</BUG>
@Nullable
public static String getSDKJarVersion(String jarPath, final String jarRegex, String manifestPath) {
| [DELETED] |
3,674 | System.out.println(change);
}
}
};
@Override
<BUG>protected Callback<VChild, Void> copyChildCallback()
</BUG>
{
return (child) ->
{
| protected Callback<VChild, Void> copyIntoCallback()
|
3,675 | 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;
|
3,676 | 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,
|
3,677 | 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,
|
3,678 | 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,
|
3,679 | 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)
|
3,680 | 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()
|
3,681 | 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)
|
3,682 | 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)
|
3,683 | }
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)
|
3,684 | 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)
|
3,685 | 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;
|
3,686 | import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.LocalFileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.permission.FsPermission;
import org.apache.hadoop.util.Progressable;
<BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*;
public class S3AFileSystem extends FileSystem {</BUG>
private URI uri;
private Path workingDir;
private AmazonS3Client s3;
| import static org.apache.hadoop.fs.s3a.Constants.*;
public class S3AFileSystem extends FileSystem {
|
3,687 | public void initialize(URI name, Configuration conf) throws IOException {
super.initialize(name, conf);
uri = URI.create(name.getScheme() + "://" + name.getAuthority());
workingDir = new Path("/user", System.getProperty("user.name")).makeQualified(this.uri,
this.getWorkingDirectory());
<BUG>String accessKey = conf.get(ACCESS_KEY, null);
String secretKey = conf.get(SECRET_KEY, null);
</BUG>
String userInfo = name.getUserInfo();
| String accessKey = conf.get(NEW_ACCESS_KEY, conf.get(OLD_ACCESS_KEY, null));
String secretKey = conf.get(NEW_SECRET_KEY, conf.get(OLD_SECRET_KEY, null));
|
3,688 | } else {
accessKey = userInfo;
}
}
AWSCredentialsProviderChain credentials = new AWSCredentialsProviderChain(
<BUG>new S3ABasicAWSCredentialsProvider(accessKey, secretKey),
new InstanceProfileCredentialsProvider(),
new S3AAnonymousAWSCredentialsProvider()
);</BUG>
bucket = name.getHost();
| new BasicAWSCredentialsProvider(accessKey, secretKey),
new AnonymousAWSCredentialsProvider()
|
3,689 |
awsConf.setSocketTimeout(conf.getInt(SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT));
</BUG>
s3 = new AmazonS3Client(credentials, awsConf);
<BUG>maxKeys = conf.getInt(MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS);
partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
</BUG>
if (partSize < 5 * 1024 * 1024) {
| new InstanceProfileCredentialsProvider(),
new AnonymousAWSCredentialsProvider()
bucket = name.getHost();
ClientConfiguration awsConf = new ClientConfiguration();
awsConf.setMaxConnections(conf.getInt(NEW_MAXIMUM_CONNECTIONS, conf.getInt(OLD_MAXIMUM_CONNECTIONS, DEFAULT_MAXIMUM_CONNECTIONS)));
awsConf.setProtocol(conf.getBoolean(NEW_SECURE_CONNECTIONS, conf.getBoolean(OLD_SECURE_CONNECTIONS, DEFAULT_SECURE_CONNECTIONS)) ? Protocol.HTTPS : Protocol.HTTP);
awsConf.setMaxErrorRetry(conf.getInt(NEW_MAX_ERROR_RETRIES, conf.getInt(OLD_MAX_ERROR_RETRIES, DEFAULT_MAX_ERROR_RETRIES)));
awsConf.setSocketTimeout(conf.getInt(NEW_SOCKET_TIMEOUT, conf.getInt(OLD_SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT)));
maxKeys = conf.getInt(NEW_MAX_PAGING_KEYS, conf.getInt(OLD_MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS));
partSize = conf.getLong(NEW_MULTIPART_SIZE, conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE));
partSizeThreshold = conf.getInt(NEW_MIN_MULTIPART_THRESHOLD, conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD));
|
3,690 | cannedACL = null;
}
if (!s3.doesBucketExist(bucket)) {
throw new IOException("Bucket " + bucket + " does not exist");
}
<BUG>boolean purgeExistingMultipart = conf.getBoolean(PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART);
long purgeExistingMultipartAge = conf.getLong(PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART_AGE);
</BUG>
if (purgeExistingMultipart) {
| boolean purgeExistingMultipart = conf.getBoolean(NEW_PURGE_EXISTING_MULTIPART, conf.getBoolean(OLD_PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART));
long purgeExistingMultipartAge = conf.getLong(NEW_PURGE_EXISTING_MULTIPART_AGE, conf.getLong(OLD_PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART_AGE));
|
3,691 | import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
<BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*;
public class S3AOutputStream extends OutputStream {</BUG>
private OutputStream backupStream;
private File backupFile;
private boolean closed;
| import static org.apache.hadoop.fs.s3a.Constants.*;
public class S3AOutputStream extends OutputStream {
|
3,692 | this.client = client;
this.progress = progress;
this.fs = fs;
this.cannedACL = cannedACL;
this.statistics = statistics;
<BUG>partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
</BUG>
if (conf.get(BUFFER_DIR, null) != null) {
| partSize = conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
|
3,693 | boolean isNew, boolean sendVerifyEmail) {
checkNotNull(study);
checkNotNull(callerRoles);
checkNotNull(participant);
Validate.entityThrowingException(new StudyParticipantValidator(study, isNew), participant);
<BUG>boolean newAccountAssigningId = isNotBlank(participant.getExternalId()) &&
(study.isExternalIdValidationEnabled() || study.isExternalIdRequiredOnSignup());
Account account = null;</BUG>
if (isNew) {
if (newAccountAssigningId) {
| boolean newAccountAssigningId = isNew && study.isExternalIdValidationEnabled()
&& isNotBlank(participant.getExternalId());
Account account = null;
|
3,694 | private Map<ParticipantOption, String> getAllOptionsButExternalId(Study study, StudyParticipant participant) {
Map<ParticipantOption, String> options = Maps.newHashMap();
for (ParticipantOption option : ParticipantOption.values()) {
options.put(option, option.fromParticipant(participant));
}
<BUG>if (study.isExternalIdRequiredOnSignup() || study.isExternalIdValidationEnabled()) {
options.remove(EXTERNAL_IDENTIFIER);</BUG>
}
return options;
}
| if (study.isExternalIdValidationEnabled()) {
options.remove(EXTERNAL_IDENTIFIER);
|
3,695 | 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;
|
3,696 | 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();
|
3,697 | 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: " +
|
3,698 | 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;
|
3,699 | 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]);
|
3,700 | 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;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.