id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
38,901
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);
38,902
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);
38,903
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);
38,904
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;
38,905
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);
38,906
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);
38,907
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;
38,908
} 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);
38,909
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);
38,910
@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);
38,911
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);
38,912
import com.intellij.openapi.components.Storage; import com.intellij.openapi.project.Project; import com.intellij.openapi.wm.ToolWindow; import com.intellij.openapi.wm.ToolWindowId; import com.intellij.openapi.wm.ToolWindowManager; <BUG>import com.intellij.ui.content.Content; import com.intellij.ui.content.MessageView;<...
import com.intellij.ui.content.ContentManager; import com.intellij.ui.content.MessageView;
38,913
if (max != 0) { mDialog.setMax(max); } } if (withButton) { <BUG>mDialog.setButton(DialogInterface.BUTTON_POSITIVE, getString(android.R.string.ok), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) {</BUG> if (getActivity() == null) {
mDialog.setButton(dialogButton, getString(android.R.string.ok), (dialog, which) -> {
38,914
try { mDialog.setIndeterminateDrawable(null); } catch (NullPointerException e) { AcraHelper.report(e); } <BUG>mDialog.getButton(DialogInterface.BUTTON_NEUTRAL).setEnabled(true); }</BUG> @Override public void onCancel(DialogInterface dialog) { if (getActivity() == null) {
mDialog.getButton(dialogButton).setEnabled(true);
38,915
import static org.lwjgl.opengl.GL15.glBindBuffer; import static yk.jcommon.collections.YArrayList.al; import static yk.jcommon.collections.YHashMap.hm; import static yk.jcommon.collections.YHashSet.hs; import static yk.senjin.VertexStructureState.assertType; <BUG>public class GShader extends AbstractState { public Sha...
public class GShader<V, F> extends AbstractState { public V vs; public F fs; public ShaderHandler shader;
38,916
UniformVariable a = iterator.next(); String old = seenAt.put(a.name, "FS uniforms"); if (old != null) { iterator.remove(); } <BUG>} }</BUG> private void newShader() { shader = new ShaderHandler(); String res = "";
this.vs = (V) vs; this.fs = (F) fs;
38,917
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;
38,918
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());
38,919
return dom; } public static DescriptionStrategy monthsInstance(final ResourceBundle bundle, final FieldExpression expression) { return new NominalDescriptionStrategy( bundle, <BUG>integer -> new DateTime().withMonthOfYear(integer).monthOfYear().getAsText(bundle.getLocale()), expression</BUG> ); } public static Descript...
integer -> Month.of(integer).getDisplayName(TextStyle.FULL, bundle.getLocale()), expression
38,920
<BUG>package com.cronutils.model.time.generator; import com.cronutils.mapper.WeekDay;</BUG> import com.cronutils.model.field.CronField; import com.cronutils.model.field.CronFieldName; import com.cronutils.model.field.constraint.FieldConstraintsBuilder;
import java.time.LocalDate; import java.util.Collections; import java.util.List; import java.util.Set; import org.apache.commons.lang3.Validate; import com.cronutils.mapper.WeekDay;
38,921
import com.cronutils.model.field.expression.Between; import com.cronutils.model.field.expression.FieldExpression; import com.cronutils.parser.CronParserField; import com.google.common.collect.Lists; import com.google.common.collect.Sets; <BUG>import org.apache.commons.lang3.Validate; import org.joda.time.DateTime; impo...
[DELETED]
38,922
<BUG>package com.cronutils.model.time.generator; import com.cronutils.model.field.CronField;</BUG> import com.cronutils.model.field.CronFieldName; import com.cronutils.model.field.expression.FieldExpression; import com.cronutils.model.field.expression.On;
import java.time.DayOfWeek; import java.time.LocalDate; import java.util.List; import org.apache.commons.lang3.Validate; import com.cronutils.model.field.CronField;
38,923
import com.cronutils.model.field.CronField;</BUG> import com.cronutils.model.field.CronFieldName; import com.cronutils.model.field.expression.FieldExpression; import com.cronutils.model.field.expression.On; import com.google.common.collect.Lists; <BUG>import org.apache.commons.lang3.Validate; import org.joda.time.DateT...
package com.cronutils.model.time.generator; import java.time.DayOfWeek; import java.time.LocalDate; import java.util.List; import com.cronutils.model.field.CronField;
38,924
class OnDayOfMonthValueGenerator extends FieldValueGenerator { private int year; private int month; public OnDayOfMonthValueGenerator(CronField cronField, int year, int month) { super(cronField); <BUG>Validate.isTrue(CronFieldName.DAY_OF_MONTH.equals(cronField.getField()), "CronField does not belong to day of month"); ...
Validate.isTrue(CronFieldName.DAY_OF_MONTH.equals(cronField.getField()), "CronField does not belong to day of" + " month"); this.year = year;
38,925
package com.cronutils.mapper; public class ConstantsMapper { private ConstantsMapper() {} public static final WeekDay QUARTZ_WEEK_DAY = new WeekDay(2, false); <BUG>public static final WeekDay JODATIME_WEEK_DAY = new WeekDay(1, false); </BUG> public static final WeekDay CRONTAB_WEEK_DAY = new WeekDay(1, true); public st...
public static final WeekDay JAVA8 = new WeekDay(1, false);
38,926
return nextMatch; } catch (NoSuchValueException e) { throw new IllegalArgumentException(e); } } <BUG>DateTime nextClosestMatch(DateTime date) throws NoSuchValueException { </BUG> List<Integer> year = yearsValueGenerator.generateCandidates(date.getYear(), date.getYear()); TimeNode days = null; int lowestMonth = months.g...
ZonedDateTime nextClosestMatch(ZonedDateTime date) throws NoSuchValueException {
38,927
boolean questionMarkSupported = cronDefinition.getFieldDefinition(DAY_OF_WEEK).getConstraints().getSpecialChars().contains(QUESTION_MARK); if(questionMarkSupported){ return new TimeNode( generateDayCandidatesQuestionMarkSupported( <BUG>date.getYear(), date.getMonthOfYear(), </BUG> ((DayOfWeekFieldDefinition) cronDefini...
date.getYear(), date.getMonthValue(),
38,928
) ); }else{ return new TimeNode( generateDayCandidatesQuestionMarkNotSupported( <BUG>date.getYear(), date.getMonthOfYear(), </BUG> ((DayOfWeekFieldDefinition) cronDefinition.getFieldDefinition(DAY_OF_WEEK) ).getMondayDoWValue()
date.getYear(), date.getMonthValue(),
38,929
} public DateTime lastExecution(DateTime date){ </BUG> Validate.notNull(date); try { <BUG>DateTime previousMatch = previousClosestMatch(date); </BUG> if(previousMatch.equals(date)){ previousMatch = previousClosestMatch(date.minusSeconds(1)); }
public java.time.Duration timeToNextExecution(ZonedDateTime date){ return java.time.Duration.between(date, nextExecution(date)); public ZonedDateTime lastExecution(ZonedDateTime date){ ZonedDateTime previousMatch = previousClosestMatch(date);
38,930
return previousMatch; } catch (NoSuchValueException e) { throw new IllegalArgumentException(e); } } <BUG>public Duration timeFromLastExecution(DateTime date){ return new Interval(lastExecution(date), date).toDuration(); } public boolean isMatch(DateTime date){ </BUG> return nextExecution(lastExecution(date)).equals(da...
[DELETED]
38,931
<BUG>package com.cronutils.model.time.generator; import com.cronutils.model.field.CronField;</BUG> import com.cronutils.model.field.expression.Every; import com.cronutils.model.field.expression.FieldExpression; import com.google.common.annotations.VisibleForTesting;
import java.time.ZonedDateTime; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.cronutils.model.field.CronField;
38,932
import com.cronutils.model.field.CronField;</BUG> import com.cronutils.model.field.expression.Every; import com.cronutils.model.field.expression.FieldExpression; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Lists; <BUG>import org.joda.time.DateTime; import org.slf4j.Logger; i...
package com.cronutils.model.time.generator; import java.time.ZonedDateTime; import java.util.List; import com.cronutils.model.field.CronField;
38,933
private static final Logger log = LoggerFactory.getLogger(EveryFieldValueGenerator.class); public EveryFieldValueGenerator(CronField cronField) { super(cronField); log.trace(String.format( "processing \"%s\" at %s", <BUG>cronField.getExpression().asString(), DateTime.now() </BUG> )); } @Override
cronField.getExpression().asString(), ZonedDateTime.now()
38,934
else if (t == STRING_LINE) { r = stringLine(b, 0); } else if (t == STRUCT_OPERATION) { r = structOperation(b, 0); <BUG>} else if (t == TUPLE) {</BUG> r = tuple(b, 0); } else if (t == TWO_INFIX_OPERATOR) {
else if (t == THREE_INFIX_OPERATOR) { r = threeInfixOperator(b, 0); else if (t == TUPLE) {
38,935
MATCHED_AT_NON_NUMERIC_OPERATION, MATCHED_AT_UNQUALIFIED_BRACKET_OPERATION, MATCHED_AT_UNQUALIFIED_NO_PARENTHESES_CALL, MATCHED_BRACKET_OPERATION, MATCHED_CAPTURE_NON_NUMERIC_OPERATION, MATCHED_COMPARISON_OPERATION, MATCHED_DOT_CALL, MATCHED_EXPRESSION, MATCHED_IN_MATCH_OPERATION, MATCHED_IN_OPERATION, MATCHED_MATCH_OP...
MATCHED_RELATIONAL_OPERATION, MATCHED_THREE_OPERATION, MATCHED_TWO_OPERATION, MATCHED_TYPE_OPERATION, MATCHED_UNARY_NON_NUMERIC_OPERATION, MATCHED_UNQUALIFIED_BRACKET_OPERATION, MATCHED_UNQUALIFIED_NO_ARGUMENTS_CALL, MATCHED_UNQUALIFIED_NO_PARENTHESES_CALL, MATCHED_UNQUALIFIED_PARENTHESES_CALL, MATCHED_WHEN_OPERATION),...
38,936
UNMATCHED_AT_NON_NUMERIC_OPERATION, UNMATCHED_AT_UNQUALIFIED_BRACKET_OPERATION, UNMATCHED_AT_UNQUALIFIED_NO_PARENTHESES_CALL, UNMATCHED_BRACKET_OPERATION, UNMATCHED_CAPTURE_NON_NUMERIC_OPERATION, UNMATCHED_COMPARISON_OPERATION, UNMATCHED_DOT_CALL, UNMATCHED_EXPRESSION, UNMATCHED_IN_MATCH_OPERATION, UNMATCHED_IN_OPERATI...
UNMATCHED_RELATIONAL_OPERATION, UNMATCHED_THREE_OPERATION, UNMATCHED_TWO_OPERATION, UNMATCHED_TYPE_OPERATION, UNMATCHED_UNARY_NON_NUMERIC_OPERATION, UNMATCHED_UNQUALIFIED_BRACKET_OPERATION, UNMATCHED_UNQUALIFIED_NO_ARGUMENTS_CALL, UNMATCHED_UNQUALIFIED_NO_PARENTHESES_CALL, UNMATCHED_UNQUALIFIED_PARENTHESES_CALL, UNMATC...
38,937
if (!r) r = consumeToken(b, OR_OPERATOR); if (!r) r = consumeToken(b, PIPE_OPERATOR); if (!r) r = consumeToken(b, RESCUE); if (!r) r = consumeToken(b, RELATIONAL_OPERATOR); if (!r) r = consumeToken(b, STAB_OPERATOR); <BUG>if (!r) r = consumeToken(b, STRUCT_OPERATOR); if (!r) r = consumeToken(b, TUPLE_OPERATOR);</BUG> i...
if (!r) r = consumeToken(b, THREE_OPERATOR); if (!r) r = consumeToken(b, TUPLE_OPERATOR);
38,938
} private static boolean maxExpression_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "maxExpression_0")) return false; boolean r; Marker m = enter_section_(b); <BUG>r = matchedExpression(b, l + 1, 20); </BUG> r = r && maxDotCall(b, l + 1); exit_section_(b, m, null, r); return r;
static boolean keywordKeyColonEOL(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "keywordKeyColonEOL")) return false; r = keywordKey(b, l + 1); r = r && consumeToken(b, KEYWORD_PAIR_COLON); r = r && keywordKeyColonEOL_2(b, l + 1);
38,939
} private static boolean maxExpression_1(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "maxExpression_1")) return false; boolean r; Marker m = enter_section_(b); <BUG>r = matchedExpression(b, l + 1, 23); </BUG> r = r && maxExpression_1_1(b, l + 1); exit_section_(b, m, null, r); return r;
static boolean keywordKeyColonEOL(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "keywordKeyColonEOL")) return false; r = keywordKey(b, l + 1); r = r && consumeToken(b, KEYWORD_PAIR_COLON); r = r && keywordKeyColonEOL_2(b, l + 1);
38,940
} private static boolean maxExpression_2(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "maxExpression_2")) return false; boolean r; Marker m = enter_section_(b); <BUG>r = matchedExpression(b, l + 1, 25); </BUG> r = r && maxQualifiedParenthesesCall(b, l + 1); exit_section_(b, m, null, r); return r;
static boolean keywordKeyColonEOL(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "keywordKeyColonEOL")) return false; r = keywordKey(b, l + 1); r = r && consumeToken(b, KEYWORD_PAIR_COLON); r = r && keywordKeyColonEOL_2(b, l + 1);
38,941
if (!r) r = consumeToken(b, OR_OPERATOR); if (!r) r = consumeToken(b, PIPE_OPERATOR); if (!r) r = consumeToken(b, RELATIONAL_OPERATOR); if (!r) r = consumeToken(b, RESCUE); if (!r) r = consumeToken(b, STAB_OPERATOR); <BUG>if (!r) r = consumeToken(b, STRUCT_OPERATOR); if (!r) r = consumeToken(b, TWO_OPERATOR);</BUG> if ...
if (!r) r = consumeToken(b, THREE_OPERATOR); if (!r) r = consumeToken(b, TWO_OPERATOR);
38,942
exit_section_(b, l, m, MATCHED_ARROW_OPERATION, r, true, null); } else if (g < 12 && inInfixOperator(b, l + 1)) { r = matchedExpression(b, l, 12); exit_section_(b, l, m, MATCHED_IN_OPERATION, r, true, null); <BUG>} else if (g < 13 && twoInfixOperator(b, l + 1)) { r = matchedExpression(b, l, 12); </BUG> exit_section_(b...
else if (g < 13 && threeInfixOperator(b, l + 1)) { r = matchedExpression(b, l, 13); exit_section_(b, l, m, MATCHED_THREE_OPERATION, r, true, null); else if (g < 14 && twoInfixOperator(b, l + 1)) { r = matchedExpression(b, l, 13);
38,943
if (!recursion_guard_(b, l, "matchedUnaryNonNumericOperation")) return false; boolean r, p; Marker m = enter_section_(b, l, _NONE_, null); r = matchedUnaryNonNumericOperation_0(b, l + 1); p = r; <BUG>r = p && matchedExpression(b, l, 16); </BUG> exit_section_(b, l, m, MATCHED_UNARY_NON_NUMERIC_OPERATION, r, p, null); re...
r = p && matchedExpression(b, l, 17);
38,944
exit_section_(b, l, m, UNMATCHED_ARROW_OPERATION, r, true, null); } else if (g < 12 && inInfixOperator(b, l + 1)) { r = unmatchedExpression(b, l, 12); exit_section_(b, l, m, UNMATCHED_IN_OPERATION, r, true, null); <BUG>} else if (g < 13 && twoInfixOperator(b, l + 1)) { r = unmatchedExpression(b, l, 12); </BUG> exit_se...
else if (g < 13 && threeInfixOperator(b, l + 1)) { r = unmatchedExpression(b, l, 13); exit_section_(b, l, m, UNMATCHED_THREE_OPERATION, r, true, null); else if (g < 14 && twoInfixOperator(b, l + 1)) { r = unmatchedExpression(b, l, 13);
38,945
if (!recursion_guard_(b, l, "unmatchedUnaryNonNumericOperation")) return false; boolean r, p; Marker m = enter_section_(b, l, _NONE_, null); r = unmatchedUnaryNonNumericOperation_0(b, l + 1); p = r; <BUG>r = p && unmatchedExpression(b, l, 16); </BUG> exit_section_(b, l, m, UNMATCHED_UNARY_NON_NUMERIC_OPERATION, r, p, n...
r = p && unmatchedExpression(b, l, 17);
38,946
import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.annotation.Nonnull; <BUG>import javax.annotation.Nullable; import com.google.common.collect.Range;</BUG> import io.github.msdk.datamodel.chromatograms.ChromatogramType; import io.github.msdk.datamod...
import com.google.common.base.Strings; import com.google.common.collect.Range;
38,947
continue; if (accession.equals(MzMLCV.cvPolarityPositive))</BUG> return PolarityType.POSITIVE; <BUG>if (accession.equals(MzMLCV.cvPolarityNegative)) return PolarityType.NEGATIVE; }</BUG> } } } return PolarityType.UNKNOWN;
for (ParamGroup pg : selectedIonParams) { String cvVal = extractCVValue(pg, MzMLCV.cvMz); if (!Strings.isNullOrEmpty(cvVal)) precursorMz = Double.parseDouble(cvVal); cvVal = extractCVValue(pg, MzMLCV.cvPrecursorMz); if (!Strings.isNullOrEmpty(cvVal)) precursorMz = Double.parseDouble(cvVal); cvVal = extractCVValue(pg, M...
38,948
continue; if (accession.equals(MzMLCV.cvChromatogramTIC))</BUG> return ChromatogramType.TIC; <BUG>if (accession.equals(MzMLCV.cvChromatogramMRM_SRM)) return ChromatogramType.MRM_SRM; if (accession.equals(MzMLCV.cvChromatogramSIC)) return ChromatogramType.SIC; if (accession.equals(MzMLCV.cvChromatogramBPC)) return Chrom...
if (accession.equals(cvParam)) { return true;
38,949
package com.example.mapdemo; import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.OnMapReadyCallback; <BUG>import com.google.android.gms.maps.SupportMapFragment; import com.google.android.gms.maps.model.LatLng; import com.google.android...
import com.google.android.gms.maps.model.Dash; import com.google.android.gms.maps.model.Dot; import com.google.android.gms.maps.model.Gap; import com.google.android.gms.maps.model.JointType; import com.google.android.gms.maps.model.PatternItem; import com.google.android.gms.maps.model.Polygon;
38,950
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 FileSyste...
import static org.apache.hadoop.fs.s3a.Constants.*; public class S3AFileSystem extends FileSystem {
38,951
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(...
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));
38,952
} 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()
38,953
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_THR...
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.g...
38,954
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_...
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...
38,955
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 backup...
import static org.apache.hadoop.fs.s3a.Constants.*; public class S3AOutputStream extends OutputStream {
38,956
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) ...
partSize = conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
38,957
public void testBackSlashVariants2() throws Throwable { doBackSlashVariantsTest(); } private void doBackSlashVariantsTest() throws Throwable { java.util.List<String> nameList = new ArrayList<String>(Arrays.asList("d", "D", "s", "S", "w", "W", "b", "B", "A", "G", "Z", "z", "Q", "E", <BUG>"t", "n", "r", "f", "a", "e", "h...
"t", "n", "r", "f", "a", "e", "h", "H", "v", "V", "R"));
38,958
return host != null && host.supportsPythonConditionalRefs(); } public boolean supportsPossessiveQuantifiers(@Nullable final RegExpQuantifier quantifier) { final RegExpLanguageHost host = findRegExpHost(quantifier); return host == null || host.supportsPossessiveQuantifiers(); <BUG>} public boolean isValidCategory(@NotNu...
public boolean supportsSimpleClass(@Nullable final RegExpSimpleClass simpleClass) { final RegExpLanguageHost host = findRegExpHost(simpleClass); return host == null || host.supportsSimpleClass(simpleClass); public boolean isValidCategory(@NotNull final PsiElement element, @NotNull String category) {
38,959
package org.intellij.lang.regexp; import org.intellij.lang.regexp.psi.RegExpChar; import org.intellij.lang.regexp.psi.RegExpGroup; <BUG>import org.intellij.lang.regexp.psi.RegExpNamedGroupRef; import org.jetbrains.annotations.NotNull;</BUG> import org.jetbrains.annotations.Nullable; public interface RegExpLanguageHost ...
import org.intellij.lang.regexp.psi.RegExpSimpleClass; import org.jetbrains.annotations.NotNull;
38,960
boolean supportsPerl5EmbeddedComments(); boolean supportsPossessiveQuantifiers(); boolean supportsPythonConditionalRefs(); boolean supportsNamedGroupSyntax(RegExpGroup group); boolean supportsNamedGroupRefSyntax(RegExpNamedGroupRef ref); <BUG>boolean supportsExtendedHexCharacter(RegExpChar regExpChar); boolean isValidC...
default boolean supportsSimpleClass(RegExpSimpleClass simpleClass) { return true; } boolean isValidCategory(@NotNull String category);
38,961
private final String[][] myCharacterClasses = { {"d", "digit: [0-9]"}, {"D", "nondigit: [^0-9]"}, {"h", "horizontal whitespace character: [ \\t\\xA0\\u1680\\u180e\\u2000-\\u200a\\u202f\\u205f\\u3000]"}, {"H", "non-horizontal whitespace character: [^\\h]"}, <BUG>{"s", "whitespace [ \\t\\n\\x0B\\f\\r]"}, {"S", "non-whit...
{"s", "whitespace: [ \\t\\n\\x0B\\f\\r]"}, {"S", "non-whitespace: [^\\s]"},
38,962
{"S", "non-whitespace [^\\s]"}, </BUG> {"v", "vertical whitespace character: [\\n\\x0B\\f\\r\\x85\\u2028\\u2029]"}, {"V", "non-vertical whitespace character: [^\\v]"}, <BUG>{"w", "word character [a-zA-Z_0-9]"}, {"W", "nonword character [^\\w]"}, </BUG> {"b", "word boundary"},
private final String[][] myCharacterClasses = { {"d", "digit: [0-9]"}, {"D", "nondigit: [^0-9]"}, {"h", "horizontal whitespace character: [ \\t\\xA0\\u1680\\u180e\\u2000-\\u200a\\u202f\\u205f\\u3000]"}, {"H", "non-horizontal whitespace character: [^\\h]"}, {"s", "whitespace: [ \\t\\n\\x0B\\f\\r]"}, {"S", "non-whitespac...
38,963
{"B", "non-word boundary"}, {"A", "beginning of the input"}, {"G", "end of the previous match"}, {"Z", "end of the input but for the final terminator, if any"}, {"z", "end of input"}, <BUG>{"Q", "Nothing, but quotes all characters until \\E"}, {"E", " \tNothing, but ends quoting started by \\Q"}, </BUG> {"t", "tab cha...
{"Q", "nothing, but quotes all characters until \\E"}, {"E", "nothing, but ends quoting started by \\Q"},
38,964
{"t", "tab character ('\\u0009')"}, {"n", "newline (line feed) character ('\\u000A')"}, {"r", "carriage-return character ('\\u000D')"}, {"f", "form-feed character ('\\u000C')"}, {"a", "alert (bell) character ('\\u0007')"}, <BUG>{"e", "escape character ('\\u001B')"} };</BUG> private final String[][] myPosixCharacterCla...
{"e", "escape character ('\\u001B')"}, {"R", "unicode line ending: \\u000D\\u000A|[\\u000A\\u000B\\u000C\\u000D\\u0085\\u2028\\u2029]"} };
38,965
"\1\50\1\36\2\13\1\55\1\55\1\55\1\13\1\40\1\42\1\13"+ </BUG> "\1\32\2\13\1\31\1\31\1\31\1\13\1\30\1\10\1\12\1\11"+ <BUG>"\1\16\1\14\1\0\1\25\1\26\1\35\1\33\1\25\1\25\1\13"+ </BUG> "\1\50\1\36\1\13\1\51\2\13\1\24\1\13\1\37\1\13\1\24"+ "\1\31\1\24\1\45\1\31\1\31\1\44\1\13\1\27\1\6\1\23"+ "\1\7\7\0\1\60\44\0\1\13\12\0\1\...
}; private static final String ZZ_CMAP_PACKED = "\10\0\2\64\1\57\1\60\1\61\1\57\22\0\1\54\1\67\1\0"+ "\1\70\1\17\1\0\1\63\1\53\1\4\1\5\1\21\1\22\1\56"+ "\1\47\1\3\1\0\1\2\7\46\2\1\1\62\1\0\1\52\1\66"+ "\1\65\1\20\1\0\1\26\1\26\1\35\1\33\1\43\1\41\1\27"+ "\1\50\1\36\2\13\1\55\1\55\1\55\1\13\1\40\1\42\1\31"+ "\1\16\1\14\...
38,966
"\0\u031e\0\u031e\0\u031e\0\u031e\0\u031e\0\u031e\0\u031e\0\u0402"+ "\0\u031e\0\u043b\0\u031e\0\u0474\0\u031e\0\u031e\0\u031e\0\u031e"+ "\0\u04ad\0\u031e\0\u04e6\0\u031e\0\u051f\0\u031e\0\u031e\0\u0390"+ "\0\u031e\0\u031e\0\u031e\0\u0558\0\u0591\0\u031e\0\u031e\0\u031e"+ "\0\u031e\0\u031e\0\u05ca\0\u0603\0\u031e\0\u063...
"\0\u06ae\0\u031e\0\u031e\0\u031e\0\u031e\0\u031e\0\u06e7\0\u031e"+
38,967
"\22\44\1\42\1\41\2\44\3\41\1\44\1\45\12\41"+ "\11\46\1\47\45\46\3\0\25\46\1\50\40\46\3\0"+ "\7\46\6\17\1\23\1\17\1\51\1\52\1\53\3\17"+ "\1\26\30\17\1\34\7\17\1\54\1\17\1\54\1\17"+ "\1\55\1\54\4\17\6\56\1\57\1\56\1\60\1\56"+ <BUG>"\1\25\15\56\1\61\1\56\1\61\1\56\1\61\3\56"+ </BUG> "\1\61\14\56\1\61\13\56\5\62\1\63\5\62...
"\1\25\15\56\1\61\1\56\1\61\2\56\1\61\2\56"+
38,968
private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); private static final String ZZ_ATTRIBUTE_PACKED_0 = "\10\0\1\1\5\0\2\11\1\1\2\11\2\1\12\11"+ "\1\1\1\11\1\1\1\11\1\1\4\11\1\1\1\11"+ "\1\1\1\11\1\1\2\11\1\1\3\11\2\1\5\11"+ <BUG>"\2\1\1\11\1\0\1\11\2\1\6\11\1\1\2\11"+ </BUG> "\3\1\1\11\1\1\10\11\1\0\1\1\4\...
"\2\1\1\11\1\0\1\11\2\1\5\11\1\1\3\11"+
38,969
private static final String ILLEGAL_CHARACTER_RANGE_TO_FROM = "Illegal character range (to < from)"; private AnnotationHolder myHolder; private final RegExpLanguageHosts myLanguageHosts; public RegExpAnnotator() { myLanguageHosts = RegExpLanguageHosts.getInstance(); <BUG>} public void annotate(@NotNull PsiElement psiEl...
@Override public void annotate(@NotNull PsiElement psiElement, @NotNull AnnotationHolder holder) {
38,970
psiElement.accept(this); } finally { myHolder = null; } <BUG>} public void visitRegExpCharRange(RegExpCharRange range) {</BUG> final RegExpCharRange.Endpoint from = range.getFrom(); final RegExpCharRange.Endpoint to = range.getTo(); final boolean a = from instanceof RegExpChar;
@Override public void visitRegExpCharRange(RegExpCharRange range) {
38,971
final Character value = regExpChar.getValue(); if (value != null && !seen.add(value)) { myHolder.createWarningAnnotation(regExpChar, "Duplicate character '" + regExpChar.getText() + "' in character class"); } } <BUG>} public void visitRegExpChar(final RegExpChar ch) {</BUG> final Character value = ch.getValue(); if (va...
@Override public void visitRegExpChar(final RegExpChar ch) {
38,972
myHolder.createErrorAnnotation(ch, "This hex character syntax is not supported"); } } } } <BUG>} public void visitRegExpProperty(RegExpProperty property) {</BUG> final ASTNode category = property.getCategoryNode(); if (category == null) { return;
@Override public void visitRegExpProperty(RegExpProperty property) {
38,973
final Annotation a = myHolder.createErrorAnnotation(category, "Unknown character category"); if (a != null) { a.setHighlightType(ProblemHighlightType.LIKE_UNKNOWN_SYMBOL); } } <BUG>} public void visitRegExpBackref(final RegExpBackref backref) {</BUG> final RegExpGroup group = backref.resolve(); if (group == null) { fin...
@Override public void visitRegExpBackref(final RegExpBackref backref) {
38,974
if (branch.getAtoms().length > 0) { return false; } } return true; <BUG>} public void visitRegExpQuantifier(RegExpQuantifier quantifier) {</BUG> final RegExpQuantifier.Count count = quantifier.getCount(); if (!(count instanceof RegExpQuantifier.SimpleCount)) { String min = count.getMin();
@Override public void visitRegExpQuantifier(RegExpQuantifier quantifier) {
38,975
return Collections.singletonList(new DelegationContract((PsiMethodCallExpression)expression, negated)); } return null; } @NotNull <BUG>private List<MethodContract> visitExpression(final List<ValueConstraint[]> states, @Nullable PsiExpression expr) { </BUG> if (states.isEmpty()) return Collections.emptyList(); if (state...
private List<PreContract> visitExpression(final List<ValueConstraint[]> states, @Nullable PsiExpression expr) {
38,976
} else if (textMatches(getParameter(paramIndex).getTypeElement(), PsiKeyword.BOOLEAN)) { ContainerUtil.addIfNotNull(result, contractWithConstraint(state, paramIndex, TRUE_VALUE, TRUE_VALUE)); ContainerUtil.addIfNotNull(result, contractWithConstraint(state, paramIndex, FALSE_VALUE, FALSE_VALUE)); } } <BUG>return result;...
return asPreContracts(result); @NotNull private static List<PreContract> asPreContracts(List<MethodContract> contracts) { return ContainerUtil.map(contracts, KnownContract::new);
38,977
return getParameter(parameter, myMethod); } private static PsiParameter getParameter(int parameter, PsiMethod method) { return method.getParameterList().getParameters()[parameter]; } <BUG>private static List<MethodContract> toContracts(List<ValueConstraint[]> states, ValueConstraint constraint) { return ContainerUtil.m...
return ContainerUtil.map(states, state -> new MethodContract(state, constraint));
38,978
} private List<MethodContract> visitLogicalOperation(PsiExpression[] operands, boolean conjunction, List<ValueConstraint[]> states) { ValueConstraint breakValue = conjunction ? FALSE_VALUE : TRUE_VALUE; List<MethodContract> finalStates = ContainerUtil.newArrayList(); for (PsiExpression operand : operands) { <BUG>List<M...
return result;
38,979
for (PsiStatement statement : statements) { if (statement instanceof PsiBlockStatement) { result.addAll(visitStatements(states, ((PsiBlockStatement)statement).getCodeBlock().getStatements())); } else if (statement instanceof PsiIfStatement) { <BUG>List<MethodContract> conditionResults = visitExpression(states, ((PsiIfS...
List<PreContract> conditionResults = visitExpression(states, ((PsiIfStatement)statement).getCondition());
38,980
import com.intellij.codeInspection.dataFlow.MethodContract.ValueConstraint; import com.intellij.codeInspection.dataFlow.instructions.MethodCallInstruction; import com.intellij.psi.*; import com.intellij.util.containers.ContainerUtil; import com.siyeh.ig.psiutils.SideEffectChecker; <BUG>import org.jetbrains.annotations....
import org.jetbrains.annotations.Nullable; import java.util.Collections;
38,981
@NotNull abstract List<MethodContract> toContracts(@NotNull PsiMethod method); } class KnownContract extends PreContract { private final MethodContract myKnownContract; <BUG>public KnownContract(MethodContract knownContract) { myKnownContract = knownContract; }</BUG> @NotNull
KnownContract(@NotNull MethodContract knownContract) { MethodContract getContract() { return myKnownContract;
38,982
} } class DelegationContract extends PreContract { private final PsiMethodCallExpression myExpression; private final boolean myNegated; <BUG>public DelegationContract(PsiMethodCallExpression expression, boolean negated) { myExpression = expression;</BUG> myNegated = negated; } @NotNull
class KnownContract extends PreContract { private final MethodContract myKnownContract; KnownContract(@NotNull MethodContract knownContract) { myKnownContract = knownContract; MethodContract getContract() { return myKnownContract;
38,983
} } class SideEffectFilter extends PreContract { private final List<PsiExpression> myExpressionsToCheck; private final List<PreContract> myContracts; <BUG>public SideEffectFilter(List<PsiExpression> expressionsToCheck, List<PreContract> contracts) { myExpressionsToCheck = expressionsToCheck;</BUG> myContracts = contrac...
class KnownContract extends PreContract { private final MethodContract myKnownContract; KnownContract(@NotNull MethodContract knownContract) { myKnownContract = knownContract; MethodContract getContract() { return myKnownContract;
38,984
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.*;
38,985
.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);
38,986
</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...
38,987
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)
38,988
.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))
38,989
.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))
38,990
@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;
38,991
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; }
38,992
return configDirectory; } public boolean isLoaded() { return loaded; } <BUG>public static Cause getCause() { return instance().pluginCause; }</BUG> public EconomyService getEconomyService() { return economyService;
[DELETED]
38,993
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.*;
38,994
.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))
38,995
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) -> {
38,996
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...
38,997
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);
38,998
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() + "\"");
38,999
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() + "\"");
39,000
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