id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
12,201
sink.tableCell(); sink.text( getI18nString( locale, "legend.shared" ) ); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); <BUG>sink.tableCell(); iconError( sink );</BUG> sink.tableCell_(); sink.tableCell(); sink.text( getI18nString( locale, "legend.different" ) );
sink.tableCell( "15px" ); // according /images/icon_error_sml.gif iconError( sink );
12,202
sink.tableCaption(); sink.text( getI18nString( locale, "stats.caption" ) ); sink.tableCaption_();</BUG> sink.tableRow(); <BUG>sink.tableHeaderCell(); sink.text( getI18nString( locale, "stats.subprojects" ) + ":" ); sink.tableHeaderCell_();</BUG> sink.tableCell(); sink.text( String.valueOf( reactorProjects.size() ) ); sink.tableCell_();
sink.bold(); sink.bold_(); sink.tableCaption_(); sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.subprojects" ) ); sink.tableHeaderCell_();
12,203
sink.tableCell(); sink.text( String.valueOf( reactorProjects.size() ) ); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); <BUG>sink.tableHeaderCell(); sink.text( getI18nString( locale, "stats.dependencies" ) + ":" ); sink.tableHeaderCell_();</BUG> sink.tableCell(); sink.text( String.valueOf( depCount ) );
sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.dependencies" ) ); sink.tableHeaderCell_();
12,204
sink.text( String.valueOf( convergence ) + "%" ); sink.bold_(); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); <BUG>sink.tableHeaderCell(); sink.text( getI18nString( locale, "stats.readyrelease" ) + ":" ); sink.tableHeaderCell_();</BUG> sink.tableCell(); if ( convergence >= PERCENTAGE && snapshotCount <= 0 )
sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.readyrelease" ) ); sink.tableHeaderCell_();
12,205
{ ReverseDependencyLink p1 = (ReverseDependencyLink) o1; ReverseDependencyLink p2 = (ReverseDependencyLink) o2; return p1.getProject().getId().compareTo( p2.getProject().getId() ); } <BUG>else {</BUG> return 0; } }
iconError( sink );
12,206
public ConfigStore<KafkaSchedulerConfiguration> getConfigStore() { return configStore; } public KafkaSchedulerConfiguration fetch(UUID version) throws ConfigStoreException { try { <BUG>return configStore.fetch(version, KafkaSchedulerConfiguration.getFactoryInstance()); } catch (ConfigStoreException e) {</BUG> log.error("Unable to fetch version: " + version, e); throw new ConfigStoreException(e); }
return configStore.fetch(version); } catch (ConfigStoreException e) {
12,207
package com.mesosphere.dcos.kafka.plan; import com.mesosphere.dcos.kafka.config.KafkaSchedulerConfiguration; import com.mesosphere.dcos.kafka.offer.KafkaOfferRequirementProvider; import com.mesosphere.dcos.kafka.state.FrameworkState; <BUG>import org.apache.mesos.scheduler.ChainedObserver; import org.apache.mesos.scheduler.plan.Block; import org.apache.mesos.scheduler.plan.Phase; import java.util.ArrayList;</BUG> import java.util.List;
import org.apache.mesos.scheduler.plan.DefaultPhase; import org.apache.mesos.scheduler.plan.Step; import org.apache.mesos.scheduler.plan.strategy.SerialStrategy; import java.util.ArrayList;
12,208
import org.apache.mesos.scheduler.plan.Phase; import java.util.ArrayList;</BUG> import java.util.List; <BUG>import java.util.UUID; public class KafkaUpdatePhase extends ChainedObserver implements Phase { private final List<Block> blocks; private final String configName; private final KafkaSchedulerConfiguration config; private final UUID id; public KafkaUpdatePhase( </BUG> String targetConfigName,
package com.mesosphere.dcos.kafka.plan; import com.mesosphere.dcos.kafka.config.KafkaSchedulerConfiguration; import com.mesosphere.dcos.kafka.offer.KafkaOfferRequirementProvider; import com.mesosphere.dcos.kafka.state.FrameworkState; import org.apache.mesos.scheduler.plan.DefaultPhase; import org.apache.mesos.scheduler.plan.Step; import org.apache.mesos.scheduler.plan.strategy.SerialStrategy; import java.util.ArrayList; public class KafkaUpdatePhase extends DefaultPhase { public static KafkaUpdatePhase create(
12,209
return false; } } return true; } <BUG>private static List<Block> createBlocks( </BUG> String configName, int brokerCount, FrameworkState frameworkState,
private static List<Step> createSteps(
12,210
.addResources(DynamicPortRequirement.getDesiredDynamicPort("API_PORT", role, principal)) .build(); log.info(String.format("Got new OfferRequirement: TaskInfo: '%s' ExecutorInfo: '%s'", TextFormat.shortDebugString(taskInfo), TextFormat.shortDebugString(executorInfo))); <BUG>return new OfferRequirement( </BUG> BROKER_TASK_TYPE, Arrays.asList(taskInfo), Optional.of(executorInfo),
return OfferRequirement.create(
12,211
TextFormat.shortDebugString(executorEnv), TextFormat.shortDebugString(taskEnv)); log.error(errStr); throw new InvalidRequirementException(errStr); } <BUG>TaskInfo updatedTaskInfo = TaskUtils.setTargetConfiguration(taskBuilder.build(), UUID.fromString(configName)); </BUG> ExecutorInfo updatedExecutorInfo = ExecutorInfo.newBuilder(taskInfo.getExecutor()) .setCommand(getExecutorCmd(config, configName, Integer.valueOf(brokerIdStr), logdir, port)) .setExecutorId(ExecutorID.newBuilder().setValue("").build()) // Set later by ExecutorRequirement
TaskInfo updatedTaskInfo = TaskUtils.setTargetConfiguration(taskBuilder, UUID.fromString(configName)).build();
12,212
ExecutorInfo updatedExecutorInfo = ExecutorInfo.newBuilder(taskInfo.getExecutor()) .setCommand(getExecutorCmd(config, configName, Integer.valueOf(brokerIdStr), logdir, port)) .setExecutorId(ExecutorID.newBuilder().setValue("").build()) // Set later by ExecutorRequirement .build(); try { <BUG>OfferRequirement offerRequirement = new OfferRequirement( </BUG> BROKER_TASK_TYPE, Arrays.asList(updatedTaskInfo), Optional.of(updatedExecutorInfo));
OfferRequirement offerRequirement = OfferRequirement.create(
12,213
.setGracePeriodSeconds(healthCheckConfiguration.getHealthCheckGracePeriod().getSeconds()) .setCommand(CommandInfo.newBuilder() .setValue("curl -f localhost:$API_PORT/admin/healthcheck") .build())); } <BUG>return TaskUtils.setTargetConfiguration(taskBuilder.build(), UUID.fromString(configName)); </BUG> } private static String getBrokerCmd(KafkaSchedulerConfiguration config) { return Joiner.on(" && ").join(Arrays.asList(
return TaskUtils.setTargetConfiguration(taskBuilder, UUID.fromString(configName)).build();
12,214
import com.mesosphere.dcos.kafka.config.KafkaSchedulerConfiguration; import com.mesosphere.dcos.kafka.state.FrameworkState; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.mesos.Protos; <BUG>import org.apache.mesos.offer.constrain.PlacementRuleGenerator; import org.apache.mesos.offer.constrain.PlacementUtils;</BUG> import java.util.Collections; import java.util.Optional; class PlacementStrategyManager {
import org.apache.mesos.offer.constrain.PlacementRule; import org.apache.mesos.offer.constrain.PlacementUtils;
12,215
private static final Log log = LogFactory.getLog(PlacementStrategyManager.class); private final FrameworkState frameworkState; PlacementStrategyManager(FrameworkState frameworkState) { this.frameworkState = frameworkState; } <BUG>public Optional<PlacementRuleGenerator> getPlacementStrategy( KafkaSchedulerConfiguration config,</BUG> Protos.TaskInfo taskInfo) { String placementStrategy = config.getServiceConfiguration().getPlacementStrategy(); log.info("Using placement strategy: " + placementStrategy);
public Optional<PlacementRule> getPlacementStrategy( KafkaSchedulerConfiguration config,
12,216
public ReportElement getBase() { return base; } @Override public float print(PDDocument document, PDPageContentStream stream, int pageNumber, float startX, float startY, float allowedWidth) throws IOException { <BUG>PDPage currPage = (PDPage) document.getDocumentCatalog().getPages().get(pageNo); PDPageContentStream pageStream = new PDPageContentStream(document, currPage, true, false); </BUG> base.print(document, pageStream, pageNo, x, y, width); pageStream.close();
PDPage currPage = document.getDocumentCatalog().getPages().get(pageNo); PDPageContentStream pageStream = new PDPageContentStream(document, currPage, PDPageContentStream.AppendMode.APPEND, false);
12,217
public PdfTextStyle(String config) { Assert.hasText(config); String[] split = config.split(","); Assert.isTrue(split.length == 3, "config must look like: 10,Times-Roman,#000000"); fontSize = Integer.parseInt(split[0]); <BUG>font = resolveStandard14Name(split[1]); color = new Color(Integer.valueOf(split[2].substring(1), 16));</BUG> } public int getFontSize() { return fontSize;
font = getFont(split[1]); color = new Color(Integer.valueOf(split[2].substring(1), 16));
12,218
package cc.catalysts.boot.report.pdf.elements; import cc.catalysts.boot.report.pdf.config.PdfTextStyle; import cc.catalysts.boot.report.pdf.utils.ReportAlignType; import org.apache.pdfbox.pdmodel.PDPageContentStream; <BUG>import org.apache.pdfbox.pdmodel.font.PDFont; import org.slf4j.Logger;</BUG> import org.slf4j.LoggerFactory; import org.springframework.util.StringUtils; import java.io.IOException;
import org.apache.pdfbox.pdmodel.font.PDType1Font; import org.apache.pdfbox.util.Matrix; import org.slf4j.Logger;
12,219
addTextSimple(stream, textConfig, textX, nextLineY, ""); return nextLineY; } try { <BUG>String[] split = splitText(textConfig.getFont(), textConfig.getFontSize(), allowedWidth, fixedText); </BUG> float x = calculateAlignPosition(textX, align, textConfig, allowedWidth, split[0]); if (!underline) { addTextSimple(stream, textConfig, x, nextLineY, split[0]); } else {
String[] split = splitText(textConfig.getFont(), textConfig.getFontSize(), allowedWidth, text);
12,220
public static void addTextSimple(PDPageContentStream stream, PdfTextStyle textConfig, float textX, float textY, String text) { try { stream.setFont(textConfig.getFont(), textConfig.getFontSize()); stream.setNonStrokingColor(textConfig.getColor()); stream.beginText(); <BUG>stream.newLineAtOffset(textX, textY); stream.showText(text);</BUG> } catch (Exception e) { LOG.warn("Could not add text: " + e.getClass() + " - " + e.getMessage()); }
stream.setTextMatrix(new Matrix(1,0,0,1, textX, textY)); stream.showText(text);
12,221
public static void addTextSimpleUnderlined(PDPageContentStream stream, PdfTextStyle textConfig, float textX, float textY, String text) { addTextSimple(stream, textConfig, textX, textY, text); try { float lineOffset = textConfig.getFontSize() / 8F; stream.setStrokingColor(textConfig.getColor()); <BUG>stream.setLineWidth(0.5F); stream.drawLine(textX, textY - lineOffset, textX + getTextWidth(textConfig.getFont(), textConfig.getFontSize(), text), textY - lineOffset); </BUG> stream.stroke(); } catch (IOException e) {
stream.moveTo(textX, textY - lineOffset); stream.lineTo(textX + getTextWidth(textConfig.getFont(), textConfig.getFontSize(), text), textY - lineOffset);
12,222
list.add(text.length()); return list; } public static String[] splitText(PDFont font, int fontSize, float allowedWidth, String text) { String endPart = ""; <BUG>String shortenedText = text; List<String> breakSplitted = Arrays.asList(shortenedText.split("(\\r\\n)|(\\n)|(\\n\\r)")).stream().collect(Collectors.toList()); if (breakSplitted.size() > 1) {</BUG> String[] splittedFirst = splitText(font, fontSize, allowedWidth, breakSplitted.get(0)); StringBuilder remaining = new StringBuilder(splittedFirst[1] == null ? "" : splittedFirst[1] + "\n");
List<String> breakSplitted = Arrays.asList(text.split("(\\r\\n)|(\\n)|(\\n\\r)")).stream().collect(Collectors.toList()); if (breakSplitted.size() > 1) {
12,223
package cc.catalysts.boot.report.pdf.elements; import org.apache.pdfbox.pdmodel.PDDocument; <BUG>import org.apache.pdfbox.pdmodel.edit.PDPageContentStream; import java.io.IOException;</BUG> import java.util.ArrayList; import java.util.Collection; import java.util.LinkedList;
import org.apache.pdfbox.pdmodel.PDPageContentStream; import java.io.IOException;
12,224
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.security.DigestOutputStream; import java.security.MessageDigest; <BUG>import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Collections; import java.util.List;</BUG> public final class PatchUtils {
import java.text.DateFormat; import java.util.Date; import java.util.List;
12,225
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;
12,226
private static final String PATH_DELIMITER = "/"; public static final byte[] NO_CONTENT = PatchingTask.NO_CONTENT; enum Element { ADDED_BUNDLE("added-bundle"), ADDED_MISC_CONTENT("added-misc-content"), <BUG>ADDED_MODULE("added-module"), BUNDLES("bundles"),</BUG> CUMULATIVE("cumulative"), DESCRIPTION("description"), MISC_FILES("misc-files"),
APPLIES_TO_VERSION("applies-to-version"), BUNDLES("bundles"),
12,227
final int count = reader.getAttributeCount(); for (int i = 0; i < count; i++) { final String value = reader.getAttributeValue(i); final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i)); switch (attribute) { <BUG>case APPLIES_TO_VERSION: builder.addAppliesTo(value); break;</BUG> case RESULTING_VERSION: if(type == Patch.PatchType.CUMULATIVE) {
[DELETED]
12,228
final StringBuilder path = new StringBuilder(); for(final String p : item.getPath()) { path.append(p).append(PATH_DELIMITER); } path.append(item.getName()); <BUG>writer.writeAttribute(Attribute.PATH.name, path.toString()); if(type != ModificationType.REMOVE) {</BUG> writer.writeAttribute(Attribute.HASH.name, bytesToHexString(item.getContentHash())); } if(type != ModificationType.ADD) {
if (item.isDirectory()) { writer.writeAttribute(Attribute.DIRECTORY.name, "true"); if(type != ModificationType.REMOVE) {
12,229
package org.jboss.as.patching; import org.jboss.as.controller.OperationFailedException; import org.jboss.as.patching.runner.PatchingException; import org.jboss.logging.Messages; import org.jboss.logging.annotations.Message; <BUG>import org.jboss.logging.annotations.MessageBundle; import java.io.IOException;</BUG> import java.util.List; @MessageBundle(projectCode = "JBAS") public interface PatchMessages {
import org.jboss.logging.annotations.Cause; import java.io.IOException;
12,230
bitmap = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888); else bitmap = Bitmap.createBitmap(drawable.getBounds().right - drawable.getBounds().left, drawable.getBounds().bottom - drawable.getBounds().top, Bitmap.Config.ARGB_8888); } <BUG>else Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888); </BUG> Canvas canvas = new Canvas(bitmap); drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight()); drawable.draw(canvas);
else bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
12,231
this.context = context.getApplicationContext(); this.fileCache = new FileCache(context); this.executorService = Executors.newFixedThreadPool(context.getResources().getInteger(R.integer.ail__thread_pool_size)); } public void submit(ImageRequest request){ <BUG>if(request instanceof LocalImageRequest || (isImageDownloaded(request) && fileCache.isCachedFileValid(request.getTargetUrl(), request.getMaxCacheDurationMs())))</BUG> executorService.submit(request); else submitDownloadRequest(request); }
|| request.isTargetLocal() || (isImageDownloaded(request) && fileCache.isCachedFileValid(request.getTargetUrl(), request.getMaxCacheDurationMs())))
12,232
import android.graphics.drawable.Drawable; import com.guardanis.imageloader.stubs.AnimatedStubDrawable; import com.guardanis.imageloader.stubs.StubDrawable; import com.guardanis.imageloader.transitions.modules.TransitionModule; import java.util.HashMap; <BUG>import java.util.Map; public class TransitionDrawable extends BitmapDrawable {</BUG> protected enum TransitionStage { AWAITING_START, TRANSITIONING, FINISHED; }
import pl.droidsonroids.gif.GifDrawable; public class TransitionDrawable extends BitmapDrawable {
12,233
return this; } public void start(){ this.animationStart = System.currentTimeMillis(); this.transitionStage = TransitionStage.TRANSITIONING; <BUG>invalidateSelf(); }</BUG> public void overrideCanvasMatrix(Matrix canvasMatrixOverride){ this.canvasMatrixOverride = canvasMatrixOverride; }
if(targetDrawable instanceof GifDrawable) ((GifDrawable) targetDrawable).start();
12,234
canvas.translate(translation[0], translation[1]); oldDrawable.draw(canvas); canvas.restore(); } protected void drawTarget(Canvas canvas){ <BUG>if(targetDrawable instanceof StubDrawable) targetDrawable.draw(canvas);</BUG> else super.draw(canvas); } protected void handlePostTransitionDrawing(Canvas canvas){
if(targetDrawable instanceof StubDrawable || targetDrawable instanceof GifDrawable) targetDrawable.draw(canvas);
12,235
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_north), ((TextView)rootView.findViewById(R.id.bearing_qibla)), getText(R.string.bearing_qibla)); <BUG>sOrientationListener = new SensorListener() { </BUG> public void onSensorChanged(int s, float v[]) { float northDirection = v[SensorManager.DATA_X]; qiblaCompassView.setDirections(northDirection, sQiblaDirection);
sOrientationListener = new android.hardware.SensorListener() {
12,236
boolean[] isTagRequired = new boolean[tagsToCheck.length]; boolean[] isTagPresent = new boolean[tagsToCheck.length]; boolean someTagsAreRequired = false; for (int i = 0; i < tagsToCheck.length; i++) { final String tag = tagsToCheck[i]; <BUG>someTagsAreRequired |= isTagRequired[i] = isTagRequired(psiClass, tag); </BUG> } if (someTagsAreRequired) { for (PsiDocTag tag : tags) {
someTagsAreRequired |= isTagRequired[i] = isTagRequired(context, tag);
12,237
JavadocManager.SERVICE.getInstance(docComment.getProject()), isOnTheFly); checkForBadCharacters(docComment, problems, manager, isOnTheFly);</BUG> for (PsiDocTag tag : tags) { for (int i = 0; i < tagsToCheck.length; i++) { final String tagToCheck = tagsToCheck[i]; <BUG>if (tagToCheck.equals(tag.getName()) && extractTagDescription(tag).length() == 0) { problems.add(createDescriptor(elementToHighlight, InspectionsBundle.message(absentDescriptionKeys[i]), manager, isOnTheFly)); </BUG> }
checkForPeriodInDoc(psiField, docComment, problems, manager, isOnTheFly); checkDuplicateTags(docComment.getTags(), problems, manager, isOnTheFly); checkForBadCharacters(docComment, problems, manager, isOnTheFly); return problems.isEmpty() ? null : problems.toArray(new ProblemDescriptor[problems.size()]);
12,238
absentParameters.add(param); } } } if (required && isReturnRequired && isReturnAbsent) { <BUG>final PsiIdentifier psiIdentifier = psiMethod.getNameIdentifier(); if (psiIdentifier != null) { problems.add(createMissingTagDescriptor(psiIdentifier, "return", manager, isOnTheFly)); }</BUG> }
problems.add(createMissingTagDescriptor(docComment.getFirstChild(), "return", manager, isOnTheFly));
12,239
}</BUG> } if (absentParameters != null) { for (PsiParameter psiParameter : absentParameters) { <BUG>final PsiIdentifier nameIdentifier = psiMethod.getNameIdentifier(); if (nameIdentifier != null) { problems.add(createMissingParamTagDescriptor(nameIdentifier, psiParameter, manager, isOnTheFly)); }</BUG> }
absentParameters.add(param); if (required && isReturnRequired && isReturnAbsent) { problems.add(createMissingTagDescriptor(docComment.getFirstChild(), "return", manager, isOnTheFly)); problems.add(createMissingParamTagDescriptor(docComment.getFirstChild(), psiParameter, manager, isOnTheFly));
12,240
final InspectionManager manager, final PsiClassType exceptionClassType, boolean isOnTheFly) { @NonNls String tag = "throws"; String message = InspectionsBundle.message("inspection.javadoc.problem.missing.tag", "<code>@" + tag + "</code> " + exceptionClassType.getCanonicalText()); final String firstDeclaredException = exceptionClassType.getCanonicalText(); <BUG>final PsiIdentifier nameIdentifier = method.getNameIdentifier(); return nameIdentifier != null ? createDescriptor(nameIdentifier, message,new AddMissingTagFix(tag, firstDeclaredException), manager, isOnTheFly) : null;</BUG> }
return createDescriptor(elementToHighlight, message, new AddMissingTagFix(tag, firstDeclaredException), manager, isOnTheFly);
12,241
private static boolean isTagRequired(Options options, String tag) { return options.REQUIRED_TAGS.contains(tag); } private boolean isJavaDocRequired(PsiModifierListOwner psiElement) { final RefJavaUtil refUtil = RefJavaUtil.getInstance(); <BUG>int actualAccess = getAccessNumber(refUtil.getAccessModifier(psiElement)); if (psiElement instanceof PsiClass) {</BUG> PsiClass psiClass = (PsiClass)psiElement; if (PsiTreeUtil.getParentOfType(psiClass, PsiClass.class) != null) { return actualAccess <= getAccessNumber(INNER_CLASS_OPTIONS.ACCESS_JAVADOC_REQUIRED_FOR);
if (psiElement instanceof PsiPackage) { return 1 <= getAccessNumber(PACKAGE_OPTIONS.ACCESS_JAVADOC_REQUIRED_FOR); if (psiElement instanceof PsiClass) {
12,242
Integer datasetId; String datasetUrn; String capacityName; String capacityType; String capacityUnit; <BUG>String capacityLow; String capacityHigh; </BUG> Long modifiedTime;
Long capacityLow; Long capacityHigh;
12,243
import com.fasterxml.jackson.databind.ObjectMapper; public class DatasetFieldPathRecord { String fieldPath; String role; public DatasetFieldPathRecord() { <BUG>} @Override public String toString() { try { return new ObjectMapper().writeValueAsString(this); } catch (JsonProcessingException ex) { return null; }</BUG> }
[DELETED]
12,244
new DatabaseWriter(JdbcUtil.wherehowsJdbcTemplate, DATASET_INVENTORY_TABLE); public static final String GET_DATASET_DEPLOYMENT_BY_DATASET_ID = "SELECT * FROM " + DATASET_DEPLOYMENT_TABLE + " WHERE dataset_id = :dataset_id"; public static final String GET_DATASET_DEPLOYMENT_BY_URN = "SELECT * FROM " + DATASET_DEPLOYMENT_TABLE + " WHERE dataset_urn = :dataset_urn"; <BUG>public static final String DELETE_DATASET_DEPLOYMENT_BY_URN = "DELETE FROM " + DATASET_DEPLOYMENT_TABLE + " WHERE dataset_urn=?"; </BUG> public static final String GET_DATASET_CAPACITY_BY_DATASET_ID =
public static final String DELETE_DATASET_DEPLOYMENT_BY_DATASET_ID = "DELETE FROM " + DATASET_DEPLOYMENT_TABLE + " WHERE dataset_id=?";
12,245
</BUG> public static final String GET_DATASET_CAPACITY_BY_DATASET_ID = "SELECT * FROM " + DATASET_CAPACITY_TABLE + " WHERE dataset_id = :dataset_id"; public static final String GET_DATASET_CAPACITY_BY_URN = "SELECT * FROM " + DATASET_CAPACITY_TABLE + " WHERE dataset_urn = :dataset_urn"; <BUG>public static final String DELETE_DATASET_CAPACITY_BY_URN = "DELETE FROM " + DATASET_CAPACITY_TABLE + " WHERE dataset_urn=?"; </BUG> public static final String GET_DATASET_TAG_BY_DATASET_ID =
new DatabaseWriter(JdbcUtil.wherehowsJdbcTemplate, DATASET_INVENTORY_TABLE); public static final String GET_DATASET_DEPLOYMENT_BY_DATASET_ID = "SELECT * FROM " + DATASET_DEPLOYMENT_TABLE + " WHERE dataset_id = :dataset_id"; public static final String GET_DATASET_DEPLOYMENT_BY_URN = "SELECT * FROM " + DATASET_DEPLOYMENT_TABLE + " WHERE dataset_urn = :dataset_urn"; public static final String DELETE_DATASET_DEPLOYMENT_BY_DATASET_ID = "DELETE FROM " + DATASET_DEPLOYMENT_TABLE + " WHERE dataset_id=?"; public static final String DELETE_DATASET_CAPACITY_BY_DATASET_ID = "DELETE FROM " + DATASET_CAPACITY_TABLE + " WHERE dataset_id=?";
12,246
"SELECT * FROM " + DATASET_CASE_SENSITIVE_TABLE + " WHERE dataset_urn = :dataset_urn"; public static final String GET_DATASET_REFERENCE_BY_DATASET_ID = "SELECT * FROM " + DATASET_REFERENCE_TABLE + " WHERE dataset_id = :dataset_id"; public static final String GET_DATASET_REFERENCE_BY_URN = "SELECT * FROM " + DATASET_REFERENCE_TABLE + " WHERE dataset_urn = :dataset_urn"; <BUG>public static final String DELETE_DATASET_REFERENCE_BY_URN = "DELETE FROM " + DATASET_REFERENCE_TABLE + " WHERE dataset_urn=?"; </BUG> public static final String GET_DATASET_PARTITION_BY_DATASET_ID =
public static final String DELETE_DATASET_REFERENCE_BY_DATASET_ID = "DELETE FROM " + DATASET_REFERENCE_TABLE + " WHERE dataset_id=?";
12,247
"SELECT * FROM " + DATASET_SECURITY_TABLE + " WHERE dataset_urn = :dataset_urn"; public static final String GET_DATASET_OWNER_BY_DATASET_ID = "SELECT * FROM " + DATASET_OWNER_TABLE + " WHERE dataset_id = :dataset_id ORDER BY sort_id"; public static final String GET_DATASET_OWNER_BY_URN = "SELECT * FROM " + DATASET_OWNER_TABLE + " WHERE dataset_urn = :dataset_urn ORDER BY sort_id"; <BUG>public static final String DELETE_DATASET_OWNER_BY_URN = "DELETE FROM " + DATASET_OWNER_TABLE + " WHERE dataset_urn=?"; </BUG> public static final String GET_USER_BY_USER_ID = "SELECT * FROM " + EXTERNAL_USER_TABLE + " WHERE user_id = :user_id";
public static final String DELETE_DATASET_OWNER_BY_DATASET_ID = "DELETE FROM " + DATASET_OWNER_TABLE + " WHERE dataset_id=?";
12,248
"SELECT app_id FROM " + EXTERNAL_GROUP_TABLE + " WHERE group_id = :group_id GROUP BY group_id"; public static final String GET_DATASET_CONSTRAINT_BY_DATASET_ID = "SELECT * FROM " + DATASET_CONSTRAINT_TABLE + " WHERE dataset_id = :dataset_id"; public static final String GET_DATASET_CONSTRAINT_BY_URN = "SELECT * FROM " + DATASET_CONSTRAINT_TABLE + " WHERE dataset_urn = :dataset_urn"; <BUG>public static final String DELETE_DATASET_CONSTRAINT_BY_URN = "DELETE FROM " + DATASET_CONSTRAINT_TABLE + " WHERE dataset_urn=?"; </BUG> public static final String GET_DATASET_INDEX_BY_DATASET_ID =
public static final String DELETE_DATASET_CONSTRAINT_BY_DATASET_ID = "DELETE FROM " + DATASET_CONSTRAINT_TABLE + " WHERE dataset_id=?";
12,249
</BUG> public static final String GET_DATASET_INDEX_BY_DATASET_ID = "SELECT * FROM " + DATASET_INDEX_TABLE + " WHERE dataset_id = :dataset_id"; public static final String GET_DATASET_INDEX_BY_URN = "SELECT * FROM " + DATASET_INDEX_TABLE + " WHERE dataset_urn = :dataset_urn"; <BUG>public static final String DELETE_DATASET_INDEX_BY_URN = "DELETE FROM " + DATASET_INDEX_TABLE + " WHERE dataset_urn=?"; </BUG> public static final String GET_DATASET_SCHEMA_BY_DATASET_ID =
"SELECT app_id FROM " + EXTERNAL_GROUP_TABLE + " WHERE group_id = :group_id GROUP BY group_id"; public static final String GET_DATASET_CONSTRAINT_BY_DATASET_ID = "SELECT * FROM " + DATASET_CONSTRAINT_TABLE + " WHERE dataset_id = :dataset_id"; public static final String GET_DATASET_CONSTRAINT_BY_URN = "SELECT * FROM " + DATASET_CONSTRAINT_TABLE + " WHERE dataset_urn = :dataset_urn"; public static final String DELETE_DATASET_CONSTRAINT_BY_DATASET_ID = "DELETE FROM " + DATASET_CONSTRAINT_TABLE + " WHERE dataset_id=?"; public static final String DELETE_DATASET_INDEX_BY_DATASET_ID = "DELETE FROM " + DATASET_INDEX_TABLE + " WHERE dataset_id=?";
12,250
DatasetSecurityRecord record = om.convertValue(security, DatasetSecurityRecord.class); record.setDatasetId(datasetId); record.setDatasetUrn(urn); record.setModifiedTime(System.currentTimeMillis() / 1000); try { <BUG>Map<String, Object> result = getDatasetSecurityByDatasetId(datasetId); </BUG> String[] columns = record.getDbColumnNames(); Object[] columnValues = record.getAllValuesToString(); String[] conditions = {"dataset_id"};
DatasetSecurityRecord result = getDatasetSecurityByDatasetId(datasetId);
12,251
String fieldPath; String descend; Integer prefixLength; String filter; public DatasetFieldIndexRecord() { <BUG>} @Override public String toString() { try { return new ObjectMapper().writeValueAsString(this); } catch (JsonProcessingException ex) { return null; }</BUG> }
[DELETED]
12,252
String actorUrn; String type; Long time; String note; public DatasetChangeAuditStamp() { <BUG>} @Override public String toString() { try { return new ObjectMapper().writeValueAsString(this); } catch (JsonProcessingException ex) { return null; }</BUG> }
[DELETED]
12,253
package wherehows.common.schemas; <BUG>import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.reflect.Field; import java.util.HashMap;</BUG> import java.util.List; import java.util.Map;
import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOException; import java.util.Date; import java.util.Collection; import java.util.HashMap;
12,254
import java.util.Map; import java.util.HashMap; import java.util.ArrayList; import java.util.Arrays; import java.util.Set; <BUG>import java.util.UUID; import org.apache.commons.logging.Log;</BUG> import org.apache.commons.logging.LogFactory; import org.apache.commons.lang.StringUtils; import org.json.simple.JSONValue;
import javax.servlet.http.HttpServletRequest; import org.apache.commons.logging.Log;
12,255
import org.sakaiproject.site.api.SitePage; import org.sakaiproject.site.cover.SiteService; import org.sakaiproject.site.api.ToolConfiguration; import org.sakaiproject.component.api.ServerConfigurationService; import org.sakaiproject.util.FormattedText; <BUG>import org.sakaiproject.portal.util.PortalUtils; import org.sakaiproject.tool.cover.SessionManager;</BUG> import org.sakaiproject.lti.api.LTIService; import org.sakaiproject.basiclti.util.SakaiBLTIUtil; import org.imsglobal.basiclti.BasicLTIUtil;
import org.sakaiproject.portal.util.ToolUtils; import org.sakaiproject.portal.util.URLUtils; // REMOVE AFTER TESTING import org.sakaiproject.tool.cover.SessionManager;
12,256
if ( profileTool.get(LTIService.LTI_TITLE) != null ) newTool.put(LTIService.LTI_PAGETITLE, profileTool.get(LTIService.LTI_TITLE)); // Duplicate by default if ( profileTool.get("button") != null ) newTool.put(LTIService.LTI_PAGETITLE, profileTool.get("button")); // Note different fields if ( profileTool.get(LTIService.LTI_DESCRIPTION) != null ) newTool.put(LTIService.LTI_DESCRIPTION, profileTool.get(LTIService.LTI_DESCRIPTION)); if ( profileTool.get(LTIService.LTI_PARAMETER) != null ) newTool.put(LTIService.LTI_PARAMETER, profileTool.get(LTIService.LTI_PARAMETER)); if ( profileTool.get(LTIService.LTI_ENABLED_CAPABILITY) != null ) newTool.put(LTIService.LTI_ENABLED_CAPABILITY, profileTool.get(LTIService.LTI_ENABLED_CAPABILITY)); <BUG>System.out.println("newTool="+newTool); theTools.add(newTool);</BUG> } return null; // Success }
M_log.info("newTool="+newTool); theTools.add(newTool);
12,257
if ( ltiService.deleteContent(key) ) { state.setAttribute(STATE_SUCCESS,rb.getString("success.deleted")); } else { addAlert(state,rb.getString("error.delete.fail")); <BUG>} switchPanel(state, "Refresh"); }</BUG> public String buildLinkAddPanelContext(VelocityPortlet portlet, Context context, RunData data, SessionState state)
if ( ToolUtils.isInlineRequest(data.getRequest()) ) { switchPanel(state, "ToolSite");
12,258
{ switchPanel(state, "Error"); } return; } <BUG>state.setAttribute(STATE_SUCCESS,rb.getString("success.link.add")); switchPanel(state, "Refresh"); }</BUG> public String buildLinkRemovePanelContext(VelocityPortlet portlet, Context context, RunData data, SessionState state)
state.setAttribute(STATE_SUCCESS,rb.getString("success.deleted")); } else { addAlert(state,rb.getString("error.delete.fail")); if ( ToolUtils.isInlineRequest(data.getRequest()) ) { switchPanel(state, "ToolSite"); } else { public String buildLinkAddPanelContext(VelocityPortlet portlet, Context context,
12,259
<BUG>package mage.sets.commander2014; import java.util.UUID;</BUG> import mage.MageInt; import mage.ObjectColor; import mage.abilities.Ability;
import java.util.ArrayList; import java.util.List; import java.util.UUID;
12,260
import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; import mage.game.Game; import mage.game.permanent.Permanent; <BUG>import mage.target.targetpointer.FixedTarget; </BUG> import mage.watchers.common.CastFromHandWatcher; public class BreachingLeviathan extends CardImpl { public BreachingLeviathan(UUID ownerId) {
import mage.target.targetpointer.FixedTargets;
12,261
<BUG>package mage.sets.portalthreekingdoms; import java.util.UUID;</BUG> import mage.abilities.Ability; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.OneShotEffect;
import java.util.ArrayList; import java.util.List; import java.util.UUID;
12,262
import mage.filter.predicate.mageobject.CardTypePredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetOpponent; <BUG>import mage.target.targetpointer.FixedTarget; </BUG> public class Exhaustion extends CardImpl { public Exhaustion(UUID ownerId) { super(ownerId, 42, "Exhaustion", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{U}");
import mage.target.targetpointer.FixedTargets;
12,263
import mage.abilities.Ability; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.OneShotEffect; <BUG>import mage.abilities.effects.common.DoIfClashWonEffect; import mage.abilities.effects.common.PreventAllDamageByAllEffect; import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;</BUG> import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome;
import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
12,264
import mage.constants.Rarity; import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; <BUG>import mage.target.targetpointer.FixedTarget; </BUG> public class PollenLullaby extends CardImpl { public PollenLullaby(UUID ownerId) { super(ownerId, 26, "Pollen Lullaby", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{W}");
import mage.target.targetpointer.FixedTargets;
12,265
import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AttackingPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; <BUG>import mage.target.targetpointer.FixedTarget; </BUG> public class Tangle extends CardImpl { public Tangle(UUID ownerId) { super(ownerId, 213, "Tangle", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{G}");
import mage.target.targetpointer.FixedTargets;
12,266
<BUG>package mage.sets.magic2010; import java.util.UUID; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity;</BUG> import mage.abilities.Ability;
import java.util.ArrayList; import java.util.List;
12,267
import org.slf4j.LoggerFactory; public class SalGroupServiceImpl implements SalGroupService, ItemLifeCycleSource { private static final Logger LOG = LoggerFactory.getLogger(SalGroupServiceImpl.class); private final GroupService<AddGroupInput, AddGroupOutput> addGroup; private final GroupService<Group, UpdateGroupOutput> updateGroup; <BUG>private final GroupService<RemoveGroupInput, RemoveGroupOutput> removeGroup; private final DeviceContext deviceContext;</BUG> private ItemLifecycleListener itemLifecycleListener; public SalGroupServiceImpl(final RequestContextStack requestContextStack, final DeviceContext deviceContext, final ConvertorExecutor convertorExecutor) { this.deviceContext = deviceContext;
private final GroupMessageService<AddGroupOutput> addGroupMessage; private final GroupMessageService<UpdateGroupOutput> updateGroupMessage; private final GroupMessageService<RemoveGroupOutput> removeGroupMessage; private final DeviceContext deviceContext;
12,268
private ItemLifecycleListener itemLifecycleListener; public SalGroupServiceImpl(final RequestContextStack requestContextStack, final DeviceContext deviceContext, final ConvertorExecutor convertorExecutor) { this.deviceContext = deviceContext; addGroup = new GroupService<>(requestContextStack, deviceContext, AddGroupOutput.class, convertorExecutor); updateGroup = new GroupService<>(requestContextStack, deviceContext, UpdateGroupOutput.class, convertorExecutor); <BUG>removeGroup = new GroupService<>(requestContextStack, deviceContext, RemoveGroupOutput.class, convertorExecutor); }</BUG> @Override public void setItemLifecycleListener(@Nullable ItemLifecycleListener itemLifecycleListener) { this.itemLifecycleListener = itemLifecycleListener;
addGroupMessage = new GroupMessageService<>(requestContextStack, deviceContext, AddGroupOutput.class); updateGroupMessage = new GroupMessageService<>(requestContextStack, deviceContext, UpdateGroupOutput.class); removeGroupMessage = new GroupMessageService<>(requestContextStack, deviceContext, RemoveGroupOutput.class); }
12,269
public void setItemLifecycleListener(@Nullable ItemLifecycleListener itemLifecycleListener) { this.itemLifecycleListener = itemLifecycleListener; } @Override public Future<RpcResult<AddGroupOutput>> addGroup(final AddGroupInput input) { <BUG>final ListenableFuture<RpcResult<AddGroupOutput>> resultFuture = addGroup.handleServiceCall(input); Futures.addCallback(resultFuture, new FutureCallback<RpcResult<AddGroupOutput>>() {</BUG> @Override public void onSuccess(RpcResult<AddGroupOutput> result) {
final ListenableFuture<RpcResult<AddGroupOutput>> resultFuture = addGroupMessage.isSupported() ? addGroupMessage.handleServiceCall(input) : addGroup.handleServiceCall(input); Futures.addCallback(resultFuture, new FutureCallback<RpcResult<AddGroupOutput>>() {
12,270
}); return resultFuture; } @Override public Future<RpcResult<UpdateGroupOutput>> updateGroup(final UpdateGroupInput input) { <BUG>final ListenableFuture<RpcResult<UpdateGroupOutput>> resultFuture = updateGroup.handleServiceCall(input.getUpdatedGroup()); Futures.addCallback(resultFuture, new FutureCallback<RpcResult<UpdateGroupOutput>>() {</BUG> @Override public void onSuccess(@Nullable RpcResult<UpdateGroupOutput> result) {
final ListenableFuture<RpcResult<UpdateGroupOutput>> resultFuture = updateGroupMessage.isSupported() ? updateGroupMessage.handleServiceCall(input.getUpdatedGroup()) : updateGroup.handleServiceCall(input.getUpdatedGroup()); Futures.addCallback(resultFuture, new FutureCallback<RpcResult<UpdateGroupOutput>>() {
12,271
import java.awt.event.ComponentEvent; import java.awt.event.KeyEvent; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.io.File; <BUG>import java.io.InputStream; import java.util.ArrayList;</BUG> import java.util.List; import java.util.concurrent.atomic.AtomicReference; import javax.swing.BorderFactory;
import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.IntBuffer; import java.util.ArrayList;
12,272
{ glClearColor(0.92F, 0.92F, 0.93F, 1.0F); drawGrid(); glTranslatef(-8, 0, -8); for (int i = 0; i < manager.getCuboidCount(); i++) <BUG>{ Element cube = manager.getCuboid(i); cube.draw(); cube.drawExtras(manager);</BUG> }
GL11.glLoadName(i+1); GL11.glLoadName(0); cube.drawExtras(manager);
12,273
glVertex2i(45, 5); } glEnd(); } private int lastMouseX, lastMouseY; <BUG>private boolean grabbing = false; public void handleInput()</BUG> { final float cameraMod = Math.abs(camera.getZ()); if (Mouse.isButtonDown(0) | Mouse.isButtonDown(1))
private Element grabbed = null; public void handleInput()
12,274
int newMouseY = Mouse.getY(); int xMovement = (int) ((newMouseX - lastMouseX) / 20); int yMovement = (int) ((newMouseY - lastMouseY) / 20); if (xMovement != 0 | yMovement != 0) { <BUG>Element element = manager.getSelectedCuboid(); switch (state)</BUG> { case 0: element.addStartX(xMovement);
if (Mouse.isButtonDown(0)) switch (state)
12,275
package com.mrcrayfish.modelcreator.element; import java.util.List; import com.mrcrayfish.modelcreator.texture.PendingTexture; public interface ElementManager { <BUG>public Element getSelectedCuboid(); public List<Element> getAllCuboids();</BUG> public Element getCuboid(int index); public int getCuboidCount(); public void clearElements();
public void setSelectedCuboid(int pos); public List<Element> getAllCuboids();
12,276
private UpdatePlanBuilder() { } public static UpdatePlan planForStatement(Prepared prepared, @Nullable Integer errKeysPos) throws IgniteCheckedException { assert !prepared.isQuery(); <BUG>GridSqlStatement stmt = new GridSqlQueryParser().parse(prepared); </BUG> if (stmt instanceof GridSqlMerge || stmt instanceof GridSqlInsert) return planForInsert(stmt); else
GridSqlStatement stmt = new GridSqlQueryParser(false).parse(prepared);
12,277
public static final String IGNITE_MBEAN_APPEND_JVM_ID = "IGNITE_MBEAN_APPEND_JVM_ID"; public static final String IGNITE_MBEAN_APPEND_CLASS_LOADER_ID = "IGNITE_MBEAN_APPEND_CLASS_LOADER_ID"; public static final String IGNITE_EXCEPTION_REGISTRY_MAX_SIZE = "IGNITE_EXCEPTION_REGISTRY_MAX_SIZE"; public static final String IGNITE_CACHE_CLIENT = "IGNITE_CACHE_CLIENT"; public static final String IGNITE_JCACHE_DEFAULT_ISOLATED = "IGNITE_CACHE_CLIENT"; <BUG>public static final String IGNITE_SQL_MERGE_TABLE_MAX_SIZE = "IGNITE_SQL_MERGE_TABLE_MAX_SIZE"; public static final String IGNITE_AFFINITY_HISTORY_SIZE = "IGNITE_AFFINITY_HISTORY_SIZE";</BUG> public static final String IGNITE_DISCOVERY_HISTORY_SIZE = "IGNITE_DISCOVERY_HISTORY_SIZE"; public static final String IGNITE_DISCOVERY_CLIENT_RECONNECT_HISTORY_SIZE = "IGNITE_DISCOVERY_CLIENT_RECONNECT_HISTORY_SIZE";
public static final String IGNITE_SQL_MERGE_TABLE_PREFETCH_SIZE = "IGNITE_SQL_MERGE_TABLE_PREFETCH_SIZE"; public static final String IGNITE_AFFINITY_HISTORY_SIZE = "IGNITE_AFFINITY_HISTORY_SIZE";
12,278
throw new QueryCancelledException(); throw new IgniteCheckedException("Failed to execute SQL query.", e); } finally { if (timeoutMillis > 0) <BUG>((Session)((JdbcConnection)conn).getSession()).setQueryTimeout(0); }</BUG> } public ResultSet executeSqlQueryWithTimer(String space, Connection conn,
session(conn).setQueryTimeout(0);
12,279
int idx = 1; for (Object arg : params) bindObject(stmt, idx++, arg); } } <BUG>public void setupConnection(Connection conn, boolean distributedJoins, boolean enforceJoinOrder) { </BUG> Session s = session(conn); s.setForceJoinOrder(enforceJoinOrder); s.setJoinBatchEnabled(distributedJoins);
public static void setupConnection(Connection conn, boolean distributedJoins, boolean enforceJoinOrder) {
12,280
final String sqlQry = qry.getSql(); Connection c = connectionForSpace(space); final boolean enforceJoinOrder = qry.isEnforceJoinOrder(); final boolean distributedJoins = qry.isDistributedJoins() && cctx.isPartitioned(); final boolean grpByCollocated = qry.isCollocated(); <BUG>GridCacheTwoStepQuery twoStepQry; </BUG> List<GridQueryFieldMetadata> meta; final TwoStepCachedQueryKey cachedQryKey = new TwoStepCachedQueryKey(space, sqlQry, grpByCollocated, distributedJoins, enforceJoinOrder);
GridCacheTwoStepQuery twoStepQry = null;
12,281
catch (IgniteCheckedException e) { throw new IgniteSQLException("Failed to execute DML statement [qry=" + sqlQry + ", params=" + Arrays.deepToString(qry.getArgs()) + "]", e); } } <BUG>try { bindParameters(stmt, F.asList(qry.getArgs())); twoStepQry = GridSqlQuerySplitter.split((JdbcPreparedStatement)stmt, qry.getArgs(), grpByCollocated, distributedJoins);</BUG> List<Integer> caches;
[DELETED]
12,282
oldIds.add(new Integer(top)); top = getNextSiblingFor(top); } DocumentImpl expandedDoc = expandRefs(); org.exist.dom.DocumentImpl doc = context.storeTemporaryDoc(expandedDoc); <BUG>NodeList cl = doc.getDocumentElement().getChildNodes(); storedNodes = new Int2ObjectHashMap(); top = 1;</BUG> int i = 0; while(top > 0 && i < cl.getLength()) {
org.exist.dom.ElementImpl root = (org.exist.dom.ElementImpl) doc.getDocumentElement(); NodeList cl = root.getChildNodes(); storedNodes.put(0, new NodeProxy(doc, root.getGID(), root.getInternalAddress())); top = 1;
12,283
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", false, false), ALPHA_MAP ("alpha", "png", false, false);</BUG> private static final byte IMG_PNG = 1, IMG_JPG = 2;
USER ("user", "user%d", "png", false, false), ALPHA_MAP ("alpha", "png", false, false);
12,284
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 preload; } public Image getImage() { setDefaultImage();
GameImage(String filename, String filenameFormat, String type, boolean beatmapSkinnable, boolean preload) { this(filename, type, beatmapSkinnable, preload); this.filenameFormat = filenameFormat; public boolean isBeatmapSkinnable() { return beatmapSkinnable; }
12,285
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(</BUG> xPaddingLeft, yPos + rectHeight - Fonts.DEFAULT.getLineHeight() - yPadding, scoreString, white ); Fonts.DEFAULT.drawString(
Fonts.MEDIUM.drawString(xPaddingLeft, yPos + yPadding, playerName, white);
12,286
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], hitResultCount[HIT_MISS]
public float getScorePercent() {
12,287
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, Beatmap beatmap) { if (replay != null && frames == null)
sd.playerName = GameMod.AUTO.isActive() ? UserList.AUTO_USER_NAME : UserList.get().getCurrentUser().getName(); return sd;
12,288
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) hitResultCount[HIT_300]; replay.hit100 = (short) hitResultCount[HIT_100]; replay.hit50 = (short) hitResultCount[HIT_50];
replay.playerName = UserList.get().getCurrentUser().getName(); replay.replayHash = Long.toString(System.currentTimeMillis()); // TODO
12,289
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 java.io.BufferedReader; import java.io.File;
import itdelatrisu.opsu.user.UserButton; import itdelatrisu.opsu.user.UserList; import java.awt.image.BufferedImage;
12,290
Logger.normal(this, "Rejecting (overload) data request from "+m.getSource().getPeer()+": "+e); } node.unlockUID(id, isSSK, false); return true; } <BUG>RequestHandler rh = new RequestHandler(m, id, node); // Do we need to keep a record of in flight RHs? rh.run(); return true;</BUG> } private boolean handleInsertRequest(Message m, boolean isSSK) {
RequestHandler rh = new RequestHandler(m, id, node); Thread t = new Thread(rh, "RequestHandler for UID "+id); t.setDaemon(true); t.start();
12,291
import freenet.keys.KeyBlock; import freenet.keys.NodeCHK; import freenet.keys.NodeSSK; import freenet.keys.SSKBlock; import freenet.support.Logger; <BUG>public class RequestHandler implements ByteCounter, StatusChangeCallback { private final static short INITIALIZE = 1; private final static short WAIT_FOR_FIRST_REPLY = 2; private final static short FINISHED = 3; private short currentState = INITIALIZE;</BUG> private static boolean logMINOR;
public class RequestHandler implements Runnable, ByteCounter {
12,292
final PeerNode source; private double closestLoc; private boolean needsPubKey; final Key key; private boolean finalTransferFailed = false; <BUG>final boolean resetClosestLoc; private short waitStatus = 0; private int status = RequestSender.NOT_FINISHED; private boolean shouldHaveStartedTransfer = false; private RequestSender rs = null;</BUG> public RequestHandler(Message m, long id, Node n) {
public String toString() { return super.toString()+" for "+uid; }
12,293
Message msg = DMT.createFNPRejectedOverload(uid, false); source.sendAsync(msg, null, 0, null); } if((waitStatus & RequestSender.WAIT_TRANSFERRING_DATA) != 0) { Message df = DMT.createFNPCHKDataFound(uid, rs.getHeaders()); <BUG>source.sendAsync(df, null, 0, null); PartiallyReceivedBlock prb = rs.getPRB();</BUG> BlockTransmitter bt = new BlockTransmitter(node.usm, source, uid, prb, node.outputThrottle, this); node.addTransferringRequestHandler(uid);
source.send(df, null); PartiallyReceivedBlock prb = rs.getPRB();
12,294
node.nodeStats.successfulChkFetchBytesSentAverage.report(sent); node.nodeStats.successfulChkFetchBytesReceivedAverage.report(sent); } } } <BUG>} private Message createDataFound(KeyBlock block) {</BUG> if(block instanceof CHKBlock) return DMT.createFNPCHKDataFound(uid, block.getRawHeaders()); else if(block instanceof SSKBlock) {
private Message createDataFound(KeyBlock block) {
12,295
{ private static final Logger logger = LoggerFactory.getLogger(SnapshotBackupManager.class); public static String JOBNAME = "SnapshotBackupManager"; private final AbstractRepository repository; private final HttpModule httpModule; <BUG>private ElasticcarMonitor elasticcarMonitor = new ElasticcarMonitor(); private static final AtomicBoolean isSnapshotRunning = new AtomicBoolean(false);</BUG> private static final DateTimeZone currentZone = DateTimeZone.UTC; private static final String S3_REPO_FOLDER_DATE_FORMAT = "yyyyMMddHHmm"; @Inject
private final AtomicInteger snapshotSuccess = new AtomicInteger(0); private final AtomicInteger snapshotFailure = new AtomicInteger(0); private final AtomicLong snapshotDuration = new AtomicLong(0); private static final AtomicBoolean isSnapshotRunning = new AtomicBoolean(false);
12,296
@Override public String getName() { return JOBNAME; } <BUG>public static String getSnapshotName(String indices,boolean includeIndexNameInSnapshot) { StringBuilder snapshotName = new StringBuilder();</BUG> if (includeIndexNameInSnapshot) { String indexName; if (indices.toLowerCase().equals("all"))
public String getSnapshotName(String indices,boolean includeIndexNameInSnapshot) { StringBuilder snapshotName = new StringBuilder();
12,297
import org.codehaus.jackson.type.TypeReference; import org.elasticsearch.action.admin.indices.delete.DeleteIndexResponse; import org.elasticsearch.action.admin.indices.status.IndexStatus; import org.elasticsearch.action.admin.indices.status.IndicesStatusResponse; import org.elasticsearch.client.Client; <BUG>import org.elasticsearch.client.transport.TransportClient; import org.slf4j.Logger;</BUG> import org.slf4j.LoggerFactory; import java.io.IOException; import java.util.List;
import org.joda.time.DateTime; import org.slf4j.Logger;
12,298
private final InstanceManager instanceManager; private final ElasticSearchIndexManager esIndexManager; private final SnapshotBackupManager snapshotBackupManager; private final HttpModule httpModule; private static final int ES_MONITORING_INITIAL_DELAY = 10; <BUG>private static final int ES_SNAPSHOT_INITIAL_DELAY = 100; private static final Logger logger = LoggerFactory.getLogger(ElasticCarServer.class);</BUG> @Inject public ElasticCarServer(IConfiguration config, ElasticCarScheduler scheduler, HttpModule httpModule, IElasticsearchProcess esProcess, Sleeper sleeper, InstanceManager instanceManager,
private static final int ES_HEALTH_MONITOR_DELAY = 600; private static final Logger logger = LoggerFactory.getLogger(ElasticCarServer.class);
12,299
displayDevice.getViewportInWindowUnits().getHeight()); if (screenRect.width == sketchWidth && screenRect.height == sketchHeight) { fullScreen = true; } <BUG>if (fullScreen || spanDisplays) { sketchWidth = screenRect.width;</BUG> sketchHeight = screenRect.height; } window.setPosition(sketchX, sketchY);
if (spanDisplays) { sketchWidth = screenRect.width;
12,300
window.setPosition(sketchX, sketchY); window.setSize(sketchWidth, sketchHeight); System.out.println("deviceIndex: " + deviceIndex); System.out.println(displayDevice); System.out.println("Screen res " + screenWidth + "x" + screenHeight); <BUG>if (fullScreen) { if (spanDisplays) {</BUG> window.setFullscreen(monitors); } else { window.setFullscreen(true);
PApplet.hideMenuBar(); if (spanDisplays) {