id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
24,501
FileBody fileBody = null; try { fileBody = getFileBody(context, imageUri); return twitter.updateProfileImage(fileBody); } finally { <BUG>Utils.closeSilently(fileBody); if (deleteImage && "file".equals(imageUri.getScheme())) { final File file = new File(imageUri.getPath()); if (!file.delete()) { Log.w(LOGTAG, String.for...
twitter.updateProfileBannerImage(fileBody); if (deleteImage) { Utils.deleteMedia(context, imageUri);
24,502
import org.mariotaku.twidere.receiver.NotificationReceiver; import org.mariotaku.twidere.service.LengthyOperationsService; import org.mariotaku.twidere.util.ActivityTracker; import org.mariotaku.twidere.util.AsyncTwitterWrapper; import org.mariotaku.twidere.util.DataStoreFunctionsKt; <BUG>import org.mariotaku.twidere.u...
import org.mariotaku.twidere.util.DebugLog; import org.mariotaku.twidere.util.ImagePreloader;
24,503
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);
24,504
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);
24,505
import android.content.Context; import android.content.SharedPreferences; import android.location.Location; import android.os.AsyncTask; import android.support.annotation.NonNull; <BUG>import android.util.Log; import org.mariotaku.twidere.BuildConfig; import org.mariotaku.twidere.Constants; import org.mariotaku.twidere...
import org.mariotaku.twidere.util.DebugLog; import org.mariotaku.twidere.util.JsonSerializer;
24,506
} public static LatLng getCachedLatLng(@NonNull final Context context) { final Context appContext = context.getApplicationContext(); final SharedPreferences prefs = DependencyHolder.Companion.get(context).getPreferences(); if (!prefs.getBoolean(KEY_USAGE_STATISTICS, false)) return null; <BUG>if (BuildConfig.DEBUG) { Lo...
DebugLog.d(HotMobiLogger.LOGTAG, "getting cached location", null);
24,507
public int destroySavedSearchAsync(final UserKey accountKey, final long searchId) { final DestroySavedSearchTask task = new DestroySavedSearchTask(accountKey, searchId); return asyncTaskManager.add(task, true); } public int destroyStatusAsync(final UserKey accountKey, final String statusId) { <BUG>final DestroyStatusTa...
final DestroyStatusTask task = new DestroyStatusTask(context, accountKey, statusId);
24,508
@Override public void afterExecute(Bus handler, SingleResponse<Relationship> result) { if (result.hasData()) { handler.post(new FriendshipUpdatedEvent(accountKey, userKey, result.getData())); } else if (result.hasException()) { <BUG>if (BuildConfig.DEBUG) { Log.w(LOGTAG, "Unable to update friendship", result.getExcepti...
public UserKey[] getAccountKeys() { return DataStoreUtils.getActivatedAccountKeys(context);
24,509
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);
24,510
customTokens.put("%%mlFinalForestsPerHost%%", hubConfig.finalForestsPerHost.toString()); customTokens.put("%%mlTraceAppserverName%%", hubConfig.traceHttpName); customTokens.put("%%mlTracePort%%", hubConfig.tracePort.toString()); customTokens.put("%%mlTraceDbName%%", hubConfig.traceDbName); customTokens.put("%%mlTraceFo...
customTokens.put("%%mlTriggersDbName%%", hubConfig.triggersDbName); customTokens.put("%%mlSchemasDbName%%", hubConfig.schemasDbName); }
24,511
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 FileSyste...
import static org.apache.hadoop.fs.s3a.Constants.*; public class S3AFileSystem extends FileSystem {
24,512
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(...
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));
24,513
} 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()
24,514
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_THR...
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.g...
24,515
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_...
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...
24,516
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 backup...
import static org.apache.hadoop.fs.s3a.Constants.*; public class S3AOutputStream extends OutputStream {
24,517
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) ...
partSize = conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
24,518
package org.springframework.data.rest.tests.shop; import static org.hamcrest.CoreMatchers.*; <BUG>import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; import org.junit.Test;</BUG> import org.junit.runner.RunWith; import org.springframework.data.rest.tests.AbstractWebIntegrationTests; impor...
import java.util.HashMap; import java.util.Map; import org.junit.Test;
24,519
Assert.notNull(associations, "AssociationLinks must not be null!"); Assert.notNull(entities, "Repositories must not be null!"); Assert.notNull(converter, "UriToEntityConverter must not be null!"); <BUG>Assert.notNull(collector, "LinkCollector must not be null!"); addSerializer(new PersistentEntityResourceSerializer(col...
NestedEntitySerializer serializer = new NestedEntitySerializer(entities, assembler, resourceProcessorInvoker); addSerializer(new ProjectionSerializer(collector, associations, resourceProcessorInvoker, false));
24,520
} } @SuppressWarnings("serial") static class ProjectionSerializer extends StdSerializer<TargetAware> { private final LinkCollector collector; <BUG>private final Associations associations; private final boolean unwrapping; private ProjectionSerializer(LinkCollector collector, Associations mappings, boolean unwrapping) {...
private static class PersistentEntityResourceSerializer extends StdSerializer<PersistentEntityResource> { private PersistentEntityResourceSerializer(LinkCollector collector) { super(PersistentEntityResource.class);
24,521
public boolean isUnwrappingSerializer() { return unwrapping; } @Override public JsonSerializer<TargetAware> unwrappingSerializer(NameTransformer unwrapper) { <BUG>return new ProjectionSerializer(collector, associations, true); </BUG> } } static class ProjectionResource extends Resource<ProjectionResourceContent> {
return new ProjectionSerializer(collector, associations, resourceProcessorInvoker, true);
24,522
mLabels[i].setVisible(false); mValues[i].setVisible(false); mValues[i].addMouseListener(CommonURLListener); } return true; <BUG>} private class URLMouseListener extends tufts.vue.MouseAdapter {</BUG> public void mouseClicked(java.awt.event.MouseEvent e) { if (e.getClickCount() != 2) return;
private static final String CAN_OPEN = "vue.openable"; private class URLMouseListener extends tufts.vue.MouseAdapter {
24,523
Log.error(t); } } } private MouseListener CommonURLListener = new URLMouseListener(); <BUG>private void loadRow(int row, String labelText, String valueText) { </BUG> if (DEBUG.RESOURCE && DEBUG.META) out("adding row " + row + " " + labelText + "=[" + valueText + "]"); JLabel label = mLabels[row]; JTextArea value = mVal...
private void loadRow(int row, final String labelText, final String valueText) {
24,524
if (DEBUG.RESOURCE && DEBUG.META) out("adding row " + row + " " + labelText + "=[" + valueText + "]"); JLabel label = mLabels[row]; JTextArea value = mValues[row]; label.setText(labelText + ":"); value.setText(valueText); <BUG>if (valueText != null && (valueText.startsWith("http://") || valueText.startsWith("/")) ) { v...
if (Resource.isLikelyURLorFile(valueText)) { value.putClientProperty(CAN_OPEN, Boolean.TRUE); if (DEBUG.Enabled) value.setForeground(Color.blue); value.putClientProperty(CAN_OPEN, Boolean.FALSE); if (DEBUG.Enabled) value.setForeground(Color.black); value.setCursor(Cursor.getDefaultCursor());
24,525
package com.projecttango.examples.java.augmentedreality; import com.google.atap.tangoservice.Tango; import com.google.atap.tangoservice.Tango.OnTangoUpdateListener; import com.google.atap.tangoservice.TangoCameraIntrinsics; import com.google.atap.tangoservice.TangoConfig; <BUG>import com.google.atap.tangoservice.TangoC...
import com.google.atap.tangoservice.TangoErrorException; import com.google.atap.tangoservice.TangoEvent;
24,526
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();
24,527
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: " +
24,528
import org.rajawali3d.materials.Material; import org.rajawali3d.materials.methods.DiffuseMethod; import org.rajawali3d.materials.textures.ATexture; import org.rajawali3d.materials.textures.StreamingTexture; import org.rajawali3d.materials.textures.Texture; <BUG>import org.rajawali3d.math.Matrix4; import org.rajawali3d....
import org.rajawali3d.math.Quaternion; import org.rajawali3d.math.vector.Vector3;
24,529
translationMoon.setRepeatMode(Animation.RepeatMode.INFINITE); translationMoon.setTransformable3D(moon); getCurrentScene().registerAnimation(translationMoon); translationMoon.play(); } <BUG>public void updateRenderCameraPose(TangoPoseData devicePose, DeviceExtrinsics extrinsics) { Pose cameraPose = ScenePoseCalculator.t...
public void updateRenderCameraPose(TangoPoseData cameraPose) { float[] rotation = cameraPose.getRotationAsFloats(); float[] translation = cameraPose.getTranslationAsFloats(); Quaternion quaternion = new Quaternion(rotation[3], rotation[0], rotation[1], rotation[2]); getCurrentCamera().setRotation(quaternion.conjugate()...
24,530
package com.projecttango.examples.java.helloareadescription; import com.google.atap.tangoservice.Tango; <BUG>import com.google.atap.tangoservice.Tango.OnTangoUpdateListener; import com.google.atap.tangoservice.TangoConfig;</BUG> import com.google.atap.tangoservice.TangoCoordinateFramePair; import com.google.atap.tangos...
import com.google.atap.tangoservice.TangoAreaDescriptionMetaData; import com.google.atap.tangoservice.TangoConfig;
24,531
} else { updateMemo(); callback.updateMemo(); } dismiss(); <BUG>}else{ </BUG> Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show(); } }
[DELETED]
24,532
} @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_memo); <BUG>ChinaPhoneHelper.setStatusBar(this,true); </BUG> topicId = getIntent().getLongExtra("topicId", -1); if (topicId == -1) { finish();
ChinaPhoneHelper.setStatusBar(this, true);
24,533
MemoEntry.COLUMN_REF_TOPIC__ID + " = ?" , new String[]{String.valueOf(topicId)}); } public Cursor selectMemo(long topicId) { Cursor c = db.query(MemoEntry.TABLE_NAME, null, MemoEntry.COLUMN_REF_TOPIC__ID + " = ?", new String[]{String.valueOf(topicId)}, null, null, <BUG>MemoEntry._ID + " DESC", null); </BUG> if (c != nu...
MemoEntry.COLUMN_ORDER + " ASC", null);
24,534
MemoEntry._ID + " = ?", new String[]{String.valueOf(memoId)}); } public long updateMemoContent(long memoId, String memoContent) { ContentValues values = new ContentValues(); <BUG>values.put(MemoEntry.COLUMN_CONTENT, memoContent); return db.update(</BUG> MemoEntry.TABLE_NAME, values, MemoEntry._ID + " = ?",
return db.update(
24,535
import android.widget.RelativeLayout; import android.widget.TextView; import com.kiminonawa.mydiary.R; import com.kiminonawa.mydiary.db.DBManager; import com.kiminonawa.mydiary.shared.EditMode; <BUG>import com.kiminonawa.mydiary.shared.ThemeManager; import java.util.List; public class MemoAdapter extends RecyclerView.A...
import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter; public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
24,536
private DBManager dbManager; private boolean isEditMode = false; private EditMemoDialogFragment.MemoCallback callback; private static final int TYPE_HEADER = 0; private static final int TYPE_ITEM = 1; <BUG>public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMe...
public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) { super(recyclerView); this.mActivity = activity;
24,537
this.memoList = memoList; this.dbManager = dbManager; this.callback = callback; } @Override <BUG>public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { </BUG> View view; if (isEditMode) { if (viewType == TYPE_HEADER) {
public DragSortAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
24,538
editMemoDialogFragment.show(mActivity.getSupportFragmentManager(), "editMemoDialogFragment"); } }); } } <BUG>protected class MemoViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { private View rootView; private TextView TV_memo_item_content;</BUG> private ImageView IV_memo_item_delete;
protected class MemoViewHolder extends DragSortAdapter.ViewHolder implements View.OnClickListener, View.OnLongClickListener { private ImageView IV_memo_item_dot; private TextView TV_memo_item_content;
24,539
import board.items.BrdItem; import board.items.BrdTracep; import board.varie.BrdKeepPoint; import freert.planar.PlaDirection; import freert.planar.PlaLimits; <BUG>import freert.planar.PlaLineInt; import freert.planar.PlaPoint;</BUG> import freert.planar.PlaPointFloat; import freert.planar.PlaPointInt; import freert.pla...
import freert.planar.PlaLineIntAlist; import freert.planar.PlaPoint;
24,540
for (int index = 1; index < line_arr.length - 2; ++index) </BUG> { <BUG>PlaDirection d1 = line_arr[index].direction(); PlaDirection d2 = line_arr[index + 1].direction(); </BUG> if (d1.is_multiple_of_45_degree() && d2.is_multiple_of_45_degree() && d1.projection(d2) != Signum.POSITIVE) {
boolean polyline_changed = true; while (polyline_changed) if (p_polyline.plaline_len() < 4) return p_polyline; polyline_changed = false; PlaLineIntAlist line_arr = p_polyline.alist_copy(0); for (int index = 1; index < line_arr.size() - 2; ++index) PlaDirection d1 = line_arr.get(index).direction(); PlaDirection d2 = lin...
24,541
if (!(prev_line.is_diagonal() && next_line.is_diagonal())) { return null; } PlaPointFloat curr_corner = prev_line.intersection_approx(next_line); <BUG>PlaPointFloat prev_corner = prev_line.intersection_approx(p_line_arr[p_no - 1]); PlaPointFloat next_corner = next_line.intersection_approx(p_line_arr[p_no + 2]); </BUG>...
PlaPointFloat prev_corner = prev_line.intersection_approx(p_line_arr.get(p_no - 1)); PlaPointFloat next_corner = next_line.intersection_approx(p_line_arr.get(p_no + 2));
24,542
if (translate_line.side_of(next_corner) == PlaSide.ON_THE_LEFT) { max_translate_dist = -max_translate_dist; } PlaLineInt[] check_lines = new PlaLineInt[3]; <BUG>check_lines[0] = p_line_arr[p_no]; check_lines[2] = p_line_arr[p_no + 1]; </BUG> double translate_dist = max_translate_dist;
check_lines[0] = p_line_arr.get(p_no); check_lines[2] = p_line_arr.get(p_no + 1);
24,543
double delta_dist = max_translate_dist; PlaSide side_of_nearest_point = translate_line.side_of(nearest_point); int sign = Signum.as_int(max_translate_dist); PlaLineInt new_line = null; PlaLineInt[] check_lines = new PlaLineInt[3]; <BUG>check_lines[0] = p_line_arr[p_no - 1]; check_lines[2] = p_line_arr[p_no + 1]; </BUG...
check_lines[0] = p_line_arr.get(p_no - 1); check_lines[2] = p_line_arr.get(p_no + 1);
24,544
return new_line; } private Polyline reposition_lines(Polyline p_polyline) { if (p_polyline.plaline_len() < 5) return p_polyline; <BUG>PlaLineInt[] line_arr = p_polyline.alist_to_array(); </BUG> for (int index = 2; index < p_polyline.plaline_len(-2); ++index) { PlaLineInt new_line = reposition_line(line_arr, index);
PlaLineIntAlist line_arr = p_polyline.alist_copy(0);
24,545
</BUG> for (int index = 2; index < p_polyline.plaline_len(-2); ++index) { PlaLineInt new_line = reposition_line(line_arr, index); if (new_line == null) continue; <BUG>line_arr[index] = new_line; </BUG> Polyline result = new Polyline(line_arr); return skip_segments_of_length_0(result); }
return new_line; private Polyline reposition_lines(Polyline p_polyline) if (p_polyline.plaline_len() < 5) return p_polyline; PlaLineIntAlist line_arr = p_polyline.alist_copy(0); line_arr.set(index, new_line);
24,546
return new Polyline(new_lines); } } else if (bend) { <BUG>PlaLineInt[] check_line_arr = new PlaLineInt[trace_polyline.plaline_len(+1)]; for (int index = 0; index < trace_polyline.plaline_len(-1); ++index) { check_line_arr[index] = trace_polyline.plaline(index); } check_line_arr[check_line_arr.length - 2] = other_trace...
PlaLineIntAlist check_line_arr = new PlaLineIntAlist(trace_polyline.plaline_len(+1)); trace_polyline.alist_append_to(check_line_arr, 0,trace_polyline.plaline_len(-1)); check_line_arr.add( other_trace_line); check_line_arr.add( other_prev_trace_line);
24,547
@Override public Object getAdapter(Class adapter) { </BUG> if (adapter == ILaunch.class) { <BUG>return getLaunch(); </BUG> } return super.getAdapter(adapter); } }
public boolean canTerminate() { return fTarget.canTerminate();
24,548
@Override public Object getAdapter(Class adapter) { </BUG> if (adapter == ILaunch.class) { <BUG>return getLaunch(); </BUG> } return super.getAdapter(adapter); } @Override
public IMemoryBlock getMemoryBlock(long startAddress, long length) throws DebugException { return null; @SuppressWarnings("unchecked") public <T> T getAdapter(Class<T> adapter) { return (T) getLaunch();
24,549
import org.goko.controller.tinyg.commons.ITinyGStatus; import org.goko.controller.tinyg.commons.bean.TinyGExecutionError; import org.goko.controller.tinyg.commons.probe.ProbeUtility; import org.goko.core.common.applicative.logging.ApplicativeLogEvent; import org.goko.core.common.event.EventBrokerUtils; <BUG>import org....
import org.goko.core.common.measure.Units; import org.goko.core.common.measure.quantity.AngleUnit; import org.goko.core.common.measure.quantity.Length;
24,550
if(G2CorePreferences.getInstance().isHomingEnabledAxisA()){ homingCommand += " A0"; } getCommunicator().send(homingCommand, true); } <BUG>@Override public Tuple6b findWorkVolumeMinimalPosition() throws GkException { return null; </BUG> }
[DELETED]
24,551
package org.goko.core.gcode.rs274ngcv3; import java.io.IOException; <BUG>import java.io.InputStream; import java.util.ArrayList;</BUG> import java.util.Collections; import java.util.Date; import java.util.List;
import java.math.BigDecimal; import java.util.ArrayList;
24,552
gl_composite_8.marginWidth = 0; gl_composite_8.marginHeight = 0; composite_8.setLayout(gl_composite_8); btnStart = new Button(composite_8, SWT.NONE); GridData gd_btnStart = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1); <BUG>gd_btnStart.heightHint = 35; </BUG> btnStart.setLayoutData(gd_btnStart); btnStart.setT...
gd_btnStart.heightHint = 37;
24,553
</BUG> btnStart.setLayoutData(gd_btnStart); btnStart.setText("Resume"); btnPause = new Button(composite_8, SWT.NONE); GridData gd_btnPause = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1); <BUG>gd_btnPause.heightHint = 35; </BUG> btnPause.setLayoutData(gd_btnPause); btnPause.setText("Pause"); btnStop = new Butto...
gl_composite_8.marginWidth = 0; gl_composite_8.marginHeight = 0; composite_8.setLayout(gl_composite_8); btnStart = new Button(composite_8, SWT.NONE); GridData gd_btnStart = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1); gd_btnStart.heightHint = 37; gd_btnPause.heightHint = 37;
24,554
btnPause.setText("Pause"); btnStop = new Button(grpControls, SWT.NONE); btnStop.setImage(ResourceManager.getPluginImage("org.goko.tools.commandpanel", "icons/stop.png")); btnStop.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED)); GridData gd_btnStop = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1); <BUG>...
gd_btnStop.heightHint = 37;
24,555
btnStop.setLayoutData(gd_btnStop); btnStop.setText("Stop"); btnKillAlarm = new Button(grpControls, SWT.NONE); btnKillAlarm.setImage(ResourceManager.getPluginImage("org.goko.tools.commandpanel", "icons/bell--minus.png")); GridData gd_btnKillAlarm = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1); <BUG>gd_btnKillA...
gd_btnKillAlarm.heightHint = 37;
24,556
</BUG> btnKillAlarm.setLayoutData(gd_btnKillAlarm); btnKillAlarm.setText("Kill alarm"); btnReset = new Button(grpControls, SWT.NONE); GridData gd_btnReset = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1); <BUG>gd_btnReset.heightHint = 35; </BUG> btnReset.setLayoutData(gd_btnReset); btnReset.setText("Reset"); bt...
btnStop.setLayoutData(gd_btnStop); btnStop.setText("Stop"); btnKillAlarm = new Button(grpControls, SWT.NONE); btnKillAlarm.setImage(ResourceManager.getPluginImage("org.goko.tools.commandpanel", "icons/bell--minus.png")); GridData gd_btnKillAlarm = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1); gd_btnKillAlarm....
24,557
gl_composite_3.marginHeight = 2; composite_3.setLayout(gl_composite_3); btnSpindleOn = new Button(composite_3, SWT.NONE); btnSpindleOn.setText("On"); GridData gd_btnSpindleOn = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1); <BUG>gd_btnSpindleOn.heightHint = 35; </BUG> btnSpindleOn.setLayoutData(gd_btnSpindleOn)...
gd_btnSpindleOn.heightHint = 38;
24,558
</BUG> btnSpindleOn.setLayoutData(gd_btnSpindleOn); btnSpindleOff = new Button(composite_3, SWT.NONE); btnSpindleOff.setText("Off"); GridData gd_btnSpindleOff = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1); <BUG>gd_btnSpindleOff.heightHint = 35; </BUG> btnSpindleOff.setLayoutData(gd_btnSpindleOff); initFromPe...
gl_composite_3.marginHeight = 2; composite_3.setLayout(gl_composite_3); btnSpindleOn = new Button(composite_3, SWT.NONE); btnSpindleOn.setText("On"); GridData gd_btnSpindleOn = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1); gd_btnSpindleOn.heightHint = 38; gd_btnSpindleOff.heightHint = 38;
24,559
package org.goko.core.controller; <BUG>import org.goko.core.common.exception.GkException; import org.goko.core.math.Tuple6b; public interface IWorkVolumeProvider { Tuple6b getWorkVolumeMinimalPosition() throws GkException;</BUG> Tuple6b findWorkVolumeMinimalPosition() throws GkException;
import org.goko.core.controller.listener.IWorkVolumeUpdateListener; String getWorkVolumeProviderName(); void addUpdateListener(IWorkVolumeUpdateListener listener); void removeUpdateListener(IWorkVolumeUpdateListener listener); Tuple6b getWorkVolumeMinimalPosition() throws GkException;
24,560
import org.goko.core.controller.bean.MachineValue; import org.goko.core.controller.bean.MachineValueDefinition; import org.goko.core.controller.bean.ProbeRequest; import org.goko.core.controller.bean.ProbeResult; import org.goko.core.controller.event.IGCodeContextListener; <BUG>import org.goko.core.controller.event.Mac...
import org.goko.core.controller.listener.IWorkVolumeUpdateListener; import org.goko.core.gcode.element.GCodeLine;
24,561
private J jogger; private X executor; private IRS274NGCService gcodeService; private boolean plannerBufferCheck = true; private IExecutionService<ExecutionTokenState, IExecutionToken<ExecutionTokenState>> executionService; <BUG>private IApplicativeLogService applicativeLogService; public AbstractTinyGControllerService(...
private List<IWorkVolumeUpdateListener> workVolumeUpdateListener; public AbstractTinyGControllerService(S internalState, C configuration, P communicator) throws GkException {
24,562
super(); this.internalState = internalState; this.configuration = configuration; this.communicator = communicator; this.gcodeContextListener = new GCodeContextObservable(); <BUG>this.configurationListener = new CopyOnWriteArrayList<ITinyGConfigurationListener<C>>(); this.actionFactory = createActionFactory();</BUG> thi...
this.workVolumeUpdateListener = new CopyOnWriteArrayList<IWorkVolumeUpdateListener>(); this.actionFactory = createActionFactory();
24,563
if(min == null){ throw new GkTechnicalException("No minimal position currently defined for the travel max position"); } return min; } <BUG>@Override public Tuple6b findWorkVolumeMaximalPosition() throws GkException {</BUG> TinyGConfiguration cfg = getConfiguration(); Tuple6b max = null; if(cfg != null){
public String getWorkVolumeProviderName() { return "TinyG 0.97"; public Tuple6b findWorkVolumeMaximalPosition() throws GkException {
24,564
soi.getSharedObject().sendMessage("userJoin", list); } } public void left(String room, Integer participant){ log.debug("Participant $user leaving"); <BUG>SharedObjectInfo soi = voiceRooms.get(room); </BUG> if (soi != null) { List<String> list = new ArrayList<String>(); list.add(participant.toString());
RoomInfo soi = voiceRooms.get(room);
24,565
soi.getSharedObject().sendMessage("userLeft", list); } } public void muted(String room, Integer participant, Boolean muted){ log.debug("Participant $user mute $muted"); <BUG>SharedObjectInfo soi = voiceRooms.get(room); </BUG> if (soi != null) { List<String> list = new ArrayList<String>(); list.add(participant.toString(...
RoomInfo soi = voiceRooms.get(room);
24,566
soi.getSharedObject().sendMessage("userMute", list); } } public void talking(String room, Integer participant, Boolean talking){ log.debug("Participant $user talk $talking"); <BUG>SharedObjectInfo soi = voiceRooms.get(room); </BUG> if (soi != null) { List<String> list = new ArrayList<String>(); list.add(participant.toS...
RoomInfo soi = voiceRooms.get(room);
24,567
package org.bigbluebutton.webconference.voice.asterisk.konference; <BUG>import org.bigbluebutton.webconference.voice.ConferenceListener; </BUG> import org.bigbluebutton.webconference.voice.asterisk.konference.events.ConferenceJoinEvent; import org.bigbluebutton.webconference.voice.asterisk.konference.events.ConferenceL...
import org.bigbluebutton.webconference.voice.ConferenceServerListener;
24,568
import org.bigbluebutton.webconference.voice.asterisk.konference.events.ConferenceMemberMuteEvent; import org.bigbluebutton.webconference.voice.asterisk.konference.events.ConferenceMemberUnmuteEvent; import org.bigbluebutton.webconference.voice.asterisk.konference.events.ConferenceStateEvent; import org.bigbluebutton.w...
private ConferenceServerListener listener;
24,569
import jetbrains.mps.transformation.TLBase.structure.ReferenceMacro_GetReferent; import jetbrains.mps.util.QueryMethodGenerated; import jetbrains.mps.util.Pair; import jetbrains.mps.logging.Logger; import java.util.List; <BUG>import java.util.Map; public class ReferenceInfo_Macro extends ReferenceInfo {</BUG> private S...
import org.jetbrains.annotations.Nullable; public class ReferenceInfo_Macro extends ReferenceInfo {
24,570
public SNode getOutputSourceNode() { return myOutputSourceNode; } public String getReferenceRole() { return myReferenceRole; <BUG>} public SNode getInputNode() {</BUG> return myInputNode; } public abstract SNode getInputTargetNode();
@Nullable public SNode getInputNode() {
24,571
generator.setPreviousInputNodesByMappingName(old); } } private List<SNode> createOutputNodesForTemplateNode(String mappingName, SNode templateNode, <BUG>SNode inputNode, </BUG> int nodeMacrosToSkip, boolean registerTopOutput) throws
@Nullable SNode inputNode,
24,572
import org.codehaus.groovy.control.CompilationUnit; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public final class GroovyTreeParser implements TreeParser { private static final Logger logger = LoggerFactory.getLogger(GroovyTreeParser.class); <BUG>private static final String GROOVY_DEFAULT_INTERFACE = "groo...
private Indexer indexer = new Indexer();
24,573
if (scriptClass != null) { sourceUnit.getAST().getStatementBlock().getVariableScope().getDeclaredVariables().values().forEach( variable -> { SymbolInformation symbol = getVariableSymbolInformation(scriptClass.getName(), sourceUri, variable); <BUG>addToValueSet(newTypeReferences, variable.getType().getName(), symbol); s...
newIndexer.addSymbol(sourceUnit.getSource().getURI(), symbol); if (classes.containsKey(variable.getType().getName())) { newIndexer.addReference(classes.get(variable.getType().getName()), GroovyLocations.createLocation(sourceUri, variable.getType()));
24,574
} if (typeReferences.containsKey(foundSymbol.getName())) { foundReferences.addAll(typeReferences.get(foundSymbol.getName()));</BUG> } <BUG>return foundReferences; }</BUG> @Override public Set<SymbolInformation> getFilteredSymbols(String query) { checkNotNull(query, "query must not be null"); Pattern pattern = getQueryP...
}); sourceUnit.getAST().getStatementBlock() .visit(new MethodVisitor(newIndexer, sourceUri, sourceUnit.getAST().getScriptClassDummy(), classes, Maps.newHashMap(), Optional.absent(), workspaceUriSupplier));
24,575
<BUG>package com.palantir.ls.server.api; import io.typefox.lsapi.ReferenceParams;</BUG> import io.typefox.lsapi.SymbolInformation; import java.net.URI; import java.util.Map;
import com.google.common.base.Optional; import io.typefox.lsapi.Location; import io.typefox.lsapi.Position; import io.typefox.lsapi.ReferenceParams;
24,576
import java.util.Map; import java.util.Set; public interface TreeParser { void parseAllSymbols(); Map<URI, Set<SymbolInformation>> getFileSymbols(); <BUG>Map<String, Set<SymbolInformation>> getTypeReferences(); Set<SymbolInformation> findReferences(ReferenceParams params); Set<SymbolInformation> getFilteredSymbols(St...
Map<Location, Set<Location>> getReferences(); Set<Location> findReferences(ReferenceParams params); Optional<Location> gotoDefinition(URI uri, Position position); Set<SymbolInformation> getFilteredSymbols(String query);
24,577
.workspaceSymbolProvider(true) .referencesProvider(true) .completionProvider(new CompletionOptionsBuilder() .resolveProvider(false) .triggerCharacter(".") <BUG>.build()) .build();</BUG> InitializeResult result = new InitializeResultBuilder() .capabilities(capabilities) .build();
.definitionProvider(true)
24,578
package com.palantir.ls.server; import com.palantir.ls.server.api.CompilerWrapper; import com.palantir.ls.server.api.TreeParser; import com.palantir.ls.server.api.WorkspaceCompiler; <BUG>import io.typefox.lsapi.FileEvent; import io.typefox.lsapi.PublishDiagnosticsParams;</BUG> import io.typefox.lsapi.ReferenceParams; i...
import com.google.common.base.Optional; import io.typefox.lsapi.Location; import io.typefox.lsapi.Position; import io.typefox.lsapi.PublishDiagnosticsParams;
24,579
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.security.DigestOutputStream; import java.security.MessageDigest; <BUG>import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Collections; import java.util.List;</BUG> public final class ...
import java.text.DateFormat; import java.util.Date; import java.util.List;
24,580
package org.jboss.as.patching.runner; <BUG>import org.jboss.as.boot.DirectoryStructure; import org.jboss.as.patching.LocalPatchInfo;</BUG> import org.jboss.as.patching.PatchInfo; import org.jboss.as.patching.PatchLogger; import org.jboss.as.patching.PatchMessages;
import static org.jboss.as.patching.runner.PatchUtils.generateTimestamp; import org.jboss.as.patching.CommonAttributes; import org.jboss.as.patching.LocalPatchInfo;
24,581
private static final String PATH_DELIMITER = "/"; public static final byte[] NO_CONTENT = PatchingTask.NO_CONTENT; enum Element { ADDED_BUNDLE("added-bundle"), ADDED_MISC_CONTENT("added-misc-content"), <BUG>ADDED_MODULE("added-module"), BUNDLES("bundles"),</BUG> CUMULATIVE("cumulative"), DESCRIPTION("description"), MIS...
APPLIES_TO_VERSION("applies-to-version"), BUNDLES("bundles"),
24,582
final int count = reader.getAttributeCount(); for (int i = 0; i < count; i++) { final String value = reader.getAttributeValue(i); final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i)); switch (attribute) { <BUG>case APPLIES_TO_VERSION: builder.addAppliesTo(value); break;</BUG> case RESULTING_VE...
[DELETED]
24,583
final StringBuilder path = new StringBuilder(); for(final String p : item.getPath()) { path.append(p).append(PATH_DELIMITER); } path.append(item.getName()); <BUG>writer.writeAttribute(Attribute.PATH.name, path.toString()); if(type != ModificationType.REMOVE) {</BUG> writer.writeAttribute(Attribute.HASH.name, bytesToHex...
if (item.isDirectory()) { writer.writeAttribute(Attribute.DIRECTORY.name, "true"); if(type != ModificationType.REMOVE) {
24,584
package org.jboss.as.patching; import org.jboss.as.controller.OperationFailedException; import org.jboss.as.patching.runner.PatchingException; import org.jboss.logging.Messages; import org.jboss.logging.annotations.Message; <BUG>import org.jboss.logging.annotations.MessageBundle; import java.io.IOException;</BUG> impor...
import org.jboss.logging.annotations.Cause; import java.io.IOException;
24,585
final String path = expr.length < 3 ? "" : path(2, ctx); ctx.updates.add(new DBAdd(data, it, path, ctx.context, info), ctx); return null; } private Item replace(final QueryContext ctx) throws QueryException { <BUG>checkWrite(ctx); final Data data = data(0, ctx); </BUG> final String path = path(1, ctx); final Item doc =...
final Data data = checkWrite(data(0, ctx), ctx);
24,586
ctx.updates.add(new DBDelete(data, path, info), ctx); } return null; } private Item rename(final QueryContext ctx) throws QueryException { <BUG>checkWrite(ctx); final Data data = data(0, ctx); </BUG> final String source = path(1, ctx); final String target = path(2, ctx);
final Data data = checkWrite(data(0, ctx), ctx);
24,587
ctx.updates.add(new DBRename(data, src.path(), trg.path(), info), ctx); } return null; } private Item optimize(final QueryContext ctx) throws QueryException { <BUG>checkWrite(ctx); final Data data = data(0, ctx); </BUG> final boolean all = expr.length == 2 && checkBln(expr[1], ctx); ctx.updates.add(new DBOptimize(data,...
final Data data = checkWrite(data(0, ctx), ctx);
24,588
final boolean all = expr.length == 2 && checkBln(expr[1], ctx); ctx.updates.add(new DBOptimize(data, ctx.context, all, info), ctx); return null; } private Item store(final QueryContext ctx) throws QueryException { <BUG>checkWrite(ctx); final Data data = data(0, ctx); </BUG> final String path = path(1, ctx); if(data.inM...
final Data data = checkWrite(data(0, ctx), ctx);
24,589
final Item it = checkItem(expr[2], ctx); ctx.updates.add(new DBStore(data, path, it, info), ctx); return null; } private Item flush(final QueryContext ctx) throws QueryException { <BUG>checkWrite(ctx); ctx.updates.add(new DBFlush(data(0, ctx), info), ctx); </BUG> return null; }
ctx.updates.add(new DBFlush(checkWrite(data(0, ctx), ctx), info), ctx);
24,590
package org.basex.query.expr; import static org.basex.query.QueryText.*; import static org.basex.query.util.Err.*; import static org.basex.util.Token.*; <BUG>import org.basex.core.*; import org.basex.query.*;</BUG> import org.basex.query.func.*; import org.basex.query.iter.*; import org.basex.query.util.*;
import org.basex.data.*; import org.basex.query.*;
24,591
checkPerm(ctx, Perm.ADMIN); } public final void checkCreate(final QueryContext ctx) throws QueryException { checkPerm(ctx, Perm.CREATE); } <BUG>public final void checkWrite(final QueryContext ctx) throws QueryException { checkPerm(ctx, Perm.WRITE); }</BUG> private void checkPerm(final QueryContext ctx, final Perm p) th...
public final Data checkWrite(final Data data, final QueryContext ctx) if(!ctx.context.perm(Perm.WRITE, data.meta)) BASX_PERM.thrw(info, Perm.WRITE); return data;
24,592
import java.util.Iterator; import java.util.List; import org.sonatype.nexus.maven.staging.deploy.strategy.DeployPerModuleRequest; import org.sonatype.nexus.maven.staging.deploy.strategy.DeployStrategy; import org.sonatype.nexus.maven.staging.deploy.strategy.FinalizeDeployRequest; <BUG>import org.sonatype.nexus.maven.st...
import org.sonatype.nexus.maven.staging.remote.Parameters;
24,593
if (!isPomArtifact) { artifact.addMetadata(new ProjectArtifactMetadata(artifact, pomFile)); } if (updateReleaseInfo) { artifact.setRelease(true); <BUG>} try {</BUG> if (isPomArtifact) { deployables.add(new DeployableArtifact(pomFile, artifact)); }
final DeployStrategy deployStrategy; try {
24,594
"Artifacts locally gathered under directory " + getWorkDirectoryRoot().getAbsolutePath() + ", skipping remote staging at user's demand."); return; } try { <BUG>final FinalizeDeployRequest request = new FinalizeDeployRequest(getMavenSession(), parameters); deployStrategy.finalizeDeploy(request);</BUG> } catch (ArtifactD...
final FinalizeDeployRequest request = new FinalizeDeployRequest(); deployStrategy.finalizeDeploy(request);
24,595
package org.sonatype.nexus.maven.staging.deploy; import org.sonatype.nexus.maven.staging.deploy.strategy.DeployStrategy; import org.sonatype.nexus.maven.staging.deploy.strategy.FinalizeDeployRequest; <BUG>import org.sonatype.nexus.maven.staging.deploy.strategy.Parameters; </BUG> import org.sonatype.nexus.maven.staging....
import org.sonatype.nexus.maven.staging.remote.Parameters;
24,596
package org.sonatype.nexus.maven.staging.deploy; import java.util.Map; import org.sonatype.nexus.maven.staging.AbstractStagingMojo; import org.sonatype.nexus.maven.staging.deploy.strategy.DeployStrategy; <BUG>import org.sonatype.nexus.maven.staging.deploy.strategy.Parameters; import org.sonatype.nexus.maven.staging.de...
import org.sonatype.nexus.maven.staging.remote.Parameters;
24,597
private boolean keepStagingRepositoryOnFailure; @Parameter(property = "skipStagingRepositoryClose") private boolean skipStagingRepositoryClose; @Parameter(property = "skipStaging") private boolean skipStaging; <BUG>protected DeployStrategy getDeployStrategy(final String key) </BUG> throws MojoExecutionException { final...
protected DeployStrategy getDeployStrategy(final String key, final Parameters parameters)
24,598
import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.util.Properties; import java.util.regex.Matcher; import java.util.regex.Pattern; <BUG>import com.google.common.base.Preconditions; import com.google.common.base.Strings;</BUG> import com.google.common.io.Closeables; import org.apache.maven.artif...
import org.sonatype.nexus.maven.staging.remote.Parameters; import com.google.common.base.Strings;
24,599
import org.apache.maven.artifact.versioning.VersionRange; import org.apache.maven.execution.MavenSession; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.project.artifact.ProjectArtifactMetadata; import org.codehaus.plexus.component.annotations.Requirement; <BUG>import org.codehaus.plexus...
import static com.google.common.base.Preconditions.checkNotNull; public abstract class AbstractDeployStrategy
24,600
catch (IOException e) { throw new ArtifactInstallationException("Cannot locally stage and maintain the index file!", e); } } private final Pattern indexProps = Pattern.compile("(.*):(.*):(.*):(.*):(.*):(.*):(.*):(.*)"); <BUG>protected void deployUp(final MavenSession mavenSession, final File sourceDirectory, final Arti...
protected void deployUp(final File sourceDirectory, final ArtifactRepository remoteRepository)