id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
47,201 | package org.meridor.perspective.events;
<BUG>import org.meridor.perspective.beans.*;
import java.time.ZonedDateTime;
import java.util.UUID;
public final class EventFactory {</BUG>
public static <T extends InstanceEvent> T instanceEvent(Class<T> eventClass, Instance instance) {
| import org.meridor.perspective.beans.InstanceState;
import static org.meridor.perspective.beans.InstanceState.*;
public final class EventFactory {
|
47,202 | return new InstanceResumingEvent();
case SHUTOFF:
return new InstanceShutOffEvent();
case SHUTTING_DOWN:
return new InstanceShuttingDownEvent();
<BUG>case SNAPSHOTTING:
return new InstanceSnapshottingEvent();</BUG>
case STARTING:
return new InstanceStartingEvent();
case SUSPENDING:
| [DELETED] |
47,203 | package org.meridor.perspective.events;
import org.junit.Test;
<BUG>import org.meridor.perspective.beans.*;
import java.time.ZonedDateTime;</BUG>
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.assertThat;
import static org.meridor.perspective.beans.InstanceState.*;
| import org.meridor.perspective.beans.InstanceState;
import java.time.ZonedDateTime;
|
47,204 | testInstanceToEvent(PAUSED, InstancePausedEvent.class);
testInstanceToEvent(PAUSING, InstancePausingEvent.class);
testInstanceToEvent(QUEUED, InstanceQueuedEvent.class);
testInstanceToEvent(REBOOTING, InstanceRebootingEvent.class);
testInstanceToEvent(REBUILDING, InstanceRebuildingEvent.class);
<BUG>testInstanceToEvent(RESIZING, InstanceResizingEvent.class);
testInstanceToEvent(SHUTOFF, InstanceShutOffEvent.class);</BUG>
testInstanceToEvent(SHUTTING_DOWN, InstanceShuttingDownEvent.class);
testInstanceToEvent(STARTING, InstanceStartingEvent.class);
testInstanceToEvent(SUSPENDING, InstanceSuspendingEvent.class);
| testInstanceToEvent(RESUMING, InstanceResumingEvent.class);
testInstanceToEvent(SHUTOFF, InstanceShutOffEvent.class);
|
47,205 | "Syncing image {} ({}) with state = {} for the first time",
event.getImage().getName(),
event.getImage().getId(),
event.getClass().getSimpleName()
);
<BUG>Yatomata<ImageFSM> fsm = fsmBuilderAware.get(ImageFSM.class).build();
fsm.fire(event);</BUG>
} else {
LOG.debug(
"Will not update image {} ({}) as it does not exist or was already deleted",
| Yatomata<ImageFSM> fsm = new FSMBuilder<>(fsmInstance).build();
fsm.fire(event);
|
47,206 | <BUG>package org.jetbrains.plugins.groovy.dsl;
import org.jetbrains.plugins.groovy.lang.resolve.NonCodeMembersProcessor;
import org.jetbrains.plugins.groovy.lang.psi.GroovyFile;
import org.jetbrains.plugins.groovy.lang.psi.GroovyPsiElementFactory;
import com.intellij.psi.*;
import com.intellij.psi.scope.PsiScopeProcessor;
import com.intellij.psi.scope.NameHint;
import com.intellij.util.PairProcessor;
import com.intellij.util.Function;
import com.intellij.openapi.util.text.StringUtil;
import java.util.LinkedHashMap;</BUG>
public class DslMembersProcessor implements NonCodeMembersProcessor {
| import com.intellij.psi.PsiClass;
import com.intellij.psi.PsiClassType;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiType;
|
47,207 | final GroovyDslExecutor cached = getCachedExecutor(vfile, stamp);
if (cached == null) {
final String text = file.getText();
count++;
scheduleParsing(queue, file, vfile, stamp, text);
<BUG>} else if (!consumer.process(file, cached)) {
return false;
}</BUG>
}
for (final String unusedPath : unusedPaths) {
| } else {
cached.processVariants(descriptor, consumer);
|
47,208 | while (count > 0) {
ProgressManager.getInstance().checkCanceled();
final Pair<GroovyFile, GroovyDslExecutor> pair = queue.poll(20, TimeUnit.MILLISECONDS);
if (pair != null) {
final GroovyDslExecutor executor = pair.second;
<BUG>if (executor != null && !consumer.process(pair.first, executor)) {
return false;
}</BUG>
count--;
}
| if (executor != null) {
executor.processVariants(descriptor, consumer);
|
47,209 |
receiverType = semanticServices.getTypeTransformer().transformToType(characteristicMember.getReceiverType().getTypeString(), typeVariableResolverForPropertyInternals);
</BUG>
}
<BUG>else {
receiverType = semanticServices.getTypeTransformer().transformToType(characteristicMember.getReceiverType().getPsiType(), typeVariableResolverForPropertyInternals);
}
return receiverType;</BUG>
}
| @Nullable
private JetType getReceiverType(
PropertyPsiDataElement characteristicMember,
TypeVariableResolver typeVariableResolverForPropertyInternals
) {
if (characteristicMember.getReceiverType() == null) {
return null;
if (!characteristicMember.getReceiverType().getTypeString().isEmpty()) {
return semanticServices.getTypeTransformer().transformToType(characteristicMember.getReceiverType().getTypeString(), typeVariableResolverForPropertyInternals);
return semanticServices.getTypeTransformer().transformToType(characteristicMember.getReceiverType().getPsiType(), typeVariableResolverForPropertyInternals);
|
47,210 | import org.spongepowered.api.world.Locatable;
import org.spongepowered.api.world.Location;
import org.spongepowered.api.world.World;
import javax.annotation.Nullable;
import java.util.List;
<BUG>import java.util.Optional;
import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;</BUG>
public class CommandDelete extends FCCommandBase {
private static final FlagMapper MAPPER = map -> key -> value -> {
map.put(key, value);
| import java.util.stream.Stream;
import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;
|
47,211 | .append(Text.of(TextColors.GREEN, "Usage: "))
.append(getUsage(source))
.build());
return CommandResult.empty();
} else if (isIn(REGIONS_ALIASES, parse.args[0])) {
<BUG>if (parse.args.length < 2) throw new CommandException(Text.of("Must specify a name!"));
IRegion region = FGManager.getInstance().getRegion(parse.args[1]);
</BUG>
boolean isWorldRegion = false;
if (region == null) {
| String regionName = parse.args[1];
IRegion region = FGManager.getInstance().getRegion(regionName).orElse(null);
|
47,212 | </BUG>
isWorldRegion = true;
}
if (region == null)
<BUG>throw new CommandException(Text.of("No region exists with the name \"" + parse.args[1] + "\"!"));
if (region instanceof GlobalWorldRegion) {
</BUG>
throw new CommandException(Text.of("You may not delete the global region!"));
}
| if (world == null)
throw new CommandException(Text.of("No world exists with name \"" + worldName + "\"!"));
if (world == null) throw new CommandException(Text.of("Must specify a world!"));
region = FGManager.getInstance().getWorldRegion(world, regionName).orElse(null);
throw new CommandException(Text.of("No region exists with the name \"" + regionName + "\"!"));
if (region instanceof IGlobal) {
|
47,213 | source.getName() + " deleted " + (isWorldRegion ? "world" : "") + "region"
);
return CommandResult.success();
} else if (isIn(HANDLERS_ALIASES, parse.args[0])) {
if (parse.args.length < 2) throw new CommandException(Text.of("Must specify a name!"));
<BUG>IHandler handler = FGManager.getInstance().gethandler(parse.args[1]);
if (handler == null)
throw new ArgumentParseException(Text.of("No handler exists with that name!"), parse.args[1], 1);
if (handler instanceof GlobalHandler)</BUG>
throw new CommandException(Text.of("You may not delete the global handler!"));
| Optional<IHandler> handlerOpt = FGManager.getInstance().gethandler(parse.args[1]);
if (!handlerOpt.isPresent())
IHandler handler = handlerOpt.get();
if (handler instanceof GlobalHandler)
|
47,214 | .excludeCurrent(true)
.autoCloseQuotes(true)
.parse();
if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) {
if (parse.current.index == 0)
<BUG>return ImmutableList.of("region", "handler").stream()
.filter(new StartsWithPredicate(parse.current.token))</BUG>
.map(args -> parse.current.prefix + args)
.collect(GuavaCollectors.toImmutableList());
else if (parse.current.index == 1) {
| return Stream.of("region", "handler")
.filter(new StartsWithPredicate(parse.current.token))
|
47,215 | .excludeCurrent(true)
.autoCloseQuotes(true)
.parse();
if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) {
if (parse.current.index == 0)
<BUG>return ImmutableList.of("region", "handler").stream()
.filter(new StartsWithPredicate(parse.current.token))</BUG>
.map(args -> parse.current.prefix + args)
.collect(GuavaCollectors.toImmutableList());
else if (parse.current.index == 1) {
| return Stream.of("region", "handler")
.filter(new StartsWithPredicate(parse.current.token))
|
47,216 | @Dependency(id = "foxcore")
},
description = "A world protection plugin built for SpongeAPI. Requires FoxCore.",
authors = {"gravityfox"},
url = "https://github.com/FoxDenStudio/FoxGuard")
<BUG>public final class FoxGuardMain {
public final Cause pluginCause = Cause.builder().named("plugin", this).build();
private static FoxGuardMain instanceField;</BUG>
@Inject
private Logger logger;
| private static FoxGuardMain instanceField;
|
47,217 | 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;
}
|
47,218 | return configDirectory;
}
public boolean isLoaded() {
return loaded;
}
<BUG>public static Cause getCause() {
return instance().pluginCause;
}</BUG>
public EconomyService getEconomyService() {
return economyService;
| [DELETED] |
47,219 | import org.spongepowered.api.world.Locatable;
import org.spongepowered.api.world.Location;
import org.spongepowered.api.world.World;
import javax.annotation.Nullable;
import java.util.*;
<BUG>import java.util.stream.Collectors;
import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;</BUG>
public class CommandHere extends FCCommandBase {
private static final String[] PRIORITY_ALIASES = {"priority", "prio", "p"};
private static final FlagMapper MAPPER = map -> key -> value -> {
| import java.util.stream.Stream;
import static net.foxdenstudio.sponge.foxcore.plugin.util.Aliases.*;
|
47,220 | .excludeCurrent(true)
.autoCloseQuotes(true)
.parse();
if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) {
if (parse.current.index == 0)
<BUG>return ImmutableList.of("region", "handler").stream()
.filter(new StartsWithPredicate(parse.current.token))</BUG>
.map(args -> parse.current.prefix + args)
.collect(GuavaCollectors.toImmutableList());
else if (parse.current.index > 0) {
| return Stream.of("region", "handler")
.filter(new StartsWithPredicate(parse.current.token))
|
47,221 | private static FGStorageManager instance;
private final Logger logger = FoxGuardMain.instance().getLogger();</BUG>
private final Set<LoadEntry> loaded = new HashSet<>();
private final Path directory = getDirectory();
private final Map<String, Path> worldDirectories;
<BUG>private FGStorageManager() {
defaultModifiedMap = new CacheMap<>((k, m) -> {</BUG>
if (k instanceof IFGObject) {
m.put((IFGObject) k, true);
return true;
| public final HashMap<IFGObject, Boolean> defaultModifiedMap;
private final UserStorageService userStorageService;
private final Logger logger = FoxGuardMain.instance().getLogger();
userStorageService = FoxGuardMain.instance().getUserStorage();
defaultModifiedMap = new CacheMap<>((k, m) -> {
|
47,222 | String name = fgObject.getName();
Path singleDir = dir.resolve(name.toLowerCase());
</BUG>
boolean shouldSave = fgObject.shouldSave();
if (force || shouldSave) {
<BUG>logger.info((shouldSave ? "S" : "Force s") + "aving handler \"" + name + "\" in directory: " + singleDir);
</BUG>
constructDirectory(singleDir);
try {
fgObject.save(singleDir);
| UUID owner = fgObject.getOwner();
boolean isOwned = !owner.equals(SERVER_UUID);
Optional<User> userOwner = userStorageService.get(owner);
String logName = (userOwner.isPresent() ? userOwner.get().getName() + ":" : "") + (isOwned ? owner + ":" : "") + name;
if (fgObject.autoSave()) {
Path singleDir = serverDir.resolve(name.toLowerCase());
logger.info((shouldSave ? "S" : "Force s") + "aving handler " + logName + " in directory: " + singleDir);
|
47,223 | if (fgObject.autoSave()) {
Path singleDir = dir.resolve(name.toLowerCase());
</BUG>
boolean shouldSave = fgObject.shouldSave();
if (force || shouldSave) {
<BUG>logger.info((shouldSave ? "S" : "Force s") + "aving world region \"" + name + "\" in directory: " + singleDir);
</BUG>
constructDirectory(singleDir);
try {
fgObject.save(singleDir);
| Path singleDir = serverDir.resolve(name.toLowerCase());
logger.info((shouldSave ? "S" : "Force s") + "aving world region " + logName + " in directory: " + singleDir);
|
47,224 | public synchronized void loadRegionLinks() {
logger.info("Loading region links");
try (DB mainDB = DBMaker.fileDB(directory.resolve("regions.foxdb").normalize().toString()).make()) {
Map<String, String> linksMap = mainDB.hashMap("links", Serializer.STRING, Serializer.STRING).createOrOpen();
linksMap.entrySet().forEach(entry -> {
<BUG>IRegion region = FGManager.getInstance().getRegion(entry.getKey());
if (region != null) {
logger.info("Loading links for region \"" + region.getName() + "\"");</BUG>
String handlersString = entry.getValue();
| Optional<IRegion> regionOpt = FGManager.getInstance().getRegion(entry.getKey());
if (regionOpt.isPresent()) {
IRegion region = regionOpt.get();
logger.info("Loading links for region \"" + region.getName() + "\"");
|
47,225 | public synchronized void loadWorldRegionLinks(World world) {
logger.info("Loading world region links for world \"" + world.getName() + "\"");
try (DB mainDB = DBMaker.fileDB(worldDirectories.get(world.getName()).resolve("wregions.foxdb").normalize().toString()).make()) {
Map<String, String> linksMap = mainDB.hashMap("links", Serializer.STRING, Serializer.STRING).createOrOpen();
linksMap.entrySet().forEach(entry -> {
<BUG>IRegion region = FGManager.getInstance().getWorldRegion(world, entry.getKey());
if (region != null) {
logger.info("Loading links for world region \"" + region.getName() + "\"");</BUG>
String handlersString = entry.getValue();
| Optional<IWorldRegion> regionOpt = FGManager.getInstance().getWorldRegion(world, entry.getKey());
if (regionOpt.isPresent()) {
IWorldRegion region = regionOpt.get();
logger.info("Loading links for world region \"" + region.getName() + "\"");
|
47,226 | 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
|
47,227 | .autoCloseQuotes(true)
.leaveFinalAsIs(true)
.parse();
if (parse.current.type.equals(AdvCmdParser.CurrentElement.ElementType.ARGUMENT)) {
if (parse.current.index == 0)
<BUG>return ImmutableList.of("region", "worldregion", "handler", "controller").stream()
</BUG>
.filter(new StartsWithPredicate(parse.current.token))
.collect(GuavaCollectors.toImmutableList());
else if (parse.current.index == 1) {
| return Stream.of("region", "worldregion", "handler", "controller")
|
47,228 | import java.util.Map;
import java.util.concurrent.TimeUnit;
import org.opennms.netmgt.utils.ParameterMap;
public class TimeoutTracker {
private int m_retry;
<BUG>private long m_timeoutInNanos;
private boolean m_strictTimeouts;</BUG>
private int m_attempt = 0;
private long m_nextRetryTimeNanos = -1L;
private long m_attemptStartTimeNanos = -1L;
| private long m_timeoutInMillis;
private long m_timeoutInSeconds;
private boolean m_strictTimeouts;
|
47,229 | private int m_attempt = 0;
private long m_nextRetryTimeNanos = -1L;
private long m_attemptStartTimeNanos = -1L;
public TimeoutTracker(Map parameters, int defaultRetry, int defaultTimeout) {
m_retry = ParameterMap.getKeyedInteger(parameters, "retry", defaultRetry);
<BUG>long m_timeoutInMillis = Math.max(10, ParameterMap.getKeyedInteger(parameters, "timeout", defaultTimeout));
m_timeoutInNanos = TimeUnit.NANOSECONDS.convert(m_timeoutInMillis, TimeUnit.MILLISECONDS);
m_strictTimeouts = ParameterMap.getKeyedBoolean(parameters, "strict-timeout", false);</BUG>
resetAttemptStartTime();
| m_timeoutInMillis = Math.max(10L, ParameterMap.getKeyedInteger(parameters, "timeout", defaultTimeout));
m_timeoutInNanos = Math.max(10000000L, TimeUnit.NANOSECONDS.convert(m_timeoutInMillis, TimeUnit.MILLISECONDS));
m_timeoutInSeconds = Math.max(1L, TimeUnit.SECONDS.convert(m_timeoutInMillis, TimeUnit.SECONDS));
m_strictTimeouts = ParameterMap.getKeyedBoolean(parameters, "strict-timeout", false);
|
47,230 | assertStarted();
long nanoTime = System.nanoTime();</BUG>
return nanoTime - m_attemptStartTimeNanos;
}
public double elapsedTime(TimeUnit unit) {
<BUG>double nanos = elapsedTimeNanos();
double nanosPerUnit = TimeUnit.NANOSECONDS.convert(1, unit);</BUG>
return nanos/nanosPerUnit;
}
@Override
| return convertFromNanos(elapsedTimeNanos(), unit);
private double convertFromNanos(double nanos, TimeUnit unit) {
double nanosPerUnit = TimeUnit.NANOSECONDS.convert(1, unit);
|
47,231 | package com.easytoolsoft.easyreport.web.controller.common;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping(value = "/error")
<BUG>public class ErrorController extends AbstractController {
@RequestMapping(value = {"/404"})</BUG>
public String error404() {
return "/error/404";
}
| public class ErrorController {
@RequestMapping(value = {"/404"})
|
47,232 | if (idx != null) {
final String clazz = idx.getDefinition().getClassName();
if (clazz != null) {
final OClass cls = metadata.getImmutableSchemaSnapshot().getClass(clazz);
if (cls != null)
<BUG>for (int clId : cls.getClusterIds()) {
clusters.add(db.getClusterNameById(clId).toLowerCase());
</BUG>
}
}
| final String clName = db.getClusterNameById(clId);
if (clName != null)
clusters.add(clName.toLowerCase());
|
47,233 | package util;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
<BUG>import java.util.Iterator;
import java.util.SortedSet;</BUG>
import java.util.TreeSet;
import javax.swing.AbstractListModel;
public class SortedListModel extends AbstractListModel
| import java.util.Set;
import java.util.SortedSet;
|
47,234 | package util.task;
import java.awt.event.ActionEvent;
<BUG>import java.awt.event.ActionListener;
import java.io.IOException;</BUG>
import java.net.URISyntaxException;
import java.security.GeneralSecurityException;
import javax.swing.SwingWorker;
| import java.io.File;
import java.io.IOException;
|
47,235 | import javax.swing.JTextField;
import javax.swing.ScrollPaneConstants;
import javax.swing.SwingUtilities;
import javax.swing.border.LineBorder;
import javax.swing.text.AbstractDocument;
<BUG>import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;</BUG>
import main.AnimeIndex;
| [DELETED] |
47,236 | if (f.isDirectory())
return true;
String extension = MAMUtil.getExtension(f);
if (extension != null)
{
<BUG>if (extension.equalsIgnoreCase(".zip"))
</BUG>
return true;
return false;
}
| if (extension.equalsIgnoreCase(".MAMListBKP"))
|
47,237 | context.setAuthCache(authCache);
ApacheHttpClient4Engine engine = new ApacheHttpClient4Engine(httpclient, context);
ResteasyClient client = new ResteasyClientBuilder().httpEngine(engine).build();
client.register(JacksonJaxbJsonProvider.class);
client.register(JacksonObjectMapperProvider.class);
<BUG>client.register(RequestLogger.class);
client.register(ResponseLogger.class);
</BUG>
ProxyBuilder<T> proxyBuilder = client.target(uri).proxyBuilder(apiClassType);
| client.register(RestRequestFilter.class);
client.register(RestResponseFilter.class);
|
47,238 | import org.hawkular.alerts.api.model.condition.Condition;
import org.hawkular.inventory.api.model.CanonicalPath;
import org.hawkular.inventory.api.model.Tenant;
import org.hawkular.inventory.json.DetypedPathDeserializer;
import org.hawkular.inventory.json.InventoryJacksonConfig;
<BUG>import org.hawkular.inventory.json.mixins.CanonicalPathMixin;
</BUG>
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.fasterxml.jackson.core.JsonParseException;
| import org.hawkular.inventory.json.mixins.model.CanonicalPathMixin;
|
47,239 | private static final String DATASET_CAPACITY_TABLE = "dataset_capacity";
private static final String DATASET_TAG_TABLE = "dataset_tag";
private static final String DATASET_CASE_SENSITIVE_TABLE = "dataset_case_sensitivity";
private static final String DATASET_REFERENCE_TABLE = "dataset_reference";
private static final String DATASET_PARTITION_TABLE = "dataset_partition";
<BUG>private static final String DATASET_SECURITY_TABLE = "dataset_security";
</BUG>
private static final String DATASET_OWNER_TABLE = "dataset_owner";
private static final String DATASET_OWNER_UNMATCHED_TABLE = "stg_dataset_owner_unmatched";
private static final String DATASET_CONSTRAINT_TABLE = "dataset_constraint";
| private static final String DATASET_SECURITY_TABLE = "dataset_security_info";
|
47,240 | throw new IllegalArgumentException(
"Dataset deployment info update fail, " + "Json missing necessary fields: " + root.toString());
</BUG>
}
<BUG>final Object[] idUrn = findIdAndUrn(idNode, urnNode);
final Integer datasetId = (Integer) idUrn[0];</BUG>
final String urn = (String) idUrn[1];
ObjectMapper om = new ObjectMapper();
for (final JsonNode deploymentInfo : deployment) {
DatasetDeploymentRecord record = om.convertValue(deploymentInfo, DatasetDeploymentRecord.class);
| "Dataset deployment info update error, missing necessary fields: " + root.toString());
final Object[] idUrn = findDataset(root);
if (idUrn[0] == null || idUrn[1] == null) {
throw new IllegalArgumentException("Cannot identify dataset from id/uri/urn: " + root.toString());
final Integer datasetId = (Integer) idUrn[0];
|
47,241 | rec.setModifiedTime(System.currentTimeMillis() / 1000);
if (datasetId == 0) {
DatasetRecord record = new DatasetRecord();
record.setUrn(urn);
record.setSourceCreatedTime("" + rec.getCreateTime() / 1000);
<BUG>record.setSchema(rec.getOriginalSchema());
record.setSchemaType(rec.getFormat());
</BUG>
record.setFields((String) StringUtil.objectToJsonString(rec.getFieldSchema()));
| record.setSchema(rec.getOriginalSchema().getText());
record.setSchemaType(rec.getOriginalSchema().getFormat());
|
47,242 | datasetId = Integer.valueOf(DatasetDao.getDatasetByUrn(urn).get("id").toString());
rec.setDatasetId(datasetId);
}
else {
DICT_DATASET_WRITER.execute(UPDATE_DICT_DATASET_WITH_SCHEMA_CHANGE,
<BUG>new Object[]{rec.getOriginalSchema(), rec.getFormat(), StringUtil.objectToJsonString(rec.getFieldSchema()),
"API", System.currentTimeMillis() / 1000, datasetId});
}</BUG>
List<Map<String, Object>> oldInfo;
try {
| new Object[]{rec.getOriginalSchema().getText(), rec.getOriginalSchema().getFormat(),
StringUtil.objectToJsonString(rec.getFieldSchema()), "API", System.currentTimeMillis() / 1000, datasetId});
|
47,243 | case "deploymentInfo":
try {
DatasetInfoDao.updateDatasetDeployment(rootNode);
} catch (Exception ex) {
Logger.debug("Metadata change exception: deployment ", ex);
<BUG>}
break;
case "caseSensitivity":
try {
DatasetInfoDao.updateDatasetCaseSensitivity(rootNode);
} catch (Exception ex) {
Logger.debug("Metadata change exception: case sensitivity ", ex);</BUG>
}
| [DELETED] |
47,244 | private TableInputData data;
public TableInput(StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta, Trans trans)
{
super(stepMeta, stepDataInterface, copyNr, transMeta, trans);
}
<BUG>private synchronized RowMetaAndData readStartDate() throws KettleException
{</BUG>
if (log.isDetailed()) logDetailed("Reading from step [" + meta.getLookupStepname() + "]");
RowMetaInterface parametersMeta = new RowMeta();
Object[] parametersData = new Object[] {};
| private RowMetaAndData readStartDate() throws KettleException
|
47,245 | data.db.disconnect();
}
}
super.dispose(smi, sdi);
}
<BUG>public synchronized void stopRunning(StepMetaInterface smi, StepDataInterface sdi) throws KettleException
{</BUG>
meta=(TableInputMeta)smi;
data=(TableInputData)sdi;
setStopped(true);
| public void stopRunning(StepMetaInterface smi, StepDataInterface sdi) throws KettleException
{
|
47,246 | meta=(DynamicSQLRowMeta)smi;
data=(DynamicSQLRowData)sdi;
if (data.db!=null && !data.isCanceled)
<BUG>{
data.db.cancelQuery();
setStopped(true);</BUG>
data.isCanceled=true;
}
}
public boolean init(StepMetaInterface smi, StepDataInterface sdi)
| synchronized(data.db) {
setStopped(true);
|
47,247 | for (int i = 0; i < componentFactoryClass.getAnnotations().length; i++)
{
Annotation annotation = componentFactoryClass.getAnnotations()[i];
Router routerAnnotation = annotation.annotationType().getAnnotation(Router.class);
if (routerAnnotation != null && routerAnnotation.type() == RouterType.Inbound)
<BUG>{
for (Iterator iterator = routerParsers.iterator(); iterator.hasNext();)
{
RouterAnnotationParser parser = (RouterAnnotationParser) iterator.next();
if (parser.supports(annotation, componentFactoryClass, null))</BUG>
{
| RouterAnnotationParser parser = parserFactory.getRouterParser(annotation, componentFactoryClass, null);
if (parser != null)
|
47,248 | {
RouterAnnotationParser parser = (RouterAnnotationParser) iterator.next();
if (parser.supports(annotation, componentFactoryClass, null))</BUG>
{
service.getInboundRouter().addRouter(parser.parseRouter(annotation));
<BUG>break;
}
}</BUG>
}
}
| for (int i = 0; i < componentFactoryClass.getAnnotations().length; i++)
Annotation annotation = componentFactoryClass.getAnnotations()[i];
Router routerAnnotation = annotation.annotationType().getAnnotation(Router.class);
if (routerAnnotation != null && routerAnnotation.type() == RouterType.Inbound)
RouterAnnotationParser parser = parserFactory.getRouterParser(annotation, componentFactoryClass, null);
if (parser != null)
|
47,249 | ((MuleContextAware) router).setMuleContext(context);
}
router.initialise();
service.getResponseRouter().addRouter(router);
break;
<BUG>}
}</BUG>
}
}
}
| else
{
throw new IllegalStateException("Cannot find parser for router annotation: " + metaData.getAnnotation().toString());
|
47,250 | Router routerAnnotation = metaData.getAnnotation().annotationType().getAnnotation(Router.class);
if (routerAnnotation != null && routerAnnotation.type() == RouterType.Outbound)
{
if (router != null)
{
<BUG>throw new IllegalStateException("You can onnly configure one outbound router on a service");
}
for (Iterator iterator = routerParsers.iterator(); iterator.hasNext();)
{
RouterAnnotationParser parser = (RouterAnnotationParser) iterator.next();
if (parser.supports(metaData.getAnnotation(), metaData.getClazz(), metaData.getMember()))</BUG>
{
| throw new IllegalStateException("You can only configure one outbound router on a service");
RouterAnnotationParser parser = parserFactory.getRouterParser(metaData.getAnnotation(), metaData.getClazz(), metaData.getMember());
if (parser != null)
|
47,251 | package org.mule.impl.endpoint;
import org.mule.api.EndpointAnnotationParser;
import org.mule.api.MuleContext;
<BUG>import org.mule.api.MuleRuntimeException;
import org.mule.api.context.MuleContextAware;</BUG>
import org.mule.api.expression.ExpressionParser;
import org.mule.api.registry.ObjectProcessor;
import org.mule.api.registry.RegistrationException;
| import org.mule.api.RouterAnnotationParser;
import org.mule.api.context.MuleContextAware;
|
47,252 | import org.mule.api.registry.ObjectProcessor;
import org.mule.api.registry.RegistrationException;
import org.mule.config.AnnotationsParserFactory;
import org.mule.config.i18n.CoreMessages;
import org.mule.impl.annotations.processors.AnnotatedServiceObjectProcessor;
<BUG>import org.mule.impl.annotations.processors.DirectBindAnnotationProcessor;
import org.mule.impl.expression.parsers.BeanAnnotationParser;
import org.mule.impl.expression.parsers.CustomEvaluatorAnnotationParser;
import org.mule.impl.expression.parsers.FunctionAnnotationParser;</BUG>
import org.mule.impl.expression.parsers.GroovyAnnotationParser;
| import org.mule.impl.concept.SplitterRouterParser;
import org.mule.impl.expression.parsers.ExpressionFilterAnnotationParser;
import org.mule.impl.expression.parsers.FunctionAnnotationParser;
|
47,253 | import org.mule.impl.expression.parsers.CustomEvaluatorAnnotationParser;
import org.mule.impl.expression.parsers.FunctionAnnotationParser;</BUG>
import org.mule.impl.expression.parsers.GroovyAnnotationParser;
import org.mule.impl.expression.parsers.MuleAnnotationParser;
import org.mule.impl.expression.parsers.OgnlAnnotationParser;
<BUG>import org.mule.impl.expression.parsers.XPathAnnotationParser;
import java.lang.annotation.Annotation;</BUG>
import java.lang.reflect.Member;
import java.util.ArrayList;
import java.util.List;
| import org.mule.impl.expression.parsers.ExpressionFilterAnnotationParser;
import org.mule.impl.expression.parsers.FunctionAnnotationParser;
import org.mule.impl.routing.IdempotentRouterParser;
import org.mule.impl.routing.WireTapRouterParser;
import java.lang.annotation.Annotation;
|
47,254 | public class DefaultAnnotationsParserFactory implements AnnotationsParserFactory, MuleContextAware
{
protected transient final Log logger = LogFactory.getLog(DefaultAnnotationsParserFactory.class);
protected MuleContext muleContext;
protected List<EndpointAnnotationParser> endpointParsers = new ArrayList<EndpointAnnotationParser>();
<BUG>protected List<ExpressionParser> expressionParsers = new ArrayList<ExpressionParser>();
protected List<ObjectProcessor> processors = new ArrayList<ObjectProcessor>();</BUG>
public void setMuleContext(MuleContext context)
{
this.muleContext = context;
| protected List<RouterAnnotationParser> routerParsers = new ArrayList<RouterAnnotationParser>();
protected List<ObjectProcessor> processors = new ArrayList<ObjectProcessor>();
|
47,255 | package org.mule.utils;
import org.mule.api.MuleContext;
import org.mule.api.expression.ExpressionParser;
<BUG>import org.mule.api.lifecycle.InitialisationException;
import org.mule.api.transformer.TransformerException;
import org.mule.config.annotations.i18n.AnnotationsMessages;</BUG>
import org.mule.expression.transformers.ExpressionArgument;
import org.mule.expression.transformers.ExpressionTransformer;
| import org.mule.api.registry.RegistrationException;
import org.mule.config.AnnotationsParserFactory;
import org.mule.config.annotations.i18n.AnnotationsMessages;
|
47,256 | package org.mule.config;
<BUG>import org.mule.api.EndpointAnnotationParser;
import org.mule.api.expression.ExpressionParser;</BUG>
import org.mule.api.registry.ObjectProcessor;
import java.lang.annotation.Annotation;
import java.lang.reflect.Member;
| import org.mule.api.RouterAnnotationParser;
import org.mule.api.expression.ExpressionParser;
|
47,257 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
47,258 | final int lineStride = dst.getScanlineStride();
final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final byte[][] data = dst.getByteDataArrays();
final float[] warpData = new float[2 * dstWidth];
<BUG>int lineOffset = 0;
if (ctable == null) { // source does not have IndexColorModel
if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
47,259 | pixelOffset += pixelStride;
} // COLS LOOP
} // ROWS LOOP
}
} else {// source has IndexColorModel
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| } else if (caseB) {
for (int h = 0; h < dstHeight; h++) {
|
47,260 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
47,261 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final short[][] data = dst.getShortDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
47,262 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
47,263 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final short[][] data = dst.getShortDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
47,264 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
47,265 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final int[][] data = dst.getIntDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
47,266 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
47,267 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final float[][] data = dst.getFloatDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
47,268 | minX = src.getMinX();
maxX = src.getMaxX();
minY = src.getMinY();
maxY = src.getMaxY();
} else {
<BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC);
minX = src.getMinX() + 1; // Left padding
maxX = src.getMaxX() - 2; // Right padding
minY = src.getMinY() + 1; // Top padding
maxY = src.getMaxY() - 2; // Bottom padding
</BUG>
}
| iterSource = getRandomIterator(src, null);
minX = src.getMinX() + leftPad; // Left padding
maxX = src.getMaxX() - rightPad; // Right padding
minY = src.getMinY() + topPad; // Top padding
maxY = src.getMaxY() - bottomPad; // Bottom padding
|
47,269 | final int pixelStride = dst.getPixelStride();
final int[] bandOffsets = dst.getBandOffsets();
final double[][] data = dst.getDoubleDataArrays();
final float[] warpData = new float[2 * dstWidth];
int lineOffset = 0;
<BUG>if (caseA) {
for (int h = 0; h < dstHeight; h++) {</BUG>
int pixelOffset = lineOffset;
lineOffset += lineStride;
warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
| if(hasROI && !roiContainsTile && roiIter == null){
throw new IllegalArgumentException("Error on creating the ROI iterator");
}
if (caseA || (caseB && roiContainsTile)) {
for (int h = 0; h < dstHeight; h++) {
|
47,270 | import android.widget.ImageView;
import android.widget.LinearLayout.LayoutParams;
import com.dtalk.dd.R;
import com.dtalk.dd.model.Photo4Gallery;
import com.dtalk.dd.ui.activity.CircleImagePubActivity;
<BUG>import com.dtalk.dd.ui.plugin.ImageLoadManager;
import com.lidroid.xutils.ViewUtils;</BUG>
import com.lidroid.xutils.view.annotation.ViewInject;
import java.util.List;
public class ShareListPicsAdapter extends BaseAdapter{
| import com.dtalk.dd.utils.Logger;
import com.lidroid.xutils.ViewUtils;
|
47,271 | package com.dtalk.dd.qiniu.utils;
<BUG>import android.content.Context;
import com.dtalk.dd.utils.Logger;</BUG>
import com.dtalk.dd.utils.MD5Util;
import com.qiniu.android.http.ResponseInfo;
import com.qiniu.android.storage.UpCompletionHandler;
| import com.bigkoo.svprogresshud.SVProgressHUD;
import com.dtalk.dd.utils.Logger;
|
47,272 | auploadToken = putPolicy.token(mac);
} catch (Exception e) {
}
return auploadToken;
}
<BUG>public void uploadCircleFiles(final List<String> path) {
String token = initQNToken();</BUG>
final Map<String, String> uploadedFiles = new HashMap<>();
for (String item : path) {
String qiniuKey = "event/" + MD5Util.getMD5String(item) + ".png";
| public void uploadCircleFiles(final List<String> path, final SVProgressHUD svProgressHUD, final OnQNUploadCallback callback) {
String token = initQNToken();
|
47,273 | String qiniuKey = "event/" + MD5Util.getMD5String(item) + ".png";
uploadManager.put(item, qiniuKey, token, new UpCompletionHandler() {
@Override
public void complete(String key, ResponseInfo info, JSONObject response) {
uploadedFiles.put(key, Config.QINIU_PREFIX+key);
<BUG>if (uploadedFiles.size() == path.size()) {
}</BUG>
}
}, new UploadOptions(null, null, false,
new UpProgressHandler(){
| if (callback != null) {
callback.uploadCompleted(uploadedFiles);
|
47,274 | import me.iwf.photopicker.PhotoPicker;
import me.iwf.photopicker.PhotoPreview;
import top.zibin.luban.Luban;
import top.zibin.luban.OnCompressListener;
public class CircleImagePubActivity extends TTBaseActivity implements
<BUG>View.OnClickListener {
private static final int EVENT_MESSAGE_MAX_COUNT = 500;</BUG>
private boolean iSPublic = true;
EditText editText;
GridViewForScrollView imageLayout;
| View.OnClickListener, QNUploadManager.OnQNUploadCallback {
private static final int EVENT_MESSAGE_MAX_COUNT = 500;
|
47,275 | } else {
handleImagePickData(contentImages);
}
}
private void handleImagePickData(List<String> list) {
<BUG>QNUploadManager.getInstance(this).uploadCircleFiles(list);
</BUG>
}
private void compressWithLs(final List<String> list) {
final List<String> compressedFiles = new ArrayList<>();
| QNUploadManager.getInstance(this).uploadCircleFiles(list, svProgressHUD, this);
|
47,276 | final Lock synchronizationLockObjectOrNull, //
final Map<String, String> environmentVariables, //
final FilePath directoryToRunCommandFrom, //
final TaskListener listenerToLogFailuresTo, //
final Logger loggerToLogFailuresTo, //
<BUG>final boolean... optionalFlagToCopyAllOutputToTaskListener) {
</BUG>
final Boolean result;
final boolean shouldLogEverything = optionalFlagToCopyAllOutputToTaskListener != null
&& optionalFlagToCopyAllOutputToTaskListener.length > 0 && optionalFlagToCopyAllOutputToTaskListener[0];
| final boolean... optionalFlagToCopyAllOutputToTaskListener) throws IOException {
|
47,277 | final ByteArrayStream stdout = new ByteArrayStream();
final ByteArrayStream stderr = new ByteArrayStream();
try {
final OutputStream stdoutStream = stdout.getOutput();
final OutputStream stderrStream = stderr.getOutput();
<BUG>final ProcStarter starter = createProcess(launcher, machineReadableCommand, masksOrNull,
environmentVariables, directoryToRunCommandFrom, stdoutStream, stderrStream);</BUG>
logCommandExecution(humanReadableCommandName, machineReadableCommand, directoryToRunCommandFrom, loggerToLogFailuresTo,
listenerToLogFailuresTo);
try {
| final ProcStarter starter = createProcess(launcher, machineReadableCommand,
environmentVariables, directoryToRunCommandFrom, stdoutStream, stderrStream);
|
47,278 | return commandOutputParser.parse(outputFromCommand, commandOutputParserContext);
} catch (Exception ex) {
logCommandException(machineReadableCommand, directoryToRunCommandFrom, humanReadableCommandName, ex,
loggerToLogFailuresTo, listenerToLogFailuresTo);
return null;
<BUG>}
} finally {</BUG>
try {
stdout.close();
stderr.close();
| } catch (InterruptedException | IOException ex) {
logCommandException(machineReadableCommand, directoryToRunCommandFrom, humanReadableCommandName, ex, loggerToLogFailuresTo, listenerToLogFailuresTo);
} finally {
|
47,279 | final String commandDescription, //
final int commandExitCode, //
final InputStream commandStdoutOrNull, //
final InputStream commandStderrOrNull, //
final Logger loggerToLogFailuresTo, //
<BUG>final TaskListener taskListener) {
final String msg = commandDescription + " (" + maskCommandForPassword(commandDescription, command) + ")" + " failed with exit code " + commandExitCode;
</BUG>
String stderr = null;
| final TaskListener taskListener) throws IOException {
final String msg = commandDescription + " (" + command.toString() + ")" + " failed with exit code " + commandExitCode;
|
47,280 | if (logger != null) {
logger.log(Level.SEVERE, exception.getMessage(), exception);
}
if (taskListener != null) {
taskListener.fatalError(summary);
<BUG>exception.printStackTrace(taskListener.getLogger());
}</BUG>
}
private static void logCommandExecution(//
final String commandDescription,
| throw new AbortException(exception.getMessage());
|
47,281 | private static final Logger LOGGER = Logger.getLogger(AccurevPlugin.class.getName());
public static void runMigrator() throws Exception {
</BUG>
final Jenkins jenkins = Jenkins.getInstance();
<BUG>if (jenkins == null) {
throw new IOException("Jenkins instance is not ready");
}</BUG>
boolean changed = false;
AccurevSCM.AccurevSCMDescriptor descriptor = jenkins.getDescriptorByType(AccurevSCM.AccurevSCMDescriptor.class);
for (Project<?, ?> p : jenkins.getAllItems(Project.class)) {
| @Initializer(after = JOB_LOADED, before = COMPLETED)
public static void initializers() throws Exception {
|
47,282 | public class CContentSubscriber extends FragmentManager {
private static final String sslLocation = "/org/jasig/portal/channels/CContentSubscriber/CContentSubscriber.ssl";
private static Document channelRegistry;
private Document registry;
private Vector expandedItems;
<BUG>private Vector condensedItems;
private final static String CHANNEL = "channel";</BUG>
private final static String FRAGMENT = "fragment";
private final static String CATEGORY = "category";
private class ListItem {
| private String searchFragment = "true";
private String searchChannel = "true";
private String searchCategory = "true";
private String searchQuery = null;
private final static String CHANNEL = "channel";
|
47,283 | String fragmentId = CommonUtils.nvl(runtimeData.getParameter("uPcCS_fragmentID"));
String channelId = CommonUtils.nvl(runtimeData.getParameter("uPcCS_channelID"));
String categoryId = CommonUtils.nvl(runtimeData.getParameter("uPcCS_categoryID"));
String action = CommonUtils.nvl(runtimeData.getParameter("uPcCS_action"));
String channelState = CommonUtils.nvl(runtimeData.getParameter("channel-state"),"browse");
<BUG>String searchFragment = CommonUtils.nvl(runtimeData.getParameter("search-fragment"),"false");
String searchChannel = CommonUtils.nvl(runtimeData.getParameter("search-channel"),"false");
String searchCategory = CommonUtils.nvl(runtimeData.getParameter("search-category"),"false");</BUG>
boolean all = false,
expand = action.equals("expand"),
| [DELETED] |
47,284 | package com.projecttango.examples.java.augmentedreality;
import com.google.atap.tangoservice.Tango;
import com.google.atap.tangoservice.Tango.OnTangoUpdateListener;
import com.google.atap.tangoservice.TangoCameraIntrinsics;
import com.google.atap.tangoservice.TangoConfig;
<BUG>import com.google.atap.tangoservice.TangoCoordinateFramePair;
import com.google.atap.tangoservice.TangoEvent;</BUG>
import com.google.atap.tangoservice.TangoOutOfDateException;
import com.google.atap.tangoservice.TangoPoseData;
import com.google.atap.tangoservice.TangoXyzIjData;
| import com.google.atap.tangoservice.TangoErrorException;
import com.google.atap.tangoservice.TangoEvent;
|
47,285 | super.onResume();
if (!mIsConnected) {
mTango = new Tango(AugmentedRealityActivity.this, new Runnable() {
@Override
public void run() {
<BUG>try {
connectTango();</BUG>
setupRenderer();
mIsConnected = true;
} catch (TangoOutOfDateException e) {
| TangoSupport.initialize();
connectTango();
|
47,286 | if (lastFramePose.statusCode == TangoPoseData.POSE_VALID) {
mRenderer.updateRenderCameraPose(lastFramePose, mExtrinsics);
mCameraPoseTimestamp = lastFramePose.timestamp;</BUG>
} else {
<BUG>Log.w(TAG, "Can't get device pose at time: " + mRgbTimestampGlThread);
}</BUG>
}
}
}
@Override
| mRenderer.updateRenderCameraPose(lastFramePose);
mCameraPoseTimestamp = lastFramePose.timestamp;
Log.w(TAG, "Can't get device pose at time: " +
|
47,287 | import org.rajawali3d.materials.Material;
import org.rajawali3d.materials.methods.DiffuseMethod;
import org.rajawali3d.materials.textures.ATexture;
import org.rajawali3d.materials.textures.StreamingTexture;
import org.rajawali3d.materials.textures.Texture;
<BUG>import org.rajawali3d.math.Matrix4;
import org.rajawali3d.math.vector.Vector3;</BUG>
import org.rajawali3d.primitives.ScreenQuad;
import org.rajawali3d.primitives.Sphere;
import org.rajawali3d.renderer.RajawaliRenderer;
| import org.rajawali3d.math.Quaternion;
import org.rajawali3d.math.vector.Vector3;
|
47,288 | translationMoon.setRepeatMode(Animation.RepeatMode.INFINITE);
translationMoon.setTransformable3D(moon);
getCurrentScene().registerAnimation(translationMoon);
translationMoon.play();
}
<BUG>public void updateRenderCameraPose(TangoPoseData devicePose, DeviceExtrinsics extrinsics) {
Pose cameraPose = ScenePoseCalculator.toOpenGlCameraPose(devicePose, extrinsics);
getCurrentCamera().setRotation(cameraPose.getOrientation());
getCurrentCamera().setPosition(cameraPose.getPosition());
}</BUG>
public int getTextureId() {
| public void updateRenderCameraPose(TangoPoseData cameraPose) {
float[] rotation = cameraPose.getRotationAsFloats();
float[] translation = cameraPose.getTranslationAsFloats();
Quaternion quaternion = new Quaternion(rotation[3], rotation[0], rotation[1], rotation[2]);
getCurrentCamera().setRotation(quaternion.conjugate());
getCurrentCamera().setPosition(translation[0], translation[1], translation[2]);
|
47,289 | package com.projecttango.examples.java.helloareadescription;
import com.google.atap.tangoservice.Tango;
<BUG>import com.google.atap.tangoservice.Tango.OnTangoUpdateListener;
import com.google.atap.tangoservice.TangoConfig;</BUG>
import com.google.atap.tangoservice.TangoCoordinateFramePair;
import com.google.atap.tangoservice.TangoErrorException;
import com.google.atap.tangoservice.TangoEvent;
| import com.google.atap.tangoservice.TangoAreaDescriptionMetaData;
import com.google.atap.tangoservice.TangoConfig;
|
47,290 | import java.sql.SQLException;
import java.sql.Statement;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
<BUG>import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;</BUG>
import java.util.concurrent.locks.Lock;
| import java.util.HashMap;
import java.util.Map;
import java.util.Set;
|
47,291 | if (msgin != null) {
try {
msgin.close();
} catch (IOException e) {
}
<BUG>}
}
}
protected void updateSourceSequence(SourceSequence seq)
</BUG>
throws SQLException {
| releaseResources(stmt, null);
protected void storeMessage(Identifier sid, RMMessage msg, boolean outbound)
throws IOException, SQLException {
storeMessage(connection, sid, msg, outbound);
protected void updateSourceSequence(Connection con, SourceSequence seq)
|
47,292 | } catch (SQLException ex) {
if (!isTableExistsError(ex)) {
throw ex;
} else {
LOG.fine("Table CXF_RM_SRC_SEQUENCES already exists.");
<BUG>verifyTable(SRC_SEQUENCES_TABLE_NAME, SRC_SEQUENCES_TABLE_COLS);
</BUG>
}
} finally {
stmt.close();
| verifyTable(con, SRC_SEQUENCES_TABLE_NAME, SRC_SEQUENCES_TABLE_COLS);
|
47,293 | } catch (SQLException ex) {
if (!isTableExistsError(ex)) {
throw ex;
} else {
LOG.fine("Table CXF_RM_DEST_SEQUENCES already exists.");
<BUG>verifyTable(DEST_SEQUENCES_TABLE_NAME, DEST_SEQUENCES_TABLE_COLS);
</BUG>
}
} finally {
stmt.close();
| LOG.fine("Table CXF_RM_SRC_SEQUENCES already exists.");
verifyTable(con, SRC_SEQUENCES_TABLE_NAME, SRC_SEQUENCES_TABLE_COLS);
|
47,294 | }
} finally {
stmt.close();
}
for (String tableName : new String[] {OUTBOUND_MSGS_TABLE_NAME, INBOUND_MSGS_TABLE_NAME}) {
<BUG>stmt = connection.createStatement();
try {</BUG>
stmt.executeUpdate(MessageFormat.format(CREATE_MESSAGES_TABLE_STMT, tableName));
} catch (SQLException ex) {
if (!isTableExistsError(ex)) {
| stmt = con.createStatement();
try {
stmt.executeUpdate(CREATE_DEST_SEQUENCES_TABLE_STMT);
|
47,295 | throw ex;
} else {
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Table " + tableName + " already exists.");
}
<BUG>verifyTable(tableName, MESSAGES_TABLE_COLS);
</BUG>
}
} finally {
stmt.close();
| LOG.fine("Table CXF_RM_SRC_SEQUENCES already exists.");
verifyTable(con, SRC_SEQUENCES_TABLE_NAME, SRC_SEQUENCES_TABLE_COLS);
|
47,296 | if (newCols.size() > 0) {
if (LOG.isLoggable(Level.FINE)) {
LOG.log(Level.FINE, "Table " + tableName + " needs additional columns");
}
for (String[] newCol : newCols) {
<BUG>Statement st = connection.createStatement();
try {</BUG>
st.executeUpdate(MessageFormat.format(ALTER_TABLE_STMT_STR,
tableName, newCol[0], newCol[1]));
if (LOG.isLoggable(Level.FINE)) {
| Statement st = con.createStatement();
try {
|
47,297 | if (nextReconnectAttempt < System.currentTimeMillis()) {
nextReconnectAttempt = System.currentTimeMillis() + reconnectDelay;
reconnectDelay = reconnectDelay * useExponentialBackOff;
}
}
<BUG>}
public static void deleteDatabaseFiles() {</BUG>
deleteDatabaseFiles(DEFAULT_DATABASE_NAME, true);
}
public static void deleteDatabaseFiles(String dbName, boolean now) {
| public static void deleteDatabaseFiles() {
|
47,298 | import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import java.math.BigInteger;
import java.util.ArrayList;
<BUG>import java.util.Collection;
import static com.n1analytics.paillier.TestConfiguration.CONFIGURATIONS;</BUG>
import static com.n1analytics.paillier.TestUtil.*;
import static org.junit.Assert.assertEquals;
@RunWith(Parameterized.class)
| import java.util.Random;
import static com.n1analytics.paillier.TestConfiguration.CONFIGURATIONS;
|
47,299 | @RunWith(Parameterized.class)
@Category(SlowTests.class)
public class AdditionTest {
private PaillierContext context;
private PaillierPrivateKey privateKey;
<BUG>static private int maxIteration = 100;
@Parameterized.Parameters</BUG>
public static Collection<Object[]> configurations() {
Collection<Object[]> configurationParams = new ArrayList<>();
for(TestConfiguration[] confs : CONFIGURATIONS) {
| static private int MAX_ITERATIONS = TestConfiguration.MAX_ITERATIONS;
@Parameterized.Parameters
|
47,300 | }
}};
BinaryAdder4 binaryAdders4[] = new BinaryAdder4[]{new BinaryAdder4() {</BUG>
@Override
public EncodedNumber eval(EncodedNumber arg1, EncodedNumber arg2) {
return arg1.add(arg2);
}
<BUG>}, new BinaryAdder4() {
@Override</BUG>
public EncodedNumber eval(EncodedNumber arg1, EncodedNumber arg2) {
| }, new EncodedToEncodedAdder() {
return arg2.add(arg1);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.