id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
35,601
.build(doc.getWiki(), doc.getSpace(), doc.getName(), doc.getVersion(), xwikiObject.getClassName(), xwikiObject.getNumber()).toString();</BUG> } else { <BUG>propertiesUri = UriBuilder .fromUri(baseUri) .path(ObjectPropertiesResource.class) .build(doc.getWiki(), doc.getSpace(), doc.getName(), xwikiObject.getClassName(), ...
fillObjectSummary(objectSummary, objectFactory, baseUri, doc, xwikiObject, xwikiApi, withPrettyNames); Link objectLink = getObjectLink(objectFactory, baseUri, doc, xwikiObject, useVersion, Relations.OBJECT); objectSummary.getLinks().add(objectLink); String propertiesUri; if (useVersion) { uri(baseUri, ObjectPropertiesA...
35,602
.build(doc.getWiki(), doc.getSpace(), doc.getName(), doc.getVersion(), xwikiObject.getClassName(), xwikiObject.getNumber(), propertyClass.getName()) .toString();</BUG> } else { <BUG>propertyUri = UriBuilder .fromUri(baseUri) .path(ObjectPropertyResource.class) .build(doc.getWiki(), doc.getSpace(), doc.getName(), xwikiO...
propertiesUri = uri(baseUri, ObjectPropertiesResource.class, doc.getWiki(), doc.getSpace(), doc.getName(), xwikiObject.getClassName(), xwikiObject.getNumber());
35,603
.build(doc.getWiki(), doc.getSpace(), doc.getName(), doc.getVersion(), xwikiObject.getClassName(), xwikiObject.getNumber()).toString();</BUG> } else { <BUG>objectUri = UriBuilder .fromUri(baseUri) .path(ObjectResource.class) .build(doc.getWiki(), doc.getSpace(), doc.getName(), xwikiObject.getClassName(), xwikiObject.ge...
private static Link getObjectLink(ObjectFactory objectFactory, URI baseUri, Document doc, BaseObject xwikiObject, boolean useVersion, String relation) String objectUri; if (useVersion) { uri(baseUri, ObjectAtPageVersionResource.class, doc.getWiki(), doc.getSpace(), doc.getName(), doc.getVersion(), xwikiObject.getClassN...
35,604
Link propertyLink = objectFactory.createLink(); propertyLink.setHref(propertyUri); propertyLink.setRel(Relations.SELF); property.getLinks().add(propertyLink); clazz.getProperties().add(property); <BUG>} String classUri = UriBuilder.fromUri(baseUri).path(ClassResource.class).build(wikiName, xwikiClass.getName()).toStrin...
String classUri = uri(baseUri, ClassResource.class, wikiName, xwikiClass.getName());
35,605
String classUri = UriBuilder.fromUri(baseUri).path(ClassResource.class).build(wikiName, xwikiClass.getName()).toString();</BUG> Link classLink = objectFactory.createLink(); classLink.setHref(classUri); classLink.setRel(Relations.SELF); <BUG>clazz.getLinks().add(classLink); String propertiesUri = UriBuilder.fromUri(base...
propertyLink.setHref(propertyUri); propertyLink.setRel(Relations.SELF); property.getLinks().add(propertyLink); clazz.getProperties().add(property); } String classUri = uri(baseUri, ClassResource.class, wikiName, xwikiClass.getName()); String propertiesUri = uri(baseUri, ClassPropertiesResource.class, wikiName, xwikiCla...
35,606
<BUG>package org.xwiki.rest.internal; import org.apache.commons.lang3.StringUtils;</BUG> import org.xwiki.component.manager.ComponentManager; import org.xwiki.context.Execution; import org.xwiki.model.reference.EntityReferenceSerializer;
import java.net.URI; import javax.ws.rs.core.UriBuilder; import org.apache.commons.httpclient.URIException; import org.apache.commons.httpclient.util.URIUtil; import org.apache.commons.lang3.StringUtils;
35,607
} @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...
return Task.named("exec", "/bin/sh").ofType(Exec.Result.class) .in(() -> task1)
35,608
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, s...
return Task.named("MyTask", parameter).ofType(String.class) .in(() -> Adder.create(parameter.length(), PLUS))
35,609
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...
Task<Long> task1 = Task.named("Foo", "Bar", 39).ofType(Long.class) Task<String> task2 = Task.named("Baz", 40).ofType(String.class) .in(() -> task1)
35,610
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 +...
Task<String> task = Task.named("WithRef").ofType(String.class) .process(() -> instanceField + " causes an outer reference");
35,611
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.e...
Task<String> task = Task.named("WithLocalRef").ofType(String.class) .process(() -> local + " won't cause an outer reference");
35,612
} @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);
35,613
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);
35,614
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);
35,615
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(() ...
TaskBuilder<Long> fib = Task.named("Fib", n).ofType(Long.class);
35,616
package com.easytoolsoft.easyreport.web.controller.common; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @Controller @RequestMapping(value = "/error") <BUG>public class ErrorController extends AbstractController { @RequestMapping(value = {"/404"})</BUG>...
public class ErrorController { @RequestMapping(value = {"/404"})
35,617
import java.security.AccessController; import java.security.PrivilegedActionException; import java.security.PrivilegedExceptionAction; import org.apache.velocity.Template; import org.apache.velocity.VelocityContext; <BUG>import org.apache.velocity.app.VelocityEngine; import org.apache.velocity.exception.ParseErrorExcep...
import org.apache.velocity.context.Context; import org.apache.velocity.exception.ParseErrorException;
35,618
_velocityEngine = velocityEngine; } public Object get(String key) { return _velocityContext.get(key); } <BUG>public String[] getKeys() { Object[] keyObjects = _velocityContext.getKeys(); Object[] innerKeyObjects = _velocityContext.getChainedContext().getKeys(); String[] keys = new String[keyObjects.length + innerKeyObj...
Context context = _velocityContext.getChainedContext(); return ArrayUtil.append( (String[])_velocityContext.getKeys(), (String[])context.getKeys());
35,619
"render-request", RenderRequest.class, PortletDisplayTemplateConstants.RENDER_REQUEST); utilTemplateVariableGroup.addVariable( "render-response", RenderResponse.class, PortletDisplayTemplateConstants.RENDER_RESPONSE); <BUG>if (language.equals(TemplateConstants.LANG_TYPE_VM)) { utilTemplateVariableGroup.addVariable( "li...
[DELETED]
35,620
package mnm.mods.tabbychat.api.gui; <BUG>import java.awt.Rectangle; import mnm.mods.util.gui.GuiComponent; public interface IGui<Gui extends GuiComponent> {</BUG> Gui asGui(); Rectangle getBounds();
public interface IGui<Gui> {
35,621
for (Channel channel : channels) { channel.clear(); } this.channels.clear(); this.channels.add(ChatChannel.DEFAULT_CHANNEL); <BUG>((ChatTray) chatbox.getTray()).clear(); }</BUG> @Override public Channel getActiveChannel() { return active;
chatbox.getTray().clear();
35,622
package com.james.status.views; <BUG>import android.animation.Animator; import android.animation.LayoutTransition;</BUG> import android.animation.ValueAnimator; import android.annotation.TargetApi; import android.app.WallpaperInfo;
import android.animation.ArgbEvaluator; import android.animation.LayoutTransition;
35,623
package com.james.status.dialogs; <BUG>import android.animation.Animator; import android.content.Context;</BUG> import android.content.Intent; import android.graphics.Color; import android.graphics.drawable.ColorDrawable;
import android.animation.ArgbEvaluator; import android.animation.ValueAnimator; import android.content.Context;
35,624
public void onAnimationCancel(Animator animation) { } @Override public void onAnimationRepeat(Animator animation) { } <BUG>}).start(); } else {</BUG> colorImage.setImageDrawable(new ColorDrawable(color)); colorHex.removeTextChangedListener(textWatcher); colorHex.setText(String.format("#%06X", (0xFFFFFF & color)));
}); animator.start(); } else {
35,625
import org.openspcoop2.generic_project.dao.jdbc.IJDBCServiceSearchWithId; import org.openspcoop2.generic_project.dao.jdbc.JDBCExpression; import org.openspcoop2.generic_project.dao.jdbc.JDBCPaginatedExpression; import org.openspcoop2.generic_project.dao.jdbc.JDBCServiceManagerProperties; import org.openspcoop2.generic_...
import org.openspcoop2.generic_project.exception.ExpressionException; import org.openspcoop2.generic_project.exception.MultipleResultException;
35,626
AliasField tipoTributoId = new AliasField(new CustomField("tipoTributo.id", Long.class, "id", this.getTributoFieldConverter().toTable(Tributo.model().TIPO_TRIBUTO)), this.getTributoFieldConverter().toTable(Tributo.model().TIPO_TRIBUTO)+"_id"); fields.add(tipoTributoId); fields.add(Tributo.model().TIPO_TRIBUTO.COD_TRIBU...
AliasField tipoContabilitaAlias = getAliasField(Tributo.model().TIPO_TRIBUTO.TIPO_CONTABILITA); fields.add(tipoContabilitaAlias); AliasField codiceContabilitaAlias = getAliasField(Tributo.model().TIPO_TRIBUTO.COD_CONTABILITA); fields.add(codiceContabilitaAlias); AliasField codiceTributoIuvAlias = getAliasField(Tributo....
35,627
" p.importo_pagato as p_importo_pagato,p.data_acquisizione as p_data_acquisizione,p.iur as p_iur,p.data_pagamento as p_data_pagamento,p.commissioni_psp as p_commissioni_psp,p.tipo_allegato as p_tipo_allegato,p.allegato as p_allegato,p.data_acquisizione_revoca as p_data_acquisizione_revoca,p.causale_revoca as p_causale_...
" UNION ALL " +
35,628
</BUG> " ( " + " SELECT 'STORNO' as tipo, r.iuv as r_iuv,r.iur as r_iur,r.importo_pagato as r_importo_pagato,r.esito as r_esito,r.data as r_data,r.stato as r_stato,r.anomalie as r_anomalie,r.id as r_id,r.id_fr as r_id_fr,r.id_pagamento as r_id_pagamento, p.importo_pagato as p_importo_pagato,p.data_acquisizione as p_dat...
" p.importo_pagato as p_importo_pagato,p.data_acquisizione as p_data_acquisizione,p.iur as p_iur,p.data_pagamento as p_data_pagamento,p.commissioni_psp as p_commissioni_psp,p.tipo_allegato as p_tipo_allegato,p.allegato as p_allegato,p.data_acquisizione_revoca as p_data_acquisizione_revoca,p.causale_revoca as p_causale_...
35,629
} } }); } } else { <BUG>if (n <= m) { for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) {</BUG> a[i][j] = operator.applyAsBoolean(a[i][j]); }
public boolean[] row(final int rowIndex) { N.checkArgument(rowIndex >= 0 && rowIndex < n, "Invalid row Index: %s", rowIndex); return a[rowIndex];
35,630
} } }); } } else { <BUG>if (n <= m) { for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) {</BUG> result[i][j] = zipFunction.apply(a[i][j], b[i][j]); }
public boolean get(final int i, final int j) { return a[i][j];
35,631
} } }); } } else { <BUG>if (n <= m) { for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) {</BUG> result[i][j] = zipFunction.apply(a[i][j], b[i][j], c[i][j]); }
return new BooleanMatrix(c);
35,632
} public AsyncExecutor(int maxConcurrentThreadNumber, long keepAliveTime, TimeUnit unit) { this.maxConcurrentThreadNumber = maxConcurrentThreadNumber; this.keepAliveTime = keepAliveTime; this.unit = unit; <BUG>} public AsyncExecutor(final ExecutorService executorService) { this(8, 300, TimeUnit.SECONDS); this.executorS...
[DELETED]
35,633
results.add(execute(cmd)); } return results; } public <T> CompletableFuture<T> execute(final Callable<T> command) { <BUG>final CompletableFuture<T> future = new CompletableFuture<T>(this, command); getExecutorService().execute(future);</BUG> return future; } public <T> List<CompletableFuture<T>> execute(final Callable<...
final CompletableFuture<T> future = new CompletableFuture<>(this, command); getExecutorService().execute(future);
35,634
<BUG>package codeine.db.mysql; import java.util.List; import org.apache.log4j.Logger; import codeine.jsons.global.MysqlConfigurationJson; import codeine.utils.StringUtils;</BUG> public class NearestHostSelector {
[DELETED]
35,635
import org.apache.log4j.Logger; import codeine.jsons.global.MysqlConfigurationJson; import codeine.utils.StringUtils;</BUG> public class NearestHostSelector { private static final Logger log = Logger.getLogger(NearestHostSelector.class); <BUG>public static long DIFF_THRESHOLD = 50; private List<MysqlConfigurationJson>...
import java.util.List; public static long DIFF_THRESHOLD = 100; private MysqlConnectionWithPing lastSql; private IMysqlConnectionsProvider mysqlHostsProvider; public NearestHostSelector(IMysqlConnectionsProvider mysqlHostsProvider) { this.mysqlHostsProvider = mysqlHostsProvider;
35,636
import javax.inject.Inject; import org.apache.log4j.Logger;</BUG> import codeine.executer.Task; import codeine.jsons.global.GlobalConfigurationJsonStore; <BUG>import codeine.jsons.global.MysqlConfigurationJson; public class NearestMysqlHostSelectorPeer implements Task, MysqlHostSelector{</BUG> public static final long ...
import java.util.concurrent.TimeUnit; public class NearestMysqlHostSelectorPeer implements Task, MysqlHostSelector{
35,637
mysqlConf = selectNearestConf(); return mysqlConf; } private MysqlConfigurationJson selectNearestConf() { log.info("selectNearestConf - starting"); <BUG>MysqlConfigurationJson selectedMysql = new NearestHostSelector(conf.get().mysql(), dbConnection).select(); </BUG> log.info("selectNearestConf - selected mysql " + sele...
MysqlConfigurationJson selectedMysql = new NearestHostSelector(new MysqlConnectionsProvider(conf.get().mysql())).select();
35,638
package net.java.sip.communicator.plugin.otr; <BUG>import java.io.UnsupportedEncodingException; import java.net.URLEncoder;</BUG> import java.security.KeyFactory; import java.security.KeyPair; import java.security.KeyPairGenerator;
[DELETED]
35,639
{ e.printStackTrace(); return null; } } <BUG>private String getSessionNS(SessionID sessionID, String function) { try { return "net.java.sip.comunicator.plugin.otr." + URLEncoder.encode(sessionID.toString(), "UTF-8") + "." + function;</BUG> }
private List<ScOtrEngineListener> listeners = new Vector<ScOtrEngineListener>(); public void addListener(ScOtrEngineListener l)
35,640
OtrActivator.bundleContext.getService(ref); service.openURL(OtrActivator.resourceService .getI18NString("plugin.otr.authbuddydialog.HELP_URI")); } public OtrPolicy getContactPolicy(Contact contact) <BUG>{ String id = getSessionNS(getSessionID(contact), "policy"); if (id == null || id.length() < 1) return getGlobalPolic...
int policy = this.configurator.getPropertyInt(getSessionID(contact) + "policy", -1);
35,641
return null; } Object b64PubKey = OtrActivator.configService.getProperty(idPubKey);</BUG> if (b64PubKey == null) <BUG>return null; X509EncodedKeySpec publicKeySpec = new X509EncodedKeySpec(Base64.decode((String) b64PubKey));</BUG> PublicKey publicKey; PrivateKey privateKey; KeyFactory keyFactory;
PKCS8EncodedKeySpec privateKeySpec = new PKCS8EncodedKeySpec(b64PrivKey); byte[] b64PubKey = this.configurator.getPropertyBytes(accountID + ".publicKey"); X509EncodedKeySpec publicKeySpec = new X509EncodedKeySpec(b64PubKey);
35,642
}else if(programsSelected.size() == 1){ lytProgsPanel.setVisibility(View.VISIBLE); lytProg2MAHAdsExtDlg.setVisibility(View.GONE); prog1 = programsSelected.get(0); ((TextView)view.findViewById(R.id.tvProg1NameMAHAdsExtDlg)).setText(prog1.getName()); <BUG>if (prog1.getImg() != null && !prog1.getImg().trim().isEmpty()) { ...
Picasso.with(view.getContext()) .load(MAHAdsController.urlRootOnServer + prog1.getImg()) .placeholder(R.drawable.img_place_holder_normal) .error(R.drawable.img_not_found) .into((ImageView) view.findViewById(R.id.ivProg1ImgMAHAds)); AngledLinearLayout prog1LytNewText = (AngledLinearLayout)view.findViewById(R.id.lytProg1...
35,643
import org.apache.commons.lang3.math.NumberUtils; import org.json.JSONException; import org.mariotaku.microblog.library.MicroBlog; import org.mariotaku.microblog.library.MicroBlogException; import org.mariotaku.microblog.library.twitter.model.RateLimitStatus; <BUG>import org.mariotaku.microblog.library.twitter.model.St...
import org.mariotaku.pickncrop.library.PNCUtils; import org.mariotaku.sqliteqb.library.AllColumns;
35,644
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());
35,645
FileBody fileBody = null; try { fileBody = getFileBody(context, imageUri); twitter.updateProfileBannerImage(fileBody); } finally { <BUG>Utils.closeSilently(fileBody); if (deleteImage && "file".equals(imageUri.getScheme())) { final File file = new File(imageUri.getPath()); if (!file.delete()) { Log.w(LOGTAG, String.form...
if (deleteImage) { Utils.deleteMedia(context, imageUri);
35,646
FileBody fileBody = null; try { fileBody = getFileBody(context, imageUri); twitter.updateProfileBackgroundImage(fileBody, tile); } finally { <BUG>Utils.closeSilently(fileBody); if (deleteImage && "file".equals(imageUri.getScheme())) { final File file = new File(imageUri.getPath()); if (!file.delete()) { Log.w(LOGTAG, S...
twitter.updateProfileBannerImage(fileBody); if (deleteImage) { Utils.deleteMedia(context, imageUri);
35,647
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);
35,648
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;
35,649
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);
35,650
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);
35,651
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;
35,652
} 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);
35,653
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);
35,654
@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);
35,655
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);
35,656
package org.datavec.spark.transform.sparkfunction.sequence; import org.apache.spark.api.java.JavaRDD; <BUG>import org.apache.spark.api.java.function.Function2; import org.apache.spark.sql.DataFrame; </BUG> import org.datavec.api.transform.schema.Schema; import org.datavec.api.writable.Writable;
import org.apache.spark.sql.Row; import org.apache.spark.sql.Dataset;
35,657
import org.jitsi.impl.neomedia.device.*; import org.jitsi.service.resources.*; import org.osgi.framework.*; public class AudioDeviceConfigurationListener extends AbstractDeviceConfigurationListener <BUG>{ public AudioDeviceConfigurationListener(</BUG> ConfigurationForm configurationForm) { super(configurationForm);
private CaptureDeviceInfo captureDevice = null; private CaptureDeviceInfo playbackDevice = null; private CaptureDeviceInfo notificationDevice = null; public AudioDeviceConfigurationListener(
35,658
ResourceManagementService resources = NeomediaActivator.getResources(); notificationService.fireNotification( popUpEvent, title, <BUG>device.getName() + "\r\n" </BUG> + resources.getI18NString( "impl.media.configform"
body + "\r\n\r\n"
35,659
task.run(); } catch(Throwable t) { log.error("failed running task " + task, t); } <BUG>if(cancelled && future != null) future.cancel(true); if(future != null && !future.isCancelled()) { doSchedule(); }</BUG> }
if(cancelled) { if(future != null) return; if(future != null && future.isCancelled()) return;
35,660
import org.jetbrains.annotations.NotNull; import java.util.Set; import java.util.HashSet; import jetbrains.mps.vfs.VFileSystem; import jetbrains.mps.vfs.IFile; <BUG>public class MPSFileSynchronizer implements ApplicationComponent { public static MPSFileSynchronizer getInstance() {</BUG> return ApplicationManager.getApp...
private CommandAdapter myListener = new MyCommandAdapter(); public static MPSFileSynchronizer getInstance() {
35,661
} else { VFileSystem.refreshFileSynchronously(file); } } public void initComponent() { <BUG>CommandProcessor.getInstance().addCommandListener(new CommandAdapter() { @Override public void commandFinished(CommandEvent event) {</BUG> for (IFile vf : myFilesToSynchronize) {
CommandProcessor.getInstance().addCommandListener(myListener); public void disposeComponent() { CommandProcessor.getInstance().removeCommandListener(myListener); private class MyCommandAdapter extends CommandAdapter { public void commandFinished(CommandEvent event) {
35,662
protected Form< ? > getForm() { if (form == null) { Component< ? > component = getComponent(); <BUG>form = (Form< ? >)component.findParent(Form.class); if (form == null)</BUG> { throw new IllegalStateException( "form was not specified in the constructor and cannot "
form = component.findParent(Form.class);
35,663
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();
35,664
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()));
35,665
} 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));
35,666
<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;
35,667
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);
35,668
.workspaceSymbolProvider(true) .referencesProvider(true) .completionProvider(new CompletionOptionsBuilder() .resolveProvider(false) .triggerCharacter(".") <BUG>.build()) .build();</BUG> InitializeResult result = new InitializeResultBuilder() .capabilities(capabilities) .build();
.definitionProvider(true)
35,669
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;
35,670
@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();
35,671
@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();
35,672
import com.fincatto.nfe310.FabricaDeObjetosFake; import org.junit.Assert; import org.junit.Test; import java.math.BigDecimal; import java.util.ArrayList; <BUG>import java.util.Arrays; import java.util.List;</BUG> public class NFEnviaEventoCancelamentoTest { @Test public void deveObterEventosComoFoiSetado() {
import java.util.Collections; import java.util.List;
35,673
import com.fincatto.nfe310.FabricaDeObjetosFake; import com.fincatto.nfe310.classes.nota.NFNota; import org.junit.Assert; import org.junit.Test; import java.util.ArrayList; <BUG>import java.util.Arrays; import java.util.List;</BUG> public class NFLoteEnvioTest { @Test public void devePermitirNotasComTamanho50() {
import java.util.Collections; import java.util.List;
35,674
public void deveGerarXMLDeAcordoComOPadraoEstabelecido() { final NFLoteEnvio loteEnvio = new NFLoteEnvio(); loteEnvio.setIdLote("333972757970401"); loteEnvio.setVersao("3.10"); loteEnvio.setIndicadorProcessamento(NFLoteIndicadorProcessamento.PROCESSAMENTO_ASSINCRONO); <BUG>loteEnvio.setNotas(Arrays.asList(FabricaDeObje...
loteEnvio.setNotas(Collections.singletonList(FabricaDeObjetosFake.getNFNota()));
35,675
import org.joda.time.DateTime; import org.joda.time.LocalDate; import java.math.BigDecimal; import java.math.BigInteger; import java.util.ArrayList; <BUG>import java.util.Arrays; public class FabricaDeObjetosFake {</BUG> public static NFInformacaoImpostoDevolvido getNFInformacaoImpostoDevolvido() { final NFInformacaoIm...
import java.util.Collections; public class FabricaDeObjetosFake {
35,676
info.setEmitente(FabricaDeObjetosFake.getNFNotaInfoEmitente()); info.setEntrega(FabricaDeObjetosFake.getNFNotaInfoLocal()); info.setExportacao(FabricaDeObjetosFake.getNFNotaInfoExportacao()); info.setIdentificador("89172658591754401086218048846976493475937081"); info.setInformacoesAdicionais(FabricaDeObjetosFake.getNFN...
info.setPessoasAutorizadasDownloadNFe(Collections.singletonList(FabricaDeObjetosFake.getPessoaAutorizadaDownloadNFe()));
35,677
imposto.setValorTotalTributos(new BigDecimal("999999999999.99")); item.setImposto(imposto); item.setNumeroItem(990); item.setProduto(FabricaDeObjetosFake.getProdutoMedicamento()); item.setImpostoDevolvido(FabricaDeObjetosFake.getNFImpostoDevolvido()); <BUG>info.setItens(Arrays.asList(item)); info.setRetirada(FabricaDeO...
info.setItens(Collections.singletonList(item)); info.setRetirada(FabricaDeObjetosFake.getNFNotaInfoLocal());
35,678
identificacao.setFormaPagamento(NFFormaPagamentoPrazo.A_PRAZO); identificacao.setModelo(NFModelo.NFE); identificacao.setNaturezaOperacao("qGYcW8I1iak14NF7vnfc8XpPYkrHWB5J7Vm3eOAe57azf1fVP7vEOY7TrRVQ"); identificacao.setNumeroNota("999999999"); identificacao.setProgramaEmissor(NFProcessoEmissor.CONTRIBUINTE); <BUG>ident...
identificacao.setReferenciadas(Collections.singletonList(referenciada));
35,679
produtoMedicamento.setCfop("1302"); produtoMedicamento.setCodigo("ohVRInAS7jw8LNDP4WWjssSjBHK8nJRERnAeRMcsUokF3YItT93fBto3zZcq"); produtoMedicamento.setCodigoDeBarras("36811963532505"); produtoMedicamento.setCodigoDeBarrasTributavel("36811963532505"); produtoMedicamento.setCampoeValorNota(NFProdutoCompoeValorNota.SIM);...
produtoMedicamento.setDeclaracoesImportacao(Collections.singletonList(FabricaDeObjetosFake.getNFNotaInfoItemProdutoDeclaracaoImportacao()));
35,680
produtoMedicamento.setValorSeguro(new BigDecimal("999999999999.99")); produtoMedicamento.setValorTotalBruto(new BigDecimal("999999999999.99")); produtoMedicamento.setValorUnitario(new BigDecimal("9999999999.9999999999")); produtoMedicamento.setValorUnitarioTributavel(new BigDecimal("9999999999.9999999999")); produtoMed...
produtoMedicamento.setNomeclaturaValorAduaneiroEstatistica(Collections.singletonList("AZ0123"));
35,681
info.setRetirada(FabricaDeObjetosFake.getNFNotaInfoLocal()); info.setTotal(FabricaDeObjetosFake.getNFNotaInfoTotal()); info.setTransporte(FabricaDeObjetosFake.getNFNotaInfoTransporte()); info.setVersao(new BigDecimal("3.10")); <BUG>info.setPessoasAutorizadasDownloadNFe(Arrays.asList(FabricaDeObjetosFake.getPessoaAutori...
info.setPessoasAutorizadasDownloadNFe(Collections.singletonList(FabricaDeObjetosFake.getPessoaAutorizadaDownloadNFe()));
35,682
identificacao.setFormaPagamento(NFFormaPagamentoPrazo.A_PRAZO); identificacao.setModelo(NFModelo.NFE); identificacao.setNaturezaOperacao("qGYcW8I1iak14NF7vnfc8XpPYkrHWB5J7Vm3eOAe57azf1fVP7vEOY7TrRVQ"); identificacao.setNumeroNota("999999999"); identificacao.setProgramaEmissor(NFProcessoEmissor.CONTRIBUINTE); <BUG>ident...
identificacao.setReferenciadas(Collections.singletonList(FabricaDeObjetosFake.getNFInfoReferenciada()));
35,683
return compra; } public static NFNotaInfoCobranca getNFNotaInfoCobranca() { final NFNotaInfoCobranca cobranca = new NFNotaInfoCobranca(); cobranca.setFatura(FabricaDeObjetosFake.getNFNotaInfoFatura()); <BUG>cobranca.setDuplicatas(Arrays.asList(FabricaDeObjetosFake.getNFNotaInfoDuplicata())); </BUG> return cobranca; } p...
cobranca.setDuplicatas(Collections.singletonList(FabricaDeObjetosFake.getNFNotaInfoDuplicata()));
35,684
</BUG> produto.setDescricao("OBS0ztekCoG0DSSVcQwPKRV2fV842Pye7mED13P4zoDczcXi4AMNvQ7BKBLnHtLc2Z9fuIY1pcKmXSK1IJQSLEs5QWvVGyC74DyJuIM0X7L0cqWPZQii5JtP"); produto.setExtipi("999"); produto.setCodigoEspecificadorSituacaoTributaria("9999999"); <BUG>produto.setMedicamentos(Arrays.asList(FabricaDeObjetosFake.getNFNotaInfoIte...
produto.setCfop("1302"); produto.setCodigo("ohVRInAS7jw8LNDP4WWjssSjBHK8nJRERnAeRMcsUokF3YItT93fBto3zZcq"); produto.setCodigoDeBarras("36811963532505"); produto.setCodigoDeBarrasTributavel("36811963532505"); produto.setCampoeValorNota(NFProdutoCompoeValorNota.SIM); produto.setDeclaracoesImportacao(Collections.singleton...
35,685
produto.setValorFrete(new BigDecimal("999999999999.99")); produto.setValorOutrasDespesasAcessorias(new BigDecimal("999999999999.99")); produto.setValorSeguro(new BigDecimal("999999999999.99")); produto.setValorTotalBruto(new BigDecimal("999999999999.99")); produto.setValorUnitario(new BigDecimal("9999999999.9999999999"...
produto.setNomeclaturaValorAduaneiroEstatistica(Collections.singletonList("AZ0123"));
35,686
medicamento.setQuantidade(new BigDecimal("9999999.999")); return medicamento; } public static NFNotaInfoItemProdutoDeclaracaoImportacao getNFNotaInfoItemProdutoDeclaracaoImportacao() { final NFNotaInfoItemProdutoDeclaracaoImportacao declaraoImportacao = new NFNotaInfoItemProdutoDeclaracaoImportacao(); <BUG>declaraoImpo...
declaraoImportacao.setAdicoes(Collections.singletonList(FabricaDeObjetosFake.getNFNotaInfoItemProdutoDeclaracaoImportacaoAdicao()));
35,687
public static NFNotaInfoVolume getNFNotaInfoVolume() { final NFNotaInfoVolume volume = new NFNotaInfoVolume(); volume.setEspecieVolumesTransportados("3Qf46HFs7FcWlhuQqLJ96vsrgJHu6B5ZXmmwMZ1RtvQVOV4Yp6M9VNqn5Ecb"); final NFNotaInfoLacre notaInfoLacre = new NFNotaInfoLacre(); notaInfoLacre.setNumeroLacre("gvmjb9BB2cmwsLb...
volume.setLacres(Collections.singletonList(notaInfoLacre));
35,688
public void deveGerarXMLDeAcordoComOPadraoEstabelecido() { final NFLoteConsultaRetorno retorno = new NFLoteConsultaRetorno(); retorno.setAmbiente(NFAmbiente.HOMOLOGACAO); retorno.setMotivo("8CwtnC5gWwUncMBYAZl9p4fvVx8RkCH2EKx2mtUNVA5tLoJsjNWL5CJ6DXNUHTWKpPl6fMKKxA0aXBu6IfmJLIHlPxtF0oZkKrNsGyGpwKqWxvDZ9HQGqscmhtTrp5NbNz...
retorno.setProtocolos(Collections.singletonList(FabricaDeObjetosFake.getNFProtocolo()));
35,689
import yuku.alkitab.base.widget.CallbackSpan; import yuku.alkitab.base.widget.Floater; import yuku.alkitab.base.widget.FormattedTextRenderer; import yuku.alkitab.base.widget.GotoButton; import yuku.alkitab.base.widget.LabeledSplitHandleButton; <BUG>import yuku.alkitab.base.widget.LeftDrawer; import yuku.alkitab.base.wi...
import yuku.alkitab.base.widget.MaterialDialogAdapterHelper; import yuku.alkitab.base.widget.ScrollbarSetter;
35,690
App.trackEvent("nav_goto_button_click"); startActivityForResult(GotoActivity.createIntent(this.activeBook.bookId, this.chapter_1, lsSplit0.getVerseBasedOnScroll()), REQCODE_goto); } void bGoto_longClick() { App.trackEvent("nav_goto_button_long_click"); <BUG>if (history.getSize() > 0) { new MaterialDialog.Builder(this) ...
MaterialDialogAdapterHelper.show(new MaterialDialog.Builder(this), new HistoryAdapter());
35,691
public HistoryEntryHolder(final View itemView) { super(itemView); text1 = V.get(itemView, android.R.id.text1); } } <BUG>private RecyclerView.Adapter<RecyclerView.ViewHolder> historyAdapter = new RecyclerView.Adapter<RecyclerView.ViewHolder>() { private final java.text.DateFormat timeFormat = DateFormat.getTimeFormat(Ap...
class HistoryAdapter extends MaterialDialogAdapterHelper.Adapter { private final java.text.DateFormat timeFormat = DateFormat.getTimeFormat(App.context);
35,692
holder.text1.setTextColor(defaultTextColor); } else { holder.text1.setTextColor(getResources().getColor(R.color.escape)); } } <BUG>holder.itemView.setOnClickListener(v -> { final int which = holder.getAdapterPosition();</BUG> final int ari = history.getAri(which); jumpToAri(ari); history.add(ari);
dismissDialog(); final int which = holder.getAdapterPosition();
35,693
@Override public void onBookmarkAttributeClick(final Version version, final String versionId, final int ari) { final List<Marker> markers = S.getDb().listMarkersForAriKind(ari, Marker.Kind.bookmark); if (markers.size() == 1) { openBookmarkDialog(markers.get(0)._id); <BUG>} else { final MaterialDialog dialog = new Mater...
public int getItemCount() { return history.getSize();
35,694
@Override public void onNoteAttributeClick(final Version version, final String versionId, final int ari) { final List<Marker> markers = S.getDb().listMarkersForAriKind(ari, Marker.Kind.note); if (markers.size() == 1) { openNoteDialog(markers.get(0)._id); <BUG>} else { final MaterialDialog dialog = new MaterialDialog.Bu...
public int getItemCount() { return history.getSize();
35,695
lCaption = V.get(itemView, R.id.lCaption); lSnippet = V.get(itemView, R.id.lSnippet); panelLabels = V.get(itemView, R.id.panelLabels); } } <BUG>class MultipleMarkerSelectAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { final Version version;</BUG> final float textSizeMult; final List<Marker> markers; fin...
class MultipleMarkerSelectAdapter extends MaterialDialogAdapterHelper.Adapter { final Version version;
35,696
holder.lSnippet.setText(caption); Appearances.applyTextAppearance(holder.lSnippet, textSizeMult); } holder.itemView.setBackgroundColor(S.applied.backgroundColor); } <BUG>holder.itemView.setOnClickListener(v -> { final int which = holder.getAdapterPosition();</BUG> final Marker marker = markers.get(which); if (kind == M...
dismissDialog(); final int which = holder.getAdapterPosition();
35,697
}; final View.OnClickListener bColorTheme_click = new View.OnClickListener() { @Override public void onClick(final View v) { final ColorThemeAdapter adapter = new ColorThemeAdapter(); <BUG>final MaterialDialog dialog = new MaterialDialog.Builder(activity) .adapter(adapter, null) .show();</BUG> final RecyclerView recyc...
final MaterialDialog dialog = MaterialDialogAdapterHelper.show(new MaterialDialog.Builder(activity), adapter);
35,698
public ColorThemeHolder(final View itemView) { super(itemView); text1 = V.get(itemView, android.R.id.text1); } } <BUG>class ColorThemeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { List<int[]> themes;</BUG> List<String> themeNames; public ColorThemeAdapter() { themes = new ArrayList<>();
class ColorThemeAdapter extends MaterialDialogAdapterHelper.Adapter { List<int[]> themes;
35,699
} else { holder.text1.setText(R.string.text_appearance_theme_custom); holder.text1.setBackgroundColor(0x0); holder.text1.setChecked(selectedPosition == -1); } <BUG>holder.itemView.setOnClickListener(v -> { final int which = holder.getAdapterPosition();</BUG> if (which == getPositionOfCustomColors()) { activity.startAct...
dismissDialog(); final int which = holder.getAdapterPosition();
35,700
import android.widget.EditText; import android.widget.TextView; import com.afollestad.materialdialogs.MaterialDialog; import yuku.afw.V; import yuku.alkitab.base.S; <BUG>import yuku.alkitab.base.U; import yuku.alkitab.debug.R;</BUG> import yuku.alkitab.model.Label; import yuku.alkitab.model.Marker; import yuku.devoxx.f...
import yuku.alkitab.base.widget.MaterialDialogAdapterHelper; import yuku.alkitab.debug.R;