id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
41,601 | private final I18n i18n;
private Filter filter;
ApplicationElement(TodoItemRepository repository, I18n i18n) {
this.repository = repository;
this.i18n = i18n;
<BUG>Elements.Builder builder = new Elements.Builder()
.section().css("todoapp")</BUG>
.header().css("header")
.h(1).innerText(i18n.constants().todos()).end()
.input(text)
| TodoBuilder builder = new TodoBuilder()
.section().css("todoapp")
|
41,602 | import static org.junit.Assert.assertNotNull;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
public class ElementsBuilderTest {
<BUG>private Elements.Builder builder;
</BUG>
@Before
public void setUp() {
Document document = mock(Document.class);
| private TestableBuilder builder;
|
41,603 | when(document.createParagraphElement()).thenAnswer(invocation -> new StandaloneElement("p"));
when(document.createSelectElement()).thenAnswer(invocation -> new StandaloneInputElement("select"));
when(document.createSpanElement()).thenAnswer(invocation -> new StandaloneElement("span"));
when(document.createTextAreaElement()).thenAnswer(invocation -> new StandaloneInputElement("textarea"));
when(document.createUListElement()).thenAnswer(invocation -> new StandaloneElement("ul"));
<BUG>builder = new Elements.Builder(document);
</BUG>
}
@Test
public void headings() {
| builder = new TestableBuilder(document);
|
41,604 | TodoItemRepository repository = new TodoItemRepository(BEAN_FACTORY);
ApplicationElement application = new ApplicationElement(repository, i18n);
Element body = Browser.getDocument().getBody();
body.appendChild(application.asElement());
body.appendChild(new FooterElement(i18n).asElement());
<BUG>Element e = new MyBuilder().ahref( "http://www.google.com" )
.img( "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" ).end()
.end().build();
body.appendChild( e );</BUG>
History.addValueChangeHandler(event -> application.filter(event.getValue()));
| [DELETED] |
41,605 | @Override
public String toString() {
return (container ? "container" : "simple") + " @ " + level + ": " + element.getTagName();
}
}
<BUG>public static class Builder extends CoreBuilder<Builder>
{
public Builder() {
super(Browser.getDocument());
}
protected Builder(Document document) {
super( document );</BUG>
}
| [DELETED] |
41,606 | return start(document.createElement(tag));
}
public B start(Element element) {
elements.push(new ElementInfo(element, true, level));
level++;
<BUG>return (B) this;
}</BUG>
public B end() {
assertCurrent();
if (level == 0) {
| return that();
|
41,607 | Element closingElement = elements.peek().element;
for (ElementInfo child : children) {
closingElement.appendChild(child.element);
}
level--;
<BUG>return (B) this;
}</BUG>
private String dumpElements() {
return elements.toString();
}
| return that();
|
41,608 | }
public B on(EventType type, EventListener listener) {
assertCurrent();
Element element = elements.peek().element;
type.register(element, listener);
<BUG>return (B) this;
}</BUG>
public B rememberAs(String id) {
assertCurrent();
references.put(id, elements.peek().element);
| public B attr(String name, String value) {
elements.peek().element.setAttribute(name, value);
return that();
|
41,609 | throw new IllegalArgumentException("no \"type\" parameter found from metaData: " + m_metaData);
}
switch (type)
{
case ServiceDependency:
<BUG>dp = createServiceDependency(b, dm, false, instanceBound);
break;
case TemporalServiceDependency:
dp = createServiceDependency(b, dm, true, instanceBound);
break;</BUG>
case ConfigurationDependency:
| dp = createServiceDependency(b, dm, instanceBound);
|
41,610 | dp = createResourceDependency(dm, instanceBound);
break;
}
return dp;
}
<BUG>private Dependency createServiceDependency(Bundle b, DependencyManager dm, boolean temporal,
boolean instanceBound)</BUG>
throws ClassNotFoundException
{
| private Dependency createServiceDependency(Bundle b, DependencyManager dm, boolean instanceBound)
|
41,611 | Class<?> serviceClass = b.loadClass(service);
String serviceFilter = m_metaData.getString(Params.filter, null);
String defaultServiceImpl = m_metaData.getString(Params.defaultImpl, null);
Class<?> defaultServiceImplClass =
(defaultServiceImpl != null) ? b.loadClass(defaultServiceImpl) : null;
<BUG>String added = m_metaData.getString(Params.added, null);
String changed = temporal ? null : m_metaData.getString(Params.changed, null);
String removed = temporal ? null : m_metaData.getString(Params.removed, null);
</BUG>
String autoConfigField = m_metaData.getString(Params.autoConfig, null);
| long timeout = m_metaData.getLong(Params.timeout, -1L);
String changed = timeout != -1 ? null : m_metaData.getString(Params.changed, null);
String removed = timeout != -1 ? null : m_metaData.getString(Params.removed, null);
|
41,612 | sd.setCallbacks(added, changed, removed);
if (autoConfigField != null)
{
sd.setAutoConfig(autoConfigField);
}
<BUG>if (temporal)
{
if (timeout != null)
{
((TemporalServiceDependency) sd).setTimeout(Long.parseLong(timeout));
}</BUG>
sd.setRequired(true);
| [DELETED] |
41,613 | }</BUG>
else if (annotation.getName().equals(A_CONFIGURATION_DEPENDENCY))
{
parseConfigurationDependencyAnnotation(annotation);
<BUG>}
else if (annotation.getName().equals(A_TEMPORAL_SERVICE_DEPENDENCY))
{
parseServiceDependencyAnnotation(annotation, true);</BUG>
}
else if (annotation.getName().equals(A_BUNDLE_DEPENDENCY))
| Patterns.parseMethod(m_method, m_descriptor, Patterns.COMPOSITION);
m_compositionMethod = m_method;
else if (annotation.getName().equals(A_SERVICE_DEP))
parseServiceDependencyAnnotation(annotation);
|
41,614 | if (m_compositionMethod != null)
{
writer.put(EntryParam.composition, m_compositionMethod);
}
}
<BUG>private void parseServiceDependencyAnnotation(Annotation annotation, boolean temporal)
{
EntryWriter writer = new EntryWriter(temporal ? EntryType.TemporalServiceDependency
: EntryType.ServiceDependency);</BUG>
m_writers.add(writer);
| private void parseServiceDependencyAnnotation(Annotation annotation)
EntryWriter writer = new EntryWriter(EntryType.ServiceDependency);
|
41,615 | public interface MetaData extends Cloneable
{
String getString(Params key);
String getString(Params key, String def);
int getInt(Params key);
<BUG>int getInt(Params key, int def);
String[] getStrings(Params key);</BUG>
String[] getStrings(Params key, String[] def);
Dictionary<String, Object> getDictionary(Params key, Dictionary<String, Object> def);
void setString(Params key, String value);
| long getLong(Params key);
long getLong(Params key, long def);
String[] getStrings(Params key);
|
41,616 | protected abstract String getSearchKeywords();
protected boolean isExpirableAllVersions() {
return false;
}
protected void searchAttachments() throws Exception {
<BUG>ServiceContext serviceContext = ServiceTestUtil.getServiceContext();
serviceContext.setScopeGroupId(group.getGroupId());
SearchContext searchContext = ServiceTestUtil.getSearchContext(</BUG>
group.getGroupId());
searchContext.setIncludeAttachments(true);
| ServiceContext serviceContext = ServiceTestUtil.getServiceContext(
SearchContext searchContext = ServiceTestUtil.getSearchContext(
|
41,617 | initialBaseModelsSearchCount + 2,
searchBaseModelsCount(
getBaseModelClass(), group.getGroupId(), searchContext));
}
protected void searchBaseModel() throws Exception {
<BUG>ServiceContext serviceContext = ServiceTestUtil.getServiceContext();
serviceContext.setScopeGroupId(group.getGroupId());
SearchContext searchContext = ServiceTestUtil.getSearchContext(</BUG>
group.getGroupId());
BaseModel<?> parentBaseModel = getParentBaseModel(
| ServiceContext serviceContext = ServiceTestUtil.getServiceContext(
SearchContext searchContext = ServiceTestUtil.getSearchContext(
|
41,618 | initialBaseModelsSearchCount + 1,
searchBaseModelsCount(
getBaseModelClass(), group.getGroupId(), searchContext));
}
protected void searchByKeywords() throws Exception {
<BUG>ServiceContext serviceContext = ServiceTestUtil.getServiceContext();
serviceContext.setScopeGroupId(group.getGroupId());
SearchContext searchContext = ServiceTestUtil.getSearchContext(</BUG>
group.getGroupId());
searchContext.setKeywords(getSearchKeywords());
| ServiceContext serviceContext = ServiceTestUtil.getServiceContext(
SearchContext searchContext = ServiceTestUtil.getSearchContext(
|
41,619 | 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.*;
|
41,620 | .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);
|
41,621 | </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) {
|
41,622 | 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)
|
41,623 | .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))
|
41,624 | .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))
|
41,625 | @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;
|
41,626 | 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;
}
|
41,627 | return configDirectory;
}
public boolean isLoaded() {
return loaded;
}
<BUG>public static Cause getCause() {
return instance().pluginCause;
}</BUG>
public EconomyService getEconomyService() {
return economyService;
| [DELETED] |
41,628 | 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.*;
|
41,629 | .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))
|
41,630 | 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) -> {
|
41,631 | 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);
|
41,632 | 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);
|
41,633 | 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() + "\"");
|
41,634 | 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() + "\"");
|
41,635 | 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
|
41,636 | .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")
|
41,637 | import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.logging.Level;
import java.util.stream.Collectors;
import javafx.application.Platform;
<BUG>import javafx.beans.property.SimpleObjectProperty;
import javafx.event.EventHandler;</BUG>
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.Cursor;
| import javafx.event.ActionEvent;
import javafx.event.EventHandler;
|
41,638 | import javafx.scene.layout.Region;
import static javafx.scene.layout.Region.USE_COMPUTED_SIZE;
import static javafx.scene.layout.Region.USE_PREF_SIZE;
import javafx.scene.layout.StackPane;
import javafx.scene.paint.Color;
<BUG>import org.apache.commons.lang3.StringUtils;
import org.joda.time.DateTime;</BUG>
import org.joda.time.Interval;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.coreutils.LoggedTask;
| import org.controlsfx.control.action.Action;
import org.controlsfx.control.action.ActionUtils;
import org.joda.time.DateTime;
|
41,639 | static final Image HASH_PIN = new Image("/org/sleuthkit/autopsy/images/hashset_hits.png");
static final Image PLUS = new Image("/org/sleuthkit/autopsy/timeline/images/plus-button.png"); // NON-NLS
static final Image MINUS = new Image("/org/sleuthkit/autopsy/timeline/images/minus-button.png"); // NON-NLS
static final Image TAG = new Image("/org/sleuthkit/autopsy/images/green-tag-icon-16.png"); // NON-NLS
static final CornerRadii CORNER_RADII = new CornerRadii(3);
<BUG>Map<EventType, DropShadow> dropShadowMap = new HashMap<>();
static void configureLODButton(Button b) {</BUG>
b.setMinSize(16, 16);
b.setMaxSize(16, 16);
b.setPrefSize(16, 16);
| static final Border selectionBorder = new Border(new BorderStroke(Color.BLACK, BorderStrokeStyle.SOLID, CORNER_RADII, new BorderWidths(2)));
private static final Logger LOGGER = Logger.getLogger(AbstractDetailViewNode.class
.getName());
static void configureLODButton(Button b) {
|
41,640 | }</BUG>
static void show(Node b, boolean show) {
b.setVisible(show);
b.setManaged(show);
}
<BUG>final ImageView hashIV = new ImageView(HASH_PIN);
final ImageView tagIV = new ImageView(TAG);
private final S parentNode;</BUG>
DescriptionVisibility descrVis;
final Pane subNodePane = new Pane();
| b.setMinSize(16, 16);
b.setMaxSize(16, 16);
b.setPrefSize(16, 16);
show(b, false);
Map<EventType, DropShadow> dropShadowMap = new HashMap<>();
final Color evtColor;
private final S parentNode;
|
41,641 | sin.close();
return i;
}
private List<InputSplit> filterByInterval(List<InputSplit> splits, Configuration conf)
throws IOException {
<BUG>List<Locatable> intervals = getIntervals(conf);
</BUG>
if (intervals == null) {
return splits;
}
| List<Interval> intervals = getIntervals(conf);
|
41,642 | assertNotEquals(lastRecordOfSplit0.getReadName(), firstRecordOfSplit1.getReadName());
}
@Test
public void testIntervals() throws Exception {
List<Interval> intervals = new ArrayList<Interval>();
<BUG>intervals.add(new Interval("chr21", 5000, 9999));
intervals.add(new Interval("chr21", 20000, 22999));</BUG>
completeSetup(false, intervals);
jobContext.getConfiguration().setInt(FileInputFormat.SPLIT_MAXSIZE, 40000);
BAMInputFormat inputFormat = new BAMInputFormat();
| intervals.add(new Interval("chr21", 5000, 9999)); // includes two unmapped fragments
intervals.add(new Interval("chr21", 20000, 22999));
|
41,643 | <BUG>package org.seqdoop.hadoop_bam;
import java.io.IOException;
import java.util.List;</BUG>
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
| import htsjdk.samtools.util.Interval;
import htsjdk.samtools.util.Locatable;
import htsjdk.samtools.util.OverlapDetector;
import java.util.Collection;
import java.util.List;
|
41,644 | import htsjdk.samtools.ValidationStringency;
import htsjdk.samtools.SAMFileHeader;
import htsjdk.samtools.SAMFileHeader.SortOrder;
import htsjdk.samtools.SAMRecord;
import htsjdk.samtools.util.BlockCompressedInputStream;
<BUG>import htsjdk.samtools.util.CoordMath;
import htsjdk.samtools.util.Locatable;</BUG>
import org.seqdoop.hadoop_bam.util.MurmurHash3;
import org.seqdoop.hadoop_bam.util.SAMHeaderReader;
import org.seqdoop.hadoop_bam.util.WrapSeekable;
| [DELETED] |
41,645 | private long fileStart, virtualStart, virtualEnd;
private boolean isInitialized = false;
private boolean keepReadPairsTogether;
private boolean readPair;
private boolean lastOfPair;
<BUG>private List<Locatable> intervals;
public static long getKey(final SAMRecord rec) {</BUG>
final int refIdx = rec.getReferenceIndex();
final int start = rec.getAlignmentStart();
| private List<Interval> intervals;
private OverlapDetector<Interval> overlapDetector;
public static long getKey(final SAMRecord rec) {
|
41,646 | lastOfPair = !first && second;
if (virtPos == virtualStart && keepReadPairsTogether && !firstOfPair) {
continue;
}
}
<BUG>if (!overlaps(r, intervals)) {
continue;</BUG>
}
key.set(getKey(r));
record.set(r);
| if (!overlaps(r)) {
|
41,647 | for (Locatable interval : intervals) {
if (r.getReadUnmappedFlag()) {</BUG>
if (interval.getStart() <= r.getStart() && interval.getEnd() >= r.getStart()) {
return true;
}
<BUG>} else if (r.getContig().equals(interval.getContig()) &&
CoordMath.overlaps(r.getStart(), r.getEnd(),
interval.getStart(), interval.getEnd())) {
return true;</BUG>
}
| [DELETED] |
41,648 | 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 {
|
41,649 | 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));
|
41,650 | } 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()
|
41,651 |
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));
|
41,652 | 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));
|
41,653 | 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 {
|
41,654 | 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);
|
41,655 | Debug.checkNull("mysql_connection", this.mysql_connection);
return this.mysql_connection;
}
@Override
public String toString () {
<BUG>return "MySQLConnection[" + this.dataSource.getUrl() + " : " + this.dataSource.getURL() + "]";
}</BUG>
@Override
protected void finalize () throws Throwable {
super.finalize();
| return "MySQLConnection[" + this.mySQL.getUrl() + "]";
|
41,656 | package com.jfixby.cmns.adopted.gdx.log;
import com.badlogic.gdx.Application;
import com.badlogic.gdx.Gdx;
import com.jfixby.cmns.api.collections.EditableCollection;
<BUG>import com.jfixby.cmns.api.collections.Map;
import com.jfixby.cmns.api.log.LoggerComponent;</BUG>
import com.jfixby.cmns.api.util.JUtils;
public class GdxLogger implements LoggerComponent {
public GdxLogger () {
| import com.jfixby.cmns.api.err.Err;
import com.jfixby.cmns.api.log.LoggerComponent;
|
41,657 | package com.jfixby.red.collections;
<BUG>import com.jfixby.cmns.api.java.IntValue;
import com.jfixby.cmns.api.math.FloatMath;</BUG>
public class RedHistogrammValue {
private RedHistogramm master;
public RedHistogrammValue (RedHistogramm redHistogramm) {
| import com.jfixby.cmns.api.java.Int;
import com.jfixby.cmns.api.math.FloatMath;
|
41,658 | public static final String PackageName = "app.version.package_name";
}
public static final String VERSION_FILE_NAME = "version.json";
private static final long serialVersionUID = 6662721574596241247L;
public String packageName;
<BUG>public int major = -1;
public int minor = -1;
public VERSION_STAGE stage = null;
public int build = -1;
</BUG>
public int versionCode = -1;
| public String major = "";
public String minor = "";
public String build = "";
|
41,659 | <BUG>package com.jfixby.cmns.db.mysql;
import com.jfixby.cmns.api.debug.Debug;</BUG>
import com.jfixby.cmns.api.log.L;
import com.jfixby.cmns.db.api.DBComponent;
import com.mysql.jdbc.jdbc2.optional.MysqlDataSource;
| import java.sql.Connection;
import java.sql.SQLException;
import com.jfixby.cmns.api.debug.Debug;
|
41,660 | }
public MySQLTable getTable (final String name) {
return new MySQLTable(this, name);
}
public MySQLConnection obtainConnection () {
<BUG>final MySQLConnection connection = new MySQLConnection(this.dataSource);
connection.open();</BUG>
return connection;
}
public void releaseConnection (final MySQLConnection connection) {
| public String getDBName () {
return this.dbName;
final MySQLConnection connection = new MySQLConnection(this);
connection.open();
|
41,661 | import org.jibble.pircbot.PircBot;
import org.jibble.pircbot.User;
import cpw.mods.fml.common.Loader;
import net.geforcemods.securitycraft.main.mod_SecurityCraft;
import net.geforcemods.securitycraft.util.PlayerUtils;
<BUG>import net.minecraft.client.Minecraft;
import net.minecraft.command.PlayerNotFoundException;</BUG>
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
| import net.minecraft.command.ICommandSender;
import net.minecraft.command.PlayerNotFoundException;
|
41,662 | import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
import net.minecraftforge.common.ForgeHooks;
import net.minecraftforge.common.ForgeVersion;
public class SCIRCBot extends PircBot{
<BUG>private static final char prefix = '!';
private HashMap<String, Integer> messageFrequency = new HashMap<String, Integer>();</BUG>
public SCIRCBot(String par1String){
this.setName(par1String);
}
| private static boolean message = false;
private HashMap<String, Integer> messageFrequency = new HashMap<String, Integer>();
|
41,663 | import net.geforcemods.securitycraft.api.IPasswordProtected;
import net.geforcemods.securitycraft.blocks.BlockLaserBlock;
import net.geforcemods.securitycraft.blocks.BlockOwnable;
import net.geforcemods.securitycraft.blocks.BlockSecurityCamera;
import net.geforcemods.securitycraft.entity.EntitySecurityCamera;
<BUG>import net.geforcemods.securitycraft.gui.GuiHandler;
import net.geforcemods.securitycraft.items.ItemModule;</BUG>
import net.geforcemods.securitycraft.main.mod_SecurityCraft;
import net.geforcemods.securitycraft.misc.CustomDamageSources;
import net.geforcemods.securitycraft.misc.SCSounds;
| import net.geforcemods.securitycraft.ircbot.SCIRCBot;
import net.geforcemods.securitycraft.items.ItemModule;
|
41,664 | import net.minecraftforge.client.event.FOVUpdateEvent;
import net.minecraftforge.client.event.MouseEvent;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.client.event.RenderHandEvent;
import net.minecraftforge.client.event.RenderPlayerEvent;
<BUG>import net.minecraftforge.common.ForgeHooks;
import net.minecraftforge.event.entity.living.LivingHurtEvent;</BUG>
import net.minecraftforge.event.entity.player.FillBucketEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action;
| import net.minecraftforge.event.ServerChatEvent;
import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
41,665 | if(event.world.getTileEntity(event.x, event.y, event.z) != null && event.world.getTileEntity(event.x, event.y, event.z) instanceof CustomizableSCTE){
CustomizableSCTE te = (CustomizableSCTE) event.world.getTileEntity(event.x, event.y, event.z);
for(int i = 0; i < te.getNumberOfCustomizableOptions(); i++){
if(te.itemStacks[i] != null){
ItemStack stack = te.itemStacks[i];
<BUG>EntityItem item = new EntityItem(event.world, (double) event.x, (double) event.y, (double) event.z, stack);
event.world.spawnEntityInWorld(item);</BUG>
te.onModuleRemoved(stack, ((ItemModule) stack.getItem()).getModule());
te.createLinkedBlockAction(EnumLinkedAction.MODULE_REMOVED, new Object[]{ stack, ((ItemModule) stack.getItem()).getModule() }, te);
}
| EntityItem item = new EntityItem(event.world, event.x, event.y, event.z, stack);
event.world.spawnEntityInWorld(item);
|
41,666 | import org.jibble.pircbot.NickAlreadyInUseException;
import org.jibble.pircbot.PircBot;
import org.jibble.pircbot.User;
import net.geforcemods.securitycraft.main.mod_SecurityCraft;
import net.geforcemods.securitycraft.util.PlayerUtils;
<BUG>import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;</BUG>
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
import net.minecraftforge.common.ForgeHooks;
| import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
|
41,667 | import net.minecraft.util.StatCollector;
import net.minecraftforge.common.ForgeHooks;
import net.minecraftforge.common.ForgeVersion;
import net.minecraftforge.fml.common.Loader;
public class SCIRCBot extends PircBot{
<BUG>private static final char prefix = '!';
private HashMap<String, Integer> messageFrequency = new HashMap<String, Integer>();</BUG>
public SCIRCBot(String par1String){
this.setName(par1String);
}
| private static boolean message = false;
private HashMap<String, Integer> messageFrequency = new HashMap<String, Integer>();
|
41,668 | e.printStackTrace();
}
if(sender.equals(this.getNick()))
sendMessage("#GeforceMods", "SecurityCraft version: " + mod_SecurityCraft.getVersion());
}
<BUG>private void sendMessageToPlayer(String par1String, EntityPlayer par2EntityPlayer){
</BUG>
par2EntityPlayer.addChatComponentMessage(ForgeHooks.newChatWithLinks(par1String));
}
private EntityPlayer getPlayer() {
| public void sendMessageToPlayer(String par1String, EntityPlayer par2EntityPlayer){
|
41,669 | import net.geforcemods.securitycraft.api.IPasswordProtected;
import net.geforcemods.securitycraft.blocks.BlockLaserBlock;
import net.geforcemods.securitycraft.blocks.BlockOwnable;
import net.geforcemods.securitycraft.blocks.BlockSecurityCamera;
import net.geforcemods.securitycraft.entity.EntitySecurityCamera;
<BUG>import net.geforcemods.securitycraft.gui.GuiHandler;
import net.geforcemods.securitycraft.items.ItemModule;</BUG>
import net.geforcemods.securitycraft.main.mod_SecurityCraft;
import net.geforcemods.securitycraft.misc.CustomDamageSources;
import net.geforcemods.securitycraft.misc.SCSounds;
| import net.geforcemods.securitycraft.ircbot.SCIRCBot;
import net.geforcemods.securitycraft.items.ItemModule;
|
41,670 | import net.minecraftforge.client.event.FOVUpdateEvent;
import net.minecraftforge.client.event.MouseEvent;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.client.event.RenderHandEvent;
import net.minecraftforge.client.event.RenderPlayerEvent;
<BUG>import net.minecraftforge.common.ForgeHooks;
import net.minecraftforge.event.entity.living.LivingHurtEvent;</BUG>
import net.minecraftforge.event.entity.player.FillBucketEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action;
| import net.minecraftforge.event.ServerChatEvent;
import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
41,671 | System.out.println(change);
}
}
};
@Override
<BUG>protected Callback<VChild, Void> copyChildCallback()
</BUG>
{
return (child) ->
{
| protected Callback<VChild, Void> copyIntoCallback()
|
41,672 | package jfxtras.labs.icalendarfx.components;
import jfxtras.labs.icalendarfx.properties.component.descriptive.Comment;
<BUG>import jfxtras.labs.icalendarfx.properties.component.misc.IANAProperty;
import jfxtras.labs.icalendarfx.properties.component.misc.UnknownProperty;</BUG>
import jfxtras.labs.icalendarfx.properties.component.recurrence.RecurrenceDates;
import jfxtras.labs.icalendarfx.properties.component.recurrence.RecurrenceRule;
| import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty;
|
41,673 | VEVENT ("VEVENT",
Arrays.asList(PropertyType.ATTACHMENT, PropertyType.ATTENDEE, PropertyType.CATEGORIES,
PropertyType.CLASSIFICATION, PropertyType.COMMENT, PropertyType.CONTACT, PropertyType.DATE_TIME_CREATED,
PropertyType.DATE_TIME_END, PropertyType.DATE_TIME_STAMP, PropertyType.DATE_TIME_START,
PropertyType.DESCRIPTION, PropertyType.DURATION, PropertyType.EXCEPTION_DATE_TIMES,
<BUG>PropertyType.GEOGRAPHIC_POSITION, PropertyType.IANA_PROPERTY, PropertyType.LAST_MODIFIED,
PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER, PropertyType.PRIORITY,</BUG>
PropertyType.RECURRENCE_DATE_TIMES, PropertyType.RECURRENCE_IDENTIFIER, PropertyType.RELATED_TO,
PropertyType.RECURRENCE_RULE, PropertyType.REQUEST_STATUS, PropertyType.RESOURCES, PropertyType.SEQUENCE,
PropertyType.STATUS, PropertyType.SUMMARY, PropertyType.TIME_TRANSPARENCY, PropertyType.UNIQUE_IDENTIFIER,
| PropertyType.GEOGRAPHIC_POSITION, PropertyType.LAST_MODIFIED,
PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER, PropertyType.PRIORITY,
|
41,674 | VTODO ("VTODO",
Arrays.asList(PropertyType.ATTACHMENT, PropertyType.ATTENDEE, PropertyType.CATEGORIES,
PropertyType.CLASSIFICATION, PropertyType.COMMENT, PropertyType.CONTACT, PropertyType.DATE_TIME_COMPLETED,
PropertyType.DATE_TIME_CREATED, PropertyType.DATE_TIME_DUE, PropertyType.DATE_TIME_STAMP,
PropertyType.DATE_TIME_START, PropertyType.DESCRIPTION, PropertyType.DURATION,
<BUG>PropertyType.EXCEPTION_DATE_TIMES, PropertyType.GEOGRAPHIC_POSITION, PropertyType.IANA_PROPERTY,
PropertyType.LAST_MODIFIED, PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER,</BUG>
PropertyType.PERCENT_COMPLETE, PropertyType.PRIORITY, PropertyType.RECURRENCE_DATE_TIMES,
PropertyType.RECURRENCE_IDENTIFIER, PropertyType.RELATED_TO, PropertyType.RECURRENCE_RULE,
PropertyType.REQUEST_STATUS, PropertyType.RESOURCES, PropertyType.SEQUENCE, PropertyType.STATUS,
| PropertyType.EXCEPTION_DATE_TIMES, PropertyType.GEOGRAPHIC_POSITION,
PropertyType.LAST_MODIFIED, PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER,
|
41,675 | throw new RuntimeException("not implemented");
}
},
DAYLIGHT_SAVING_TIME ("DAYLIGHT",
Arrays.asList(PropertyType.COMMENT, PropertyType.DATE_TIME_START,
<BUG>PropertyType.IANA_PROPERTY, PropertyType.NON_STANDARD, PropertyType.RECURRENCE_DATE_TIMES,
PropertyType.RECURRENCE_RULE, PropertyType.TIME_ZONE_NAME, PropertyType.TIME_ZONE_OFFSET_FROM,</BUG>
PropertyType.TIME_ZONE_OFFSET_TO),
DaylightSavingTime.class)
{
| PropertyType.RECURRENCE_RULE, PropertyType.TIME_ZONE_NAME, PropertyType.TIME_ZONE_OFFSET_FROM,
|
41,676 | throw new RuntimeException("not implemented");
}
},
VALARM ("VALARM",
Arrays.asList(PropertyType.ACTION, PropertyType.ATTACHMENT, PropertyType.ATTENDEE, PropertyType.DESCRIPTION,
<BUG>PropertyType.DURATION, PropertyType.IANA_PROPERTY, PropertyType.NON_STANDARD, PropertyType.REPEAT_COUNT,
PropertyType.SUMMARY, PropertyType.TRIGGER),</BUG>
VAlarm.class)
{
@Override
| DAYLIGHT_SAVING_TIME ("DAYLIGHT",
Arrays.asList(PropertyType.COMMENT, PropertyType.DATE_TIME_START,
PropertyType.NON_STANDARD, PropertyType.RECURRENCE_DATE_TIMES,
PropertyType.RECURRENCE_RULE, PropertyType.TIME_ZONE_NAME, PropertyType.TIME_ZONE_OFFSET_FROM,
PropertyType.TIME_ZONE_OFFSET_TO),
DaylightSavingTime.class)
|
41,677 | private ContentLineStrategy contentLineGenerator;
protected void setContentLineGenerator(ContentLineStrategy contentLineGenerator)
{
this.contentLineGenerator = contentLineGenerator;
}
<BUG>protected Callback<VChild, Void> copyChildCallback()
</BUG>
{
throw new RuntimeException("Can't copy children. copyChildCallback isn't overridden in subclass." + this.getClass());
};
| protected Callback<VChild, Void> copyIntoCallback()
|
41,678 | import jfxtras.labs.icalendarfx.properties.calendar.Version;
import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty;
public enum CalendarProperty
{
CALENDAR_SCALE ("CALSCALE",
<BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER),
CalendarScale.class)</BUG>
{
@Override
public VChild parse(VCalendar vCalendar, String contentLine)
| Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD),
CalendarScale.class)
|
41,679 | CalendarScale calendarScale = (CalendarScale) child;
destination.setCalendarScale(calendarScale);
}
},
METHOD ("METHOD",
<BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER),
Method.class)</BUG>
{
@Override
public VChild parse(VCalendar vCalendar, String contentLine)
| Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD),
Method.class)
|
41,680 | }
list.add(new NonStandardProperty((NonStandardProperty) child));
}
},
PRODUCT_IDENTIFIER ("PRODID",
<BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER),
ProductIdentifier.class)</BUG>
{
@Override
public VChild parse(VCalendar vCalendar, String contentLine)
| public void copyChild(VChild child, VCalendar destination)
CalendarScale calendarScale = (CalendarScale) child;
destination.setCalendarScale(calendarScale);
METHOD ("METHOD",
Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD),
Method.class)
|
41,681 | ProductIdentifier productIdentifier = (ProductIdentifier) child;
destination.setProductIdentifier(productIdentifier);
}
},
VERSION ("VERSION",
<BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER),
Version.class)</BUG>
{
@Override
public VChild parse(VCalendar vCalendar, String contentLine)
| Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD),
Version.class)
|
41,682 | package jfxtras.labs.icalendarfx.components;
import jfxtras.labs.icalendarfx.properties.component.descriptive.Comment;
<BUG>import jfxtras.labs.icalendarfx.properties.component.misc.IANAProperty;
import jfxtras.labs.icalendarfx.properties.component.misc.UnknownProperty;</BUG>
import jfxtras.labs.icalendarfx.properties.component.recurrence.RecurrenceDates;
import jfxtras.labs.icalendarfx.properties.component.recurrence.RecurrenceRule;
| import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty;
|
41,683 | } else {
updateMemo();
callback.updateMemo();
}
dismiss();
<BUG>}else{
</BUG>
Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show();
}
}
| [DELETED] |
41,684 | }
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_memo);
<BUG>ChinaPhoneHelper.setStatusBar(this,true);
</BUG>
topicId = getIntent().getLongExtra("topicId", -1);
if (topicId == -1) {
finish();
| ChinaPhoneHelper.setStatusBar(this, true);
|
41,685 | MemoEntry.COLUMN_REF_TOPIC__ID + " = ?"
, new String[]{String.valueOf(topicId)});
}
public Cursor selectMemo(long topicId) {
Cursor c = db.query(MemoEntry.TABLE_NAME, null, MemoEntry.COLUMN_REF_TOPIC__ID + " = ?", new String[]{String.valueOf(topicId)}, null, null,
<BUG>MemoEntry._ID + " DESC", null);
</BUG>
if (c != null) {
c.moveToFirst();
}
| MemoEntry.COLUMN_ORDER + " ASC", null);
|
41,686 | MemoEntry._ID + " = ?",
new String[]{String.valueOf(memoId)});
}
public long updateMemoContent(long memoId, String memoContent) {
ContentValues values = new ContentValues();
<BUG>values.put(MemoEntry.COLUMN_CONTENT, memoContent);
return db.update(</BUG>
MemoEntry.TABLE_NAME,
values,
MemoEntry._ID + " = ?",
| return db.update(
|
41,687 | import android.widget.RelativeLayout;
import android.widget.TextView;
import com.kiminonawa.mydiary.R;
import com.kiminonawa.mydiary.db.DBManager;
import com.kiminonawa.mydiary.shared.EditMode;
<BUG>import com.kiminonawa.mydiary.shared.ThemeManager;
import java.util.List;
public class MemoAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> implements EditMode {
</BUG>
private List<MemoEntity> memoList;
| import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter;
public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
|
41,688 | private DBManager dbManager;
private boolean isEditMode = false;
private EditMemoDialogFragment.MemoCallback callback;
private static final int TYPE_HEADER = 0;
private static final int TYPE_ITEM = 1;
<BUG>public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback) {
this.mActivity = activity;</BUG>
this.topicId = topicId;
this.memoList = memoList;
| public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) {
super(recyclerView);
this.mActivity = activity;
|
41,689 | this.memoList = memoList;
this.dbManager = dbManager;
this.callback = callback;
}
@Override
<BUG>public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
</BUG>
View view;
if (isEditMode) {
if (viewType == TYPE_HEADER) {
| public DragSortAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
41,690 | editMemoDialogFragment.show(mActivity.getSupportFragmentManager(), "editMemoDialogFragment");
}
});
}
}
<BUG>protected class MemoViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
private View rootView;
private TextView TV_memo_item_content;</BUG>
private ImageView IV_memo_item_delete;
| protected class MemoViewHolder extends DragSortAdapter.ViewHolder implements View.OnClickListener, View.OnLongClickListener {
private ImageView IV_memo_item_dot;
private TextView TV_memo_item_content;
|
41,691 | import java.io.InputStream;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import cx.ring.R;
import cx.ring.model.CallContact;
<BUG>import cx.ring.utils.CropImageUtils;
</BUG>
import cx.ring.utils.VCardUtils;
import ezvcard.VCard;
import ezvcard.property.Photo;
| import cx.ring.utils.BitmapUtils;
|
41,692 | import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.concurrent.ExecutorService;
import cx.ring.R;
import cx.ring.fragments.ContactListFragment;
<BUG>import cx.ring.model.CallContact;
import se.emilsjolander.stickylistheaders.StickyListHeadersAdapter;</BUG>
public class ContactsAdapter extends BaseAdapter implements StickyListHeadersAdapter, SectionIndexer {
private final ExecutorService infosFetcher;
private final Context mContext;
| import cx.ring.utils.BitmapUtils;
import se.emilsjolander.stickylistheaders.StickyListHeadersAdapter;
|
41,693 | fh.photo.post(new Runnable() {
@Override
public void run() {
final CallContact c = fh.contact.get();
if (c.getId() == cid) {
<BUG>c.setPhoto(bmp);
fh.photo.setImageBitmap(bmp);</BUG>
fh.photo.startAnimation(AnimationUtils.loadAnimation(fh.photo.getContext(), R.anim.contact_fadein));
}
}
| c.setPhoto(BitmapUtils.bitmapToBytes(bmp));
fh.photo.setImageBitmap(bmp);
|
41,694 | package cx.ring.adapters;
<BUG>import android.content.Context;
import android.view.LayoutInflater;</BUG>
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
| import android.provider.ContactsContract;
import android.view.LayoutInflater;
|
41,695 | } else {
convertView = LayoutInflater.from(mContext).inflate(R.layout.item_number_selected,
parent, false);
}
}
<BUG>CallContact.Phone number = mNumbers.get(position);
ImageView numberIcon = (ImageView) convertView.findViewById(R.id.number_icon);</BUG>
numberIcon.setImageResource(number.getNumber().isRingId() ?
R.drawable.ring_logo_24dp : R.drawable.ic_dialer_sip_black);
if (longView) {
| ImageView numberIcon = (ImageView) convertView.findViewById(R.id.number_icon);
|
41,696 | import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.concurrent.ExecutorService;
import cx.ring.R;
<BUG>import cx.ring.model.CallContact;
import cx.ring.model.Conversation;
import cx.ring.model.TextMessage;</BUG>
import cx.ring.views.ConversationViewHolder;
public class ConversationAdapter extends RecyclerView.Adapter<ConversationViewHolder> {
| import cx.ring.model.Phone;
import cx.ring.model.TextMessage;
|
41,697 | convElement == null || convElement.call == null) {
return;
}
int pictureResID;
String histTxt;
<BUG>String callNumber = CallContact.Phone.getShortenedNumber(convElement.call.number);
convViewHolder.mPhoto.setScaleY(1);</BUG>
if (convElement.call.isMissed()) {
if (convElement.call.isIncoming()) {
pictureResID = R.drawable.ic_call_missed_black;
| String callNumber = Phone.getShortenedNumber(convElement.call.number);
convViewHolder.mPhoto.setScaleY(1);
|
41,698 | import android.os.Bundle;
import android.os.IBinder;
import android.view.MenuItem;
import cx.ring.R;
import cx.ring.fragments.ContactListFragment;
<BUG>import cx.ring.model.CallContact;
import cx.ring.service.IDRingService;</BUG>
import cx.ring.service.LocalService;
import cx.ring.utils.ContentUriHandler;
public class NewConversationActivity extends Activity implements ContactListFragment.Callbacks {
| import cx.ring.model.Phone;
import cx.ring.service.IDRingService;
|
41,699 | </BUG>
break;
case Im.CONTENT_ITEM_TYPE:
if (new SipUri(number).isRingId())
<BUG>contact.addNumber(number, type, label, CallContact.NumberType.UNKNOWN);
</BUG>
break;
}
}
if (new_contact && !contact.getPhones().isEmpty()) {
| switch (c.getString(iMime)) {
case Phone.CONTENT_ITEM_TYPE:
contact.addPhoneNumber(number, type, label);
case SipAddress.CONTENT_ITEM_TYPE:
contact.addNumber(number, type, label, cx.ring.model.Phone.NumberType.SIP);
contact.addNumber(number, type, label, cx.ring.model.Phone.NumberType.UNKNOWN);
|
41,700 | import cx.ring.fragments.AccountsManagementFragment;
import cx.ring.fragments.ContactListFragment;
import cx.ring.fragments.SmartListFragment;
import cx.ring.model.Account;
import cx.ring.model.CallContact;
<BUG>import cx.ring.model.ConfigKey;
import cx.ring.navigation.RingNavigationFragment;</BUG>
import cx.ring.service.IDRingService;
import cx.ring.service.LocalService;
import cx.ring.settings.SettingsFragment;
| import cx.ring.model.Phone;
import cx.ring.navigation.RingNavigationFragment;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.