id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
43,801
medicamento.setQuantidade(new BigDecimal("9999999.999")); return medicamento; } public static NFNotaInfoItemProdutoDeclaracaoImportacao getNFNotaInfoItemProdutoDeclaracaoImportacao() { final NFNotaInfoItemProdutoDeclaracaoImportacao declaraoImportacao = new NFNotaInfoItemProdutoDeclaracaoImportacao(); <BUG>declaraoImportacao.setAdicoes(Arrays.asList(FabricaDeObjetosFake.getNFNotaInfoItemProdutoDeclaracaoImportacaoAdicao())); </BUG> declaraoImportacao.setCodigoExportador("E9jBqM65b0MiCiRnYil203iNGJOSZs8iU1KGmQsj2N0kw6QMuvhbsQosFGcU"); declaraoImportacao.setDataDesembaraco(new LocalDate(2014, 1, 1)); declaraoImportacao.setDataRegistro(new LocalDate(2014, 2, 2));
declaraoImportacao.setAdicoes(Collections.singletonList(FabricaDeObjetosFake.getNFNotaInfoItemProdutoDeclaracaoImportacaoAdicao()));
43,802
public static NFNotaInfoVolume getNFNotaInfoVolume() { final NFNotaInfoVolume volume = new NFNotaInfoVolume(); volume.setEspecieVolumesTransportados("3Qf46HFs7FcWlhuQqLJ96vsrgJHu6B5ZXmmwMZ1RtvQVOV4Yp6M9VNqn5Ecb"); final NFNotaInfoLacre notaInfoLacre = new NFNotaInfoLacre(); notaInfoLacre.setNumeroLacre("gvmjb9BB2cmwsLbzeR3Bsk8QbA7b1XEgXUhKeS9QZGiwhFnqDtEzS3377MP2"); <BUG>volume.setLacres(Arrays.asList(notaInfoLacre)); </BUG> volume.setMarca("lc0w13Xw2PxsSD4u4q3N6Qix9ZuCFm0HXo6BxBmKnjVbh9Xwy3k9UwBNfuYo"); volume.setNumeracaoVolumesTransportados("mcBUtZwnI5DKj2YZNAcLP7W9h6j1xKmF5SX1BTKmsvyg0H5xSrfVw8HGn8eb"); volume.setPesoBruto(new BigDecimal("1.358"));
volume.setLacres(Collections.singletonList(notaInfoLacre));
43,803
public void deveGerarXMLDeAcordoComOPadraoEstabelecido() { final NFLoteConsultaRetorno retorno = new NFLoteConsultaRetorno(); retorno.setAmbiente(NFAmbiente.HOMOLOGACAO); retorno.setMotivo("8CwtnC5gWwUncMBYAZl9p4fvVx8RkCH2EKx2mtUNVA5tLoJsjNWL5CJ6DXNUHTWKpPl6fMKKxA0aXBu6IfmJLIHlPxtF0oZkKrNsGyGpwKqWxvDZ9HQGqscmhtTrp5NbNzk9TOsCJaMU59tF8kOxu0EUZAMLF8bGJteg86T4hQ6ej5Zi0n1Tin0vFAtN1ue68NWrfQWM11VPpqvSXRlaa8qIw1Qal8tWCFGJA0wZpl7eV98bAYL18pt3e71yKcX"); retorno.setNumeroRecibo("123456789012345"); <BUG>retorno.setProtocolos(Arrays.asList(FabricaDeObjetosFake.getNFProtocolo())); </BUG> retorno.setStatus("eeowo"); retorno.setUf(NFUnidadeFederativa.SC); retorno.setVersao("3.10");
retorno.setProtocolos(Collections.singletonList(FabricaDeObjetosFake.getNFProtocolo()));
43,804
import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.LocalFileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.util.Progressable; <BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*; public class S3AFileSystem extends FileSystem {</BUG> private URI uri; private Path workingDir; private AmazonS3Client s3;
import static org.apache.hadoop.fs.s3a.Constants.*; public class S3AFileSystem extends FileSystem {
43,805
public void initialize(URI name, Configuration conf) throws IOException { super.initialize(name, conf); uri = URI.create(name.getScheme() + "://" + name.getAuthority()); workingDir = new Path("/user", System.getProperty("user.name")).makeQualified(this.uri, this.getWorkingDirectory()); <BUG>String accessKey = conf.get(ACCESS_KEY, null); String secretKey = conf.get(SECRET_KEY, null); </BUG> String userInfo = name.getUserInfo();
String accessKey = conf.get(NEW_ACCESS_KEY, conf.get(OLD_ACCESS_KEY, null)); String secretKey = conf.get(NEW_SECRET_KEY, conf.get(OLD_SECRET_KEY, null));
43,806
} else { accessKey = userInfo; } } AWSCredentialsProviderChain credentials = new AWSCredentialsProviderChain( <BUG>new S3ABasicAWSCredentialsProvider(accessKey, secretKey), new InstanceProfileCredentialsProvider(), new S3AAnonymousAWSCredentialsProvider() );</BUG> bucket = name.getHost();
new BasicAWSCredentialsProvider(accessKey, secretKey), new AnonymousAWSCredentialsProvider()
43,807
awsConf.setSocketTimeout(conf.getInt(SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT)); </BUG> s3 = new AmazonS3Client(credentials, awsConf); <BUG>maxKeys = conf.getInt(MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS); partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD); </BUG> if (partSize < 5 * 1024 * 1024) {
new InstanceProfileCredentialsProvider(), new AnonymousAWSCredentialsProvider() bucket = name.getHost(); ClientConfiguration awsConf = new ClientConfiguration(); awsConf.setMaxConnections(conf.getInt(NEW_MAXIMUM_CONNECTIONS, conf.getInt(OLD_MAXIMUM_CONNECTIONS, DEFAULT_MAXIMUM_CONNECTIONS))); awsConf.setProtocol(conf.getBoolean(NEW_SECURE_CONNECTIONS, conf.getBoolean(OLD_SECURE_CONNECTIONS, DEFAULT_SECURE_CONNECTIONS)) ? Protocol.HTTPS : Protocol.HTTP); awsConf.setMaxErrorRetry(conf.getInt(NEW_MAX_ERROR_RETRIES, conf.getInt(OLD_MAX_ERROR_RETRIES, DEFAULT_MAX_ERROR_RETRIES))); awsConf.setSocketTimeout(conf.getInt(NEW_SOCKET_TIMEOUT, conf.getInt(OLD_SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT))); maxKeys = conf.getInt(NEW_MAX_PAGING_KEYS, conf.getInt(OLD_MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS)); partSize = conf.getLong(NEW_MULTIPART_SIZE, conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE)); partSizeThreshold = conf.getInt(NEW_MIN_MULTIPART_THRESHOLD, conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD));
43,808
cannedACL = null; } if (!s3.doesBucketExist(bucket)) { throw new IOException("Bucket " + bucket + " does not exist"); } <BUG>boolean purgeExistingMultipart = conf.getBoolean(PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART); long purgeExistingMultipartAge = conf.getLong(PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART_AGE); </BUG> if (purgeExistingMultipart) {
boolean purgeExistingMultipart = conf.getBoolean(NEW_PURGE_EXISTING_MULTIPART, conf.getBoolean(OLD_PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART)); long purgeExistingMultipartAge = conf.getLong(NEW_PURGE_EXISTING_MULTIPART_AGE, conf.getLong(OLD_PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART_AGE));
43,809
import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; <BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*; public class S3AOutputStream extends OutputStream {</BUG> private OutputStream backupStream; private File backupFile; private boolean closed;
import static org.apache.hadoop.fs.s3a.Constants.*; public class S3AOutputStream extends OutputStream {
43,810
this.client = client; this.progress = progress; this.fs = fs; this.cannedACL = cannedACL; this.statistics = statistics; <BUG>partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD); </BUG> if (conf.get(BUFFER_DIR, null) != null) {
partSize = conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
43,811
import edu.umd.cs.findbugs.BugInstance; import edu.umd.cs.findbugs.TigerSubstitutes; import edu.umd.cs.findbugs.annotations.CheckForNull; import edu.umd.cs.findbugs.plugin.eclipse.quickfix.exception.BugResolutionException; public abstract class BugResolution implements IMarkerResolution { <BUG>static private final String MISSING_BUG_INSTANCE = "This bug is no longer in the system. " + "The bugs somehow got out of sync with the memory representation. " + "Try running FindBugs again. If that does not work, check the error log and remove the *.fbwarnings files."; private String label = TigerSubstitutes.getSimpleName(getClass());</BUG> private IProgressMonitor monitor = null; @CheckForNull public String getLabel() {
static private final String MISSING_BUG_INSTANCE = "This bug is no longer in the system. " + "The bugs somehow got out of sync with the memory representation. " private String label = TigerSubstitutes.getSimpleName(getClass());
43,812
FindbugsPlugin.getBugCollection(project, monitor).remove(bug); marker.delete(); MarkerUtil.redisplayMarkers(project, FindbugsPlugin.getShell()); } finally { originalUnit.discardWorkingCopy(); <BUG>} } catch (BugResolutionException e) { FindbugsPlugin.getDefault().logException(e, e.getMessage()); } catch (JavaModelException e) { FindbugsPlugin.getDefault().logException(e, e.getMessage()); } catch (BadLocationException e) { FindbugsPlugin.getDefault().logException(e, e.getMessage()); } catch (CoreException e) { FindbugsPlugin.getDefault().logException(e, e.getMessage());</BUG> }
[DELETED]
43,813
if (element instanceof ICompilationUnit) { return (ICompilationUnit) element; } } return null; <BUG>} protected CompilationUnit createWorkingCopy(ICompilationUnit unit) throws JavaModelException { assert unit != null;</BUG> unit.becomeWorkingCopy(null, monitor);
protected void reportException(Exception e) { assert e != null; FindbugsPlugin.getDefault().logException(e, e.getLocalizedMessage()); MessageDialog.openError(FindbugsPlugin.getShell(), "BugResolution failed.", e.getLocalizedMessage()); private CompilationUnit createWorkingCopy(ICompilationUnit unit) throws JavaModelException {
43,814
ASTParser parser = ASTParser.newParser(AST.JLS3); parser.setSource(unit); parser.setResolveBindings(resolveBindings()); return (CompilationUnit) parser.createAST(monitor); } <BUG>protected void rewriteCompilationUnit(ASTRewrite rewrite, IDocument doc, ICompilationUnit originalUnit) throws JavaModelException, BadLocationException { </BUG> TextEdit edits = rewrite.rewriteAST(doc, originalUnit.getJavaProject().getOptions(true)); edits.apply(doc); originalUnit.getBuffer().setContents(doc.get());
private void rewriteCompilationUnit(ASTRewrite rewrite, IDocument doc, ICompilationUnit originalUnit) throws JavaModelException, BadLocationException {
43,815
try { IMarkerResolution resolution = resolutionClass.newInstance(); loadAttributes(resolution, attributes); return resolution; } catch (InstantiationException e) { <BUG>FindbugsPlugin.getDefault().logException(e, "Failed to instaniate Fixer '" + </BUG> TigerSubstitutes.getSimpleName(resolutionClass)+ "'."); return null; } catch (IllegalAccessException e) {
FindbugsPlugin.getDefault().logException(e, "Failed to instaniate BugResolution '" +
43,816
import org.spongepowered.api.world.Locatable; import org.spongepowered.api.world.Location; import org.spongepowered.api.world.World; import javax.annotation.Nullable; import java.util.List; <BUG>import java.util.Optional; import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;</BUG> public class CommandDelete extends FCCommandBase { private static final FlagMapper MAPPER = map -> key -> value -> { map.put(key, value);
import java.util.stream.Stream; import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;
43,817
.append(Text.of(TextColors.GREEN, "Usage: ")) .append(getUsage(source)) .build()); return CommandResult.empty(); } else if (isIn(REGIONS_ALIASES, parse.args[0])) { <BUG>if (parse.args.length < 2) throw new CommandException(Text.of("Must specify a name!")); IRegion region = FGManager.getInstance().getRegion(parse.args[1]); </BUG> boolean isWorldRegion = false; if (region == null) {
String regionName = parse.args[1]; IRegion region = FGManager.getInstance().getRegion(regionName).orElse(null);
43,818
</BUG> isWorldRegion = true; } if (region == null) <BUG>throw new CommandException(Text.of("No region exists with the name \"" + parse.args[1] + "\"!")); if (region instanceof GlobalWorldRegion) { </BUG> throw new CommandException(Text.of("You may not delete the global region!")); }
if (world == null) throw new CommandException(Text.of("No world exists with name \"" + worldName + "\"!")); if (world == null) throw new CommandException(Text.of("Must specify a world!")); region = FGManager.getInstance().getWorldRegion(world, regionName).orElse(null); throw new CommandException(Text.of("No region exists with the name \"" + regionName + "\"!")); if (region instanceof IGlobal) {
43,819
source.getName() + " deleted " + (isWorldRegion ? "world" : "") + "region" ); return CommandResult.success(); } else if (isIn(HANDLERS_ALIASES, parse.args[0])) { if (parse.args.length < 2) throw new CommandException(Text.of("Must specify a name!")); <BUG>IHandler handler = FGManager.getInstance().gethandler(parse.args[1]); if (handler == null) throw new ArgumentParseException(Text.of("No handler exists with that name!"), parse.args[1], 1); if (handler instanceof GlobalHandler)</BUG> throw new CommandException(Text.of("You may not delete the global handler!"));
Optional<IHandler> handlerOpt = FGManager.getInstance().gethandler(parse.args[1]); if (!handlerOpt.isPresent()) IHandler handler = handlerOpt.get(); if (handler instanceof GlobalHandler)
43,820
.excludeCurrent(true) .autoCloseQuotes(true) .parse(); if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) { if (parse.current.index == 0) <BUG>return ImmutableList.of("region", "handler").stream() .filter(new StartsWithPredicate(parse.current.token))</BUG> .map(args -> parse.current.prefix + args) .collect(GuavaCollectors.toImmutableList()); else if (parse.current.index == 1) {
return Stream.of("region", "handler") .filter(new StartsWithPredicate(parse.current.token))
43,821
.excludeCurrent(true) .autoCloseQuotes(true) .parse(); if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) { if (parse.current.index == 0) <BUG>return ImmutableList.of("region", "handler").stream() .filter(new StartsWithPredicate(parse.current.token))</BUG> .map(args -> parse.current.prefix + args) .collect(GuavaCollectors.toImmutableList()); else if (parse.current.index == 1) {
return Stream.of("region", "handler") .filter(new StartsWithPredicate(parse.current.token))
43,822
@Dependency(id = "foxcore") }, description = "A world protection plugin built for SpongeAPI. Requires FoxCore.", authors = {"gravityfox"}, url = "https://github.com/FoxDenStudio/FoxGuard") <BUG>public final class FoxGuardMain { public final Cause pluginCause = Cause.builder().named("plugin", this).build(); private static FoxGuardMain instanceField;</BUG> @Inject private Logger logger;
private static FoxGuardMain instanceField;
43,823
private UserStorageService userStorage; private EconomyService economyService = null; private boolean loaded = false; private FCCommandDispatcher fgDispatcher; public static FoxGuardMain instance() { <BUG>return instanceField; }</BUG> @Listener public void construct(GameConstructionEvent event) { instanceField = this;
} public static Cause getCause() { return instance().pluginCause; }
43,824
return configDirectory; } public boolean isLoaded() { return loaded; } <BUG>public static Cause getCause() { return instance().pluginCause; }</BUG> public EconomyService getEconomyService() { return economyService;
[DELETED]
43,825
import org.spongepowered.api.world.Locatable; import org.spongepowered.api.world.Location; import org.spongepowered.api.world.World; import javax.annotation.Nullable; import java.util.*; <BUG>import java.util.stream.Collectors; import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;</BUG> public class CommandHere extends FCCommandBase { private static final String[] PRIORITY_ALIASES = {"priority", "prio", "p"}; private static final FlagMapper MAPPER = map -> key -> value -> {
import java.util.stream.Stream; import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;
43,826
.excludeCurrent(true) .autoCloseQuotes(true) .parse(); if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) { if (parse.current.index == 0) <BUG>return ImmutableList.of("region", "handler").stream() .filter(new StartsWithPredicate(parse.current.token))</BUG> .map(args -> parse.current.prefix + args) .collect(GuavaCollectors.toImmutableList()); else if (parse.current.index > 0) {
return Stream.of("region", "handler") .filter(new StartsWithPredicate(parse.current.token))
43,827
private static FGStorageManager instance; private final Logger logger = FoxGuardMain.instance().getLogger();</BUG> private final Set<LoadEntry> loaded = new HashSet<>(); private final Path directory = getDirectory(); private final Map<String, Path> worldDirectories; <BUG>private FGStorageManager() { defaultModifiedMap = new CacheMap<>((k, m) -> {</BUG> if (k instanceof IFGObject) { m.put((IFGObject) k, true); return true;
public final HashMap<IFGObject, Boolean> defaultModifiedMap; private final UserStorageService userStorageService; private final Logger logger = FoxGuardMain.instance().getLogger(); userStorageService = FoxGuardMain.instance().getUserStorage(); defaultModifiedMap = new CacheMap<>((k, m) -> {
43,828
String name = fgObject.getName(); Path singleDir = dir.resolve(name.toLowerCase()); </BUG> boolean shouldSave = fgObject.shouldSave(); if (force || shouldSave) { <BUG>logger.info((shouldSave ? "S" : "Force s") + "aving handler \"" + name + "\" in directory: " + singleDir); </BUG> constructDirectory(singleDir); try { fgObject.save(singleDir);
UUID owner = fgObject.getOwner(); boolean isOwned = !owner.equals(SERVER_UUID); Optional<User> userOwner = userStorageService.get(owner); String logName = (userOwner.isPresent() ? userOwner.get().getName() + ":" : "") + (isOwned ? owner + ":" : "") + name; if (fgObject.autoSave()) { Path singleDir = serverDir.resolve(name.toLowerCase()); logger.info((shouldSave ? "S" : "Force s") + "aving handler " + logName + " in directory: " + singleDir);
43,829
if (fgObject.autoSave()) { Path singleDir = dir.resolve(name.toLowerCase()); </BUG> boolean shouldSave = fgObject.shouldSave(); if (force || shouldSave) { <BUG>logger.info((shouldSave ? "S" : "Force s") + "aving world region \"" + name + "\" in directory: " + singleDir); </BUG> constructDirectory(singleDir); try { fgObject.save(singleDir);
Path singleDir = serverDir.resolve(name.toLowerCase()); logger.info((shouldSave ? "S" : "Force s") + "aving world region " + logName + " in directory: " + singleDir);
43,830
public synchronized void loadRegionLinks() { logger.info("Loading region links"); try (DB mainDB = DBMaker.fileDB(directory.resolve("regions.foxdb").normalize().toString()).make()) { Map<String, String> linksMap = mainDB.hashMap("links", Serializer.STRING, Serializer.STRING).createOrOpen(); linksMap.entrySet().forEach(entry -> { <BUG>IRegion region = FGManager.getInstance().getRegion(entry.getKey()); if (region != null) { logger.info("Loading links for region \"" + region.getName() + "\"");</BUG> String handlersString = entry.getValue();
Optional<IRegion> regionOpt = FGManager.getInstance().getRegion(entry.getKey()); if (regionOpt.isPresent()) { IRegion region = regionOpt.get(); logger.info("Loading links for region \"" + region.getName() + "\"");
43,831
public synchronized void loadWorldRegionLinks(World world) { logger.info("Loading world region links for world \"" + world.getName() + "\""); try (DB mainDB = DBMaker.fileDB(worldDirectories.get(world.getName()).resolve("wregions.foxdb").normalize().toString()).make()) { Map<String, String> linksMap = mainDB.hashMap("links", Serializer.STRING, Serializer.STRING).createOrOpen(); linksMap.entrySet().forEach(entry -> { <BUG>IRegion region = FGManager.getInstance().getWorldRegion(world, entry.getKey()); if (region != null) { logger.info("Loading links for world region \"" + region.getName() + "\"");</BUG> String handlersString = entry.getValue();
Optional<IWorldRegion> regionOpt = FGManager.getInstance().getWorldRegion(world, entry.getKey()); if (regionOpt.isPresent()) { IWorldRegion region = regionOpt.get(); logger.info("Loading links for world region \"" + region.getName() + "\"");
43,832
StringBuilder builder = new StringBuilder(); for (Iterator<IHandler> it = handlers.iterator(); it.hasNext(); ) { builder.append(it.next().getName()); if (it.hasNext()) builder.append(","); } <BUG>return builder.toString(); }</BUG> private final class LoadEntry { public final String name; public final Type type;
public enum Type { REGION, WREGION, HANDLER
43,833
.autoCloseQuotes(true) .leaveFinalAsIs(true) .parse(); if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) { if (parse.current.index == 0) <BUG>return ImmutableList.of("region", "worldregion", "handler", "controller").stream() </BUG> .filter(new StartsWithPredicate(parse.current.token)) .collect(GuavaCollectors.toImmutableList()); else if (parse.current.index == 1) {
return Stream.of("region", "worldregion", "handler", "controller")
43,834
@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 GuiSeedAnalyzer(InventoryPlayer inventory, TileEntitySeedAnalyzer seedAnalyzer) { super(new ContainerSeedAnalyzer(inventory, seedAnalyzer)); this.seedAnalyzer = seedAnalyzer;
private AgriGuiWrapper guiJournal;
43,835
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));
43,836
package com.eucalyptus.blockstorage.entities; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.PersistenceContext; import javax.persistence.Table; <BUG>import com.eucalyptus.entities.Entities; import com.eucalyptus.entities.TransactionResource;</BUG> import org.apache.log4j.Logger; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy;
[DELETED]
43,837
import com.eucalyptus.util.EucalyptusCloudException; import java.util.NoSuchElementException;</BUG> @Entity <BUG>@PersistenceContext(name="eucalyptus_storage") @Table( name = "das_info" ) @Cache( usage = CacheConcurrencyStrategy.TRANSACTIONAL ) @ConfigurableClass(root = "storage", alias = "das", description = "Basic storage controller configuration for DAS.", singleton=false, deferred = true) </BUG> public class DASInfo extends AbstractPersistent {
import com.eucalyptus.blockstorage.util.StorageProperties; import com.eucalyptus.configurable.ConfigurableClass; import com.eucalyptus.configurable.ConfigurableField; import com.eucalyptus.configurable.ConfigurableIdentifier; import com.eucalyptus.entities.AbstractPersistent; import com.eucalyptus.entities.Transactions; @PersistenceContext(name = "eucalyptus_storage") @Table(name = "das_info") @Cache(usage = CacheConcurrencyStrategy.TRANSACTIONAL) @ConfigurableClass(root = "storage", alias = "das", description = "Basic storage controller configuration for DAS.", singleton = false, deferred = true)
43,838
int result = 1; result = prime * result + ((name == null) ? 0 : name.hashCode()); return result; } @Override <BUG>public String toString() {</BUG> return this.name; }
public String toString() {
43,839
LOG.error(e); } checkAndAddUser(); } private void checkAndAddUser() { <BUG>TransactionResource outter = Entities.transactionFor(CHAPUserInfo.class); try {</BUG> CHAPUserInfo userInfo = Entities.uniqueResult(new CHAPUserInfo("eucalyptus")); outter.commit();
try (TransactionResource outter = Entities.transactionFor(CHAPUserInfo.class)) {
43,840
import ml.puredark.hviewer.ui.activities.BaseActivity; import ml.puredark.hviewer.ui.dataproviders.ListDataProvider; import ml.puredark.hviewer.ui.fragments.SettingFragment; import ml.puredark.hviewer.ui.listeners.OnItemLongClickListener; import ml.puredark.hviewer.utils.SharedPreferencesUtil; <BUG>import static android.webkit.WebSettings.LOAD_CACHE_ELSE_NETWORK; public class PictureViewerAdapter extends RecyclerView.Adapter<PictureViewerAdapter.PictureViewerViewHolder> {</BUG> private BaseActivity activity; private Site site; private ListDataProvider mProvider;
import static ml.puredark.hviewer.R.id.container; public class PictureViewerAdapter extends RecyclerView.Adapter<PictureViewerAdapter.PictureViewerViewHolder> {
43,841
final PictureViewHolder viewHolder = new PictureViewHolder(view); if (pictures != null && position < pictures.size()) { final Picture picture = pictures.get(getPicturePostion(position)); if (picture.pic != null) { loadImage(container.getContext(), picture, viewHolder); <BUG>} else if (site.hasFlag(Site.FLAG_SINGLE_PAGE_BIG_PICTURE) && site.extraRule != null && site.extraRule.pictureUrl != null) { getPictureUrl(container.getContext(), viewHolder, picture, site, site.extraRule.pictureUrl, site.extraRule.pictureHighRes);</BUG> } else if (site.picUrlSelector != null) { getPictureUrl(container.getContext(), viewHolder, picture, site, site.picUrlSelector, null); } else {
} else if (site.hasFlag(Site.FLAG_SINGLE_PAGE_BIG_PICTURE) && site.extraRule != null) { if(site.extraRule.pictureRule != null && site.extraRule.pictureRule.url != null) getPictureUrl(container.getContext(), viewHolder, picture, site, site.extraRule.pictureRule.url, site.extraRule.pictureRule.highRes); else if(site.extraRule.pictureUrl != null) getPictureUrl(container.getContext(), viewHolder, picture, site, site.extraRule.pictureUrl, site.extraRule.pictureHighRes);
43,842
import java.util.regex.Pattern; import butterknife.BindView; import butterknife.ButterKnife; import ml.puredark.hviewer.R; import ml.puredark.hviewer.beans.Category; <BUG>import ml.puredark.hviewer.beans.CommentRule; import ml.puredark.hviewer.beans.Rule;</BUG> import ml.puredark.hviewer.beans.Selector; import ml.puredark.hviewer.beans.Site; import ml.puredark.hviewer.ui.adapters.CategoryInputAdapter;
import ml.puredark.hviewer.beans.PictureRule; import ml.puredark.hviewer.beans.Rule;
43,843
inputGalleryRulePictureUrlReplacement.setText(site.galleryRule.pictureUrl.replacement); } if (site.galleryRule.pictureHighRes != null) { inputGalleryRulePictureHighResSelector.setText(joinSelector(site.galleryRule.pictureHighRes)); inputGalleryRulePictureHighResRegex.setText(site.galleryRule.pictureHighRes.regex); <BUG>inputGalleryRulePictureHighResReplacement.setText(site.galleryRule.pictureHighRes.replacement); }</BUG> if (site.galleryRule.commentRule != null) { if (site.galleryRule.commentRule.item != null) { inputGalleryRuleCommentItemSelector.setText(joinSelector(site.galleryRule.commentRule.item));
[DELETED]
43,844
inputExtraRuleCommentDatetimeReplacement.setText(site.extraRule.commentDatetime.replacement); } if (site.extraRule.commentContent != null) { inputExtraRuleCommentContentSelector.setText(joinSelector(site.extraRule.commentContent)); inputExtraRuleCommentContentRegex.setText(site.extraRule.commentContent.regex); <BUG>inputExtraRuleCommentContentReplacement.setText(site.extraRule.commentContent.replacement); }</BUG> } } }
[DELETED]
43,845
lastSite.galleryRule.cover = loadSelector(inputGalleryRuleCoverSelector, inputGalleryRuleCoverRegex, inputGalleryRuleCoverReplacement); lastSite.galleryRule.category = loadSelector(inputGalleryRuleCategorySelector, inputGalleryRuleCategoryRegex, inputGalleryRuleCategoryReplacement); lastSite.galleryRule.datetime = loadSelector(inputGalleryRuleDatetimeSelector, inputGalleryRuleDatetimeRegex, inputGalleryRuleDatetimeReplacement); lastSite.galleryRule.rating = loadSelector(inputGalleryRuleRatingSelector, inputGalleryRuleRatingRegex, inputGalleryRuleRatingReplacement); lastSite.galleryRule.description = loadSelector(inputGalleryRuleDescriptionSelector, inputGalleryRuleDescriptionRegex, inputGalleryRuleDescriptionReplacement); <BUG>lastSite.galleryRule.tags = loadSelector(inputGalleryRuleTagsSelector, inputGalleryRuleTagsRegex, inputGalleryRuleTagsReplacement); lastSite.galleryRule.pictureThumbnail = loadSelector(inputGalleryRulePictureThumbnailSelector, inputGalleryRulePictureThumbnailRegex, inputGalleryRulePictureThumbnailReplacement); lastSite.galleryRule.pictureUrl = loadSelector(inputGalleryRulePictureUrlSelector, inputGalleryRulePictureUrlRegex, inputGalleryRulePictureUrlReplacement); lastSite.galleryRule.pictureHighRes = loadSelector(inputGalleryRulePictureHighResSelector, inputGalleryRulePictureHighResRegex, inputGalleryRulePictureHighResReplacement); lastSite.galleryRule.commentRule = new CommentRule(); lastSite.galleryRule.commentRule.item = loadSelector(inputGalleryRuleCommentItemSelector, inputGalleryRuleCommentItemRegex, inputGalleryRuleCommentItemReplacement);</BUG> lastSite.galleryRule.commentRule.avatar = loadSelector(inputGalleryRuleCommentAvatarSelector, inputGalleryRuleCommentAvatarRegex, inputGalleryRuleCommentAvatarReplacement);
lastSite.galleryRule.pictureRule = (lastSite.galleryRule.pictureRule == null) ? new PictureRule() : lastSite.galleryRule.pictureRule; lastSite.galleryRule.pictureRule.thumbnail = loadSelector(inputGalleryRulePictureThumbnailSelector, inputGalleryRulePictureThumbnailRegex, inputGalleryRulePictureThumbnailReplacement); lastSite.galleryRule.pictureRule.url = loadSelector(inputGalleryRulePictureUrlSelector, inputGalleryRulePictureUrlRegex, inputGalleryRulePictureUrlReplacement); lastSite.galleryRule.pictureRule.highRes = loadSelector(inputGalleryRulePictureHighResSelector, inputGalleryRulePictureHighResRegex, inputGalleryRulePictureHighResReplacement); lastSite.galleryRule.commentRule = (lastSite.galleryRule.commentRule == null) ? new CommentRule() : lastSite.galleryRule.commentRule; lastSite.galleryRule.commentRule.item = loadSelector(inputGalleryRuleCommentItemSelector, inputGalleryRuleCommentItemRegex, inputGalleryRuleCommentItemReplacement);
43,846
lastSite.extraRule.cover = loadSelector(inputExtraRuleCoverSelector, inputExtraRuleCoverRegex, inputExtraRuleCoverReplacement); lastSite.extraRule.category = loadSelector(inputExtraRuleCategorySelector, inputExtraRuleCategoryRegex, inputExtraRuleCategoryReplacement); lastSite.extraRule.datetime = loadSelector(inputExtraRuleDatetimeSelector, inputExtraRuleDatetimeRegex, inputExtraRuleDatetimeReplacement); lastSite.extraRule.rating = loadSelector(inputExtraRuleRatingSelector, inputExtraRuleRatingRegex, inputExtraRuleRatingReplacement); lastSite.extraRule.description = loadSelector(inputExtraRuleDescriptionSelector, inputExtraRuleDescriptionRegex, inputExtraRuleDescriptionReplacement); <BUG>lastSite.extraRule.tags = loadSelector(inputExtraRuleTagsSelector, inputExtraRuleTagsRegex, inputExtraRuleTagsReplacement); lastSite.extraRule.pictureThumbnail = loadSelector(inputExtraRulePictureThumbnailSelector, inputExtraRulePictureThumbnailRegex, inputExtraRulePictureThumbnailReplacement); lastSite.extraRule.pictureUrl = loadSelector(inputExtraRulePictureUrlSelector, inputExtraRulePictureUrlRegex, inputExtraRulePictureUrlReplacement); lastSite.extraRule.pictureHighRes = loadSelector(inputExtraRulePictureHighResSelector, inputExtraRulePictureHighResRegex, inputExtraRulePictureHighResReplacement); lastSite.extraRule.commentRule = new CommentRule(); lastSite.extraRule.commentRule.item = loadSelector(inputExtraRuleCommentItemSelector, inputExtraRuleCommentItemRegex, inputExtraRuleCommentItemReplacement);</BUG> lastSite.extraRule.commentRule.avatar = loadSelector(inputExtraRuleCommentAvatarSelector, inputExtraRuleCommentAvatarRegex, inputExtraRuleCommentAvatarReplacement);
lastSite.extraRule.pictureRule = (lastSite.extraRule.pictureRule == null) ? new PictureRule() : lastSite.extraRule.pictureRule; lastSite.extraRule.pictureRule.thumbnail = loadSelector(inputExtraRulePictureThumbnailSelector, inputExtraRulePictureThumbnailRegex, inputExtraRulePictureThumbnailReplacement); lastSite.extraRule.pictureRule.url = loadSelector(inputExtraRulePictureUrlSelector, inputExtraRulePictureUrlRegex, inputExtraRulePictureUrlReplacement); lastSite.extraRule.pictureRule.highRes = loadSelector(inputExtraRulePictureHighResSelector, inputExtraRulePictureHighResRegex, inputExtraRulePictureHighResReplacement); lastSite.extraRule.commentRule = (lastSite.extraRule.commentRule == null) ? new CommentRule() : lastSite.extraRule.commentRule; lastSite.extraRule.commentRule.item = loadSelector(inputExtraRuleCommentItemSelector, inputExtraRuleCommentItemRegex, inputExtraRuleCommentItemReplacement);
43,847
notifyItemChanged(position); if (mItemClickListener != null) mItemClickListener.onItemClick(v, position); } }); <BUG>if (tag.selected) label.getChildAt(0).setBackgroundResource(R.color.colorPrimary); else label.getChildAt(0).setBackgroundResource(R.color.dimgray);</BUG> }
[DELETED]
43,848
loadPicture(picture, task, null, true); } else if (!TextUtils.isEmpty(picture.pic) && !highRes) { picture.retries = 0; loadPicture(picture, task, null, false); } else if (task.collection.site.hasFlag(Site.FLAG_SINGLE_PAGE_BIG_PICTURE) <BUG>&& task.collection.site.extraRule != null && task.collection.site.extraRule.pictureUrl != null) { </BUG> getPictureUrl(picture, task, task.collection.site.extraRule.pictureUrl, task.collection.site.extraRule.pictureHighRes);
&& task.collection.site.extraRule != null) { if(task.collection.site.extraRule.pictureRule != null && task.collection.site.extraRule.pictureRule.url != null) getPictureUrl(picture, task, task.collection.site.extraRule.pictureRule.url, task.collection.site.extraRule.pictureRule.highRes); else if(task.collection.site.extraRule.pictureUrl != null)
43,849
if (Picture.hasPicPosfix(picture.url)) { picture.pic = picture.url; loadPicture(picture, task, null, false); } else if (task.collection.site.hasFlag(Site.FLAG_JS_NEEDED_ALL)) { <BUG>new Handler(Looper.getMainLooper()).post(()->{ </BUG> WebView webView = new WebView(HViewerApplication.mContext); WebSettings mWebSettings = webView.getSettings(); mWebSettings.setJavaScriptEnabled(true);
new Handler(Looper.getMainLooper()).post(() -> {
43,850
public VPC getVPC(int accountId, int vpcID); public void deleteVPC(int accountId, int vpcId) throws RuntimeException, VPCNotFoundException; public List<VPC> getVPC(int accountId);</BUG> public List<VPC> getVPC(String apiKey); <BUG>public int getActivationNonce(int id) throws RuntimeException; public int getActivationId(int nonce) throws RuntimeException, StaleNonceException; public int getSessionNonce(int id) throws RuntimeException; public int getSessionId(int nonce) throws RuntimeException, StaleNonceException; public Status registerComponents(String accountId, Credentials credentials, Component component) throws RetryException; public Status unRegisterComponent(String accountId, Credentials credentials, Component component) throws RetryException; public Status updateComponent(String accountId, Credentials credentials, Component component) throws RetryException; }</BUG>
public void deleteVPC(int accountId, int vpcId) throws VPCNotFoundException; public List<VPC> getVPC(int accountId); public int getActivationNonce(int id); public int getActivationId(int nonce) throws StaleNonceException; public int getSessionNonce(int id); public int getSessionId(int nonce) throws StaleNonceException; Component component);
43,851
package org.rstudio.studio.client.workbench.views.console; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.ui.IsWidget; import com.google.inject.Inject; import org.rstudio.core.client.command.CommandBinder; <BUG>import org.rstudio.core.client.command.Handler; import org.rstudio.core.client.layout.DelayFadeInHelper;</BUG> import org.rstudio.studio.client.application.events.EventBus; import org.rstudio.studio.client.workbench.commands.Commands; import org.rstudio.studio.client.workbench.events.BusyEvent;
import org.rstudio.core.client.dom.WindowEx; import org.rstudio.core.client.layout.DelayFadeInHelper;
43,852
import com.google.gwt.user.client.ui.Widget; import com.google.inject.Inject; import com.google.inject.Provider; import com.google.inject.name.Named; import org.rstudio.core.client.Debug; <BUG>import org.rstudio.core.client.Triad; import org.rstudio.core.client.events.WindowStateChangeEvent;</BUG> import org.rstudio.core.client.layout.DualWindowLayoutPanel; import org.rstudio.core.client.layout.LogicalWindow; import org.rstudio.core.client.layout.WindowState;
import org.rstudio.core.client.dom.WindowEx; import org.rstudio.core.client.events.WindowStateChangeEvent;
43,853
return new WorkbenchTab[] { workspaceTab_, historyTab_, filesTab_, plotsTab_, packagesTab_, helpTab_, vcsTab_, buildTab_}; } public void activateTab(Tab tab) <BUG>{ tabToPanel_.get(tab).selectTab(tabToIndex_.get(tab));</BUG> } public ConsolePane getConsole() {
WindowEx.get().focus(); tabToPanel_.get(tab).selectTab(tabToIndex_.get(tab));
43,854
import com.google.gwt.event.shared.HasHandlers; public class NativeKeyDownEvent extends GwtEvent<NativeKeyDownHandler> { public static final GwtEvent.Type<NativeKeyDownHandler> TYPE = new GwtEvent.Type<NativeKeyDownHandler>(); <BUG>protected NativeKeyDownEvent(NativeEvent event) </BUG> { event_ = event; }
public NativeKeyDownEvent(NativeEvent event)
43,855
void showHelp(String helpURL); void back() ; void forward() ; void print() ; void popout() ; <BUG>void refresh() ; LinkMenu getHistory() ;</BUG> boolean navigated(); } public interface LinkMenu extends HasSelectionHandlers<String>
void focus(); LinkMenu getHistory() ;
43,856
public interface SplitfileBlock { abstract int getNumber(); abstract boolean hasData(); abstract Bucket getData(); abstract void storeTo(ObjectContainer container); <BUG>abstract boolean trySetData(Bucket data); </BUG> abstract void assertSetData(Bucket data); abstract Bucket clearData(); abstract Bucket replaceData(Bucket data);
abstract Bucket trySetData(Bucket data);
43,857
return data != null; } public synchronized Bucket getData() { return data; } <BUG>public synchronized boolean trySetData(Bucket data) { if(this.data == data) return true; if(this.data != null) return false; </BUG> this.data = data;
public synchronized Bucket trySetData(Bucket data) { if(this.data != null) return this.data;
43,858
if(this.data == data) return true; if(this.data != null) return false; </BUG> this.data = data; <BUG>return true; </BUG> } public synchronized void assertSetData(Bucket data) { assert(this.data == null || this.data == data); this.data = data;
return data != null; public synchronized Bucket getData() { return data; public synchronized Bucket trySetData(Bucket data) { if(this.data != null) return this.data; return null;
43,859
import freenet.node.RequestStarter; import freenet.support.Executor; import freenet.support.Logger; import freenet.support.OOMHandler; import freenet.support.OOMHook; <BUG>import freenet.support.Logger.LogLevel; import freenet.support.io.NativeThread;</BUG> public class FECQueue implements OOMHook { private transient LinkedList<FECJob>[] transientQueue; private transient LinkedList<FECJob>[] persistentQueueCache;
import freenet.support.api.Bucket; import freenet.support.io.NativeThread;
43,860
job.bucketFactory); else { job.getCodec().realEncode(job.dataBlocks, job.checkBlocks, job.blockLength, job.bucketFactory); if ((job.dataBlockStatus != null) || (job.checkBlockStatus != null)) { for (int i = 0; i < job.dataBlocks.length; i++) { <BUG>if(!job.dataBlockStatus[i].trySetData(job.dataBlocks[i])) { job.dataBlocks[i].free();</BUG> job.dataBlocks[i] = null; }
Bucket existingData = job.dataBlockStatus[i].trySetData(job.dataBlocks[i]); if(existingData != null && existingData != job.dataBlocks[i]) { job.dataBlocks[i].free();
43,861
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;
43,862
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;
43,863
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"),
43,864
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]
43,865
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) {
43,866
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;
43,867
chart.addYAxisLabels(AxisLabelsFactory.newAxisLabels(labels)); chart.addXAxisLabels(AxisLabelsFactory.newNumericRangeAxisLabels(0, max)); chart.setBarWidth(BarChart.AUTO_RESIZE); chart.setSize(600, 500); chart.setHorizontal(true); <BUG>chart.setTitle("Total Evaluations by User"); showChartImg(resp, chart.toURLString()); }</BUG> private List<Entry<String, Integer>> sortEntries(Collection<Entry<String, Integer>> entries) { List<Entry<String, Integer>> result = new ArrayList<Entry<String, Integer>>(entries);
chart.setDataEncoding(DataEncoding.TEXT); return chart; }
43,868
checkEvaluationsEqual(eval4, foundissueProto.getEvaluations(0)); checkEvaluationsEqual(eval5, foundissueProto.getEvaluations(1)); } public void testGetRecentEvaluationsNoneFound() throws Exception { DbIssue issue = createDbIssue("fad", persistenceHelper); <BUG>DbEvaluation eval1 = createEvaluation(issue, "someone", 100); DbEvaluation eval2 = createEvaluation(issue, "someone", 200); DbEvaluation eval3 = createEvaluation(issue, "someone", 300); issue.addEvaluations(eval1, eval2, eval3);</BUG> getPersistenceManager().makePersistent(issue);
[DELETED]
43,869
public int read() throws IOException { return inputStream.read(); } }); } <BUG>} protected DbEvaluation createEvaluation(DbIssue issue, String who, long when) {</BUG> DbUser user; Query query = getPersistenceManager().newQuery("select from " + persistenceHelper.getDbUserClass().getName() + " where openid == :myopenid");
@SuppressWarnings({"unchecked"}) protected DbEvaluation createEvaluation(DbIssue issue, String who, long when) {
43,870
eval.setComment("my comment"); eval.setDesignation("MUST_FIX"); eval.setIssue(issue); eval.setWhen(when); eval.setWho(user.createKeyObject()); <BUG>eval.setEmail(who); return eval;</BUG> } protected PersistenceManager getPersistenceManager() { return testHelper.getPersistenceManager();
issue.addEvaluation(eval); return eval;
43,871
import com.tremolosecurity.server.GlobalEntries; public class OpenUnisonServletFilter extends UnisonServletFilter { OpenUnisonConfigManager cfgMgr; static Logger logger = Logger.getLogger(OpenUnisonServletFilter.class.getName()); private SessionManager sessionManager; <BUG>public static final String version = "1.0.6-2016072601"; </BUG> @Override public ConfigManager loadConfiguration(FilterConfig filterCfg, String registryName) throws Exception {
public static final String version = "1.0.6-2016072602";
43,872
import android.widget.TextView; import android.widget.Toast; import com.woxthebox.draglistview.BoardView; import com.woxthebox.draglistview.DragItem; import java.util.ArrayList; <BUG>public class BoardFragment extends Fragment { private BoardView mBoardView;</BUG> private int mColumns; public static BoardFragment newInstance() { return new BoardFragment();
private static int sCreatedItems = 0; private BoardView mBoardView;
43,873
((TextView) header.findViewById(R.id.text)).setText("Column " + (mColumns + 1)); ((TextView) header.findViewById(R.id.item_count)).setText("" + addItems); header.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { <BUG>mItemArray.add(0, new Pair<>((long) mBoardView.getItemCount(), "Test " + mBoardView.getItemCount())); ((TextView) header.findViewById(R.id.item_count)).setText("" + mItemArray.size()); listAdapter.notifyDataSetChanged();</BUG> } });
long id = sCreatedItems++; Pair item = new Pair<>(id, "Test " + id); mBoardView.addItem(column, 0, item, true);
43,874
import android.support.v7.widget.RecyclerView; import android.view.MotionEvent; import android.view.View; public abstract class DragItemAdapter<VH extends DragItemAdapter.ViewHolder> extends RecyclerView.Adapter<VH> { interface DragStartedListener { <BUG>public void onDragStarted(View itemView, long itemId); }</BUG> private DragStartedListener mDragStartedListener; private long mDragItemId = -1; private boolean mDragOnLongPress;
}
43,875
import android.support.v7.widget.RecyclerView; import android.util.AttributeSet; import android.view.View; class DragItemRecyclerView extends RecyclerView implements AutoScroller.AutoScrollListener { public interface DragItemListener { <BUG>public void onDragStarted(int itemPosition, float x, float y); public void onDragging(int itemPosition, float x, float y); public void onDragEnded(int newItemPosition); }</BUG> private enum DragState {
}
43,876
if (x >= child.getLeft() - params.leftMargin && x <= child.getRight() + params.rightMargin && y >= child.getTop() - params.topMargin && y <= child.getBottom() + params.bottomMargin) { return child; } } <BUG>if (count > 0) { return getChildAt(count - 1); }</BUG> return null; }
[DELETED]
43,877
mHoldChangePosition = false; } }, getItemAnimator().getMoveDuration()); invalidate(); } <BUG>Object removeDragItemAndEnd() { mAutoScroller.stopAutoScroll();</BUG> Object item = mAdapter.removeItem(mDragItemPosition); mAdapter.setDragItemId(-1); mDragState = DragState.DRAG_ENDED;
if (mDragItemPosition == -1) { return null; mAutoScroller.stopAutoScroll();
43,878
if (id == mItemList.get(i).first) { return i; } } return -1; <BUG>} @Override public void changeItemPosition(int fromPos, int toPos) { Pair<Long, String> pair = mItemList.remove(fromPos); mItemList.add(toPos, pair); notifyDataSetChanged();</BUG> }
[DELETED]
43,879
timeWarp = new OwnLabel(getFormattedTimeWrap(), skin, "warp"); timeWarp.setName("time warp"); Container wrapWrapper = new Container(timeWarp); wrapWrapper.width(60f * GlobalConf.SCALE_FACTOR); wrapWrapper.align(Align.center); <BUG>VerticalGroup timeGroup = new VerticalGroup().align(Align.left).space(3 * GlobalConf.SCALE_FACTOR).padTop(3 * GlobalConf.SCALE_FACTOR); </BUG> HorizontalGroup dateGroup = new HorizontalGroup(); dateGroup.space(4 * GlobalConf.SCALE_FACTOR); dateGroup.addActor(date);
VerticalGroup timeGroup = new VerticalGroup().align(Align.left).columnAlign(Align.left).space(3 * GlobalConf.SCALE_FACTOR).padTop(3 * GlobalConf.SCALE_FACTOR);
43,880
focusListScrollPane.setFadeScrollBars(false); focusListScrollPane.setScrollingDisabled(true, false); focusListScrollPane.setHeight(tree ? 200 * GlobalConf.SCALE_FACTOR : 100 * GlobalConf.SCALE_FACTOR); focusListScrollPane.setWidth(160); } <BUG>VerticalGroup objectsGroup = new VerticalGroup().align(Align.left).space(3 * GlobalConf.SCALE_FACTOR); </BUG> objectsGroup.addActor(searchBox); if (focusListScrollPane != null) { objectsGroup.addActor(focusListScrollPane);
VerticalGroup objectsGroup = new VerticalGroup().align(Align.left).columnAlign(Align.left).space(3 * GlobalConf.SCALE_FACTOR);
43,881
headerGroup.addActor(expandIcon); headerGroup.addActor(detachIcon); addActor(headerGroup); expandIcon.setChecked(expanded); } <BUG>public void expand() { </BUG> if (!expandIcon.isChecked()) { expandIcon.setChecked(true); }
public void expandPane() {
43,882
</BUG> if (!expandIcon.isChecked()) { expandIcon.setChecked(true); } } <BUG>public void collapse() { </BUG> if (expandIcon.isChecked()) { expandIcon.setChecked(false); }
headerGroup.addActor(expandIcon); headerGroup.addActor(detachIcon); addActor(headerGroup); expandIcon.setChecked(expanded); public void expandPane() { public void collapsePane() {
43,883
}); playstop.addListener(new TextTooltip(txt("gui.tooltip.playstop"), skin)); TimeComponent timeComponent = new TimeComponent(skin, ui); timeComponent.initialize(); CollapsiblePane time = new CollapsiblePane(ui, txt("gui.time"), timeComponent.getActor(), skin, true, playstop); <BUG>time.align(Align.left); mainActors.add(time);</BUG> panes.put(timeComponent.getClass().getSimpleName(), time); if (Constants.desktop) { recCamera = new OwnImageButton(skin, "rec");
time.align(Align.left).columnAlign(Align.left); mainActors.add(time);
43,884
panes.put(visualEffectsComponent.getClass().getSimpleName(), visualEffects); ObjectsComponent objectsComponent = new ObjectsComponent(skin, ui); objectsComponent.setSceneGraph(sg); objectsComponent.initialize(); CollapsiblePane objects = new CollapsiblePane(ui, txt("gui.objects"), objectsComponent.getActor(), skin, false); <BUG>objects.align(Align.left); mainActors.add(objects);</BUG> panes.put(objectsComponent.getClass().getSimpleName(), objects); GaiaComponent gaiaComponent = new GaiaComponent(skin, ui); gaiaComponent.initialize();
objects.align(Align.left).columnAlign(Align.left); mainActors.add(objects);
43,885
if (Constants.desktop) { MusicComponent musicComponent = new MusicComponent(skin, ui); musicComponent.initialize(); Actor[] musicActors = MusicActorsManager.getMusicActors() != null ? MusicActorsManager.getMusicActors().getActors(skin) : null; CollapsiblePane music = new CollapsiblePane(ui, txt("gui.music"), musicComponent.getActor(), skin, true, musicActors); <BUG>music.align(Align.left); mainActors.add(music);</BUG> panes.put(musicComponent.getClass().getSimpleName(), music); } Button switchWebgl = new OwnTextButton(txt("gui.webgl.back"), skin, "link");
music.align(Align.left).columnAlign(Align.left); mainActors.add(music);
43,886
package org.dcm4chee.arc.audit; import org.dcm4che3.net.Device; <BUG>import org.dcm4che3.net.audit.AuditLogger; import org.dcm4che3.util.StringUtils;</BUG> import org.dcm4chee.arc.Scheduler; import org.dcm4chee.arc.conf.ArchiveDeviceExtension; import org.dcm4chee.arc.conf.Duration;
import org.dcm4che3.net.audit.AuditLoggerDeviceExtension; import org.dcm4che3.util.StringUtils;
43,887
log.info("Trying to schedule 24h reminder in the past ("+new Date(reminderTime)+"), no reminder will be sent for eval ("+eval.getTitle()+") ["+eval.getId()+"]"); reminderTime = 0; } else { log.info("Scheduling a reminder ("+new Date(reminderTime)+") for 24h before the end ("+new Date(dueTime)+") of the evaluation ("+eval.getTitle()+") ["+eval.getId()+"]"); } <BUG>} }</BUG> return reminderTime; } protected void sendAvailableEmail(Long evalId) {
} else if (reminderDays == -2) { reminderTime = System.currentTimeMillis() + (1000l * 60l * 5l); // reminders every 5 minutes log.warn("REMINDERS TESTING ONLY (-2): Scheduling a reminder in the near future ("+new Date(reminderTime)+") for testing: due date ("+new Date(dueTime)+") of the evaluation ("+eval.getTitle()+") ["+eval.getId()+"]");
43,888
} else { String[] stateList = statusStr.trim().split(" "); logger.info("GroupMembershipSync.execute() syncing " + statusStr); for(String state : stateList) { List<EvalEvaluation> evals = evaluationService.getEvaluationsByState(state); <BUG>int count = 0; if(evals != null) { count = evals.size(); }</BUG> if(logger.isInfoEnabled()) {
int count = evals.size();
43,889
import java.text.DateFormat; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.List; <BUG>import java.util.Locale; import org.sakaiproject.evaluation.constant.EvalConstants;</BUG> import org.sakaiproject.evaluation.logic.EvalAuthoringService; import org.sakaiproject.evaluation.logic.EvalCommonLogic; import org.sakaiproject.evaluation.logic.EvalEvaluationService;
import org.azeckoski.reflectutils.ArrayUtils; import org.sakaiproject.evaluation.constant.EvalConstants;
43,890
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;
43,891
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();
43,892
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: " +
43,893
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;
43,894
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]);
43,895
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;
43,896
CustomizationUtil.optimizeSchema(myActionsTree, mySelectedSchema); } final CustomizableActionsSchemas allSchemasComponent = CustomizableActionsSchemas.getInstance(); allSchemasComponent.clear(); for (int i = 0; i < myCustomizationSchemas.getSize(); i++){ <BUG>final CustomActionsSchema schema = (CustomActionsSchema)myCustomizationSchemas.getElementAt(i); allSchemasComponent.addCustomActionsSchema(schema);</BUG> } allSchemasComponent.setActiveSchema(mySelectedSchema); setCustomizationSchemaForCurrentProjects();
if (schema.isModified()){ schema.resetMainActionGroups(); allSchemasComponent.addCustomActionsSchema(schema);
43,897
import java.util.Iterator; public class CustomActionsSchema implements JDOMExternalizable{ public String myName; public String myDescription; private ArrayList<ActionUrl> myActions = new ArrayList<ActionUrl>(); <BUG>private boolean myModified = false; private static final String GROUP = "group";</BUG> public CustomActionsSchema() { } public CustomActionsSchema(String name, String description) {
private ActionGroup myMainMenuActionGroup; private ActionGroup myMainToolabarActionGroup; private ActionGroup myEditorPopupActionGroup; private static final String GROUP = "group";
43,898
return myName; } public String getDescription() { return myDescription; } <BUG>public ActionGroup getMainMenuActionGroup(){ return CustomizationUtil.correctActionGroup((ActionGroup)ActionManager.getInstance().getAction(IdeActions.GROUP_MAIN_MENU), this, ActionsTreeUtil.MAIN_MENU_TITLE); }</BUG> public void readExternal(Element element) throws InvalidDataException {
if (myMainMenuActionGroup == null){ myMainMenuActionGroup = CustomizationUtil.correctActionGroup((ActionGroup)ActionManager.getInstance().getAction(IdeActions.GROUP_MAIN_MENU), this, ActionsTreeUtil.MAIN_MENU_TITLE); return myMainMenuActionGroup;
43,899
group.addGroup(subGroup); } } } } <BUG>private static Group createGroup(ActionGroup actionGroup, boolean ignore) { </BUG> final String name = actionGroup.getTemplatePresentation().getText(); return createGroup(actionGroup, name != null ? name : ActionManager.getInstance().getId(actionGroup), null, null, ignore); }
public static Group createGroup(ActionGroup actionGroup, boolean ignore) {
43,900
if (actionUrl.getActionType() == ActionUrl.ADDED) { reordableChildren.add(actionUrl.getAbsolutePosition(), componentAction); } else if (actionUrl.getActionType() == ActionUrl.DELETED) { final AnAction anAction = reordableChildren.get(actionUrl.getAbsolutePosition()); <BUG>if (anAction.getTemplatePresentation().getText() == null && anAction instanceof ActionGroup) { final Group eqGroup = new Group(null, null, null); ActionsTreeUtil.fillGroupIgnorePopupFlag((ActionGroup)anAction, eqGroup, true);</BUG> if (!actionUrl.getComponent().equals(eqGroup)) { continue;
final Group eqGroup = ActionsTreeUtil.createGroup((ActionGroup)anAction, true);