id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
20,701 | CHEVRON_RIGHT ("chevron-right", "png", false, false),
CHEVRON_LEFT ("chevron-left", "png", false, false),
SEARCH ("search", "png", false, false),
CONTROL_SLIDER_BALL ("control-sliderball", "png", false, false),
CONTROL_CHECK_ON ("control-check-on", "png", false, false),
<BUG>CONTROL_CHECK_OFF ("control-check-off", "png... | USER ("user", "user%d", "png", false, false),
ALPHA_MAP ("alpha", "png", false, false);
|
20,702 | GameImage(String filename, String type, boolean beatmapSkinnable, boolean preload) {
this.filename = filename;
this.type = getType(type);
this.beatmapSkinnable = beatmapSkinnable;
this.preload = preload;
<BUG>}
public boolean isBeatmapSkinnable() { return beatmapSkinnable; }</BUG>
public boolean isPreload() { return pr... | GameImage(String filename, String filenameFormat, String type, boolean beatmapSkinnable, boolean preload) {
this(filename, type, beatmapSkinnable, preload);
this.filenameFormat = filenameFormat;
public boolean isBeatmapSkinnable() { return beatmapSkinnable; }
|
20,703 | g.drawRect(0, yPos, rectWidth, rectHeight);
g.setLineWidth(oldLineWidth);
data.drawSymbolString(rankString, rectWidth, yPos, 1.0f, alpha * 0.2f, true);
white.a = blue.a = alpha * 0.75f;
if (playerName != null)
<BUG>Fonts.MEDIUMBOLD.drawString(xPaddingLeft, yPos + yPadding, playerName, white);
Fonts.DEFAULT.drawString(<... | Fonts.MEDIUM.drawString(xPaddingLeft, yPos + yPadding, playerName, white);
|
20,704 | int objectCount = hit300 + hit100 + hit50 + miss;
if (objectCount > 0)
percent = (hit300 * 300 + hit100 * 100 + hit50 * 50) / (objectCount * 300f) * 100f;
return percent;
}
<BUG>private float getScorePercent() {
</BUG>
return getScorePercent(
hitResultCount[HIT_300], hitResultCount[HIT_100],
hitResultCount[HIT_50], hit... | public float getScorePercent() {
|
20,705 | sd.score = slidingScore ? scoreDisplay : score;
sd.combo = comboMax;
sd.perfect = (comboMax == fullObjectCount);
sd.mods = GameMod.getModState();
sd.replayString = (replay == null) ? null : replay.getReplayFilename();
<BUG>sd.playerName = null; // TODO
return sd;</BUG>
}
public Replay getReplay(ReplayFrame[] frames, B... | sd.playerName = GameMod.AUTO.isActive() ?
UserList.AUTO_USER_NAME : UserList.get().getCurrentUser().getName();
return sd;
|
20,706 | return null;
replay = new Replay();
replay.mode = Beatmap.MODE_OSU;
replay.version = Updater.get().getBuildDate();
replay.beatmapHash = (beatmap == null) ? "" : beatmap.md5Hash;
<BUG>replay.playerName = ""; // TODO
replay.replayHash = Long.toString(System.currentTimeMillis()); // TODO</BUG>
replay.hit300 = (short) hi... | replay.playerName = UserList.get().getCurrentUser().getName();
replay.replayHash = Long.toString(System.currentTimeMillis()); // TODO
|
20,707 | import itdelatrisu.opsu.downloads.Download;
import itdelatrisu.opsu.downloads.DownloadNode;
import itdelatrisu.opsu.replay.PlaybackSpeed;
import itdelatrisu.opsu.ui.Colors;
import itdelatrisu.opsu.ui.Fonts;
<BUG>import itdelatrisu.opsu.ui.UI;
import java.awt.image.BufferedImage;</BUG>
import java.io.BufferedInputStream... | import itdelatrisu.opsu.user.UserButton;
import itdelatrisu.opsu.user.UserList;
import java.awt.image.BufferedImage;
|
20,708 | import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ParalyticGas;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
public class PotionOfParalyticGas extends Potion {
{
<BUG>name = "Potion of Paralytic Gas";
}</BUG>
@Override
pu... | initials = "PG";
}
|
20,709 | private static final String TXT_NO = "No, I changed my mind";
private static final String TXT_R_U_SURE_DRINK =
"Are you sure you want to drink it? In most cases you should throw such potions at your enemies.";
private static final String TXT_R_U_SURE_THROW =
"Are you sure you want to throw it? In most cases it makes se... | protected String initials;
private static final Class<?>[] potions = {
|
20,710 | public String info() {
return isKnown() ?
desc() :
"This flask contains a swirling " + color + " liquid. " +
"Who knows what it will do when drunk or thrown?";
<BUG>}
@Override</BUG>
public boolean isIdentified() {
return isKnown();
}
| public String initials(){
return isKnown() ? initials : null;
@Override
|
20,711 | public class PotionOfPurity extends Potion {
private static final String TXT_FRESHNESS = "You feel uncommon freshness in the air.";
private static final String TXT_NO_SMELL = "You've stopped sensing any smells!";
private static final int DISTANCE = 5;
{
<BUG>name = "Potion of Purification";
}</BUG>
@Override
public voi... | initials = "Pu";
}
|
20,712 | import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.GL20;
<BUG>import com.badlogic.gdx.utils.reflect.ClassReflection;
import com.watabou.glscripts.Script;</BUG>
import com.watabou.gltextures.T... | import com.badlogic.gdx.utils.reflect.ReflectionException;
import com.watabou.glscripts.Script;
|
20,713 | if (requestedReset) {
requestedReset = false;
try {
requestedScene = ClassReflection.newInstance(sceneClass);
switchScene();
<BUG>} catch (Exception e) {
</BUG>
e.printStackTrace();
}
}
| } catch (ReflectionException e) {
|
20,714 | import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Fire;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
public class PotionOfLiquidFlame extends Potion {
{
<BUG>name = "Potion of Liquid Flame";
}</BUG>
@Override
public void ... | initials = "LF";
}
|
20,715 | import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Ooze;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
<BUG>... | import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.LloydsBeacon;
|
20,716 | import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
public class PotionOfHealing extends Potion {
{
<BUG>name = "Potion of Healing";
bones = true;</BUG>
}
@Override
public void apply(... | initials = "He";
bones = true;
|
20,717 | import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.noosa.audio.Sample;
public class PotionOfLevitation extends Potion {
{
<BUG>name = "Potion of Levitation";
}</BUG>
@Override
public void shatter( int cell ) {
if (Dungeon.visi... | initials = "Le";
}
|
20,718 | package com.shatteredpixel.shatteredpixeldungeon.items.potions;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
public class PotionOfExperience extends Potion {
{
<BUG>name = "Potion of Experience";
bones = true;</BUG>
}
@Override
public void apply( Hero hero ) {
| initials = "Ex";
bones = true;
|
20,719 | import com.shatteredpixel.shatteredpixeldungeon.utils.BArray;
import com.watabou.utils.PathFinder;
public class PotionOfFrost extends Potion {
private static final int DISTANCE = 2;
{
<BUG>name = "Potion of Frost";
}</BUG>
@Override
public void shatter( int cell ) {
PathFinder.buildDistanceMap( cell, BArray.not( Level.... | initials = "Fr";
}
|
20,720 | import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MindVision;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
public class PotionOfMindVision extends Potion {
{
<BUG>name = "Potion of Mind Vision";
}</BUG>
@Override
public void app... | initials = "MV";
}
|
20,721 | return super.getCloser( target );
}
}
@Override
protected boolean canAttack( Char enemy ) {
<BUG>return Ballistica.cast( pos, enemy.pos, false, true ) == enemy.pos;
</BUG>
}
@Override
protected boolean doAttack( Char enemy ) {
| return Ballistica.cast( pos, enemy.pos, false, true ) == enemy.pos && !isCharmedBy( enemy );
|
20,722 | public int attackProc( Char enemy, int damage ) {
if (Random.Int( 6 ) == 0 && enemy == Dungeon.hero) {
Hero hero = Dungeon.hero;
KindOfWeapon weapon = hero.belongings.weapon;
if (weapon != null && !(weapon instanceof Knuckles) && !weapon.cursed) {
<BUG>hero.belongings.weapon = null;
Dungeon.level.drop( weapon, hero.pos... | Dungeon.quickslot.clearItem( weapon );
Dungeon.level.drop( weapon, hero.pos ).sprite.drop();
|
20,723 | import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
public class PotionOfInvisibility extends Potion {
private static final float ALPHA = 0.4f;
{
<BUG>name = "Potion of Invisibility";
}</BUG>
@Override
public void apply( Hero hero ) {
setKnown();... | initials = "In";
}
|
20,724 | package com.shatteredpixel.shatteredpixeldungeon.items.bags;
import java.util.ArrayList;
import java.util.Iterator;
<BUG>import com.shatteredpixel.shatteredpixeldungeon.Badges;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;</BUG>
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com... | import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
20,725 | defaultAction = AC_OPEN;
}
public Char owner;
public ArrayList<Item> items = new ArrayList<Item>();
public int size = 1;
<BUG>@Override
public ArrayList<String> actions( Hero hero ) {
ArrayList<String> actions = super.actions( hero );
return actions;
}</BUG>
@Override
| [DELETED] |
20,726 | return false;
}
}
@Override
public void onDetach( ) {
<BUG>this.owner = null;
}</BUG>
@Override
public boolean isUpgradable() {
return false;
| for (Item item : items)
Dungeon.quickslot.clearItem(item);
updateQuickslot();
|
20,727 | import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
public class PotionOfMight extends PotionOfStrength {
{
<BUG>name = "Potion of Might";
bones = true;</BUG>
}
@Override
public ... | initials = "Mi";
bones = true;
|
20,728 | } else {
return false;
}
}
@Override
<BUG>public void onDetach( ) {
for (Item item : items) {</BUG>
((Wand)item).stopCharging();
}
}
| [DELETED] |
20,729 | 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 ... | import java.text.DateFormat;
import java.util.Date;
import java.util.List;
|
20,730 | 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;
|
20,731 | 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"),
MIS... | APPLIES_TO_VERSION("applies-to-version"),
BUNDLES("bundles"),
|
20,732 | 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_VE... | [DELETED] |
20,733 | 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, bytesToHex... | if (item.isDirectory()) {
writer.writeAttribute(Attribute.DIRECTORY.name, "true");
if(type != ModificationType.REMOVE) {
|
20,734 | 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>
impor... | import org.jboss.logging.annotations.Cause;
import java.io.IOException;
|
20,735 | public static final String DEFAULT_ARGUMENT_SHORTNAME = "ob";
public static final String COMPRESSION_FULLNAME = "bam_compression";
public static final String COMPRESSION_SHORTNAME = "compress";
public static final String SIMPLIFY_BAM_FULLNAME = "simplifyBAM";
public static final String SIMPLIFY_BAM_SHORTNAME = SIMPLIFY... | public static final String ENABLE_MD5_FULLNAME = "generate_md5";
private final GenomeAnalysisEngine engine;
|
20,736 | private final GenomeAnalysisEngine engine;
private SAMFileHeader headerOverride = null;
private final File samFile;
private final OutputStream samOutputStream;
private Integer compressionLevel = null;
<BUG>private boolean indexOnTheFly = false;
private boolean presorted = true;</BUG>
private Integer maxRecordsInRam = n... | private boolean generateMD5 = false;
private boolean presorted = true;
|
20,737 | 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())... | chart.setDataEncoding(DataEncoding.TEXT);
return chart;
}
|
20,738 | 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... | [DELETED] |
20,739 | 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) {
|
20,740 | 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;
|
20,741 | import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import org.jboss.netty.buffer.ChannelBuffer;
<BUG>import org.jboss.netty.channel.ChannelHandlerContext;
import org.neo4j.helpers.Pair;</BUG>
import org.neo4j.kernel.IdType;
import org.neo4j.kernel.impl.ha.IdAllocation;
... | import org.jboss.netty.buffer.ChannelBuffers;
import org.neo4j.helpers.Pair;
|
20,742 | this.caller = caller;
this.serializer = serializer;
}
}
@SuppressWarnings( "unchecked" )
<BUG>protected static void handleRequest( Master realMaster,
@SuppressWarnings( "unused" ) ChannelHandlerContext ctx,</BUG>
ChannelBuffer buffer ) throws IOException
{
| protected static ChannelBuffer handleRequest( Master realMaster,
|
20,743 | this.pos = 0;
}
public int read( ByteBuffer dst ) throws IOException
{
if ( pos >= data.length ) return -1;
<BUG>int size = Math.min( data.length - pos, dst.capacity() );
</BUG>
dst.put( data, pos, size );
pos += size;
return size;
| int size = Math.min( data.length - pos, dst.limit() - dst.position() );
|
20,744 | import org.neo4j.graphdb.RelationshipType;
import org.neo4j.graphdb.Transaction;
import org.neo4j.helpers.collection.IteratorUtil;
import org.neo4j.kernel.DeadlockDetectedException;
import org.neo4j.kernel.EmbeddedGraphDatabase;
<BUG>import org.neo4j.kernel.HighlyAvailableGraphDatabase;
import org.neo4j.kernel.ha.Maste... | import org.neo4j.kernel.ha.FakeBroker;
import org.neo4j.kernel.ha.MasterImpl;
|
20,745 | import org.neo4j.graphdb.Relationship;
import org.neo4j.graphdb.RelationshipType;
import org.neo4j.graphdb.Transaction;
import org.neo4j.graphdb.event.KernelEventHandler;
import org.neo4j.graphdb.event.TransactionEventHandler;
<BUG>import org.neo4j.helpers.Pair;
import org.neo4j.kernel.ha.SlaveRelationshipTypeCreator;<... | import org.neo4j.kernel.ha.AbstractBroker;
import org.neo4j.kernel.ha.SlaveRelationshipTypeCreator;
|
20,746 | new SlaveTxRollbackHook( broker, this ) );
}
}
private boolean brokerSaysIAmMaster()
{
<BUG>return false;
}</BUG>
public Transaction beginTx()
{
return localGraph.beginTx();
| return ((AbstractBroker) broker).noobYouAreTheMaster();
|
20,747 | ClientBootstrap bootstrap = new ClientBootstrap( new NioClientSocketChannelFactory(
executor, executor ) );
BlockingReadHandler<ChannelBuffer> blockingReadHandler = new BlockingReadHandler<ChannelBuffer>();
bootstrap.setPipelineFactory( new ClientPipelineFactory( blockingReadHandler ) );
ChannelFuture channelFuture = b... | Client client = new Client( blockingReadHandler, channelFuture );
return client;
}
|
20,748 | import org.estatio.dom.charge.ChargeRepository;
import org.estatio.dom.index.IndexRepository;
import org.estatio.dom.invoice.PaymentMethod;
import org.estatio.dom.lease.Fraction;
import org.estatio.dom.lease.InvoicingFrequency;
<BUG>import org.estatio.dom.lease.Lease;
import org.estatio.dom.lease.LeaseItem;</BUG>
impor... | import org.estatio.dom.lease.LeaseConstants;
import org.estatio.dom.lease.LeaseItem;
|
20,749 | }
});
}
@Before
public void setUp() {
<BUG>agreement = agreementRepository.findAgreementByTypeAndReference(agreementTypeRepository.find(LeaseConstants.AT_LEASE), LeaseForKalPoison001Nl.REF);
</BUG>
assertNotNull(agreement);
party = partyRepository.findPartyByReference(PersonForJohnDoeNl.REF);
assertThat(party.getRefere... | agreement = agreementRepository.findAgreementByTypeAndReference(agreementTypeRepository.find(LeaseConstants.AgreementType.LEASE.getTitle()), LeaseForKalPoison001Nl.REF);
|
20,750 | public static class NewRole extends Agreement_IntegTest {
@Test
public void happyCase() throws Exception {
AgreementRole existingRole = agreementRoleRepository.findByParty(party).get(0);
existingRole.setEndDate(new LocalDate(2013, 12, 31));
<BUG>wrap(agreement).newRole(agreementRoleTypeRepository.findByTitle(LeaseConst... | wrap(agreement).newRole(agreementRoleTypeRepository.findByTitle(LeaseConstants.AgreementRoleType.MANAGER.getTitle()), party, new LocalDate(2014, 1, 1), new LocalDate(2014, 12, 31));
wrap(agreement).newRole(agreementRoleTypeRepository.findByTitle(LeaseConstants.AgreementRoleType.MANAGER.getTitle()), party, new LocalDate... |
20,751 | Party landlord = findPartyByReferenceOrNameElseNull(landlordReference);
Party tenant = findPartyByReferenceOrNameElseNull(tenantReference);
Lease lease = leaseRepository.newLease(unit.getApplicationTenancy(), reference, name, null, startDate, null, endDate, landlord, tenant);
fixtureResults.addResult(this, lease.getRef... | final AgreementRole role = lease.createRole(agreementRoleTypeRepository.findByTitle(LeaseConstants.AgreementRoleType.MANAGER.getTitle()), manager, null, null);
|
20,752 | landlord,
tenant
);
fixtureResults.addResult(this, lease.getReference(), lease);
if (createManagerRole) {
<BUG>final AgreementRole role = lease.createRole(agreementRoleTypeRepository.findByTitle(LeaseConstants.ART_MANAGER), manager, null, null);
</BUG>
fixtureResults.addResult(this, role);
}
if (createLeaseUnitAndTags)... | final AgreementRole role = lease.createRole(agreementRoleTypeRepository.findByTitle(LeaseConstants.AgreementRoleType.MANAGER.getTitle()), manager, null, null);
|
20,753 | private PartyRepository partyRepository;
@Inject
private ClockService clockService;
@Before
public void setUp() throws Exception {
<BUG>artTenant = agreementRoleTypeRepository.findByTitle(LeaseConstants.ART_TENANT);
</BUG>
leaseOxfTopModel = leaseRepository.findLeaseByReference(LeaseForOxfTopModel001Gb.REF);
partyTopMo... | artTenant = agreementRoleTypeRepository.findByTitle(LeaseConstants.AgreementRoleType.TENANT.getTitle());
|
20,754 | super(friendlyName, localName);
}
protected void createBankMandate(String ownerRef, String bankAccountRef, Integer sequence, SequenceType sequenceType, Scheme scheme, ExecutionContext executionContext) {
final Party owner = partyRepository.findPartyByReference(ownerRef);
final BankAccount bankAccount = (BankAccount) fi... | final AgreementRoleType agreementRoleType = agreementRoleTypeRepository.findByTitle(LeaseConstants.AgreementRoleType.TENANT.getTitle());
|
20,755 | public static final String GB_PERCENTAGE = CountriesRefData.GBR + CHARGE_SUFFIX_PERCENTAGE;
public static final String GB_DEPOSIT = CountriesRefData.GBR + CHARGE_SUFFIX_DEPOSIT;
public static final String GB_DISCOUNT = CountriesRefData.GBR + CHARGE_SUFFIX_DISCOUNT;
public static final String GB_ENTRY_FEE = CountriesRef... | public static final String GB_MARKETING = CountriesRefData.GBR + CHARGE_SUFFIX_MARKETING;
@Override
|
20,756 | import org.estatio.dom.budgeting.budgetcalculation.Status;
import org.estatio.dom.charge.Charge;
import org.estatio.dom.charge.ChargeRepository;
import org.estatio.dom.invoice.PaymentMethod;
import org.estatio.dom.lease.InvoicingFrequency;
<BUG>import org.estatio.dom.lease.Lease;
import org.estatio.dom.lease.LeaseItem;... | import org.estatio.dom.lease.LeaseConstants;
import org.estatio.dom.lease.LeaseItem;
|
20,757 | propertyOxf = propertyRepository.findPropertyByReference(PropertyForOxfGb.REF);
budget2015 = budgetRepository.findByPropertyAndStartDate(propertyOxf, BudgetsForOxf.BUDGET_2015_START_DATE);
charge = chargeRepository.findByReference(ChargeRefData.GB_SERVICE_CHARGE);
leaseTopModel = leaseRepository.findLeaseByReference(Le... | leaseItem = leaseTopModel.newItem(LeaseItemType.SERVICE_CHARGE_BUDGETED, LeaseConstants.AgreementRoleType.LANDLORD, charge, InvoicingFrequency.MONTHLY_IN_ADVANCE, PaymentMethod.DIRECT_DEBIT, leaseTopModel.getStartDate());
|
20,758 | import java.beans.PropertyDescriptor;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
<BUG>import org.grails.datastore.mapping.model.PersistentProperty;
import org.springframework.beans.BeanWrapper;</BUG>
import org.springframework.beans.PropertyAccessorFactory;... | import org.grails.datastore.mapping.reflect.ClassPropertyFetcher;
import org.springframework.beans.BeanWrapper;
|
20,759 | import org.grails.datastore.mapping.model.IdentityMapping;
import org.grails.datastore.mapping.model.PersistentEntity;
import org.springframework.util.ReflectionUtils;
@SuppressWarnings({"rawtypes", "unchecked"})
public class BeanEntityAccess implements EntityAccess {
<BUG>private static final Set EXCLUDED_PROPERTIES =... | private static final Set EXCLUDED_PROPERTIES = ClassPropertyFetcher.EXCLUDED_PROPERTIES;
protected Object entity;
|
20,760 | import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
<BUG>import javax.persistence.Entity;
import org.grails.datastore.mapping.engine.internal.MappingUtils;</BUG>
import org.grails.datastore.mapping.model.ClassMapping;
import org.grails.datastore.mapping... | import groovy.lang.MetaBeanProperty;
import groovy.lang.MetaProperty;
import org.grails.datastore.mapping.engine.internal.MappingUtils;
|
20,761 | public class GormMappingConfigurationStrategy implements MappingConfigurationStrategy {
private static final String IDENTITY_PROPERTY = IDENTITY;
private static final String VERSION_PROPERTY = VERSION;
public static final String MAPPED_BY_NONE = "none";
protected MappingFactory propertyFactory;
<BUG>private static fina... | private static final Set EXCLUDED_PROPERTIES = ClassPropertyFetcher.EXCLUDED_PROPERTIES;
private boolean canExpandMappingContext = true;
|
20,762 | protected boolean isCollectionType(Class type) {
return Collection.class.isAssignableFrom(type) || Map.class.isAssignableFrom(type);
}
protected boolean isExcludedProperty(String propertyName, ClassMapping classMapping, Collection transients, boolean includeIdentifiers) {
IdentityMapping id = classMapping != null ? cla... | String[] identifierName = id != null && !includeIdentifiers ? id.getIdentifierName() : null;
|
20,763 | package org.grails.datastore.mapping.model;
import java.beans.PropertyDescriptor;
<BUG>import java.io.Serializable;
import java.math.BigDecimal;</BUG>
import java.math.BigInteger;
import java.net.URI;
import java.net.URL;
| import java.beans.IntrospectionException;
import java.lang.reflect.Modifier;
import java.math.BigDecimal;
|
20,764 | import java.sql.Clob;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
<BUG>import java.util.concurrent.ConcurrentLinkedQueue;
import org.grails.datastore.mapping.config.Entity;</BUG>
import org.grails.datastore.mapping.config.Property;
import org.grail... | import groovy.lang.MetaBeanProperty;
import groovy.lang.MetaMethod;
import groovy.lang.MetaProperty;
import org.codehaus.groovy.reflection.CachedMethod;
import org.grails.datastore.mapping.config.Entity;
|
20,765 | import java.util.*;
import org.grails.datastore.mapping.config.Entity;
import org.grails.datastore.mapping.core.EntityCreationException;
import org.grails.datastore.mapping.core.exceptions.ConfigurationException;
import org.grails.datastore.mapping.model.config.GormProperties;
<BUG>import org.grails.datastore.mapping.m... | import org.grails.datastore.mapping.model.types.Identity;
import org.grails.datastore.mapping.model.types.OneToMany;
|
20,766 | this.javaClass = javaClass;
this.context = context;
this.isAbstract = Modifier.isAbstract(javaClass.getModifiers());
this.isMultiTenant = org.grails.datastore.mapping.reflect.ClassUtils.isMultiTenant(javaClass);
decapitalizedName = Introspector.decapitalize(javaClass.getSimpleName());
<BUG>String classSpecified = Class... | String classSpecified = ClassPropertyFetcher.getStaticPropertyValue(javaClass, GormProperties.MAPPING_STRATEGY, String.class);
|
20,767 | customTokens.put("%%mlFinalForestsPerHost%%", hubConfig.finalForestsPerHost.toString());
customTokens.put("%%mlTraceAppserverName%%", hubConfig.traceHttpName);
customTokens.put("%%mlTracePort%%", hubConfig.tracePort.toString());
customTokens.put("%%mlTraceDbName%%", hubConfig.traceDbName);
customTokens.put("%%mlTraceFo... | customTokens.put("%%mlTriggersDbName%%", hubConfig.triggersDbName);
customTokens.put("%%mlSchemasDbName%%", hubConfig.schemasDbName);
}
|
20,768 | public class UserControllerTest
{
private static final Logger LOGGER = Logger.getLogger( UserControllerTest.class.getName() );
Properties properties = new Properties();
InputStream input = null;
<BUG>private String neo4jServerPort = System.getProperty( "neo4j.server.port" );
private String neo4jRemoteShellPort = System... | private String dbmsConnectorHttpPort = System.getProperty( "dbms.connector.http.port" );
private String dbmsConnectorBoltPort = System.getProperty( "dbms.connector.bolt.port" );
private String dbmsShellPort = System.getProperty( "dbms.shell.port" );
private String dbmsDirectoriesData = System.getProperty( "dbms.directo... |
20,769 | @Bean
public Configuration getConfiguration()
{
if ( StringUtils.isEmpty( url ) )
{
<BUG>url = "http://localhost:" + port;
</BUG>
}
Configuration config = new Configuration();
config.driverConfiguration().setDriverClassName( HttpDriver.class.getName() )
| url = "http://localhost:" + dbmsConnectorHttpPort;
|
20,770 | Bundle savedInstanceState) {
final View rootView = inflater.inflate(R.layout.tab_qibla, container, false);
final QiblaCompassView qiblaCompassView = (QiblaCompassView)rootView.findViewById(R.id.qibla_compass);
qiblaCompassView.setConstants(((TextView)rootView.findViewById(R.id.bearing_north)), getText(R.string.bearing_... | sOrientationListener = new android.hardware.SensorListener() {
|
20,771 | import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.ScaleGestureDetector;
import de.jeisfeld.augendiagnoselib.Application;
<BUG>import de.jeisfeld.augendiagnoselib.R;
import de.jeisfeld.augendiagnoselib.util.PreferenceUtil;</BUG>
import de.jeisfeld.augendiagno... | import de.jeisfeld.augendiagnoselib.fragments.DisplayImageFragment.OverlayStatus;
import de.jeisfeld.augendiagnoselib.util.PreferenceUtil;
|
20,772 | if (mMetadata != null && mMetadata.hasOverlayPosition()) {
mHasOverlayPosition = true;
mOverlayX = mMetadata.getXCenter();
mOverlayY = mMetadata.getYCenter();
mOverlayScaleFactor = mMetadata.getOverlayScaleFactor()
<BUG>boolean shouldBeLocked = !mMetadata.hasFlag(JpegMetadata.FLAG_OVERLAY_SET_BY_CAMERA_ACTIVITY);
lockO... | boolean shouldBeLocked = !mMetadata.hasFlag(JpegMetadata.FLAG_OVERLAY_SET_BY_CAMERA_ACTIVITY)
&& !mMetadata.hasFlag(JpegMetadata.FLAG_OVERLAY_POSITION_DETERMINED_AUTOMATICALLY);
lockOverlay(shouldBeLocked, false);
|
20,773 | mCanvas = new Canvas(mCanvasBitmap);
doInitialScaling();
updatePinchMode();
refresh(HIGH);
showFullResolutionSnapshot(true);
<BUG>if (mMetadata != null && mMetadata.hasOverlayPosition() && mGuiElementUpdater != null
&& !mMetadata.hasFlag(JpegMetadata.FLAG_OVERLAY_SET_BY_CAMERA_ACTIVITY)) {
mGuiElementUpdater.setLockCh... | [DELETED] |
20,774 | import de.jeisfeld.augendiagnoselib.components.colorpicker.ColorPickerSwatch.OnColorSelectedListener;
import de.jeisfeld.augendiagnoselib.util.DialogUtil;
import de.jeisfeld.augendiagnoselib.util.PreferenceUtil;
import de.jeisfeld.augendiagnoselib.util.SystemUtil;
import de.jeisfeld.augendiagnoselib.util.imagefile.EyeP... | import de.jeisfeld.augendiagnoselib.util.imagefile.PupilAndIrisDetector;
public class DisplayImageFragment extends Fragment implements GuiElementUpdater, OnColorSelectedListener {
|
20,775 | public final void initializeImages() {
if (mType == TYPE_FILERESOURCE) {
mImageView.setImage(mFileResource, getActivity(), mImageIndex);
}
else {
<BUG>mImageView.setImage(mFile, getActivity(), mImageIndex);
}</BUG>
if (mImageView.getEyePhoto().getRightLeft() == null && mRightLeft != null) {
mImageView.getEyePhoto().set... | PupilAndIrisDetector.determineAndStoreIrisPosition(mFile);
|
20,776 | import de.jeisfeld.augendiagnoselib.util.imagefile.EyePhoto.RightLeft;
import de.jeisfeld.augendiagnoselib.util.imagefile.FileUtil;
import de.jeisfeld.augendiagnoselib.util.imagefile.ImageUtil;
import de.jeisfeld.augendiagnoselib.util.imagefile.JpegMetadata;
import de.jeisfeld.augendiagnoselib.util.imagefile.JpegSynchr... | import de.jeisfeld.augendiagnoselib.util.imagefile.PupilAndIrisDetector;
import static de.jeisfeld.augendiagnoselib.activities.CameraActivity.Action.CANCEL_AND_VIEW_IMAGES;
|
20,777 | PupilCenterInfo pupilCenterInfo = new PupilCenterInfo(image, x, y, PupilCenterInfo.Phase.INITIAL);
pupilCenterInfo.collectCircleInfo(Integer.MAX_VALUE);
pupilCenterInfoList.add(pupilCenterInfo);
}
}
<BUG>double maxLeapValue = Double.MIN_VALUE;
</BUG>
PupilCenterInfo bestPupilCenter = null;
for (PupilCenterInfo pupilCen... | float maxLeapValue = Float.MIN_VALUE;
|
20,778 | maxLeapValue = pupilCenterInfo.mLeapValue;
bestPupilCenter = pupilCenterInfo;
}
}
if (bestPupilCenter != null) {
<BUG>mPupilXCenter = bestPupilCenter.mXCenter / image.getWidth();
mPupilYCenter = bestPupilCenter.mYCenter / image.getHeight();
mPupilRadius = bestPupilCenter.mPupilRadius / Math.min(image.getWidth(), imag... | mPupilXCenter = bestPupilCenter.mXCenter / (float) image.getWidth();
mPupilYCenter = bestPupilCenter.mYCenter / (float) image.getHeight();
mPupilRadius = bestPupilCenter.mPupilRadius / (float) Math.max(image.getWidth(), image.getHeight());
|
20,779 |
mPupilRadius = bestPupilCenter.mPupilRadius / Math.min(image.getWidth(), image.getHeight());
</BUG>
mIrisXCenter = mPupilXCenter;
mIrisYCenter = mPupilYCenter;
<BUG>mIrisRadius = bestPupilCenter.mIrisRadius / Math.min(image.getWidth(), image.getHeight());
</BUG>
}
}
private void refinePupilPosition(final int resolutio... | maxLeapValue = pupilCenterInfo.mLeapValue;
bestPupilCenter = pupilCenterInfo;
if (bestPupilCenter != null) {
mPupilXCenter = bestPupilCenter.mXCenter / (float) image.getWidth();
mPupilYCenter = bestPupilCenter.mYCenter / (float) image.getHeight();
mPupilRadius = bestPupilCenter.mPupilRadius / (float) Math.max(image.get... |
20,780 | private void refinePupilPosition(final int resolution) {
Image image = ImageUtil.resizeImage(mImage, resolution, false);
List<PupilCenterInfo> pupilCenterInfoList = new ArrayList<>();
int pupilXCenter = (int) Math.round(mPupilXCenter * image.getWidth());
int pupilYCenter = (int) Math.round(mPupilYCenter * image.getHeig... | int pupilRadius = (int) Math.round(mPupilRadius * Math.max(image.getWidth(), image.getHeight()));
|
20,781 | PupilCenterInfo pupilCenterInfo = new PupilCenterInfo(image, x, y, PupilCenterInfo.Phase.PUPIL_REFINEMENT);
pupilCenterInfo.collectCircleInfo((int) (pupilRadius + MAX_REFINEMENT_STEPS + MAX_LEAP_WIDTH * resolution));
pupilCenterInfoList.add(pupilCenterInfo);
}
}
<BUG>double maxLeapValue = Double.MIN_VALUE;
</BUG>
Pupil... | float maxLeapValue = Float.MIN_VALUE;
|
20,782 | private int mPupilRadius = 0;
private int mIrisRadius = 0;
private Image mImage;
private Phase mPhase;
private Map<Integer, CircleInfo> mCircleInfos = new HashMap<>();
<BUG>private double mLeapValue = Double.MIN_VALUE;
</BUG>
private PupilCenterInfo(final Image image, final int xCoord, final int yCoord, final Phase pha... | private float mLeapValue = Float.MIN_VALUE;
|
20,783 | mImage = image;
mPhase = phase;
}
private void collectCircleInfo(final int maxRelevantRadius) {
PixelReader pixelReader = mImage.getPixelReader();
<BUG>int maxPossibleRadius = (int) (Math.min(
Math.min(mImage.getWidth() - 1 - mXCenter, mXCenter),
Math.min(mImage.getHeight() - 1 - mYCenter, mYCenter)));
int maxRadius = ... | int maxPossibleRadius = (int) Math.min(
Math.min(mImage.getHeight() - 1 - mYCenter, mYCenter));
int maxRadius = Math.min(maxRelevantRadius, maxPossibleRadius);
|
20,784 | for (int x = mXCenter - maxRadius; x <= mXCenter + maxRadius; x++) {
for (int y = mYCenter - maxRadius; y <= mYCenter + maxRadius; y++) {
long d2 = (x - mXCenter) * (x - mXCenter) + (y - mYCenter) * (y - mYCenter);
if (d2 <= maxRadius2) {
int d = (int) Math.round(Math.sqrt(d2));
<BUG>double brightness = getBrightness(p... | float brightness = getBrightness(pixelReader.getColor(x, y));
|
20,785 |
double sum = color.getRed() + color.getGreen() + color.getBlue();
</BUG>
return sum - min;
}
<BUG>private void addInfo(final int distance, final double brightness) {
</BUG>
CircleInfo circleInfo = mCircleInfos.get(distance);
if (circleInfo == null) {
circleInfo = new CircleInfo(distance);
| addInfo(d, brightness);
private static float getBrightness(final Color color) {
float min = (float) Math.min(Math.min(color.getRed(), color.getGreen()), color.getBlue());
float sum = (float) (color.getRed() + color.getGreen() + color.getBlue());
private void addInfo(final int distance, final float brightness) {
|
20,786 |
double[] innerDarkness = new double[mCircleInfos.size()];
</BUG>
for (int i = minRadius; i <= maxRadius; i++) {
<BUG>double currentQuantile = mCircleInfos.get(Integer.valueOf(i)).getQuantile(MIN_BLACK_QUOTA);
</BUG>
innerQuantileSum += currentQuantile * i;
innerDarkness[i] = i == 0 ? 0 : 2 * innerQuantileSum / (i * (i... | int maxRadius = mPhase == Phase.INITIAL
? mCircleInfos.size() - 1
: Math.min(mCircleInfos.size() - 1, baseRadius + MAX_REFINEMENT_STEPS + (int) (MAX_LEAP_WIDTH * resolution));
int minRadius = mPhase == Phase.INITIAL ? 0
: Math.max(0, baseRadius - MAX_REFINEMENT_STEPS - (int) (MAX_LEAP_WIDTH * resolution));
float innerQ... |
20,787 | - mCircleInfos.get(Integer.valueOf(i - j)).getQuantile(1 - MIN_WHITE_QUOTA)
+ mCircleInfos.get(Integer.valueOf(i + j)).getQuantile(1 - MIN_WHITE_QUOTA2)
- mCircleInfos.get(Integer.valueOf(i - j)).getQuantile(1 - MIN_WHITE_QUOTA2))
/ (2 * Math.sqrt(j));
if (irisQuantileSum > 0) {
<BUG>double newLeapValue = irisQuantileS... | float newLeapValue = irisQuantileSum / j;
|
20,788 | switch (mPhase) {
case INITIAL:
for (CircleInfo pupilCircleInfo : relevantPupilCircles) {
for (CircleInfo irisCircleInfo : relevantIrisCircles) {
if (irisCircleInfo.mRadius - pupilCircleInfo.mRadius >= resolution
<BUG>double newLeapValue = pupilCircleInfo.mPupilLeapValue * (1 + irisCircleInfo.mIrisLeapValue);
</BUG>
if... | float newLeapValue = pupilCircleInfo.mPupilLeapValue * (1 + irisCircleInfo.mIrisLeapValue);
|
20,789 | private static final class CircleInfo {
private CircleInfo(final int radius) {
mRadius = radius;
}
private int mRadius;
<BUG>private List<Double> mBrightnesses = new ArrayList<>();
private double mPupilLeapValue;
private double mIrisLeapValue;
private void addBrightness(final double brightness) {
</BUG>
mBrightnesse... | [DELETED] |
20,790 | mBrightnesses.add(brightness);
}
private void calculateStatistics() {
Collections.sort(mBrightnesses);
}
<BUG>private double getQuantile(final double p) {
</BUG>
return mBrightnesses.get((int) (mBrightnesses.size() * p));
}
}
| private float getQuantile(final float p) {
|
20,791 | int yDiff = yCoord - mYCenter;
if (Math.abs(yDiff) > IRIS_BOUNDARY_SEARCH_RANGE * mRadius) {
return false;
}
int expectedXDistance = (int) Math.round(Math.sqrt(mRadius * mRadius - yDiff * yDiff));
<BUG>double brightnessSum = 0;
</BUG>
int leftBoundary = Math.max(mXCenter - expectedXDistance - xDistanceRange, 0);
int ri... | float brightnessSum = 0;
|
20,792 | int leftBoundary = Math.max(mXCenter - expectedXDistance - xDistanceRange, 0);
int rightBoundary = Math.min(mXCenter - expectedXDistance + xDistanceRange, (int) mImage.getWidth() - 1);
for (int x = leftBoundary; x <= rightBoundary; x++) {
brightnessSum += getBrightness(pixelReader.getColor(x, yCoord));
}
<BUG>double av... | float avgBrightness = brightnessSum / (2 * xDistanceRange + 1);
|
20,793 | int leftBoundary2 = Math.max(mXCenter + expectedXDistance - xDistanceRange, 0);
int rightBoundary2 = Math.min(mXCenter + expectedXDistance + xDistanceRange, (int) mImage.getWidth() - 1);
for (int x = leftBoundary2; x <= rightBoundary2; x++) {
brightnessSum2 += getBrightness(pixelReader.getColor(x, yCoord));
}
<BUG>doub... | float avgBrightness2 = brightnessSum2 / (2 * xDistanceRange + 1);
|
20,794 | }
private void determineXCenter() {
List<Integer> xSumValues = new ArrayList<>();
for (Integer yCoord : mLeftPoints.keySet()) {
xSumValues.add(mLeftPoints.get(yCoord) + mRightPoints.get(yCoord));
<BUG>}
xSumValues.sort(new Comparator<Integer>() {
@Override
public int compare(final Integer integer1, final Integer intege... | [DELETED] |
20,795 | for (Integer y : mRightPoints.keySet()) {
int yDistance = y - mYCenter;
int xDistance = mRightPoints.get(y) - mXCenter;
sum += Math.sqrt(xDistance * xDistance + yDistance * yDistance);
}
<BUG>mRadius = (int) Math.round(sum / (2 * mLeftPoints.size()));
}
private static double getBrightness(final Color color) {
return M... | [DELETED] |
20,796 | import de.jeisfeld.augendiagnoselib.util.imagefile.EyePhoto;
import de.jeisfeld.augendiagnoselib.util.imagefile.EyePhoto.RightLeft;
import de.jeisfeld.augendiagnoselib.util.imagefile.FileUtil;
import de.jeisfeld.augendiagnoselib.util.imagefile.ImageUtil;
import de.jeisfeld.augendiagnoselib.util.imagefile.JpegMetadataUt... | import de.jeisfeld.augendiagnoselib.util.imagefile.PupilAndIrisDetector;
public class OrganizeNewPhotosActivity extends BaseActivity {
|
20,797 | mImageLeft.invalidate();
if (updateDate) {
mPictureDate.setTime(mPhotoRight.getDate());
mEditDate.setText(DateUtil.getDisplayDate(mPictureDate));
mEditDate.invalidate();
<BUG>}
}</BUG>
private void displayError(final int resource, final Object... args) {
DialogUtil.displayError(this, resource, false, args);
}
| PupilAndIrisDetector.determineAndStoreIrisPosition(mPhotoRight.getAbsolutePath());
PupilAndIrisDetector.determineAndStoreIrisPosition(mPhotoLeft.getAbsolutePath());
|
20,798 | package org.exist.xquery.functions.text;
<BUG>import java.util.Collections;
import java.util.HashMap;
import java.util.Vector;</BUG>
import org.exist.dom.DocumentSet;
import org.exist.dom.NodeSet;
| [DELETED] |
20,799 | for (SequenceIterator i = args[arg].iterate(); i.hasNext(); q++) {
QNameValue qnv = (QNameValue) i.nextItem();
qnames[q] = qnv.getQName();
}
++arg;
<BUG>}
String start = null;</BUG>
if (!args[arg].isEmpty())
start = args[arg].getStringValue();
FunctionReference ref = (FunctionReference) args[++arg].itemAt(0);
| } else
qnames = getDefinedIndexes(context.getBroker(), docs);
String start = null;
|
20,800 | installPkgs.addClickHandler(new ClickHandler()
{
@Override
public void onClick(ClickEvent arg0)
{
<BUG>deps_.withRSConnect("Viewing publish accounts", null, new Command()
</BUG>
{
@Override
public void execute()
| deps_.withRSConnect("Viewing publish accounts", false, null, new Command()
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.