id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
20,801
{ showAccountWizard(); } else { <BUG>deps_.withRSConnect("Connecting a publishing account", null, new Command() </BUG> { @Override public void execute()
public void onClick(ClickEvent arg0) deps_.withRSConnect("Viewing publish accounts", false, null, new Command()
20,802
e.printStackTrace(); } filePlayback=null; } @Override <BUG>public void stop() { if ( filePlayback!=null ) filePlayback.stop(); } void initFiles() throws FileNotFoundException {</BUG> if ((dataDir.length() != 0) && !dataDir.endsWith("/")) { dataDir = dataDir + "/"; } // guard path if needed String samples_str = dataDir ...
@Override public boolean isrunning(){ if ( filePlayback!=null ) return filePlayback.isrunning(); return false; } void initFiles() throws FileNotFoundException {
20,803
public class BufferMonitor extends Thread implements FieldtripBufferMonitor { public static final String TAG = BufferMonitor.class.toString(); private final Context context; private final SparseArray<BufferConnectionInfo> clients = new SparseArray<BufferConnectionInfo>(); private final BufferInfo info; <BUG>private fin...
[DELETED]
20,804
public static final String CLIENT_INFO_TIME = "c_time"; public static final String CLIENT_INFO_WAITTIMEOUT = "c_waitTimeout"; public static final String CLIENT_INFO_CONNECTED = "c_connected"; public static final String CLIENT_INFO_CHANGED = "c_changed"; public static final String CLIENT_INFO_DIFF = "c_diff"; <BUG>publi...
public static final int THREAD_INFO_TYPE = 0;
20,805
package nl.dcc.buffer_bci.bufferclientsservice; import android.os.Parcel; import android.os.Parcelable; <BUG>import nl.dcc.buffer_bci.bufferservicecontroller.C; public class ThreadInfo implements Parcelable {</BUG> public static final Creator<ThreadInfo> CREATOR = new Creator<ThreadInfo>() { @Override public ThreadInfo...
import nl.dcc.buffer_bci.C; public class ThreadInfo implements Parcelable {
20,806
} @DB @Override @ActionEvent(eventType = EventTypes.EVENT_ACL_GROUP_CREATE, eventDescription = "Creating Acl Group", create = true) public AclGroup createAclGroup(Long domainId, String aclGroupName, String description) { <BUG>Account caller = CallContext.current().getCallingAccount(); if (!_accountMgr.isRootAdmin(calle...
if (caller.getDomainId() != domainId.longValue()) { throw new PermissionDeniedException("Can't create acl role in domain " + domainId + ", permission denied");
20,807
List<Hash> peers = sel.selectFloodfillParticipants(rkey, 1, _ignore, _facade.getKBuckets()); if (peers.isEmpty()) break; Hash peer = peers.get(0); RouterInfo ri = _facade.lookupRouterInfoLocally(peer); <BUG>if (ri != null && StoreJob.supportsKeyCerts(ri)) </BUG> return peer; if (_log.shouldLog(Log.INFO)) _log.info(getJ...
if (ri != null && StoreJob.supportsCert(ri, keyCert))
20,808
package net.i2p.router; import net.i2p.CoreVersion; public class RouterVersion { public final static String ID = "Monotone"; public final static String VERSION = CoreVersion.VERSION; <BUG>public final static long BUILD = 8; </BUG> public final static String EXTRA = ""; public final static String FULL_VERSION = VERSION ...
public final static long BUILD = 9;
20,809
hashLen = hLen; sigLen = sLen; base = baseAlgo; digestName = mdName; algoName = aName; <BUG>params = pSpec; }</BUG> public int getCode() { return code; } public int getPubkeyLen() { return pubkeyLen; } public int getPrivkeyLen() { return privkeyLen; }
since = supportedSince;
20,810
case 64: return new Hash512(); default: throw new UnsupportedOperationException("Unsupported hash length: " + getHashLen()); } <BUG>} public boolean isAvailable() {</BUG> if (DSA_SHA1 == this) return true; try {
public String getSupportedSince() { return since; public boolean isAvailable() {
20,811
public static SigType getByCode(int code) { return BY_CODE.get(Integer.valueOf(code)); } public static SigType parseSigType(String stype) { try { <BUG>return valueOf(stype.toUpperCase(Locale.US)); } catch (IllegalArgumentException iae) {</BUG> try { int code = Integer.parseInt(stype);
String uc = stype.toUpperCase(Locale.US); if (uc.equals("EDDSA_SHA512_ED25519")) return EdDSA_SHA512_Ed25519; return valueOf(uc); } catch (IllegalArgumentException iae) {
20,812
package net.i2p.router.networkdb.kademlia; import java.util.ArrayList; import java.util.List; <BUG>import java.util.Set; import net.i2p.data.Certificate; import net.i2p.data.DatabaseEntry; import net.i2p.data.Hash;</BUG> import net.i2p.data.LeaseSet;
import net.i2p.crypto.SigType; import net.i2p.data.DataFormatException; import net.i2p.data.Hash;
20,813
import de.vanita5.twittnuker.receiver.NotificationReceiver; import de.vanita5.twittnuker.service.LengthyOperationsService; import de.vanita5.twittnuker.util.ActivityTracker; import de.vanita5.twittnuker.util.AsyncTwitterWrapper; import de.vanita5.twittnuker.util.DataStoreFunctionsKt; <BUG>import de.vanita5.twittnuker.u...
import de.vanita5.twittnuker.util.DebugLog; import de.vanita5.twittnuker.util.ImagePreloader;
20,814
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);
20,815
@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);
20,816
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);
20,817
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);
20,818
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);
20,819
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);
20,820
import de.vanita5.twittnuker.annotation.CustomTabType; import de.vanita5.twittnuker.library.MicroBlog; import de.vanita5.twittnuker.library.MicroBlogException; import de.vanita5.twittnuker.library.twitter.model.RateLimitStatus; import de.vanita5.twittnuker.library.twitter.model.Status; <BUG>import de.vanita5.twittnuker...
import org.mariotaku.pickncrop.library.PNCUtils; import org.mariotaku.sqliteqb.library.AllColumns;
20,821
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());
20,822
import java.util.List; import java.util.Map.Entry; import javax.inject.Singleton; import okhttp3.Dns; @Singleton <BUG>public class TwidereDns implements Constants, Dns { </BUG> private static final String RESOLVER_LOGTAG = "TwittnukerDns"; private final SharedPreferences mHostMapping; private final SharedPreferencesWra...
public class TwidereDns implements Dns, Constants {
20,823
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);
20,824
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"})
20,825
@SideOnly(Side.CLIENT) public class GuiSeedAnalyzer extends GuiContainer { public static final ResourceLocation texture = new ResourceLocation(Reference.MOD_ID, "textures/gui/GuiSeedAnalyzer.png"); public TileEntitySeedAnalyzer seedAnalyzer; private boolean journalOpen; <BUG>private GuiJournal guiJournal; </BUG> public...
private AgriGuiWrapper guiJournal;
20,826
return; } ItemStack journal = seedAnalyzer.getStackInSlot(ContainerSeedAnalyzer.journalSlotId); if(journal != null) { journalOpen = true; <BUG>guiJournal = new GuiJournal(journal); </BUG> guiJournal.setWorldAndResolution(this.mc, this.width, this.height); } }
guiJournal = new AgriGuiWrapper(new GuiJournal(journal));
20,827
import javax.security.auth.Subject; import javax.security.auth.callback.Callback; import javax.security.auth.callback.CallbackHandler; import javax.security.auth.callback.NameCallback; import javax.security.auth.callback.PasswordCallback; <BUG>import javax.security.auth.callback.UnsupportedCallbackException; import jav...
import javax.security.auth.login.FailedLoginException; import javax.security.auth.login.LoginException;
20,828
if (webCredential == null) webCredential = ((PasswordCallback)callbacks[2]).getPassword(); //use standard PasswordCallback if ((webUserName == null) || (webCredential == null)) { setAuthenticated(false); <BUG>return isAuthenticated(); }</BUG> UserInfo userInfo = getUserInfo(webUserName); if (userInfo == null) {
throw new FailedLoginException(); }
20,829
import java.util.Locale; import java.util.Map; import java.util.TreeMap; public class DependencyConvergenceReport extends AbstractProjectInfoReport <BUG>{ private List reactorProjects; private static final int PERCENTAGE = 100;</BUG> public String getOutputName() {
private static final int PERCENTAGE = 100; private static final List SUPPORTED_FONT_FAMILY_NAMES = Arrays.asList( GraphicsEnvironment .getLocalGraphicsEnvironment().getAvailableFontFamilyNames() );
20,830
sink.section1(); sink.sectionTitle1(); sink.text( getI18nString( locale, "title" ) ); sink.sectionTitle1_(); Map dependencyMap = getDependencyMap(); <BUG>generateLegend( locale, sink ); generateStats( locale, sink, dependencyMap ); generateConvergence( locale, sink, dependencyMap ); sink.section1_();</BUG> sink.body_()...
sink.lineBreak(); sink.section1_();
20,831
Iterator it = artifactMap.keySet().iterator(); while ( it.hasNext() ) { String version = (String) it.next(); sink.tableRow(); <BUG>sink.tableCell(); sink.text( version );</BUG> sink.tableCell_(); sink.tableCell(); generateVersionDetails( sink, artifactMap, version );
sink.tableCell( String.valueOf( cellWidth ) + "px" ); sink.text( version );
20,832
sink.tableCell(); sink.text( getI18nString( locale, "legend.shared" ) ); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); <BUG>sink.tableCell(); iconError( sink );</BUG> sink.tableCell_(); sink.tableCell(); sink.text( getI18nString( locale, "legend.different" ) );
sink.tableCell( "15px" ); // according /images/icon_error_sml.gif iconError( sink );
20,833
sink.tableCaption(); sink.text( getI18nString( locale, "stats.caption" ) ); sink.tableCaption_();</BUG> sink.tableRow(); <BUG>sink.tableHeaderCell(); sink.text( getI18nString( locale, "stats.subprojects" ) + ":" ); sink.tableHeaderCell_();</BUG> sink.tableCell(); sink.text( String.valueOf( reactorProjects.size() ) ); s...
sink.bold(); sink.bold_(); sink.tableCaption_(); sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.subprojects" ) ); sink.tableHeaderCell_();
20,834
sink.tableCell(); sink.text( String.valueOf( reactorProjects.size() ) ); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); <BUG>sink.tableHeaderCell(); sink.text( getI18nString( locale, "stats.dependencies" ) + ":" ); sink.tableHeaderCell_();</BUG> sink.tableCell(); sink.text( String.valueOf( depCount ) );
sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.dependencies" ) ); sink.tableHeaderCell_();
20,835
sink.text( String.valueOf( convergence ) + "%" ); sink.bold_(); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); <BUG>sink.tableHeaderCell(); sink.text( getI18nString( locale, "stats.readyrelease" ) + ":" ); sink.tableHeaderCell_();</BUG> sink.tableCell(); if ( convergence >= PERCENTAGE && snapshotCount <= 0 )
sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.readyrelease" ) ); sink.tableHeaderCell_();
20,836
{ ReverseDependencyLink p1 = (ReverseDependencyLink) o1; ReverseDependencyLink p2 = (ReverseDependencyLink) o2; return p1.getProject().getId().compareTo( p2.getProject().getId() ); } <BUG>else {</BUG> return 0; } }
iconError( sink );
20,837
.put("undefined", Tristate.UNDEFINED) .put("true", Tristate.TRUE) .build())), optional(GenericArguments.onlyOne(GenericArguments.string(Text.of("context"))))), GenericArguments.seq( <BUG>GenericArguments.onlyOne(choices(Text.of("target"), catalogChoices)), onlyOne(GenericArguments.choices(Text.of("value"), ImmutableMa...
onlyOne(choices(Text.of("source"), catalogChoices)), choices(Text.of("target"), catalogChoices), onlyOne(GenericArguments.choices(Text.of("value"), ImmutableMap.<String, Tristate>builder()
20,838
GenericArguments.firstParsing( GenericArguments.seq( choices(Text.of("flag"), flagChoices), GenericArguments.firstParsing( GenericArguments.seq( <BUG>GenericArguments.onlyOne(choices(Text.of("source"), catalogChoices)), GenericArguments.onlyOne(choices(Text.of("target"), catalogChoices)), onlyOne(GenericArguments.choic...
choices(Text.of("target"), catalogChoices), onlyOne(GenericArguments.choices(Text.of("value"), ImmutableMap.<String, Tristate>builder()
20,839
.put("false", Tristate.FALSE) .put("undefined", Tristate.UNDEFINED) .put("true", Tristate.TRUE) .build()))), GenericArguments.seq( <BUG>GenericArguments.onlyOne(choices(Text.of("target"), catalogChoices)), onlyOne(GenericArguments.choices(Text.of("value"), ImmutableMap.<String, Tristate>builder()</BUG> .put("-1", Tris...
onlyOne(choices(Text.of("source"), catalogChoices)), choices(Text.of("target"), catalogChoices), onlyOne(GenericArguments.choices(Text.of("value"), ImmutableMap.<String, Tristate>builder()
20,840
GenericArguments.firstParsing( GenericArguments.seq( choices(Text.of("flag"), flagChoices), GenericArguments.firstParsing( GenericArguments.seq( <BUG>GenericArguments.onlyOne(choices(Text.of("source"), catalogChoices)), GenericArguments.onlyOne(choices(Text.of("target"), catalogChoices)), onlyOne(GenericArguments.choic...
choices(Text.of("target"), catalogChoices), onlyOne(GenericArguments.choices(Text.of("value"), ImmutableMap.<String, Tristate>builder()
20,841
.put("false", Tristate.FALSE) .put("undefined", Tristate.UNDEFINED) .put("true", Tristate.TRUE) .build()))), GenericArguments.seq( <BUG>GenericArguments.onlyOne(choices(Text.of("target"), catalogChoices)), onlyOne(GenericArguments.choices(Text.of("value"), ImmutableMap.<String, Tristate>builder()</BUG> .put("-1", Tris...
onlyOne(choices(Text.of("source"), catalogChoices)), choices(Text.of("target"), catalogChoices), onlyOne(GenericArguments.choices(Text.of("value"), ImmutableMap.<String, Tristate>builder()
20,842
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_...
sOrientationListener = new android.hardware.SensorListener() {
20,843
package org.eclipse.emf.index.util; import java.util.Collection; <BUG>public class CollectionUtils { public static <T> Collection<T> addIfNotNull(Collection<T> c, T element) {</BUG> if (element != null) c.add(element); return c;
import java.util.ArrayList; public static <T> Collection<T> copyOrNull(Collection<T> source) { if(source == null) return null; return new ArrayList<T>(source); } public static <T> Collection<T> addIfNotNull(Collection<T> c, T element) {
20,844
import org.eclipse.emf.index.EClassDescriptor; import org.eclipse.emf.index.EPackageDescriptor; import org.eclipse.emf.index.IGenericQuery; import org.eclipse.emf.index.IIndexStore; import org.eclipse.emf.index.impl.DefaultQueryTool; <BUG>public class EClassDAOImpl extends BasicCachingMemoryDAO<EClassDescriptor> implem...
public class EClassDAOImpl extends BasicMemoryDAOImpl<EClassDescriptor> implements EClassDescriptor.DAO {
20,845
return DefaultQueryTool.createQueryEClass(this, eClass); } public IGenericQuery<EClassDescriptor> createQueryEClassesInPackage(EPackageDescriptor ePackageDescriptor) { return ePackageScope.createQuery(ePackageDescriptor); } <BUG>protected class EClassQuery extends BasicCachingMemoryDAO<EClassDescriptor>.Query implement...
protected class EClassQuery extends BasicMemoryDAOImpl<EClassDescriptor>.Query implements EClassDescriptor.Query {
20,846
ePackageQuery = indexStore.ePackageDAO().createQuery(); return ePackageQuery; } @Override protected boolean matches(EClassDescriptor typeDescriptor) { <BUG>return (namePattern == null || namePattern.equals(typeDescriptor.getName())); }</BUG> @Override protected Collection<EClassDescriptor> scope() { Collection<EClassDe...
return matchesGlobbing(typeDescriptor.getName(), namePattern);
20,847
private TargetDesc target; protected Query(TargetDesc target) { this.target = target; } public Collection<SourceDesc> executeListResult() { <BUG>return lookup(target); }</BUG> public SourceDesc executeSingleResult() { Collection<SourceDesc> result = lookup(target); if(result != null && !result.isEmpty()) {
return CollectionUtils.copyOrNull(lookup(target));
20,848
import org.eclipse.emf.index.ECrossReferenceDescriptor; import org.eclipse.emf.index.EObjectDescriptor; import org.eclipse.emf.index.IGenericQuery; import org.eclipse.emf.index.IIndexStore; import org.eclipse.emf.index.impl.DefaultQueryTool; <BUG>public class ECrossReferenceDAOImpl extends BasicCachingMemoryDAO<ECrossR...
public class ECrossReferenceDAOImpl extends BasicMemoryDAOImpl<ECrossReferenceDescriptor> implements
20,849
return sourceScope.createQuery(sourceDescriptor); } public IGenericQuery<ECrossReferenceDescriptor> createQueryCrossReferencesTo(EObjectDescriptor targetDescriptor) { return targetScope.createQuery(targetDescriptor); } <BUG>protected class CrossRefQuery extends BasicCachingMemoryDAO<ECrossReferenceDescriptor>.Query imp...
protected class CrossRefQuery extends BasicMemoryDAOImpl<ECrossReferenceDescriptor>.Query implements
20,850
public ECrossReferenceDescriptor.Query referenceName(String pattern) { referenceNamePattern = pattern; return this; } protected boolean matches(ECrossReferenceDescriptor crossRefDescriptor) { <BUG>return referenceNamePattern == null || referenceNamePattern.equals(crossRefDescriptor.getReferenceName()); }</BUG> @Overrid...
return matchesGlobbing(crossRefDescriptor.getReferenceName(), referenceNamePattern);
20,851
<BUG>package org.eclipse.emf.index.ecore; import org.eclipse.emf.ecore.EPackage;</BUG> import org.eclipse.emf.index.EPackageDescriptor; import org.eclipse.emf.index.IIndexStore; public class EPackageRegistryIndexFeeder {
import java.util.ArrayList; import java.util.List; import org.eclipse.emf.ecore.EPackage;
20,852
import org.eclipse.emf.index.EPackageDescriptor; import org.eclipse.emf.index.IIndexStore; public class EPackageRegistryIndexFeeder { public static void feedEPackagesFromRegistry(IIndexStore indexStore) { for (boolean hasChanged = true; hasChanged;) { <BUG>for (String nsURI : EPackage.Registry.INSTANCE.keySet()) { hasC...
List<String> nsURIs = new ArrayList<String>(EPackage.Registry.INSTANCE.keySet()); for (String nsURI : nsURIs) { hasChanged = false;
20,853
import org.eclipse.emf.index.EObjectDescriptor; import org.eclipse.emf.index.IGenericQuery; import org.eclipse.emf.index.IIndexStore; import org.eclipse.emf.index.ResourceDescriptor; import org.eclipse.emf.index.impl.DefaultQueryTool; <BUG>public class EObjectDAOImpl extends BasicCachingMemoryDAO<EObjectDescriptor> imp...
public class EObjectDAOImpl extends BasicMemoryDAOImpl<EObjectDescriptor> implements EObjectDescriptor.DAO {
20,854
return DefaultQueryTool.createQueryEObjectsInResource(this, eObject, resourceDescriptor); } public IGenericQuery<EObjectDescriptor> createQueryEObjectsInResource(ResourceDescriptor resourceDescriptor) { return resourceScope.createQuery(resourceDescriptor); } <BUG>private class ElementQuery extends BasicCachingMemoryDAO...
private class ElementQuery extends BasicMemoryDAOImpl<EObjectDescriptor>.Query implements EObjectDescriptor.Query {
20,855
} userDataPatterns.put(key, pattern); return this; } public boolean matches(EObjectDescriptor elementDescriptor) { <BUG>if ((fragmentPattern == null || fragmentPattern.equals(elementDescriptor.getFragment())) && (namePattern == null || namePattern.equals(elementDescriptor.getName())) && (typeDescriptor == null || typeD...
public IGenericQuery<EObjectDescriptor> createQueryEObjectsByType(EClassDescriptor eClassDescriptor) { return eClassScope.createQuery(eClassDescriptor);
20,856
drawLegendEntry(number++, getSpecialsDescription(special), getSpecialsColor(special), true); } } if (epAvailable) { <BUG>drawLegendEntry(number++, "Entry Point", colorMap.get(ENTRY_POINT), true); }</BUG> if (overlayAvailable) { drawLegendEntry(number++, "Overlay", colorMap.get(OVERLAY));
drawLegendEntry(number++, "Entry Point", colorMap.get(ENTRY_POINT), true);
20,857
int stringX = startX; int stringY = startY + LEGEND_SAMPLE_SIZE; Graphics g = image.getGraphics(); g.setColor(color); g.drawString(description, stringX, stringY); <BUG>g.drawString("---------------------------------", stringX, stringY + LEGEND_SAMPLE_SIZE); }</BUG> @SuppressWarnings("unused") private void drawLegendCro...
g.drawString("---------------------------------", stringX, stringY }
20,858
drawLegendEntry(number, description, color, false); } private void drawLegendEntry(int number, String description, Color color, boolean withOutLine) { assert description != null && color != null; <BUG>int startX = fileWidth + LEGEND_GAP; int startY = LEGEND_GAP + (LEGEND_ENTRY_HEIGHT * number);</BUG> if (startY >= heig...
int startX = LEGEND_GAP; int startY = LEGEND_GAP + (LEGEND_ENTRY_HEIGHT * number);
20,859
long fileSize = data.getFile().length(); long pixelMax = getXPixels() * (long) getYPixels(); return (int) Math.ceil(fileSize / (double) pixelMax); } public static void main(String[] args) throws IOException { <BUG>File file = new File( "/home/katja/samples/RegisterMe.Oops.exe"); </BUG> VisualizerBuilder builder = new V...
File file = new File("/home/katja/samples/RegisterMe.Oops.exe");
20,860
import org.yamj.plugin.api.model.type.ImageType; @Service("artworkScannerService") public class ArtworkScannerService implements IQueueProcessService { private static final Logger LOG = LoggerFactory.getLogger(ArtworkScannerService.class); private static final String USE_SCANNER_FOR = "Use {} scanner for {}"; <BUG>priv...
private final HashMap<String, MovieArtworkScanner> registeredMovieArtworkScanner = new HashMap<>(); private final HashMap<String, SeriesArtworkScanner> registeredSeriesArtworkScanner = new HashMap<>(); private final HashMap<String, PersonArtworkScanner> registeredPersonArtworkScanner = new HashMap<>(); private final Ha...
20,861
List<ArtworkDTO> posters = null; int maxResults = 0; if (artwork.getBoxedSet() != null) { maxResults = this.configServiceWrapper.getIntProperty("yamj3.artwork.scanner.poster.boxset.maxResults", 5); for (String prio : determinePriorities("yamj3.artwork.scanner.poster.boxset.priorities", registeredBoxedSetArtworkScanner....
posters = scanner.getPosters(buildBoxedSet(artwork.getBoxedSet()));
20,862
List<ArtworkDTO> fanarts = null; int maxResults = 0; if (artwork.getBoxedSet() != null) { maxResults = this.configServiceWrapper.getIntProperty("yamj3.artwork.scanner.fanart.boxset.maxResults", 5); for (String prio : determinePriorities("yamj3.artwork.scanner.fanart.boxset.priorities", registeredBoxedSetArtworkScanner....
fanarts = scanner.getFanarts(buildBoxedSet(artwork.getBoxedSet()));
20,863
List<ArtworkDTO> banners = null; int maxResults = 0; if (artwork.getBoxedSet() != null) { maxResults = this.configServiceWrapper.getIntProperty("yamj3.artwork.scanner.banner.boxset.maxResults", 5); for (String prio : determinePriorities("yamj3.artwork.scanner.banner.boxset.priorities", registeredBoxedSetArtworkScanner....
banners = scanner.getBanners(buildBoxedSet(artwork.getBoxedSet()));
20,864
if (person == null) { LOG.warn("No associated person found for artwork: {}", artwork); return; } LOG.debug("Scan online for photo: {}", artwork); <BUG>List<ArtworkDTO> photos = null; for (String prio : determinePriorities("yamj3.artwork.scanner.photo.priorities", registeredPersonArtworkScanner.keySet())) { IPersonArtwo...
IPerson iPerson = buildPerson(person); photos = scanner.getPhotos(iPerson);
20,865
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_...
sOrientationListener = new android.hardware.SensorListener() {
20,866
nodes = visitor.getPathNodeMap(); affectedPaths = nodes.keySet(); } private void prepareCommit() throws Exception { commit.setAffectedPaths(affectedPaths); <BUG>commit.setBaseRevisionId(mongoSync.getHeadRevisionId()); commit.setRevisionId(revisionId);</BUG> if (commit.getBranchId() == null && branchId != null) { commit...
commit.setBaseRevisionId(branchId == null? mongoSync.getHeadRevisionId() : baseRevisionId); commit.setRevisionId(revisionId);
20,867
if (affectedPaths == null || affectedPaths.isEmpty()) { existingNodes = Collections.emptyMap(); } existingNodes = new HashMap<String, MongoNode>(); for (String path : affectedPaths) { <BUG>NodeExistsCommand command = new NodeExistsCommand( nodeStore, path, mongoSync.getHeadRevisionId()); command.setBranchId(branchId);...
NodeExistsCommand command; if (branchId == null) { command = new NodeExistsCommand(nodeStore, path, mongoSync.getHeadRevisionId()); } else { command = new NodeExistsCommand(nodeStore, path, baseRevisionId); if (command.execute()) {
20,868
committingNode.setBranchId(branchId); } logger.debug("Prepared committing node: {}", committingNode); } } <BUG>protected boolean saveAndSetHeadRevision() throws Exception { long assumedHeadRevision = this.mongoSync.getHeadRevisionId();</BUG> MongoSync mongoSync = new SaveAndSetHeadRevisionAction(nodeStore, assumedHeadR...
if (branchId != null) { return true; long assumedHeadRevision = this.mongoSync.getHeadRevisionId();
20,869
affectedPaths = pathNodeMap.keySet(); nodes = new HashSet<MongoNode>(pathNodeMap.values()); } private void prepareCommit() throws Exception { commit.setAffectedPaths(affectedPaths); <BUG>commit.setBaseRevisionId(mongoSync.getHeadRevisionId()); commit.setRevisionId(revisionId);</BUG> if (commit.getBranchId() == null && ...
commit.setBaseRevisionId(branchId == null? mongoSync.getHeadRevisionId() : baseRevisionId); commit.setRevisionId(revisionId);
20,870
committingNode.setBranchId(branchId); } logger.debug("Prepared committing node: {}", committingNode); } } <BUG>protected boolean saveAndSetHeadRevision() throws Exception { long assumedHeadRevision = this.mongoSync.getHeadRevisionId();</BUG> MongoSync mongoSync = new SaveAndSetHeadRevisionAction(nodeStore, assumedHeadR...
if (branchId != null) { return true; long assumedHeadRevision = this.mongoSync.getHeadRevisionId();
20,871
package org.opennms.web.rss; <BUG>import java.io.StringWriter; import org.apache.log4j.Category;</BUG> import org.opennms.core.utils.ThreadCategory; import com.sun.syndication.feed.synd.SyndFeed; import com.sun.syndication.feed.synd.SyndFeedImpl;
import javax.servlet.ServletRequest; import org.apache.log4j.Category;
20,872
import com.sun.syndication.feed.synd.SyndFeedImpl; import com.sun.syndication.io.SyndFeedOutput; public class AbstractFeed implements Feed { protected int m_maxEntries = 20; protected String m_feedType = "rss_2.0"; <BUG>private String m_urlBase = ""; public AbstractFeed() {</BUG> } public AbstractFeed(String feedType)...
protected String m_urlBase = ""; protected ServletRequest m_servletRequest; public AbstractFeed() {
20,873
summaries = list.toArray(new OutageSummary[list.size()]); } finally { Vault.releaseDbConnection(conn); } return summaries; <BUG>} public OutageSummary[] getCurrentSDSOutageSummaries() throws SQLException {</BUG> OutageSummary[] summaries = new OutageSummary[0]; Connection conn = Vault.getDbConnection(); try {
public OutageSummary[] getAllOutageSummaries() throws SQLException {
20,874
package org.opennms.web.rss; import java.sql.SQLException; import java.util.ArrayList; import org.opennms.web.notification.Notification; import org.opennms.web.notification.NotificationModel; <BUG>import org.opennms.web.outage.OutageModel; import org.opennms.web.outage.OutageSummary;</BUG> import com.sun.syndication.fe...
[DELETED]
20,875
import com.sun.syndication.feed.synd.SyndFeed; import com.sun.syndication.feed.synd.SyndFeedImpl; public class NotificationFeed extends AbstractFeed { public SyndFeed getFeed() { SyndFeed feed = new SyndFeedImpl(); <BUG>feed.setTitle("Outstanding Notifications"); feed.setDescription("Outstanding Notifications"); feed.s...
feed.setTitle("Notifications"); feed.setDescription("Notifications"); feed.setLink(getUrlBase() + "notification/browse"); ArrayList<SyndEntry> entries = new ArrayList<SyndEntry>();
20,876
int count = 0; for (Notification notification : notifications) { if (count++ == this.getMaxEntries()) { break; } <BUG>entry = new SyndEntryImpl(); entry.setTitle(notification.getTextMessage()); entry.setLink(getUrlBase() + "notification/detail.jsp?notice=" + notification.getId());</BUG> entry.setPublishedDate(notifica...
if (notification.getTimeReplied() == null) { entry.setTitle(sanitizeTitle(notification.getTextMessage())); } else { entry.setTitle(sanitizeTitle(notification.getTextMessage()) + " (acknowledged)"); entry.setLink(getUrlBase() + "notification/detail.jsp?notice=" + notification.getId());
20,877
feed.setDescription("OpenNMS Nodes with Outages"); feed.setLink(getUrlBase() + "outage/current.jsp"); ArrayList<SyndEntry> entries = new ArrayList<SyndEntry>(); try { OutageModel model = new OutageModel(); <BUG>OutageSummary[] summaries = model.getCurrentOutageSummaries(); </BUG> SyndEntry entry; int count = 0; for (Ou...
OutageSummary[] summaries = model.getAllOutageSummaries();
20,878
int count = 0; for (OutageSummary summary : summaries) { if (count++ == this.getMaxEntries()) { break; } <BUG>entry = new SyndEntryImpl(); entry.setTitle("outage: " + summary.getNodeLabel()); entry.setLink(getUrlBase() + "element/node.jsp?node=" + summary.getNodeId());</BUG> entry.setPublishedDate(summary.getTimeDown(...
if (summary.getTimeUp() == null) { entry.setTitle("outage: " + sanitizeTitle(summary.getNodeLabel())); } else { entry.setTitle("outage: " + sanitizeTitle(summary.getNodeLabel()) + " (resolved)"); entry.setLink(getUrlBase() + "element/node.jsp?node=" + summary.getNodeId());
20,879
throw new RuntimeParserException("The variable ["+var.getName()+"] is declared final but is reassigned",bexp); } if (var instanceof Parameter && Modifier.isFinal(var.getModifiers())) { throw new RuntimeParserException("The parameter ["+var.getName()+"] is declared final but is reassigned",bexp); } <BUG>} });</BUG> anal...
@Override public void variableNotAlwaysInitialized(final VariableExpression var) { throw new RuntimeParserException("The variable ["+var.getName()+"] may be uninitialized", var); });
20,880
import java.util.LinkedList; import java.util.Map; public class FinalVariableAnalyzer extends ClassCodeVisitorSupport {</BUG> private final SourceUnit sourceUnit; <BUG>private final VariableNotFinalCallback callback; private static enum VariableState {</BUG> is_uninitialized(true), is_final(true), is_var(false); privat...
import java.util.Set; public class FinalVariableAnalyzer extends ClassCodeVisitorSupport { private final Set<VariableExpression> declaredFinalVariables = new HashSet<VariableExpression>(); private boolean inAssignment = false; private static enum VariableState {
20,881
} } } } } <BUG>@Override public void visitPrefixExpression(final PrefixExpression expression) { super.visitPrefixExpression(expression); checkPrePostfixOperation(expression.getExpression(), expression);</BUG> }
declaredFinalVariables.clear();
20,882
public void visitPrefixExpression(final PrefixExpression expression) { super.visitPrefixExpression(expression); checkPrePostfixOperation(expression.getExpression(), expression);</BUG> } @Override <BUG>public void visitPostfixExpression(final PostfixExpression expression) { super.visitPostfixExpression(expression); chec...
inAssignment = expression.getExpression() instanceof VariableExpression; inAssignment = false; checkPrePostfixOperation(expression.getExpression(), expression); inAssignment = expression.getExpression() instanceof VariableExpression; inAssignment = false; checkPrePostfixOperation(expression.getExpression(), expression)...
20,883
return; } if (!isDeclaration && var.isClosureSharedVariable()) { getState().put(var, VariableState.is_var); } <BUG>VariableState count = getState().get(var); if (count == null) { count = uninitialized ? VariableState.is_uninitialized : VariableState.is_final; </BUG> if (var instanceof Parameter) {
VariableState variableState = getState().get(var); if (variableState == null) { variableState = uninitialized ? VariableState.is_uninitialized : VariableState.is_final;
20,884
while (true) { FindResult result = findManager.findString(myEditor.getDocument().getCharsSequence(), offset, model, virtualFile); if (!result.isStringFound()) break;</BUG> int newOffset = result.getEndOffset(); <BUG>if (offset == newOffset) break; offset = newOffset; results.add(result); if (results.size() > myMatches...
FindResult result = findManager.findString(charsSequence, offset, model, virtualFile); if (!result.isStringFound()) break; if (offset == newOffset) { ++offset; if (offset == charsSequence.length()) break; else { if (results.size() > myMatchesLimit) break;
20,885
final Tree self = (Tree) comp; wh.write("<div id=\"").write(self.getUuid()).write("\" z.type=\"zul.tree.Tree\"") .write(self.getOuterAttrs()).write(self.getInnerAttrs()).write(">"); if(self.getTreecols() != null){ wh.write("<div id=\"").write(self.getUuid()).write("!head\" class=\"tree-head\">") <BUG>.writeln("<table w...
.write("<table width=\"").write(self.getInnerWidth()).write("\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"table-layout:fixed\">")
20,886
</BUG> .writeComponents(self.getHeads()) .write("</table></div>"); } wh.write("<div id=\"").write(self.getUuid()).write("!body\" class=\"tree-body\">") <BUG>.writeln("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">") </BUG> .writeln(self.getTreechildren()) .write("</table></div>"); if(self.getTr...
final Tree self = (Tree) comp; wh.write("<div id=\"").write(self.getUuid()).write("\" z.type=\"zul.tree.Tree\"") .write(self.getOuterAttrs()).write(self.getInnerAttrs()).write(">"); if(self.getTreecols() != null){ wh.write("<div id=\"").write(self.getUuid()).write("!head\" class=\"tree-head\">") .write("<table width=\"...
20,887
final String uuid = self.getUuid(); wh.write("<div id=\"").write(uuid).write("\" z.type=\"zul.sel.Libox\"") .write(self.getOuterAttrs()).write(self.getInnerAttrs()).write(">"); if(self.getListhead() != null){ wh.write("<div id=\"").write(uuid).write("!head\" class=\"listbox-head\">") <BUG>.writeln("<table width=\"100%\...
.write("<table width=\"").write(self.getInnerWidth()).write("\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"table-layout:fixed\">")
20,888
</BUG> .writeComponents(self.getHeads()) .write("</table></div>"); } wh.write("<div id=\"").write(uuid).write("!body\" class=\"listbox-body\">") <BUG>.write("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" id=\"") </BUG> .write(uuid).writeln("!cave\" class=\"listbox-btable\">") .writeComponents(s...
final String uuid = self.getUuid(); wh.write("<div id=\"").write(uuid).write("\" z.type=\"zul.sel.Libox\"") .write(self.getOuterAttrs()).write(self.getInnerAttrs()).write(">"); if(self.getListhead() != null){ wh.write("<div id=\"").write(uuid).write("!head\" class=\"listbox-head\">") .write("<table width=\"").write(sel...
20,889
.write(uuid).writeln("!cave\" class=\"listbox-btable\">") .writeComponents(self.getItems()) .write("\n</table></div>"); if(self.getListfoot() != null){ wh.write("<div id=\"").write(uuid).write("!foot\" class=\"listbox-foot\">") <BUG>.writeln("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=...
.write("<table width=\"").write(self.getInnerWidth()).write("\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"table-layout:fixed\">")
20,890
final Grid self = (Grid) comp; final String uuid = self.getUuid(); wh.write("<div id=\"").write(uuid).write("\" z.type=\"zul.grid.Grid\""); wh.write(self.getOuterAttrs()).write(self.getInnerAttrs()).write(">"); wh.write("<div id=\"").write(uuid).write("!paging\" class=\"grid-paging\">"); <BUG>wh.writeln("<table width=\...
wh.write("<table width=\"").write(self.getInnerWidth()).write("\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"grid-btable\">")
20,891
final String uuid = self.getUuid(); wh.write("<div id=\"").write(uuid).write("\" z.type=\"zul.grid.Grid\""); wh.write(self.getOuterAttrs()).write(self.getInnerAttrs()).write(">"); if(self.getColumns() != null){ wh.write("<div id=\"").write(uuid).write("!head\" class=\"grid-head\">") <BUG>.writeln("<table width=\"100%\"...
.write("<table width=\"").write(self.getInnerWidth()).write("\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"table-layout:fixed\">")
20,892
</BUG> .writeComponents(self.getHeads()) .write("</table></div>"); } wh.write("<div id=\"").write(uuid).write("!body\" class=\"grid-body\">"); <BUG>wh.writeln("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"grid-btable\">") </BUG> .writeln(self.getRows()) .write("</table></div>"); if(sel...
final String uuid = self.getUuid(); wh.write("<div id=\"").write(uuid).write("\" z.type=\"zul.grid.Grid\""); wh.write(self.getOuterAttrs()).write(self.getInnerAttrs()).write(">"); if(self.getColumns() != null){ wh.write("<div id=\"").write(uuid).write("!head\" class=\"grid-head\">") .write("<table width=\"").write(self...
20,893
package org.jboss.logmanager.handlers; <BUG>import org.jboss.logmanager.ExtLogRecord; import java.text.SimpleDateFormat;</BUG> import java.util.Date; import java.util.Calendar; import java.util.TimeZone;
import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardCopyOption; import java.text.SimpleDateFormat;
20,894
package org.jboss.logmanager.handlers; import java.io.File; <BUG>import java.io.FileNotFoundException; import java.io.OutputStream; import java.util.logging.ErrorManager;</BUG> import org.jboss.logmanager.ExtLogRecord; public class PeriodicSizeRotatingFileHandler extends PeriodicRotatingFileHandler {
import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardCopyOption; import java.util.logging.ErrorManager;
20,895
package org.jboss.logmanager.handlers; import java.io.OutputStream; import java.io.File; import java.io.FileNotFoundException; <BUG>import org.jboss.logmanager.ExtLogRecord; import java.text.SimpleDateFormat;</BUG> import java.util.Date; import java.util.logging.ErrorManager; public class SizeRotatingFileHandler extend...
import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardCopyOption; import java.text.SimpleDateFormat;
20,896
super.setOutputStream(this.outputStream); } } public void setFile(final File file) throws FileNotFoundException { synchronized (outputLock) { <BUG>if (rotateOnBoot && maxBackupIndex > 0 && file != null && file.exists() && file.length() > 0L) { rotate(file); }</BUG> super.setFile(file); if (outputStream != null)
try { } catch (IOException e) { throw new RuntimeException(e);
20,897
import com.jogamp.newt.event.KeyEvent; import com.jogamp.opengl.GL3; import com.jogamp.opengl.util.GLBuffers; import com.jogamp.opengl.util.glsl.ShaderCode; import com.jogamp.opengl.util.glsl.ShaderProgram; <BUG>import glsl.ShaderCodeKt; import main.framework.Framework;</BUG> import main.framework.Semantic; import vec....
import glsl.ShaderProgramKt; import main.framework.Framework;
20,898
import java.nio.FloatBuffer; import java.nio.IntBuffer; import static com.jogamp.opengl.GL.*; import static com.jogamp.opengl.GL2ES3.GL_COLOR; public class VertCalcOffset extends Framework { <BUG>private final String VERTEX_SHADER = "tut03/calc-offset.vert"; private final String FRAGMENT_SHADER = "tut03/standard.frag";...
[DELETED]
20,899
import com.jogamp.newt.event.KeyEvent; import com.jogamp.opengl.GL3; import com.jogamp.opengl.util.GLBuffers; import com.jogamp.opengl.util.glsl.ShaderCode; import com.jogamp.opengl.util.glsl.ShaderProgram; <BUG>import glsl.ShaderCodeKt; import main.framework.Framework;</BUG> import main.framework.Semantic; import vec....
import glsl.ShaderProgramKt; import main.framework.Framework;
20,900
import java.nio.FloatBuffer; import java.nio.IntBuffer; import static com.jogamp.opengl.GL.*; import static com.jogamp.opengl.GL2ES3.GL_COLOR; public class FragChangeColor extends Framework { <BUG>private final String VERTEX_SHADER = "tut03/calc-offset.vert"; private final String FRAGMENT_SHADER = "tut03/calc-color.fra...
[DELETED]