id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
1
package net.java.sip.communicator.impl.neomedia; <BUG>import gnu.java.zrtp.ZrtpConfigure; import gnu.java.zrtp.ZrtpConstants;</BUG> import java.awt.*; import java.awt.event.*;
import gnu.java.zrtp.*;
2
strb.append(it.name()); strb.append(';'); } return strb.toString(); } <BUG>class PublicKeyControls extends TransparentPanel </BUG> { private final ZrtpConfigureTableModel<ZrtpConstants.SupportedPubKeys> dataModel;
private class PublicKeyControls extends TransparentPanel
3
= new ZrtpConfigureTableModel<ZrtpConstants.SupportedPubKeys>( ZrtpConstants.SupportedPubKeys.DH2K, active, inActive, savedConf); <BUG>createControls(this, dataModel, NeomediaActivator.getResources().getI18NString( "impl.media.security.zrtp.PUB_KEY_ALGORITHMS"));</BUG> }
createControls(this, dataModel);
4
String id = getPropertyID(ZrtpConstants.SupportedPubKeys.DH2K); NeomediaActivator.getConfigurationService() .setProperty(id, value); } } <BUG>class HashControls extends TransparentPanel </BUG> { private final ZrtpConfigureTableModel<ZrtpConstants.SupportedHashes> dataModel;
private class HashControls extends TransparentPanel
5
= new ZrtpConfigureTableModel<ZrtpConstants.SupportedHashes>( ZrtpConstants.SupportedHashes.S256, active, inActive, savedConf); <BUG>createControls(this, dataModel, NeomediaActivator.getResources() .getI18NString( "impl.media.security.zrtp.HASH_ALGORITHMS"));</BUG> }
createControls(this, dataModel);
6
String id = getPropertyID(ZrtpConstants.SupportedHashes.S256); NeomediaActivator.getConfigurationService() .setProperty(id, value); } } <BUG>class CipherControls </BUG> extends TransparentPanel { private final ZrtpConfigureTableModel<ZrtpConstants.SupportedSymCiphers>
private class CipherControls
7
= new ZrtpConfigureTableModel<ZrtpConstants.SupportedSymCiphers>( ZrtpConstants.SupportedSymCiphers.AES1, active, inActive, savedConf); <BUG>createControls(this, dataModel, NeomediaActivator.getResources() .getI18NString( "impl.media.security.zrtp.SYM_CIPHER_ALGORITHMS"));</BUG> }
createControls(this, dataModel);
8
String id = getPropertyID(ZrtpConstants.SupportedSymCiphers.AES1); NeomediaActivator.getConfigurationService() .setProperty(id, value); } } <BUG>class SasControls extends TransparentPanel </BUG> { private final ZrtpConfigureTableModel<ZrtpConstants.SupportedSASTypes> dataModel;
private class SasControls extends TransparentPanel
9
= new ZrtpConfigureTableModel<ZrtpConstants.SupportedSASTypes>( ZrtpConstants.SupportedSASTypes.B32, active, inActive, savedConf); <BUG>createControls(this, dataModel, NeomediaActivator.getResources() .getI18NString("impl.media.security.zrtp.SAS_TYPES"));</BUG> }
createControls(this, dataModel);
10
String id = getPropertyID(ZrtpConstants.SupportedSASTypes.B32); NeomediaActivator.getConfigurationService() .setProperty(id, value); } } <BUG>class LengthControls </BUG> extends TransparentPanel { private final ZrtpConfigureTableModel<ZrtpConstants.SupportedAuthLengths>
private class LengthControls
11
= new ZrtpConfigureTableModel<ZrtpConstants.SupportedAuthLengths>( ZrtpConstants.SupportedAuthLengths.HS32, active, inActive, savedConf); <BUG>createControls(this, dataModel, NeomediaActivator.getResources() .getI18NString("impl.media.security.zrtp.SRTP_LENGTHS"));</BUG> }
createControls(this, dataModel);
12
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;
13
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();
14
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: " +
15
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;
16
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]);
17
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;
18
isNegative = true; calStart = (Calendar) cal2.clone(); calEnd = (Calendar) cal1.clone(); } long targetMillis = calEnd.getTimeInMillis(); <BUG>long deltaMillis = targetMillis - calStart.getTimeInMillis(); </BUG> if (deltaMillis == 0) { return; }
long deltaMillis = computeDeltaMillis(calStart.getTimeInMillis(), targetMillis);
19
} @RootTask static Task<Exec.Result> exec(String parameter, int number) { Task<String> task1 = MyTask.create(parameter); Task<Integer> task2 = Adder.create(number, number + 2); <BUG>return Task.ofType(Exec.Result.class).named("exec", "/bin/sh") .in(() -> task1)</BUG> .in(() -> task2) .process(Exec.exec((str, i) -> args("/bin/sh", "-c", "\"echo " + i + "\""))); }
return Task.named("exec", "/bin/sh").ofType(Exec.Result.class) .in(() -> task1)
20
return args; } static class MyTask { static final int PLUS = 10; static Task<String> create(String parameter) { <BUG>return Task.ofType(String.class).named("MyTask", parameter) .in(() -> Adder.create(parameter.length(), PLUS))</BUG> .in(() -> Fib.create(parameter.length())) .process((sum, fib) -> something(parameter, sum, fib)); }
return Task.named("MyTask", parameter).ofType(String.class) .in(() -> Adder.create(parameter.length(), PLUS))
21
final String instanceField = "from instance"; final TaskContext context = TaskContext.inmem(); final AwaitingConsumer<String> val = new AwaitingConsumer<>(); @Test public void shouldJavaUtilSerialize() throws Exception { <BUG>Task<Long> task1 = Task.ofType(Long.class).named("Foo", "Bar", 39) .process(() -> 9999L); Task<String> task2 = Task.ofType(String.class).named("Baz", 40) .in(() -> task1)</BUG> .ins(() -> singletonList(task1))
Task<Long> task1 = Task.named("Foo", "Bar", 39).ofType(Long.class) Task<String> task2 = Task.named("Baz", 40).ofType(String.class) .in(() -> task1)
22
assertEquals(des.id().name(), "Baz"); assertEquals(val.awaitAndGet(), "[9999] hello 10004"); } @Test(expected = NotSerializableException.class) public void shouldNotSerializeWithInstanceFieldReference() throws Exception { <BUG>Task<String> task = Task.ofType(String.class).named("WithRef") .process(() -> instanceField + " causes an outer reference");</BUG> serialize(task); } @Test
Task<String> task = Task.named("WithRef").ofType(String.class) .process(() -> instanceField + " causes an outer reference");
23
serialize(task); } @Test public void shouldSerializeWithLocalReference() throws Exception { String local = instanceField; <BUG>Task<String> task = Task.ofType(String.class).named("WithLocalRef") .process(() -> local + " won't cause an outer reference");</BUG> serialize(task); Task<String> des = deserialize(); context.evaluate(des).consume(val);
Task<String> task = Task.named("WithLocalRef").ofType(String.class) .process(() -> local + " won't cause an outer reference");
24
} @RootTask public static Task<String> standardArgs(int first, String second) { firstInt = first; secondString = second; <BUG>return Task.ofType(String.class).named("StandardArgs", first, second) .process(() -> second + " " + first * 100);</BUG> } @Test public void shouldParseFlags() throws Exception {
return Task.named("StandardArgs", first, second).ofType(String.class) .process(() -> second + " " + first * 100);
25
assertThat(parsedEnum, is(CustomEnum.BAR)); } @RootTask public static Task<String> enums(CustomEnum enm) { parsedEnum = enm; <BUG>return Task.ofType(String.class).named("Enums", enm) .process(enm::toString);</BUG> } @Test public void shouldParseCustomTypes() throws Exception {
return Task.named("Enums", enm).ofType(String.class) .process(enm::toString);
26
assertThat(parsedType.content, is("blarg parsed for you!")); } @RootTask public static Task<String> customType(CustomType myType) { parsedType = myType; <BUG>return Task.ofType(String.class).named("Types", myType.content) .process(() -> myType.content);</BUG> } public enum CustomEnum { BAR
return Task.named("Types", myType.content).ofType(String.class) .process(() -> myType.content);
27
TaskContext taskContext = TaskContext.inmem(); TaskContext.Value<Long> value = taskContext.evaluate(fib92); value.consume(f92 -> System.out.println("fib(92) = " + f92)); } static Task<Long> create(long n) { <BUG>TaskBuilder<Long> fib = Task.ofType(Long.class).named("Fib", n); </BUG> if (n < 2) { return fib .process(() -> n);
TaskBuilder<Long> fib = Task.named("Fib", n).ofType(Long.class);
28
import android.content.Context; import android.content.Intent; import android.content.res.AssetManager; import android.content.res.Resources; import android.graphics.Color; <BUG>import android.graphics.Typeface; import android.os.Bundle;</BUG> import android.support.v7.app.AlertDialog; import android.support.v7.app.AppCompatActivity; import android.text.Html;
import android.os.Build; import android.os.Bundle;
29
tableLayout = (TableLayout) findViewById(R.id.grid); float tableHeight = tableLayout.getLayoutParams().height; float tableWidth = tableLayout.getLayoutParams().width; float tableHeightDP = convertPixelsToDp(tableHeight, getApplicationContext()); float tableWidthDP = convertPixelsToDp(tableWidth, getApplicationContext()); <BUG>float tileHeight = tableHeightDP / (NUM_ROWS + 0.5f); float tileWidth = tableWidthDP / (NUM_COLS + 1); Log.e("height:", tableHeightDP + "");</BUG> Log.e("Wi", tableWidthDP + ""); Log.e("tileHeight", tileHeight + "");
float tileHeight = tableHeightDP/(NUM_ROWS + 0.5f); float tileWidth = tableWidthDP/ (NUM_COLS + 1); Log.e("height:", tableHeightDP + "");
30
tr.setLayoutParams(new TableRow.LayoutParams(GridLayout.LayoutParams.FILL_PARENT, TableLayout.LayoutParams.FILL_PARENT)); for (int j = 0; j < NUM_COLS; j++) { final TextView charTile = new TextView(this); charTile.setHeight((int) dpToPixel(tileHeight)); charTile.setTextSize(TypedValue.COMPLEX_UNIT_SP, fontSize); <BUG>charTile.setWidth((int) dpToPixel(tileWidth)); charTile.setElevation(10); charTile.setBackground(getDrawable(R.drawable.my_border)); charTile.setId(NUM_ROWS * i + j);</BUG> charTile.setTypeface(null, Typeface.BOLD);
if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.LOLLIPOP) if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.LOLLIPOP) else charTile.setBackgroundDrawable(getResources().getDrawable(R.drawable.my_border)); charTile.setId(NUM_ROWS * i + j);
31
public void clickBack(View view) { if (coordsPassed.size() > 0){ int [] ids = coordsFromStr( coordsPassed.get(coordsPassed.size()-1) ); coordsPassed.remove(coordsPassed.size()-1); currentWord = currentWord.substring(0, currentWord.length()-1); <BUG>TextView tv = (TextView) findViewById(fetchId(ids[0], ids[1])); tv.setBackground(getDrawable(R.drawable.my_border)); showCurrentWord(checkWord());</BUG> } }
if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.LOLLIPOP) else tv.setBackgroundDrawable(getResources().getDrawable(R.drawable.my_border)); showCurrentWord(checkWord());
32
return dp; } private void resetAllTiles(){ for (int i = 0; i < NUM_ROWS; i++) { for (int j = 0; j < NUM_COLS; j++) { <BUG>TextView tv = (TextView) findViewById(fetchId(i, j)); tv.setBackground(getDrawable(R.drawable.my_border)); }</BUG> } }
if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.LOLLIPOP) else tv.setBackgroundDrawable(getResources().getDrawable(R.drawable.my_border));
33
} @RootTask static Task<Exec.Result> exec(String parameter, int number) { Task<String> task1 = MyTask.create(parameter); Task<Integer> task2 = Adder.create(number, number + 2); <BUG>return Task.ofType(Exec.Result.class).named("exec", "/bin/sh") .in(() -> task1)</BUG> .in(() -> task2) .process(Exec.exec((str, i) -> args("/bin/sh", "-c", "\"echo " + i + "\""))); }
return Task.named("exec", "/bin/sh").ofType(Exec.Result.class) .in(() -> task1)
34
return args; } static class MyTask { static final int PLUS = 10; static Task<String> create(String parameter) { <BUG>return Task.ofType(String.class).named("MyTask", parameter) .in(() -> Adder.create(parameter.length(), PLUS))</BUG> .in(() -> Fib.create(parameter.length())) .process((sum, fib) -> something(parameter, sum, fib)); }
return Task.named("MyTask", parameter).ofType(String.class) .in(() -> Adder.create(parameter.length(), PLUS))
35
final String instanceField = "from instance"; final TaskContext context = TaskContext.inmem(); final AwaitingConsumer<String> val = new AwaitingConsumer<>(); @Test public void shouldJavaUtilSerialize() throws Exception { <BUG>Task<Long> task1 = Task.ofType(Long.class).named("Foo", "Bar", 39) .process(() -> 9999L); Task<String> task2 = Task.ofType(String.class).named("Baz", 40) .in(() -> task1)</BUG> .ins(() -> singletonList(task1))
Task<Long> task1 = Task.named("Foo", "Bar", 39).ofType(Long.class) Task<String> task2 = Task.named("Baz", 40).ofType(String.class) .in(() -> task1)
36
assertEquals(des.id().name(), "Baz"); assertEquals(val.awaitAndGet(), "[9999] hello 10004"); } @Test(expected = NotSerializableException.class) public void shouldNotSerializeWithInstanceFieldReference() throws Exception { <BUG>Task<String> task = Task.ofType(String.class).named("WithRef") .process(() -> instanceField + " causes an outer reference");</BUG> serialize(task); } @Test
Task<String> task = Task.named("WithRef").ofType(String.class) .process(() -> instanceField + " causes an outer reference");
37
serialize(task); } @Test public void shouldSerializeWithLocalReference() throws Exception { String local = instanceField; <BUG>Task<String> task = Task.ofType(String.class).named("WithLocalRef") .process(() -> local + " won't cause an outer reference");</BUG> serialize(task); Task<String> des = deserialize(); context.evaluate(des).consume(val);
Task<String> task = Task.named("WithLocalRef").ofType(String.class) .process(() -> local + " won't cause an outer reference");
38
} @RootTask public static Task<String> standardArgs(int first, String second) { firstInt = first; secondString = second; <BUG>return Task.ofType(String.class).named("StandardArgs", first, second) .process(() -> second + " " + first * 100);</BUG> } @Test public void shouldParseFlags() throws Exception {
return Task.named("StandardArgs", first, second).ofType(String.class) .process(() -> second + " " + first * 100);
39
assertThat(parsedEnum, is(CustomEnum.BAR)); } @RootTask public static Task<String> enums(CustomEnum enm) { parsedEnum = enm; <BUG>return Task.ofType(String.class).named("Enums", enm) .process(enm::toString);</BUG> } @Test public void shouldParseCustomTypes() throws Exception {
return Task.named("Enums", enm).ofType(String.class) .process(enm::toString);
40
assertThat(parsedType.content, is("blarg parsed for you!")); } @RootTask public static Task<String> customType(CustomType myType) { parsedType = myType; <BUG>return Task.ofType(String.class).named("Types", myType.content) .process(() -> myType.content);</BUG> } public enum CustomEnum { BAR
return Task.named("Types", myType.content).ofType(String.class) .process(() -> myType.content);
41
TaskContext taskContext = TaskContext.inmem(); TaskContext.Value<Long> value = taskContext.evaluate(fib92); value.consume(f92 -> System.out.println("fib(92) = " + f92)); } static Task<Long> create(long n) { <BUG>TaskBuilder<Long> fib = Task.ofType(Long.class).named("Fib", n); </BUG> if (n < 2) { return fib .process(() -> n);
TaskBuilder<Long> fib = Task.named("Fib", n).ofType(Long.class);
42
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;
43
context.getApplicationContext().sendBroadcast(intent); } } @Nullable public static Location getCachedLocation(Context context) { <BUG>if (BuildConfig.DEBUG) { Log.v(LOGTAG, "Fetching cached location", new Exception()); }</BUG> Location location = null;
DebugLog.v(LOGTAG, "Fetching cached location", new Exception());
44
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);
45
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);
46
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);
47
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;
48
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);
49
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);
50
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;
51
} 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);
52
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);
53
@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);
54
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);
55
super.onSaveInstanceState(outState); } void onSingletonInitialized() { this.mSingleton = Singleton.getInstance(); } <BUG>void initializeSingleton() { Singleton.init(getActivity(), new Singleton.Callbacks() { @Override public void onInitialized() { onSingletonInitialized(); } });</BUG> }
Singleton.init(getActivity(), () -> onSingletonInitialized());
56
textViewTitle.setText(getZooniverseId()); final Button buttonExamine = (Button) mRootView.findViewById(R.id.buttonExamine); if (buttonExamine == null) { Log.error("buttonExamine is null."); return; <BUG>} buttonExamine.setOnClickListener(new View.OnClickListener() { @Override public void onClick(final View view) { doExamine(); } });</BUG> final Button buttonDiscuss = (Button) mRootView.findViewById(R.id.buttonDiscuss);
buttonExamine.setOnClickListener(view -> doExamine());
57
});</BUG> final Button buttonDiscuss = (Button) mRootView.findViewById(R.id.buttonDiscuss); if (buttonDiscuss == null) { Log.error("buttonDiscuss is null."); return; <BUG>} buttonDiscuss.setOnClickListener(new View.OnClickListener() { @Override public void onClick(final View view) { doDiscuss(); } });</BUG> }
textViewTitle.setText(getZooniverseId()); final Button buttonExamine = (Button) mRootView.findViewById(R.id.buttonExamine); if (buttonExamine == null) { Log.error("buttonExamine is null."); buttonExamine.setOnClickListener(view -> doExamine()); buttonDiscuss.setOnClickListener(view -> doDiscuss());
58
implements LoaderManager.LoaderCallbacks<Cursor> { private static final String ARG_QUESTION_CLASSIFICATION_IN_PROGRESS = "classification-in-progress"; private static final int URL_LOADER = 0; private static final int COLUMN_INDEX_ZOONIVERSE_ID = 1; private static final int COLUMN_INDEX_GROUP_ID = 2; <BUG>private static final Callbacks sDummyCallbacks = new Callbacks() { public void onClassificationFinished() { }</BUG> };
private static final Callbacks sDummyCallbacks = () -> {
59
mUsernameView = (EditText) findViewById(R.id.username); final Intent intent = getIntent(); if (intent != null) { mExistingAccountName = intent.getStringExtra(ARG_USERNAME); } <BUG>mPasswordView = (EditText) findViewById(R.id.password); mPasswordView.setOnEditorActionListener(new AppCompatTextView.OnEditorActionListener() { @Override public boolean onEditorAction(final TextView textView, final int id, final KeyEvent keyEvent) {</BUG> if (id == R.id.login || id == EditorInfo.IME_NULL) {
mPasswordView.setOnEditorActionListener((textView, id, keyEvent) -> {
60
import android.net.Uri; import android.support.annotation.NonNull; import android.text.TextUtils; import com.android.volley.Request; import com.android.volley.RequestQueue; <BUG>import com.android.volley.Response; import com.android.volley.VolleyError;</BUG> import com.murrayc.galaxyzoo.app.Log; import com.murrayc.galaxyzoo.app.Utils; import com.murrayc.galaxyzoo.app.provider.HttpUtils;
[DELETED]
61
import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.support.annotation.NonNull; import android.text.TextUtils; <BUG>import com.android.volley.Response; import com.android.volley.VolleyError;</BUG> import com.murrayc.galaxyzoo.app.Log; import com.murrayc.galaxyzoo.app.LoginUtils; import com.murrayc.galaxyzoo.app.R;
[DELETED]
62
if(mRequestMoreItemsTaskInProgress) { return; } mRequestMoreItemsTaskInProgress = true; try { <BUG>mClient.requestMoreItemsAsync(count, new Response.Listener<String>() { @Override public void onResponse(final String response) {</BUG> final List<ZooniverseClient.Subject> result = MoreItemsJsonParser.parseMoreItemsResponseContent(response);
response -> {
63
mRootView = inflater.inflate(R.layout.fragment_subject, container, false); assert mRootView != null; mImageView = (ImageView) mRootView.findViewById(R.id.imageView); if (mImageView == null) { Log.error("mImageView is null."); <BUG>} else { mImageView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(final View v) { doInvert(); } });</BUG> }
mImageView.setOnClickListener(v -> doInvert());
64
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 PatchUtils {
import java.text.DateFormat; import java.util.Date; import java.util.List;
65
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;
66
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"), MISC_FILES("misc-files"),
APPLIES_TO_VERSION("applies-to-version"), BUNDLES("bundles"),
67
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_VERSION: if(type == Patch.PatchType.CUMULATIVE) {
[DELETED]
68
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, bytesToHexString(item.getContentHash())); } if(type != ModificationType.ADD) {
if (item.isDirectory()) { writer.writeAttribute(Attribute.DIRECTORY.name, "true"); if(type != ModificationType.REMOVE) {
69
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> import java.util.List; @MessageBundle(projectCode = "JBAS") public interface PatchMessages {
import org.jboss.logging.annotations.Cause; import java.io.IOException;
70
package com.liferay.marketplace.app.manager.web.dao.search; <BUG>import com.liferay.marketplace.app.manager.web.util.AppDisplay; import com.liferay.portal.kernel.dao.search.ResultRow;</BUG> import com.liferay.portal.kernel.dao.search.ResultRowSplitter; import com.liferay.portal.kernel.dao.search.ResultRowSplitterEntry; import java.util.ArrayList;
import com.liferay.marketplace.app.manager.web.util.ModuleGroupDisplay; import com.liferay.portal.kernel.dao.search.ResultRow;
71
package com.liferay.marketplace.app.manager.web.constants; import com.liferay.portal.kernel.util.StringPool; import org.osgi.framework.Bundle; public class BundleStateConstants { public static final int ACTIVE = Bundle.ACTIVE; <BUG>public static final String ACTIVE_LABEL = "active"; public static final int INSTALLED = Bundle.INSTALLED;</BUG> public static final String INSTALLED_LABEL = "installed"; public static final int[] INSTALLED_STATES = { BundleStateConstants.ACTIVE, BundleStateConstants.RESOLVED,
public static final int ANY = 0; public static final String ANY_LABEL = StringPool.BLANK; public static final int INSTALLED = Bundle.INSTALLED;
72
mData.add(new MainItem("二维码与条形码的扫描与生成", R.drawable.scan_barcode, ActivityScanerCode.class)); mData.add(new MainItem("WebView的封装可播放视频", R.drawable.webpage, com.vondear.vontools.activity.ActivityWebView.class)); mData.add(new MainItem("常用的Dialog展示", R.drawable.dialog, ActivityDialog.class)); mData.add(new MainItem("VonTextUtils操作Demo", R.drawable.text_editor, ActivityTextUtils.class)); mData.add(new MainItem("进度条的艺术", R.drawable.signal_wifi, ActivityProgressBar.class)); <BUG>mData.add(new MainItem("横向滑动选择日期", R.drawable.bookshelf, ActivityWheelHorizontal.class)); mData.add(new MainItem("SlidingDrawerSingle使用", R.drawable.sliding_drawer, ActivitySlidingDrawerSingle.class)); mData.add(new MainItem("app的检测更新与安装", R.mipmap.ic_launcher, ActivitySplash.class)); }</BUG> private void initView() {
mData.add(new MainItem("横向左右自动滚动的ImageView", R.drawable.picture, ActivityAutoImageView.class)); mData.add(new MainItem("app检测更新与安装", R.mipmap.ic_launcher, ActivitySplash.class)); }
73
tv_time_second = (TextView) findViewById(R.id.tv_time_second); ll_back = (LinearLayout) findViewById(R.id.ll_back); ll_back.setVisibility(View.VISIBLE); ll_back.setOnClickListener(this); tv_title = (TextView) findViewById(R.id.tv_title); <BUG>tv_title.setText("会员码"); </BUG> ll_menu = (LinearLayout) findViewById(R.id.ll_menu); ll_menu.setVisibility(View.VISIBLE); iv_code = (ImageView) findViewById(R.id.iv_code);
tv_title.setText("动态生成码");
74
import android.content.Context; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.text.method.ScrollingMovementMethod; import android.view.View; <BUG>import android.widget.Button; import com.vondear.tools.R; import com.vondear.vontools.view.DialogEditTextSureCancle;</BUG> import com.vondear.vontools.view.DialogLoadingProgressAcfunVideo; import com.vondear.vontools.view.DialogSure;
import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import com.vondear.vontools.VonBarUtils; import com.vondear.vontools.view.DialogEditTextSureCancle;
75
import com.vondear.vontools.view.dialogShapeLoadingView.ShapeLoadingDialog; import com.vondear.vontools.view.dialogWheel.DialogWheelYearMonthDay; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; <BUG>public class ActivityDialog extends AppCompatActivity { @BindView(R.id.button_DialogSure)</BUG> Button buttonDialogSure; @BindView(R.id.button_DialogSureCancle) Button buttonDialogSureCancle;
public class ActivityDialog extends Activity { @BindView(R.id.button_DialogSure)
76
public static final int REPORT_PDF_XSL; public static final int REPORT_SVG_XSL; public static final int EVENT_REPORT; public static final int OUTAGE_REPORT; public static final int NOTIFY_REPORT; <BUG>public static final int LINKD_CONFIG_FILE_NAME; public static final int MAP_PROPERTIES_FILE_NAME;</BUG> public static final int EVENT_REPORT_DTD; public static final int OUTAGE_REPORT_DTD; public static final int NOTIFY_REPORT_DTD;
public static final int OPENNMS_DATASOURCE_CONFIG_FILE_NAME; public static final int MAP_PROPERTIES_FILE_NAME;
77
SURVEILLANCE_VIEWS_FILE_NAME = 61; SITE_STATUS_VIEWS_FILE_NAME = 62; MONITORING_LOCATIONS_FILE_NAME = 63; HTTP_COLLECTION_CONFIG_FILE_NAME = 64; NSCLIENT_COLLECTION_CONFIG_FILE_NAME = 65; <BUG>NSCLIENT_CONFIG_FILE_NAME = 66; FILE_ID_TO_NAME = new String[67]; </BUG> FILE_ID_TO_NAME[DB_CONFIG_FILE_NAME] = "opennms-database.xml"; FILE_ID_TO_NAME[JMS_CONFIG_FILE_NAME] = "opennms-jms.xml";
OPENNMS_DATASOURCE_CONFIG_FILE_NAME = 67; FILE_ID_TO_NAME = new String[68];
78
FILE_ID_TO_NAME[SURVEILLANCE_VIEWS_FILE_NAME] = "surveillance-views.xml"; FILE_ID_TO_NAME[SITE_STATUS_VIEWS_FILE_NAME] = "site-status-views.xml"; FILE_ID_TO_NAME[MONITORING_LOCATIONS_FILE_NAME] = "monitoring-locations.xml"; FILE_ID_TO_NAME[HTTP_COLLECTION_CONFIG_FILE_NAME] = "http-datacollection-config.xml"; FILE_ID_TO_NAME[NSCLIENT_COLLECTION_CONFIG_FILE_NAME] = "nsclient-datacollection-config.xml"; <BUG>FILE_ID_TO_NAME[NSCLIENT_CONFIG_FILE_NAME] = "nsclient-config.xml"; }</BUG> public static final String getFileName(int id) { return FILE_ID_TO_NAME[id]; }
FILE_ID_TO_NAME[OPENNMS_DATASOURCE_CONFIG_FILE_NAME] = "opennms-datasources.xml";
79
public class Relationship { private static final int ARROWHEAD_LENGTH = 10;</BUG> private static final int ARROWHEAD_WIDTH = ARROWHEAD_LENGTH / 2; private Line edge; private HTML label; <BUG>private Widget from; private Widget to; </BUG> private Line arrowheadLeft;
package org.neo4j.server.ext.visualization.gwt.client; import org.vaadin.gwtgraphics.client.Line; import com.google.gwt.dom.client.Style; import com.google.gwt.dom.client.Style.Position; import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.user.client.ui.HTML; private static final int ARROWHEAD_LENGTH = 10; private Node from; private Node to;
80
arrowheadRight = new Line(0, 0, 0, 0); parent.add(arrowheadRight); updateArrowhead(); } private void addEdge(VGraphComponent parent) { <BUG>edge = new Line((int) Math.round(getCenterX(from)), (int) Math.round(getCenterY(from)), (int) Math.round(getCenterX(to)), (int) Math.round(getCenterY(to))); </BUG> parent.add(edge);
[DELETED]
81
label = new HTML("<div style='text-align:center'>" + type + "</div>"); parent.add(label); Style style = label.getElement().getStyle(); style.setPosition(Position.ABSOLUTE); style.setBackgroundColor("white"); <BUG>style.setFontSize(9, Unit.PX); </BUG> updateLabel(); } void update() {
style.setFontSize(10, Unit.PX);
82
void update() { updateEdge(); updateLabel(); updateArrowhead(); } <BUG>private void updateArrowhead() { double originX = getArrowheadOrigin(getCenterX(from), getCenterX(to)); double originY = getArrowheadOrigin(getCenterY(from), getCenterY(to)); double angle = Math.atan2(getCenterY(to) - getCenterY(from), getCenterX(to) - getCenterX(from));</BUG> double leftX = originX
double fromX = from.getCenterX(); double fromY = from.getCenterY(); double toX = to.getCenterX(); double toY = to.getCenterY(); double originX = getArrowheadOrigin(fromX, toX); double originY = getArrowheadOrigin(fromY, toY); double angle = Math.atan2(toY - fromY, toX - fromX);
83
double rightY = originY + rotateY(-ARROWHEAD_LENGTH, ARROWHEAD_WIDTH, angle); updateLine(arrowheadRight, originX, originY, rightX, rightY); } private void updateEdge() { <BUG>updateLine(edge, getCenterX(from), getCenterY(from), getCenterX(to), getCenterY(to)); </BUG> }
updateLine(edge, from.getCenterX(), from.getCenterY(), to.getCenterX(), to.getCenterY());
84
Bundle savedInstanceState) { final View rootView = inflater.inflate(R.layout.tab_qibla, container, false); final QiblaCompassView qiblaCompassView = (QiblaCompassView)rootView.findViewById(R.id.qibla_compass); qiblaCompassView.setConstants(((TextView)rootView.findViewById(R.id.bearing_north)), getText(R.string.bearing_north), ((TextView)rootView.findViewById(R.id.bearing_qibla)), getText(R.string.bearing_qibla)); <BUG>sOrientationListener = new SensorListener() { </BUG> public void onSensorChanged(int s, float v[]) { float northDirection = v[SensorManager.DATA_X]; qiblaCompassView.setDirections(northDirection, sQiblaDirection);
sOrientationListener = new android.hardware.SensorListener() {
85
import org.opennms.netmgt.model.events.EventBuilder; import org.opennms.netmgt.model.events.EventForwarder; import org.opennms.netmgt.model.events.annotations.EventHandler; import org.opennms.netmgt.xml.event.Event; import org.opennms.rancid.RWSClientApi; <BUG>import org.opennms.rancid.RancidNode; import org.springframework.beans.factory.InitializingBean;</BUG> import org.springframework.transaction.annotation.Transactional; public class RancidProvisioningAdapter implements ProvisioningAdapter, InitializingBean { private NodeDao m_nodeDao;
import org.opennms.rancid.RancidNodeAuthentication; import org.springframework.beans.factory.InitializingBean;
86
m_eventForwarder = eventForwarder; } public EventForwarder getEventForwarder() { return m_eventForwarder; } <BUG>private Category log() { return Logger.getLogger("Rancid"); } public void afterPropertiesSet() throws Exception { }</BUG> public RWSConfig getRwsConfig() {
private static Category log() { return ThreadCategory.getInstance(RancidProvisioningAdapter.class); RWSClientApi.init();
87
import java.io.File; import java.io.FileReader; import java.io.IOException; import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.ValidationException; <BUG>import org.opennms.netmgt.ConfigFileConstants; public class RancidAdapterConfigFactory implements RancidAdapterConfig {</BUG> private static RancidAdapterConfigFactory m_singleton = null; private static boolean m_loaded = false; public static synchronized void init() throws IOException, MarshalException, ValidationException {
import org.opennms.rancid.RancidNode; import org.opennms.rancid.RancidNodeAuthentication; public class RancidAdapterConfigFactory implements RancidAdapterConfig {
88
final String name = column.getQualifiedOutputName(); final boolean isUDT = column.getType().isUDT(); final boolean isArray = column.getType().isArray(); final boolean isUDTArray = column.getType().isArray() && database.getArray(column.getType().getSchema(), column.getType().getQualifiedUserType()).getElementType().isUDT(); if (!(generateInterfaces() && isArray)) { <BUG>out.tab(1).javadoc("Setter for <code>%s</code>.%s", name, defaultIfBlank(" " + comment, "")); </BUG> if (scala) { out.tab(1).println("def %s(value : %s) : %s = {", setter, type, setterReturnType); out.tab(2).println("set(%s, value)", index);
out.tab(1).javadoc("Setter for <code>%s</code>.%s", name, defaultIfBlank(" " + escapeEntities(comment), ""));
89
private final void generateRecordGetter0(TypedElementDefinition<?> column, int index, JavaWriter out) { final String comment = StringUtils.defaultString(column.getComment()); final String getter = getStrategy().getJavaGetterName(column, Mode.RECORD); final String type = out.ref(getJavaType(column.getType())); final String name = column.getQualifiedOutputName(); <BUG>out.tab(1).javadoc("Getter for <code>%s</code>.%s", name, defaultIfBlank(" " + comment, "")); </BUG> if (column.getContainer() instanceof TableDefinition) printColumnJPAAnnotation(out, (ColumnDefinition) column); printValidationAnnotation(out, column);
out.tab(1).javadoc("Getter for <code>%s</code>.%s", name, defaultIfBlank(" " + escapeEntities(comment), ""));
90
private final void generateInterfaceGetter0(TypedElementDefinition<?> column, @SuppressWarnings("unused") int index, JavaWriter out) { final String comment = StringUtils.defaultString(column.getComment()); final String getter = getStrategy().getJavaGetterName(column, Mode.INTERFACE); final String type = out.ref(getJavaType(column.getType(), Mode.INTERFACE)); final String name = column.getQualifiedOutputName(); <BUG>out.tab(1).javadoc("Getter for <code>%s</code>.%s", name, defaultIfBlank(" " + comment, "")); </BUG> if (column instanceof ColumnDefinition) printColumnJPAAnnotation(out, (ColumnDefinition) column); printValidationAnnotation(out, column);
out.tab(1).javadoc("Getter for <code>%s</code>.%s", name, defaultIfBlank(" " + escapeEntities(comment), ""));
91
out.println("object %s {", className); printSingletonInstance(out, udt); for (AttributeDefinition attribute : udt.getAttributes()) { final String attrId = out.ref(getStrategy().getJavaIdentifier(attribute), 2); final String attrComment = StringUtils.defaultString(attribute.getComment()); <BUG>out.tab(1).javadoc("The attribute <code>%s</code>.%s", attribute.getQualifiedOutputName(), defaultIfBlank(" " + attrComment, "")); </BUG> out.tab(1).println("val %s = %s.%s", attrId, udtId, attrId); } out.println("}");
out.tab(1).javadoc("The attribute <code>%s</code>.%s", attribute.getQualifiedOutputName(), defaultIfBlank(" " + escapeEntities(attrComment), ""));
92
final String columnComment = StringUtils.defaultString(column.getComment()); final List<String> converters = out.ref(list( column.getType().getConverter(), column.getType().getBinding() )); <BUG>out.tab(1).javadoc("The column <code>%s</code>.%s", column.getQualifiedOutputName(), defaultIfBlank(" " + columnComment, "")); </BUG> if (scala) { out.tab(1).println("val %s : %s[%s, %s] = createField(\"%s\", %s, \"%s\"[[before=, ][new %s()]])", columnId, TableField.class, recordType, columnType, columnName, columnTypeRef, escapeString(columnComment), converters);
out.tab(1).javadoc("The column <code>%s</code>.%s", column.getQualifiedOutputName(), defaultIfBlank(" " + escapeEntities(columnComment), ""));
93
schemas.add(schema); final String schemaClassName = out.ref(getStrategy().getFullJavaClassName(schema)); final String schemaId = getStrategy().getJavaIdentifier(schema); final String schemaFullId = getStrategy().getFullJavaIdentifier(schema); final String schemaComment = !StringUtils.isBlank(schema.getComment()) <BUG>? schema.getComment() : "The schema <code>" + schema.getQualifiedOutputName() + "</code>.";</BUG> out.tab(1).javadoc(schemaComment); if (scala) out.tab(1).println("val %s = %s", schemaId, schemaFullId);
? escapeEntities(schema.getComment()) : "The schema <code>" + schema.getQualifiedOutputName() + "</code>.";
94
for (TableDefinition table : schema.getTables()) { final String tableClassName = out.ref(getStrategy().getFullJavaClassName(table)); final String tableId = getStrategy().getJavaIdentifier(table); final String tableFullId = getStrategy().getFullJavaIdentifier(table); final String tableComment = !StringUtils.isBlank(table.getComment()) <BUG>? table.getComment() : "The table <code>" + table.getQualifiedOutputName() + "</code>.";</BUG> out.tab(1).javadoc(tableComment); if (scala) out.tab(1).println("val %s = %s", tableId, tableFullId);
? escapeEntities(table.getComment()) : "The table <code>" + table.getQualifiedOutputName() + "</code>.";
95
final String isUnnamed = parameter.isUnnamed() ? "true" : "false"; final List<String> converters = out.ref(list( parameter.getType().getConverter(), parameter.getType().getBinding() )); <BUG>out.tab(1).javadoc("The parameter <code>%s</code>.%s", parameter.getQualifiedOutputName(), defaultIfBlank(" " + paramComment, "")); </BUG> out.tab(1).println("val %s : %s[%s] = %s.createParameter(\"%s\", %s, %s, %s[[before=, ][new %s]])", paramId, Parameter.class, paramType, AbstractRoutine.class, paramName, paramTypeRef, isDefaulted, isUnnamed, converters); }
out.tab(1).javadoc("The parameter <code>%s</code>.%s", parameter.getQualifiedOutputName(), defaultIfBlank(" " + escapeEntities(paramComment), ""));
96
try { if (f.exists() && f.isDirectory()) { for (File x : f.listFiles()) { long size = 0; if (!x.isDirectory()) size = x.length(); <BUG>BaseFile baseFile=new BaseFile(x.getPath(), parseFilePermission(x), x.lastModified() , size, x.isDirectory()); baseFile.setName(x.getName());</BUG> baseFile.setMode(OpenMode.FILE); if (showHidden) { files.add(baseFile);
BaseFile baseFile=new BaseFile(x.getPath(), parseFilePermission(x), x.lastModified(), size, x.isDirectory()); baseFile.setName(x.getName());
97
.getLayoutInflater().inflate(R.layout.processrow, null); root.setTag("copy" + id); ImageButton cancel = (ImageButton) root.findViewById(R.id.delete_button); TextView progressText = (TextView) root.findViewById(R.id.progressText); Drawable icon = icons.getCopyDrawable(); <BUG>boolean move = b.isMove(); </BUG> if (move) { icon = icons.getCutDrawable(); }
boolean move = dataPackage.isMove();
98
rootView.removeView(rootView.findViewWithTag("copy" + id1)); CopyIds.remove(CopyIds.indexOf(id1)); CancelledCopyIds.add(id1); } }); <BUG>String name = b.getName(); int p1 = b.getP1(); int p2 = b.getP2(); String text = getResources().getString(R.string.copying) + "\n" + name;</BUG> if (move) {
String name = dataPackage.getName(); long doneBytes = dataPackage.getByteProgress(); long totalBytes = dataPackage.getTotal(); double progressPercent = (doneBytes/totalBytes)*100; String text = getResources().getString(R.string.copying) + "\n" + name;
99
if (completed) { rootView.removeViewInLayout(process); ExtractIds.remove(ExtractIds.indexOf(id)); } else { String name = dataPackage.getName(); <BUG>int p1 = dataPackage.getP1(); long p3 = dataPackage.getTotal(); long p2 = dataPackage.getDone(); ProgressBar p = (ProgressBar) process.findViewById(R.id.progressBar1); if (p1 <= 100) { ((TextView) process.findViewById(R.id.progressText)).setText(getResources().getString(R.string.extracting) + "\n" + name + "\n" + p1 + "%" + "\n" + Futils.readableFileSize(p2) + "/" + Futils.readableFileSize(p3)); p.setProgress(p1); }</BUG> }
[DELETED]
100
if (completed) { rootView.removeViewInLayout(process); ZipIds.remove(ZipIds.indexOf(id)); } else { String name = dataPackage.getName(); <BUG>int p1 = dataPackage.getP1(); ProgressBar p = (ProgressBar) process.findViewById(R.id.progressBar1); if (p1 <= 100) { ((TextView) process.findViewById(R.id.progressText)).setText(getResources().getString(R.string.zipping) + "\n" + name + "\n" + p1 + "%"); p.setProgress(p1); }</BUG> }
ExtractIds.remove(ExtractIds.indexOf(id));
README.md exists but content is empty. Use the Edit dataset card button to edit it.
Downloads last month
95
Edit dataset card