id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
20,401
this.lastName = pgpPublicKeyData.getLastName(); </BUG> this.birthday = newUserRegistrationForm.getBirthday(); this.googleUser = googleUser; if (googleUser.getEmail() != null) { <BUG>this.email = new Email(googleUser.getEmail()); // or email = pgpPublicKeyData.getUserEmail() </BUG> } if (newUserRegistrationForm.getUserI...
NewUserRegistrationForm newUserRegistrationForm) { this.userId = googleUser.getUserId(); this.webSafeStringKey = Key.create( CryptonomicaUser.class, googleUser.getUserId() ).toWebSafeString(); this.firstName = pgpPublicKeyData.getFirstName().toLowerCase(); this.lastName = pgpPublicKeyData.getLastName().toLowerCase(); t...
20,402
</BUG> ) .filter( "lastName", <BUG>generalSearchUserProfilesForm.getLastName() </BUG> ) .list(); } else if (generalSearchUserProfilesForm.getFirstName() != null
&& generalSearchUserProfilesForm.getEmail() == null) { cryptonomicaUsersList = ofy().load() .type(CryptonomicaUser.class) "firstName", generalSearchUserProfilesForm.getFirstName().toLowerCase() generalSearchUserProfilesForm.getLastName().toLowerCase()
20,403
&& generalSearchUserProfilesForm.getEmail() == null) { cryptonomicaUsersList = ofy().load() .type(CryptonomicaUser.class) .filter( "firstName", <BUG>generalSearchUserProfilesForm.getFirstName() </BUG> ) .list(); }
generalSearchUserProfilesForm.getFirstName().toLowerCase()
20,404
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,405
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,406
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,407
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,408
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,409
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,410
public static boolean debugMode = false; @ModConfigProperty(category = "Debug", name = "debugModeGOTG", comment = "Enable/Disable Debug Mode for the Gift Of The Gods") public static boolean debugModeGOTG = false; @ModConfigProperty(category = "Debug", name = "debugModeEnchantments", comment = "Enable/Disable Debug Mode...
@ModConfigProperty(category = "Weapons", name = "enableSwordsRecipes", comment = "Enable/Disable ArmorPlus Sword's Recipes") @ModConfigProperty(category = "Weapons", name = "enableBattleAxesRecipes", comment = "Enable/Disable ArmorPlus Battle Axes's Recipes") @ModConfigProperty(category = "Weapons", name = "enableBowsR...
20,411
DefaultWorkbenchFeaturesMenusHelper menusHelper, ClientUserSystemManager userSystemManager, WorkbenchMenuBarPresenter menuBar, SyncBeanManager iocManager, Workbench workbench, <BUG>PlaceManager placeManager ) { super( appConfigService, kieSecurityService, pmas, kieACL, activityBeansCache ); this.homeProducer = homePro...
PlaceManager placeManager, PermissionTreeSetup permissionTreeSetup ) { super( appConfigService, pmas, activityBeansCache ); this.homeProducer = homeProducer;
20,412
this.userSystemManager = userSystemManager; this.menuBar = menuBar; this.iocManager = iocManager; this.workbench = workbench; this.placeManager = placeManager; <BUG>addCustomSecurityLoadedCallback( policy -> homeProducer.init() ); }</BUG> @PostConstruct public void init() { workbench.addStartupBlocker( LiveSparkEntryPo...
this.permissionTreeSetup = permissionTreeSetup; }
20,413
import javax.annotation.PostConstruct; import javax.enterprise.context.ApplicationScoped; import javax.enterprise.event.Event; import javax.inject.Inject; import javax.inject.Named; <BUG>import org.guvnor.common.services.shared.security.KieWorkbenchPolicy; import org.guvnor.common.services.shared.security.KieWorkbenchS...
[DELETED]
20,414
final OrganizationalUnitService organizationalUnitService, final KieProjectService projectService, final ConfigurationService configurationService, final ConfigurationFactory configurationFactory, final AdministrationService administrationService, <BUG>final Event<ApplicationStarted> applicationStartedEvent, final Kie...
final Event<ApplicationStarted> applicationStartedEvent ) {
20,415
public class HomeProducer { private HomePageCommunityConstants constants = HomePageCommunityConstants.INSTANCE; private HomeModel model; @Inject private PlaceManager placeManager; <BUG>@Inject private KieWorkbenchACL kieACL;</BUG> public void init() { final String url = GWT.getModuleBaseURL(); model = new HomeModel( co...
[DELETED]
20,416
package com.github.ddth.kafka.internal; <BUG>import java.util.Collection; import kafka.consumer.ConsumerIterator;</BUG> import kafka.consumer.KafkaStream; import kafka.message.MessageAndMetadata; import org.slf4j.Logger;
import java.util.HashSet; import java.util.concurrent.CountDownLatch; import kafka.consumer.ConsumerIterator;
20,417
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,418
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,419
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,420
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,421
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,422
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,423
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,424
package org.mule.providers.email; import org.mule.config.i18n.Messages; import org.mule.providers.AbstractMessageAdapter; <BUG>import org.mule.umo.MessagingException; import org.mule.umo.provider.MessageTypeNotSupportedException;</BUG> import javax.mail.Address; import javax.mail.Header; import javax.mail.Message;
import org.mule.umo.transformer.TransformerException; import org.mule.umo.provider.MessageTypeNotSupportedException;
20,425
import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.io.InputStreamReader; import java.util.Enumeration; public class MailMessageAdapter extends AbstractMessageAdapter { <BUG>public static final String PROPERTY_TO_ADDRESSES = "toAddresses"; public static final String PROPERTY_FROM_ADDRESS = "fr...
[DELETED]
20,426
return i2; } public static String propertiesToString(Map props, boolean newline) { StringBuffer buf = new StringBuffer(); <BUG>buf.append("Properties{"); if (newline) {</BUG> buf.append("\n"); } Map.Entry entry;
if(props==null || props.entrySet().size()==0) { buf.append("none}"); return buf.toString(); if (newline) {
20,427
@Override public String toString() { return "desc"; } }; <BUG>public static final SortOrder DEFAULT = DESC; private static final SortOrder PROTOTYPE = DEFAULT; </BUG> @Override public SortOrder readFrom(StreamInput in) throws IOException {
return "asc"; }, DESC { private static final SortOrder PROTOTYPE = ASC;
20,428
GeoDistance geoDistance = GeoDistance.DEFAULT; boolean reverse = false; MultiValueMode sortMode = null; NestedInnerQueryParseSupport nestedHelper = null; final boolean indexCreatedBeforeV2_0 = context.indexShard().getIndexSettings().getIndexVersionCreated().before(Version.V_2_0_0); <BUG>boolean coerce = false; boolean ...
boolean coerce = GeoDistanceSortBuilder.DEFAULT_COERCE; boolean ignoreMalformed = GeoDistanceSortBuilder.DEFAULT_IGNORE_MALFORMED; XContentParser.Token token;
20,429
String currentName = parser.currentName(); while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) { if (token == XContentParser.Token.FIELD_NAME) { currentName = parser.currentName(); } else if (token == XContentParser.Token.START_ARRAY) { <BUG>parseGeoPoints(parser, geoPoints); </BUG> fieldName = curr...
GeoDistanceSortBuilder.parseGeoPoints(parser, geoPoints);
20,430
package org.elasticsearch.search.sort; <BUG>import org.elasticsearch.script.Script; public class SortBuilders {</BUG> public static ScoreSortBuilder scoreSort() { return new ScoreSortBuilder(); }
import org.elasticsearch.common.geo.GeoPoint; import java.util.Arrays; public class SortBuilders {
20,431
public GeoDistanceSortBuilder ignoreMalformed(boolean ignoreMalformed) { this.ignoreMalformed = ignoreMalformed; return this; }</BUG> @Override <BUG>public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { builder.startObject("_geo_distance"); if (geohashes.size() == 0 && points.si...
if (coerce == false) { } } public boolean ignoreMalformed() { return this.ignoreMalformed; } builder.startObject(NAME);
20,432
System.out.println(change); } } }; @Override <BUG>protected Callback<VChild, Void> copyChildCallback() </BUG> { return (child) -> {
protected Callback<VChild, Void> copyIntoCallback()
20,433
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...
import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty;
20,434
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.DESCRIPTI...
PropertyType.GEOGRAPHIC_POSITION, PropertyType.LAST_MODIFIED, PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER, PropertyType.PRIORITY,
20,435
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_TI...
PropertyType.EXCEPTION_DATE_TIMES, PropertyType.GEOGRAPHIC_POSITION, PropertyType.LAST_MODIFIED, PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER,
20,436
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....
PropertyType.RECURRENCE_RULE, PropertyType.TIME_ZONE_NAME, PropertyType.TIME_ZONE_OFFSET_FROM,
20,437
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, PropertyT...
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)
20,438
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 ...
protected Callback<VChild, Void> copyIntoCallback()
20,439
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), CalendarSca...
Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD), CalendarScale.class)
20,440
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 contentLi...
Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD), Method.class)
20,441
} 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)
20,442
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 vCal...
Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD), Version.class)
20,443
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...
import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty;
20,444
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; publ...
public String major = ""; public String minor = ""; public String build = "";
20,445
<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;
20,446
} 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();
20,447
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 CommandDel...
import java.util.stream.Stream; import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;
20,448
.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...
String regionName = parse.args[1]; IRegion region = FGManager.getInstance().getRegion(regionName).orElse(null);
20,449
</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 exis...
20,450
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[...
Optional<IHandler> handlerOpt = FGManager.getInstance().gethandler(parse.args[1]); if (!handlerOpt.isPresent()) IHandler handler = handlerOpt.get(); if (handler instanceof GlobalHandler)
20,451
.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...
return Stream.of("region", "handler") .filter(new StartsWithPredicate(parse.current.token))
20,452
.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...
return Stream.of("region", "handler") .filter(new StartsWithPredicate(parse.current.token))
20,453
@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 stat...
private static FoxGuardMain instanceField;
20,454
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; }
20,455
return configDirectory; } public boolean isLoaded() { return loaded; } <BUG>public static Cause getCause() { return instance().pluginCause; }</BUG> public EconomyService getEconomyService() { return economyService;
[DELETED]
20,456
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 Comm...
import java.util.stream.Stream; import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;
20,457
.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...
return Stream.of("region", "handler") .filter(new StartsWithPredicate(parse.current.token))
20,458
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 ...
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) -> {
20,459
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 { fg...
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(n...
20,460
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 { fgOb...
Path singleDir = serverDir.resolve(name.toLowerCase()); logger.info((shouldSave ? "S" : "Force s") + "aving world region " + logName + " in directory: " + singleDir);
20,461
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(...
Optional<IRegion> regionOpt = FGManager.getInstance().getRegion(entry.getKey()); if (regionOpt.isPresent()) { IRegion region = regionOpt.get(); logger.info("Loading links for region \"" + region.getName() + "\"");
20,462
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("l...
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() + "\"");
20,463
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
20,464
.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)) .co...
return Stream.of("region", "worldregion", "handler", "controller")
20,465
rest("/cart/").description("Personal Shopping Cart Service") .produces(MediaType.APPLICATION_JSON_VALUE) .options("/{cartId}") .route().id("getCartOptionsRoute").end().endRest() .options("/checkout/{cartId}") <BUG>.route().id("checkoutCartOptionsRoute").end().endRest() .options("/{cartId}/{itemId}/{quantity}")</BUG> .r...
.options("/{cartId}/{tmpId}") .route().id("cartSetOptionsRoute").end().endRest() .options("/{cartId}/{itemId}/{quantity}")
20,466
package org.neo4j.ha.monitoring; <BUG>import static org.junit.Assert.assertEquals; import static org.neo4j.test.ha.ClusterManager.allSeesAllAsAvailable; import static org.neo4j.test.ha.ClusterManager.fromXml;</BUG> import org.junit.Test; import org.neo4j.graphdb.Transaction;
[DELETED]
20,467
import org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource; import org.neo4j.kernel.impl.transaction.xaframework.EideticTransactionMonitor; import org.neo4j.kernel.impl.transaction.xaframework.XaResourceManager; import org.neo4j.kernel.monitoring.Monitors; import org.neo4j.test.TargetDirectory; <BUG>import org.neo4j.t...
import static org.junit.Assert.assertEquals; import static org.neo4j.test.ha.ClusterManager.allSeesAllAsAvailable; import static org.neo4j.test.ha.ClusterManager.fromXml; public class RemoteRequestMonitoringIT
20,468
@SideOnly(Side.CLIENT) public class GuiSeedAnalyzer extends GuiContainer { public static final ResourceLocation texture = new ResourceLocation(Reference.MOD_ID, "textures/gui/GuiSeedAnalyzer.png"); public TileEntitySeedAnalyzer seedAnalyzer; private boolean journalOpen; <BUG>private GuiJournal guiJournal; </BUG> public...
private AgriGuiWrapper guiJournal;
20,469
return; } ItemStack journal = seedAnalyzer.getStackInSlot(ContainerSeedAnalyzer.journalSlotId); if(journal != null) { journalOpen = true; <BUG>guiJournal = new GuiJournal(journal); </BUG> guiJournal.setWorldAndResolution(this.mc, this.width, this.height); } }
guiJournal = new AgriGuiWrapper(new GuiJournal(journal));
20,470
import org.apache.commons.lang3.math.NumberUtils; import org.json.JSONException; import org.mariotaku.microblog.library.MicroBlog; import org.mariotaku.microblog.library.MicroBlogException; import org.mariotaku.microblog.library.twitter.model.RateLimitStatus; <BUG>import org.mariotaku.microblog.library.twitter.model.St...
import org.mariotaku.pickncrop.library.PNCUtils; import org.mariotaku.sqliteqb.library.AllColumns;
20,471
context.getApplicationContext().sendBroadcast(intent); } } @Nullable public static Location getCachedLocation(Context context) { <BUG>if (BuildConfig.DEBUG) { Log.v(LOGTAG, "Fetching cached location", new Exception()); }</BUG> Location location = null;
DebugLog.v(LOGTAG, "Fetching cached location", new Exception());
20,472
FileBody fileBody = null; try { fileBody = getFileBody(context, imageUri); twitter.updateProfileBannerImage(fileBody); } finally { <BUG>Utils.closeSilently(fileBody); if (deleteImage && "file".equals(imageUri.getScheme())) { final File file = new File(imageUri.getPath()); if (!file.delete()) { Log.w(LOGTAG, String.form...
if (deleteImage) { Utils.deleteMedia(context, imageUri);
20,473
FileBody fileBody = null; try { fileBody = getFileBody(context, imageUri); twitter.updateProfileBackgroundImage(fileBody, tile); } finally { <BUG>Utils.closeSilently(fileBody); if (deleteImage && "file".equals(imageUri.getScheme())) { final File file = new File(imageUri.getPath()); if (!file.delete()) { Log.w(LOGTAG, S...
twitter.updateProfileBannerImage(fileBody); if (deleteImage) { Utils.deleteMedia(context, imageUri);
20,474
FileBody fileBody = null; try { fileBody = getFileBody(context, imageUri); return twitter.updateProfileImage(fileBody); } finally { <BUG>Utils.closeSilently(fileBody); if (deleteImage && "file".equals(imageUri.getScheme())) { final File file = new File(imageUri.getPath()); if (!file.delete()) { Log.w(LOGTAG, String.for...
twitter.updateProfileBannerImage(fileBody); if (deleteImage) { Utils.deleteMedia(context, imageUri);
20,475
import org.mariotaku.twidere.receiver.NotificationReceiver; import org.mariotaku.twidere.service.LengthyOperationsService; import org.mariotaku.twidere.util.ActivityTracker; import org.mariotaku.twidere.util.AsyncTwitterWrapper; import org.mariotaku.twidere.util.DataStoreFunctionsKt; <BUG>import org.mariotaku.twidere.u...
import org.mariotaku.twidere.util.DebugLog; import org.mariotaku.twidere.util.ImagePreloader;
20,476
final List<InetAddress> addresses = mDns.lookup(host); for (InetAddress address : addresses) { c.addRow(new String[]{host, address.getHostAddress()}); } } catch (final IOException ignore) { <BUG>if (BuildConfig.DEBUG) { Log.w(LOGTAG, ignore); }</BUG> }
DebugLog.w(LOGTAG, null, ignore);
20,477
for (Location location : twitter.getAvailableTrends()) { map.put(location); } return map.pack(); } catch (final MicroBlogException e) { <BUG>if (BuildConfig.DEBUG) { Log.w(LOGTAG, e); }</BUG> }
DebugLog.w(LOGTAG, null, e);
20,478
import android.content.Context; import android.content.SharedPreferences; import android.location.Location; import android.os.AsyncTask; import android.support.annotation.NonNull; <BUG>import android.util.Log; import org.mariotaku.twidere.BuildConfig; import org.mariotaku.twidere.Constants; import org.mariotaku.twidere...
import org.mariotaku.twidere.util.DebugLog; import org.mariotaku.twidere.util.JsonSerializer;
20,479
} public static LatLng getCachedLatLng(@NonNull final Context context) { final Context appContext = context.getApplicationContext(); final SharedPreferences prefs = DependencyHolder.Companion.get(context).getPreferences(); if (!prefs.getBoolean(KEY_USAGE_STATISTICS, false)) return null; <BUG>if (BuildConfig.DEBUG) { Lo...
DebugLog.d(HotMobiLogger.LOGTAG, "getting cached location", null);
20,480
public int destroySavedSearchAsync(final UserKey accountKey, final long searchId) { final DestroySavedSearchTask task = new DestroySavedSearchTask(accountKey, searchId); return asyncTaskManager.add(task, true); } public int destroyStatusAsync(final UserKey accountKey, final String statusId) { <BUG>final DestroyStatusTa...
final DestroyStatusTask task = new DestroyStatusTask(context, accountKey, statusId);
20,481
@Override public void afterExecute(Bus handler, SingleResponse<Relationship> result) { if (result.hasData()) { handler.post(new FriendshipUpdatedEvent(accountKey, userKey, result.getData())); } else if (result.hasException()) { <BUG>if (BuildConfig.DEBUG) { Log.w(LOGTAG, "Unable to update friendship", result.getExcepti...
public UserKey[] getAccountKeys() { return DataStoreUtils.getActivatedAccountKeys(context);
20,482
MicroBlog microBlog = MicroBlogAPIFactory.getInstance(context, accountId); if (!Utils.isOfficialCredentials(context, accountId)) continue; try { microBlog.setActivitiesAboutMeUnread(cursor); } catch (MicroBlogException e) { <BUG>if (BuildConfig.DEBUG) { Log.w(LOGTAG, e); }</BUG> }
DebugLog.w(LOGTAG, null, e);
20,483
package com.devicehive.auth; import com.devicehive.vo.DeviceVO; import com.devicehive.vo.NetworkVO; import com.devicehive.vo.UserVO; <BUG>import java.security.Principal; import java.util.Set;</BUG> public class HivePrincipal implements Principal { private UserVO user; private Set<String> actions;
import java.util.Collections; import java.util.HashSet; import java.util.Set;
20,484
return networks.toString(); } if (devices != null) { return devices.toString(); } <BUG>return "anonymousUser"; </BUG> } public boolean isAuthenticated() { return user != null || actions != null || subnets != null || networks != null || devices != null;
return "anonymousPrincipal";
20,485
e.printStackTrace(); } filePlayback=null; } @Override <BUG>public void stop() { if ( filePlayback!=null ) filePlayback.stop(); } void initFiles() throws FileNotFoundException {</BUG> if ((dataDir.length() != 0) && !dataDir.endsWith("/")) { dataDir = dataDir + "/"; } // guard path if needed String samples_str = dataDir ...
@Override public boolean isrunning(){ if ( filePlayback!=null ) return filePlayback.isrunning(); return false; } void initFiles() throws FileNotFoundException {
20,486
public class BufferMonitor extends Thread implements FieldtripBufferMonitor { public static final String TAG = BufferMonitor.class.toString(); private final Context context; private final SparseArray<BufferConnectionInfo> clients = new SparseArray<BufferConnectionInfo>(); private final BufferInfo info; <BUG>private fin...
[DELETED]
20,487
public static final String CLIENT_INFO_TIME = "c_time"; public static final String CLIENT_INFO_WAITTIMEOUT = "c_waitTimeout"; public static final String CLIENT_INFO_CONNECTED = "c_connected"; public static final String CLIENT_INFO_CHANGED = "c_changed"; public static final String CLIENT_INFO_DIFF = "c_diff"; <BUG>publi...
public static final int THREAD_INFO_TYPE = 0;
20,488
package nl.dcc.buffer_bci.bufferclientsservice; import android.os.Parcel; import android.os.Parcelable; <BUG>import nl.dcc.buffer_bci.bufferservicecontroller.C; public class ThreadInfo implements Parcelable {</BUG> public static final Creator<ThreadInfo> CREATOR = new Creator<ThreadInfo>() { @Override public ThreadInfo...
import nl.dcc.buffer_bci.C; public class ThreadInfo implements Parcelable {
20,489
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,490
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,491
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,492
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,493
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,494
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,495
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,496
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,497
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,498
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,499
package com.cronutils.model.time.generator; import java.util.Collections; <BUG>import java.util.List; import org.apache.commons.lang3.Validate;</BUG> import com.cronutils.model.field.CronField; import com.cronutils.model.field.expression.FieldExpression; public abstract class FieldValueGenerator {
import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.Validate;
20,500
import java.util.ResourceBundle; import java.util.function.Function;</BUG> class DescriptionStrategyFactory { private DescriptionStrategyFactory() {} public static DescriptionStrategy daysOfWeekInstance(final ResourceBundle bundle, final FieldExpression expression) { <BUG>final Function<Integer, String> nominal = integ...
import java.util.function.Function; import com.cronutils.model.field.expression.FieldExpression; import com.cronutils.model.field.expression.On; final Function<Integer, String> nominal = integer -> DayOfWeek.of(integer).getDisplayName(TextStyle.FULL, bundle.getLocale());