id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
23,201 | os.close();
}
private void doc(Declaration decl) throws IOException {
if (decl instanceof ClassOrInterface) {
if (shouldInclude(decl)) {
<BUG>FileWriter writer = new FileWriter(getObjectFile(decl));
</BUG>
try {
new ClassDoc(this, writer,
(ClassOrInterface) decl,
| Writer writer = openWriter(getObjectFile(decl));
|
23,202 | 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 pag... | PDPage currPage = document.getDocumentCatalog().getPages().get(pageNo);
PDPageContentStream pageStream = new PDPageContentStream(document, currPage, PDPageContentStream.AppendMode.APPEND, false);
|
23,203 | 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),... | font = getFont(split[1]);
color = new Color(Integer.valueOf(split[2].substring(1), 16));
|
23,204 | 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.Logg... | import org.apache.pdfbox.pdmodel.font.PDType1Font;
import org.apache.pdfbox.util.Matrix;
import org.slf4j.Logger;
|
23,205 | 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, ... | String[] split = splitText(textConfig.getFont(), textConfig.getFontSize(), allowedWidth, text);
|
23,206 | 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.sh... | stream.setTextMatrix(new Matrix(1,0,0,1, textX, textY));
stream.showText(text);
|
23,207 | 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... | stream.moveTo(textX, textY - lineOffset);
stream.lineTo(textX + getTextWidth(textConfig.getFont(), textConfig.getFontSize(), text), textY - lineOffset);
|
23,208 | 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());
... | List<String> breakSplitted = Arrays.asList(text.split("(\\r\\n)|(\\n)|(\\n\\r)")).stream().collect(Collectors.toList());
if (breakSplitted.size() > 1) {
|
23,209 | 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;
|
23,210 | }
pt = pt_iterator.next();
p = p_iterator.next();</BUG>
{
SNode _nodeToCheck_1029348928467 = invoke;
<BUG>BaseIntentionProvider intentionProvider = null;
typeCheckingContext.createLessThanInequation(typeCheckingContext.typeOf(p, "r:00000000-0000-4000-0000-011c89590337(jetbrains.mps.baseLanguage.closures.typesystem)", "... | public void applyRule(final SNode invoke, final TypeCheckingContext typeCheckingContext) {
List<SNode> ptypes = new ArrayList<SNode>();
for(SNode p : SLinkOperations.getTargets(invoke, "parameter", true)) {
ptypes.add(typeCheckingContext.typeOf(p, "r:00000000-0000-4000-0000-011c89590337(jetbrains.mps.baseLanguage.closu... |
23,211 | SNode st = SConceptOperations.createNewNode("jetbrains.mps.baseLanguage.collections.structure.SequenceType", null);
SLinkOperations.setTarget(st, "elementType", typeCheckingContext.getEquationManager().getRepresentator(YLCS_typevar_1221579075693), true);
{
SNode _nodeToCheck_1029348928467 = closure;
BaseIntentionProvid... | typeCheckingContext.createEquation(typeCheckingContext.typeOf(closure, "r:00000000-0000-4000-0000-011c89590337(jetbrains.mps.baseLanguage.closures.typesystem)", "1221579075903", true), new _Quotations.QuotationClass_7().createNode(paramTypes, st, realThrows, typeCheckingContext), _nodeToCheck_1029348928467, null, "r:00... |
23,212 | List<SNode> paramTypes = new ArrayList<SNode>();
for(SNode p : SLinkOperations.getTargets(md, "parameter", true)) {
paramTypes.add(ClassifierTypeUtil.resolveType(SLinkOperations.getTarget(p, "type", true), ct));
}
SNode resType = ClassifierTypeUtil.resolveType(SLinkOperations.getTarget(md, "returnType", true), ct);
<BU... | supertypes = Collections.singletonList(new _Quotations.QuotationClass_2().createNode(paramTypes, resType));
|
23,213 | List<SNode> supertypes = Collections.emptyList();
String rtSig = "_FunctionTypes." + FunctionType_Behavior.call_getRuntimeSignature_1213877404927(ft);
List<SNode> interfaces = RulesUtil_Closures.getInterfaces();
for(SNode ice : interfaces) {
if (rtSig.equals(SPropertyOperations.getString(ice, "name"))) {
<BUG>SNode ct ... | SNode ct = new _Quotations.QuotationClass_3().createNode(ice);
|
23,214 | import jetbrains.mps.lang.typesystem.runtime.AbstractInferenceRule_Runtime;
import jetbrains.mps.lang.typesystem.runtime.InferenceRule_Runtime;
import jetbrains.mps.smodel.SNode;
import jetbrains.mps.typesystem.inference.TypeCheckingContext;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
<BUG... | import java.util.List;
import java.util.ArrayList;
|
23,215 | public void applyRule(final SNode invoke, final TypeCheckingContext typeCheckingContext) {
final SNode cl = SNodeOperations.getAncestor(invoke, "jetbrains.mps.baseLanguage.closures.structure.ClosureLiteral", false, false);
if (!((cl != null))) {
BaseIntentionProvider intentionProvider = null;
typeCheckingContext.report... | [DELETED] |
23,216 | specifier.getDefaultFlowletOutput().setSchema(out);
specifier.getDefaultFlowletInput().setSchema(TupleSchema.EVENT_SCHEMA);
}
@Override
public void process(Tuple tuple, TupleContext tupleContext, OutputCollector outputCollector) {
<BUG>if (Common.debug)
System.out.println(this.getClass().getSimpleName() + ": Received ... | if (Common.debug) {
HashMap<String, String> headers = tuple.get("headers");
|
23,217 | String text = body == null ? null :new String(body);
Tuple output = new TupleBuilder().
set("title", title).
set("text", text).
create();
<BUG>if (Common.debug)
System.out.println(this.getClass().getSimpleName() + ": Emitting tuple " + output);
outputCollector.add(output);</BUG>
}
| if (Common.debug) {
|
23,218 | import com.continuuity.api.stream.Stream;
public class Main implements Application {
@Override
public ApplicationSpecification configure() {
return ApplicationSpecification.builder()
<BUG>.addFlow(CountCounts.class)
.addStream(new Stream("test"))
.create();</BUG>
}
| .addQuery(CountQuery.class)
.addStream(new Stream("text"))
.addDataSet(new CounterTable(Common.tableName))
.create();
|
23,219 | specifier.getDefaultFlowletOutput().setSchema(out);
}
@Override
public void process(Tuple tuple, TupleContext tupleContext, OutputCollector outputCollector) {
final String[] fields = { "title", "text" };
<BUG>if (Common.debug)
System.out.println(this.getClass().getSimpleName() + ": Received tuple " + tuple);
for (Stri... | if (Common.debug) {
for (String field : fields) {
|
23,220 | for (String token : tokens) {
Tuple output = new TupleBuilder().
set("field", field).
set("word", token).
create();
<BUG>if (Common.debug)
System.out.println(this.getClass().getSimpleName() + ": Emitting tuple " + output);
outputCollector.add(output);</BUG>
}
| if (Common.debug) {
|
23,221 | import com.continuuity.api.flow.Flow;
import com.continuuity.api.flow.FlowSpecifier;
public class CountCounts implements Flow {
public void configure(FlowSpecifier specifier) {
specifier.name("CountCounts");
<BUG>specifier.email("andreas@continuuity.com");
specifier.application("Examples");</BUG>
specifier.flowlet("sou... | specifier.stream("text");
specifier.dataset(Common.tableName);
specifier.application("Examples");
|
23,222 | import com.continuuity.api.data.Increment;
import com.continuuity.api.flow.flowlet.*;
import com.continuuity.api.flow.flowlet.builders.*;
public class Incrementer extends ComputeFlowlet
{
<BUG>static byte[] keyTotal = "countSink".getBytes();
@Override</BUG>
public void configure(FlowletSpecifier configurator) {
TupleSc... | static String keyTotal = ":sinkTotal:";
@Override
|
23,223 | String key = Integer.toString(count);
if (Common.debug)
</BUG>
System.out.println(this.getClass().getSimpleName() + ": Emitting " +
"Increment for " + key);
<BUG>Increment increment = new Increment(key.getBytes(), 1);
outputCollector.add(increment);
if (Common.count) {
increment = new Increment(keyTotal, 1);
outputColl... | if (Common.debug) {
|
23,224 | package CountAndFilterWords;
<BUG>import com.continuuity.api.data.Increment;
import com.continuuity.api.flow.flowlet.*;</BUG>
import com.continuuity.api.flow.flowlet.builders.*;
public class CountByField extends ComputeFlowlet
{
| import com.continuuity.api.data.dataset.KeyValueTable;
import com.continuuity.api.flow.flowlet.*;
|
23,225 | public class CountAndFilterWords implements Flow {
public void configure(FlowSpecifier specifier) {
specifier.name("CountAndFilterWords");
specifier.email("me@continuuity.com");
specifier.application("End2End");
<BUG>specifier.stream("text");
specifier.flowlet("source", StreamSource.class, 1);</BUG>
specifier.flowlet("... | specifier.dataset(Common.counterTableName);
specifier.flowlet("source", StreamSource.class, 1);
|
23,226 | import org.codehaus.groovy.control.CompilationUnit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public final class GroovyTreeParser implements TreeParser {
private static final Logger logger = LoggerFactory.getLogger(GroovyTreeParser.class);
<BUG>private static final String GROOVY_DEFAULT_INTERFACE = "groo... | private Indexer indexer = new Indexer();
|
23,227 | if (scriptClass != null) {
sourceUnit.getAST().getStatementBlock().getVariableScope().getDeclaredVariables().values().forEach(
variable -> {
SymbolInformation symbol =
getVariableSymbolInformation(scriptClass.getName(), sourceUri, variable);
<BUG>addToValueSet(newTypeReferences, variable.getType().getName(), symbol);
s... | newIndexer.addSymbol(sourceUnit.getSource().getURI(), symbol);
if (classes.containsKey(variable.getType().getName())) {
newIndexer.addReference(classes.get(variable.getType().getName()),
GroovyLocations.createLocation(sourceUri, variable.getType()));
|
23,228 | }
if (typeReferences.containsKey(foundSymbol.getName())) {
foundReferences.addAll(typeReferences.get(foundSymbol.getName()));</BUG>
}
<BUG>return foundReferences;
}</BUG>
@Override
public Set<SymbolInformation> getFilteredSymbols(String query) {
checkNotNull(query, "query must not be null");
Pattern pattern = getQueryP... | });
sourceUnit.getAST().getStatementBlock()
.visit(new MethodVisitor(newIndexer, sourceUri, sourceUnit.getAST().getScriptClassDummy(),
classes, Maps.newHashMap(), Optional.absent(), workspaceUriSupplier));
|
23,229 | <BUG>package com.palantir.ls.server.api;
import io.typefox.lsapi.ReferenceParams;</BUG>
import io.typefox.lsapi.SymbolInformation;
import java.net.URI;
import java.util.Map;
| import com.google.common.base.Optional;
import io.typefox.lsapi.Location;
import io.typefox.lsapi.Position;
import io.typefox.lsapi.ReferenceParams;
|
23,230 | import java.util.Map;
import java.util.Set;
public interface TreeParser {
void parseAllSymbols();
Map<URI, Set<SymbolInformation>> getFileSymbols();
<BUG>Map<String, Set<SymbolInformation>> getTypeReferences();
Set<SymbolInformation> findReferences(ReferenceParams params);
Set<SymbolInformation> getFilteredSymbols(St... | Map<Location, Set<Location>> getReferences();
Set<Location> findReferences(ReferenceParams params);
Optional<Location> gotoDefinition(URI uri, Position position);
Set<SymbolInformation> getFilteredSymbols(String query);
|
23,231 | .workspaceSymbolProvider(true)
.referencesProvider(true)
.completionProvider(new CompletionOptionsBuilder()
.resolveProvider(false)
.triggerCharacter(".")
<BUG>.build())
.build();</BUG>
InitializeResult result = new InitializeResultBuilder()
.capabilities(capabilities)
.build();
| .definitionProvider(true)
|
23,232 | package com.palantir.ls.server;
import com.palantir.ls.server.api.CompilerWrapper;
import com.palantir.ls.server.api.TreeParser;
import com.palantir.ls.server.api.WorkspaceCompiler;
<BUG>import io.typefox.lsapi.FileEvent;
import io.typefox.lsapi.PublishDiagnosticsParams;</BUG>
import io.typefox.lsapi.ReferenceParams;
i... | import com.google.common.base.Optional;
import io.typefox.lsapi.Location;
import io.typefox.lsapi.Position;
import io.typefox.lsapi.PublishDiagnosticsParams;
|
23,233 | import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.DigestOutputStream;
import java.security.MessageDigest;
<BUG>import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;</BUG>
public final class ... | import java.text.DateFormat;
import java.util.Date;
import java.util.List;
|
23,234 | 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;
|
23,235 | private static final String PATH_DELIMITER = "/";
public static final byte[] NO_CONTENT = PatchingTask.NO_CONTENT;
enum Element {
ADDED_BUNDLE("added-bundle"),
ADDED_MISC_CONTENT("added-misc-content"),
<BUG>ADDED_MODULE("added-module"),
BUNDLES("bundles"),</BUG>
CUMULATIVE("cumulative"),
DESCRIPTION("description"),
MIS... | APPLIES_TO_VERSION("applies-to-version"),
BUNDLES("bundles"),
|
23,236 | final int count = reader.getAttributeCount();
for (int i = 0; i < count; i++) {
final String value = reader.getAttributeValue(i);
final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
switch (attribute) {
<BUG>case APPLIES_TO_VERSION:
builder.addAppliesTo(value);
break;</BUG>
case RESULTING_VE... | [DELETED] |
23,237 | final StringBuilder path = new StringBuilder();
for(final String p : item.getPath()) {
path.append(p).append(PATH_DELIMITER);
}
path.append(item.getName());
<BUG>writer.writeAttribute(Attribute.PATH.name, path.toString());
if(type != ModificationType.REMOVE) {</BUG>
writer.writeAttribute(Attribute.HASH.name, bytesToHex... | if (item.isDirectory()) {
writer.writeAttribute(Attribute.DIRECTORY.name, "true");
if(type != ModificationType.REMOVE) {
|
23,238 | package org.jboss.as.patching;
import org.jboss.as.controller.OperationFailedException;
import org.jboss.as.patching.runner.PatchingException;
import org.jboss.logging.Messages;
import org.jboss.logging.annotations.Message;
<BUG>import org.jboss.logging.annotations.MessageBundle;
import java.io.IOException;</BUG>
impor... | import org.jboss.logging.annotations.Cause;
import java.io.IOException;
|
23,239 | TaskContext taskContext = TaskContext.inmem();
TaskContext.Value<Long> value = taskContext.evaluate(fib92);
value.consume(f92 -> System.out.println("fib(92) = " + f92));
}
static Task<Long> create(long n) {
<BUG>TaskBuilder<Long> fib = Task.ofType(Long.class).named("Fib", n);
</BUG>
if (n < 2) {
return fib
.process(() ... | TaskBuilder<Long> fib = Task.named("Fib", n).ofType(Long.class);
|
23,240 | int randomIndex = random.nextInt(defaultSkins.size());
final SkinData targetSkin = defaultSkins.get(randomIndex);
if (targetSkin != null) {
preferences.setTargetSkin(targetSkin);
properties.clear();
<BUG>properties.put(ChangeSkinCore.SKIN_KEY, plugin.convertToProperty(targetSkin));
Bukkit.getScheduler().runTaskAsynchro... | Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> plugin.getStorage().save(preferences));
|
23,241 | ServerInfo target = connectEvent.getTarget();
List<String> blacklist = plugin.getConfig().getStringList("server-blacklist");
if (blacklist != null && !blacklist.contains(target.getName())) {
final ProxiedPlayer player = connectEvent.getPlayer();
if (plugin.getLoginSession(player.getPendingConnection()) == null) {
<BUG>... | ProxyServer.getInstance().getScheduler().runAsync(plugin, () -> onLazyLoad(player));
|
23,242 | preferences.setTargetSkin(cachedSkin);
save(cachedSkin, preferences);
}
}
private void save(final SkinData skin, final UserPreference preferences) {
<BUG>Bukkit.getScheduler().runTaskAsynchronously(plugin, new Runnable() {
@Override
public void run() {</BUG>
if (plugin.getStorage().save(skin)) {
| Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {
|
23,243 | if (!defaultSkins.isEmpty()) {
int randomIndex = random.nextInt(defaultSkins.size());
final SkinData targetSkin = defaultSkins.get(randomIndex);
if (targetSkin != null) {
preferences.setTargetSkin(targetSkin);
<BUG>plugin.applySkin(player, targetSkin);
ProxyServer.getInstance().getScheduler().runAsync(plugin, new Runna... | ProxyServer.getInstance().getScheduler().runAsync(plugin, () -> plugin.getStorage().save(preferences));
}
}
}
public void save(final SkinData skin, final UserPreference preferences) {
ProxyServer.getInstance().getScheduler().runAsync(plugin, () -> {
if (plugin.getStorage().save(skin)) {
|
23,244 | out.writeInteger(skinId);
out.writeUTF(encodedData);
out.writeUTF(encodedSignature);
out.writeUTF(receiverUUID);
});
<BUG>} else {
plugin.getPluginChannel().sendTo(player, (out) -> {
out.writeUTF("PermissionsFailure");
});</BUG>
}
| plugin.getPluginChannel().sendTo(player, out -> out.writeUTF("PermissionsFailure"));
|
23,245 | refetchSkin(connection, playerName, loginEvent);
}
}
private void refetchSkin(final PendingConnection conn, final String playerName , final AsyncEvent<?> loginEvent) {
loginEvent.registerIntent(plugin);
<BUG>ProxyServer.getInstance().getScheduler().runAsync(plugin, new Runnable() {
@Override
public void run() {</BUG>
... | ProxyServer.getInstance().getScheduler().runAsync(plugin, () -> {
|
23,246 | import java.net.URL;
import java.text.MessageFormat;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
<BUG>import java.util.concurrent.ThreadFactory;
import ninja.leaping.configurate.ConfigurationNode;</BUG>
import ninja.leaping.configurate.yaml.YAMLConfigurationLoader;
import org.slf4j.Logger;
... | import java.util.stream.Collectors;
import ninja.leaping.configurate.ConfigurationNode;
|
23,247 | } catch (Exception ex) {
logger.error("Failed to setup database. Disabling plugin...", ex);
return;
}
List<String> defaultSkins = Lists.newArrayList();
<BUG>for (ConfigurationNode node : rootNode.getNode("default-skins").getChildrenMap().values()) {
defaultSkins.add(node.getString());
}
core.loadDefaultSkins(defaultSki... | defaultSkins.addAll(rootNode.getNode("default-skins").getChildrenMap().values()
.stream()
.map(ConfigurationNode::getString).collect(Collectors.toList()));
core.loadDefaultSkins(defaultSkins);
|
23,248 | YAMLConfigurationLoader messageLoader = YAMLConfigurationLoader.builder().setFile(messageFile).build();
try {
URL jarConfigFile = this.getClass().getResource("/messages.yml");
YAMLConfigurationLoader defaultLoader = YAMLConfigurationLoader.builder().setURL(jarConfigFile).build();
ConfigurationNode defaultRoot = default... | defaultRoot.getChildrenMap().values().stream().forEach((node) -> {
});
messageNode.getChildrenMap().values().stream().forEach((node) -> {
});
} catch (IOException ioEx) {
|
23,249 | plugin.sendMessage(invoker, "skin-changed");
}
}
private void sendUpdate() {
sendUpdateSelf();
<BUG>for (Player onlinePlayer : plugin.getGame().getServer().getOnlinePlayers()) {
if (onlinePlayer.equals(receiver) || !onlinePlayer.canSee(receiver)) {
continue;
}
onlinePlayer.offer(Keys.VANISH, true);</BUG>
onlinePlayer.o... | plugin.getGame().getServer().getOnlinePlayers().stream()
.filter(onlinePlayer -> onlinePlayer.equals(receiver))
.filter(onlinePlayer -> onlinePlayer.canSee(receiver))
.forEach(onlinePlayer -> {
onlinePlayer.offer(Keys.VANISH, true);
|
23,250 | import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.LocalFileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.permission.FsPermission;
import org.apache.hadoop.util.Progressable;
<BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*;
public class S3AFileSystem extends FileSyste... | import static org.apache.hadoop.fs.s3a.Constants.*;
public class S3AFileSystem extends FileSystem {
|
23,251 | public void initialize(URI name, Configuration conf) throws IOException {
super.initialize(name, conf);
uri = URI.create(name.getScheme() + "://" + name.getAuthority());
workingDir = new Path("/user", System.getProperty("user.name")).makeQualified(this.uri,
this.getWorkingDirectory());
<BUG>String accessKey = conf.get(... | String accessKey = conf.get(NEW_ACCESS_KEY, conf.get(OLD_ACCESS_KEY, null));
String secretKey = conf.get(NEW_SECRET_KEY, conf.get(OLD_SECRET_KEY, null));
|
23,252 | } else {
accessKey = userInfo;
}
}
AWSCredentialsProviderChain credentials = new AWSCredentialsProviderChain(
<BUG>new S3ABasicAWSCredentialsProvider(accessKey, secretKey),
new InstanceProfileCredentialsProvider(),
new S3AAnonymousAWSCredentialsProvider()
);</BUG>
bucket = name.getHost();
| new BasicAWSCredentialsProvider(accessKey, secretKey),
new AnonymousAWSCredentialsProvider()
|
23,253 |
awsConf.setSocketTimeout(conf.getInt(SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT));
</BUG>
s3 = new AmazonS3Client(credentials, awsConf);
<BUG>maxKeys = conf.getInt(MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS);
partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(MIN_MULTIPART_THR... | new InstanceProfileCredentialsProvider(),
new AnonymousAWSCredentialsProvider()
bucket = name.getHost();
ClientConfiguration awsConf = new ClientConfiguration();
awsConf.setMaxConnections(conf.getInt(NEW_MAXIMUM_CONNECTIONS, conf.getInt(OLD_MAXIMUM_CONNECTIONS, DEFAULT_MAXIMUM_CONNECTIONS)));
awsConf.setProtocol(conf.g... |
23,254 | cannedACL = null;
}
if (!s3.doesBucketExist(bucket)) {
throw new IOException("Bucket " + bucket + " does not exist");
}
<BUG>boolean purgeExistingMultipart = conf.getBoolean(PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART);
long purgeExistingMultipartAge = conf.getLong(PURGE_EXISTING_MULTIPART_AGE, DEFAULT_... | boolean purgeExistingMultipart = conf.getBoolean(NEW_PURGE_EXISTING_MULTIPART, conf.getBoolean(OLD_PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART));
long purgeExistingMultipartAge = conf.getLong(NEW_PURGE_EXISTING_MULTIPART_AGE, conf.getLong(OLD_PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART... |
23,255 | import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
<BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*;
public class S3AOutputStream extends OutputStream {</BUG>
private OutputStream backupStream;
private File backup... | import static org.apache.hadoop.fs.s3a.Constants.*;
public class S3AOutputStream extends OutputStream {
|
23,256 | this.client = client;
this.progress = progress;
this.fs = fs;
this.cannedACL = cannedACL;
this.statistics = statistics;
<BUG>partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
</BUG>
if (conf.get(BUFFER_DIR, null) ... | partSize = conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
|
23,257 | if (connect(isProducer)) {
break;
}
} catch (InvalidSelectorException e) {
throw new ConnectionException(
<BUG>"Connection to JMS failed. Invalid message selector");
} catch (JMSException | NamingException e) {
logger.log(LogLevel.ERROR, "RECONNECTION_EXCEPTION",
</BUG>
new Object[] { e.toString() });
| Messages.getString("CONNECTION_TO_JMS_FAILED_INVALID_MSG_SELECTOR")); //$NON-NLS-1$
logger.log(LogLevel.ERROR, "RECONNECTION_EXCEPTION", //$NON-NLS-1$
|
23,258 | private synchronized void createConnectionNoRetry() throws ConnectionException {
if (!isConnectValid()) {
try {
connect(isProducer);
} catch (JMSException e) {
<BUG>logger.log(LogLevel.ERROR, "Connection to JMS failed", new Object[] { e.toString() });
throw new ConnectionException(
"Connection to JMS failed. Did not tr... | logger.log(LogLevel.ERROR, "CONNECTION_TO_JMS_FAILED", new Object[] { e.toString() }); //$NON-NLS-1$
Messages.getString("CONNECTION_TO_JMS_FAILED_NO_RECONNECT_AS_RECONNECT_POLICY_DOES_NOT_APPLY")); //$NON-NLS-1$
|
23,259 | boolean res = false;
int count = 0;
do {
try {
if(count > 0) {
<BUG>logger.log(LogLevel.INFO, "ATTEMPT_TO_RESEND_MESSAGE", new Object[] { count });
</BUG>
Thread.sleep(messageRetryDelay);
}
synchronized (getSession()) {
| logger.log(LogLevel.INFO, "ATTEMPT_TO_RESEND_MESSAGE", new Object[] { count }); //$NON-NLS-1$
|
23,260 | getProducer().send(message);
res = true;
}
}
catch (JMSException e) {
<BUG>logger.log(LogLevel.WARN, "ERROR_DURING_SEND", new Object[] { e.toString() });
logger.log(LogLevel.INFO, "ATTEMPT_TO_RECONNECT");
</BUG>
setConnect(null);
| logger.log(LogLevel.WARN, "ERROR_DURING_SEND", new Object[] { e.toString() }); //$NON-NLS-1$
logger.log(LogLevel.INFO, "ATTEMPT_TO_RECONNECT"); //$NON-NLS-1$
|
23,261 | import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
import com.ibm.streams.operator.Attribute;
import com.ibm.streams.operator.StreamSchema;
import com.ibm.streams.operator.Type;
<BUG>import com.ibm.streams.operator.Type.MetaType;
class ConnectionDocumentParser {</BUG>
private static final Set<String> support... | import com.ibm.streamsx.messaging.jms.Messages;
class ConnectionDocumentParser {
|
23,262 | return msgClass;
}
private void convertProviderURLPath(File applicationDir) throws ParseConnectionDocumentException {
if(!isAMQ()) {
if(this.providerURL == null || this.providerURL.trim().length() == 0) {
<BUG>throw new ParseConnectionDocumentException("A value must be specified for provider_url attribute in connection... | throw new ParseConnectionDocumentException(Messages.getString("PROVIDER_URL_MUST_BE_SPECIFIED_IN_CONN_DOC")); //$NON-NLS-1$
|
23,263 | URL absProviderURL = new URL(url.getProtocol(), url.getHost(), applicationDir.getAbsolutePath() + File.separator + path);
this.providerURL = absProviderURL.toExternalForm();
}
}
} catch (MalformedURLException e) {
<BUG>throw new ParseConnectionDocumentException("Invalid provider_url value detected: " + e.getMessage());... | throw new ParseConnectionDocumentException(Messages.getString("INVALID_PROVIDER_URL", e.getMessage())); //$NON-NLS-1$
|
23,264 | for (int j = 0; j < accessSpecChildNodes.getLength(); j++) {
if (accessSpecChildNodes.item(j).getNodeName().equals("destination")) { //$NON-NLS-1$
destIndex = j;
} else if (accessSpecChildNodes.item(j).getNodeName().equals("uses_connection")) { //$NON-NLS-1$
if (!connection.equals(accessSpecChildNodes.item(j).getAttrib... | throw new ParseConnectionDocumentException(Messages.getString("VALUE_OF_CONNECTION_PARAM_NOT_THE_SAME_AS_CONN_USED_BY_ACCESS_ELEMENT", connection, access )); //$NON-NLS-1$
|
23,265 | nativeSchema = access_specification.item(i).getChildNodes().item(nativeSchemaIndex);
}
break;
}
}
<BUG>if (!accessFound) {
throw new ParseConnectionDocumentException("The value of the access parameter " + access
+ " is not found in the connections document");</BUG>
}
return nativeSchema;
| throw new ParseConnectionDocumentException(Messages.getString("VALUE_OF_ACCESS_PARAM_NOT_FOUND_IN_CONN_DOC", access )); //$NON-NLS-1$
|
23,266 | nativeAttrLength = Integer.parseInt((attrList.item(i).getAttributes().getNamedItem("length") //$NON-NLS-1$
.getNodeValue()));
}
if ((msgClass == MessageClass.wbe || msgClass == MessageClass.wbe22)
&& ((streamSchema.getAttribute(nativeAttrName) != null) && (streamSchema
<BUG>.getAttribute(nativeAttrName).getType().getMe... | throw new ParseConnectionDocumentException(Messages.getString("BLOB_NOT_SUPPORTED_FOR_MSG_CLASS", msgClass)); //$NON-NLS-1$
|
23,267 | throw new ParseConnectionDocumentException(" Blob data type is not supported for message class "
+ msgClass);</BUG>
}
Iterator<NativeSchema> it = nativeSchemaObjects.iterator();
while (it.hasNext()) {
<BUG>if (it.next().getName().equals(nativeAttrName)) {
throw new ParseConnectionDocumentException("Parameter name: " + ... | nativeAttrLength = Integer.parseInt((attrList.item(i).getAttributes().getNamedItem("length") //$NON-NLS-1$
.getNodeValue()));
if ((msgClass == MessageClass.wbe || msgClass == MessageClass.wbe22)
&& ((streamSchema.getAttribute(nativeAttrName) != null) && (streamSchema
.getAttribute(nativeAttrName).getType().getMetaType(... |
23,268 | if (msgClass == MessageClass.text) {
typesWithLength = new HashSet<String>(Arrays.asList("Bytes")); //$NON-NLS-1$
}
Set<String> typesWithoutLength = new HashSet<String>(Arrays.asList("Byte", "Short", "Int", "Long", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
"Float", "Double", "Boolean")); //$NON-NLS-1$ //$... | throw new ParseConnectionDocumentException(Messages.getString("LENGTH_ATTRIB_SHOULD_NOT_BE_PRESENT_FOR_PARAM_IN_NATIVE_SCHEMA", nativeAttrName )); //$NON-NLS-1$
|
23,269 | if ((nativeAttrLength != LENGTH_ABSENT_IN_NATIVE_SCHEMA)
&& (msgClass == MessageClass.wbe || msgClass == MessageClass.wbe22 || msgClass == MessageClass.xml)
&& (streamSchema.getAttribute(nativeAttrName) != null)
&& (streamSchema.getAttribute(nativeAttrName).getType().getMetaType() != Type.MetaType.RSTRING)
&& (streamSc... | throw new ParseConnectionDocumentException(Messages.getString("LENGTH_ATTRIB_SHOULD_NOT_BE_PRESENT_FOR_PARAM_IN_NATIVE_SCHEMA", nativeAttrName )); //$NON-NLS-1$
|
23,270 | if (streamSchema.getAttribute(nativeAttrName) != null) {
MetaType metaType = streamSchema.getAttribute(nativeAttrName).getType().getMetaType();
if (metaType == Type.MetaType.DECIMAL32 || metaType == Type.MetaType.DECIMAL64
|| metaType == Type.MetaType.DECIMAL128 || metaType == Type.MetaType.TIMESTAMP) {
if (nativeAttrL... | Messages.getString("LENGTH_ATTRIB_SHOULD_NOT_BE_PRESENT_FOR_PARAM_WITH_TYPE_IN_NATIVE_SCHEMA", nativeAttrName, metaType )); //$NON-NLS-1$
|
23,271 | nativeAttrLength = -4;
}
}
}
if (typesWithLength.contains(nativeAttrType)) {
<BUG>if (nativeAttrLength == LENGTH_ABSENT_IN_NATIVE_SCHEMA && msgClass == MessageClass.bytes) {
throw new ParseConnectionDocumentException("Length attribute should be present for parameter: "
+ nativeAttrName + " In native schema file for mes... | throw new ParseConnectionDocumentException(Messages.getString("LENGTH_ATTRIB_SHOULD_NOT_BE_PRESENT_FOR_PARAM_IN_NATIVE_SCHEMA_FOR_MSG_CLASS_BYTES", nativeAttrName )); //$NON-NLS-1$
|
23,272 | if (streamSchema.getAttribute(nativeAttrName) != null) {
streamAttrName = streamSchema.getAttribute(nativeAttrName).getName();
streamAttrMetaType = streamSchema.getAttribute(nativeAttrName).getType().getMetaType();
if ((msgClass == MessageClass.stream || msgClass == MessageClass.map)
&& !mapSPLToNativeSchemaDataTypesFo... | throw new ParseConnectionDocumentException(Messages.getString("ATTRIB_WITH_TYPE_IN_NATIVE_SCHEMA_CANNOT_BE_MAPPED_TO_ATTRIB_WITH_TYPE", nativeAttrName, nativeAttrType, streamAttrName, streamAttrMetaType.getLanguageType())); //$NON-NLS-1$
|
23,273 | + nativeAttrType + " in the native schema cannot be mapped with attribute: "
+ streamAttrName + " with type : " + streamAttrMetaType.getLanguageType());</BUG>
}
else if (msgClass == MessageClass.bytes
&& !mapSPLToNativeSchemaDataTypesForBytes.get(streamAttrMetaType.getLanguageType()).equals(
<BUG>nativeAttrType)) {
thr... | if (streamSchema.getAttribute(nativeAttrName) != null) {
streamAttrName = streamSchema.getAttribute(nativeAttrName).getName();
streamAttrMetaType = streamSchema.getAttribute(nativeAttrName).getType().getMetaType();
if ((msgClass == MessageClass.stream || msgClass == MessageClass.map)
&& !mapSPLToNativeSchemaDataTypesFo... |
23,274 | package com.ibm.streamsx.messaging.i18n;
import java.text.MessageFormat;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
public class Messages {
<BUG>private static final String BUNDLE_NAME = "com.ibm.streamsx.messaging.mqtt.MQTTMessages"; //$NON-NLS-1$
</BUG>
private static final ResourceBu... | private static final String BUNDLE_NAME = "com.ibm.streamsx.messaging.i18n.CommonMessages"; //$NON-NLS-1$
|
23,275 | import java.util.ArrayList;
import java.util.Date;
import java.util.LinkedList;
import org.apache.commons.lang3.StringUtils;
public class Log {
<BUG>private final static String FEHLER = "Fehler(" + Const.PROGRAMMNAME + "): ";
private static class Error {</BUG>
String cl = "";
int nr = 0;
int count = 0;
| public final static String LILNE = "################################################################################";
private static class Error {
|
23,276 | sysLog("ImportOLD: " + Config.importOld);
if (Config.nurSenderLaden != null) {
sysLog("Nur Sender laden: " + StringUtils.join(Config.nurSenderLaden, ','));
}
sysLog("");
<BUG>sysLog("##################################################################################");
}</BUG>
public static synchronized void endMsg() ... | [DELETED] |
23,277 | strEx = " ";
}
retList.add(strEx + e.cl + " Fehlernummer: " + e.nr + " Anzahl: " + e.count);
}
}
<BUG>retList.add("##################################################################################");
return retList;</BUG>
}
public static synchronized void errorLog(int fehlerNummer, Exception ex) {
fehlermeldung_(fehle... | retList.add(LILNE);
return retList;
|
23,278 | public final static int VON_NR = 0;
public final static String NACH = "nach";
public final static int NACH_NR = 1;
public final static String[] COLUMN_NAMES = {VON, NACH};
public static final int MAX_ELEM = 2;
<BUG>public LinkedList<String[]> list = new LinkedList<>();
public void init() {
</BUG>
list.clear();
| public static LinkedList<String[]> list = new LinkedList<>();
public static void init() {
|
23,279 | public void init() {
</BUG>
list.clear();
list.add(new String[]{" ", "_"});
}
<BUG>public String replace(String strCheck, boolean pfad) {
</BUG>
Iterator<String[]> it = list.iterator();
while (it.hasNext()) {
String[] strReplace = it.next();
| public final static int VON_NR = 0;
public final static String NACH = "nach";
public final static int NACH_NR = 1;
public final static String[] COLUMN_NAMES = {VON, NACH};
public static final int MAX_ELEM = 2;
public static LinkedList<String[]> list = new LinkedList<>();
public static void init() {
public static String... |
23,280 | import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
<BUG>import java.util.logging.Logger;
import org.apache.commons.lang.StringUtils;</BUG>
import org.jibx.runtime.BindingDirectory;
import org.jibx.runtime.IBindingFactory;
import org.jibx... | import eu.europeana.corelib.solr.entity.*;
import org.apache.commons.lang.StringUtils;
|
23,281 | import eu.europeana.corelib.definitions.jibx.*;
import eu.europeana.corelib.definitions.jibx.ResourceOrLiteralType.Resource;
import eu.europeana.corelib.definitions.model.ColorSpace;
import eu.europeana.corelib.definitions.model.Orientation;
import eu.europeana.corelib.solr.bean.impl.FullBeanImpl;
<BUG>import eu.europe... | [DELETED] |
23,282 | appendEuropeanaAggregation(rdf, fullBean);
appendAgents(rdf, fullBean.getAgents());
appendConcepts(rdf, fullBean.getConcepts());
appendPlaces(rdf, fullBean.getPlaces());
appendTimespans(rdf, fullBean.getTimespans());
<BUG>appendLicenses(rdf, fullBean.getLicenses());
IMarshallingContext marshallingContext;</BUG>
try {
i... | appendServices(rdf,fullBean.getServices());
IMarshallingContext marshallingContext;
|
23,283 | wr.getDctermsIsFormatOf());
SolrUtils.addFromMap(doc, EdmLabel.WR_DCTERMS_ISSUED,
wr.getDctermsIssued());
SolrUtils.addFromStringArray(doc, EdmLabel.WR_OWL_SAMEAS,
wr.getOwlSameAs());
<BUG>SolrUtils.addFromStringArray(doc,EdmLabel.WR_SVCS_HAS_SERVICE,wr.getSvcsHasService());
SolrUtils.addFromString(doc,EdmLabel.WR_EDM_... | SolrUtils.addFromString(doc,EdmLabel.WR_WDRS_DESCRIBEDBY,wr.getWdrsDescribedBy());
SolrUtils.addFromString(doc,EdmLabel.WR_EDM_PREVIEW,wr.getEdmPreview());
|
23,284 | update = MongoUtils.updateMap(wrMongo, wr, "webResourceEdmRights", ops)
|| update;
update = MongoUtils.updateArray(wrMongo, wr, "owlSameAs", ops)
|| update;
update = MongoUtils.updateString(wrMongo,wr,"edmPreview",ops)||update;
<BUG>update = MongoUtils.updateString(wrMongo,wr,"svcsHasService",ops)||update;
if (update)... | update = MongoUtils.updateArray(wrMongo,wr,"svcsHasService",ops)||update;
update = MongoUtils.updateString(wrMongo,wr,"wdrsDescribedBy",ops)||update;
if (update) {
|
23,285 | SolrUtils.addFromMap(doc, EdmLabel.PROVIDER_AGGREGATION_EDM_RIGHTS,
aggr.getEdmRights());
}
SolrUtils.addFromMap(doc,
EdmLabel.PROVIDER_AGGREGATION_EDM_DATA_PROVIDER,
<BUG>aggr.getEdmDataProvider());
SolrUtils.addFromMap(doc, EdmLabel.PROVIDER_AGGREGATION_EDM_PROVIDER,</BUG>
aggr.getEdmProvider());
SolrUtils.addFromStr... | EdmLabel.PROVIDER_AGGREGATION_EDM_INTERMEDIATE_PROVIDER,
aggr.getEdmIntermediateProvider());
SolrUtils.addFromMap(doc, EdmLabel.PROVIDER_AGGREGATION_EDM_PROVIDER,
|
23,286 | T obj) {
Map<String, List<String>> retMap = new HashMap<String, List<String>>();
if (obj != null) {
if (obj.getLang() != null
&& StringUtils.isNotBlank(obj.getLang().getLang())) {
<BUG>List<String> val = new ArrayList<String>();
val.add(obj.getString());
retMap.put(obj.getLang().getLang(), val);
} else {
List<String> v... | if(StringUtils.isNotBlank(obj.getString())) {
|
23,287 | } else {
List<String> val = new ArrayList<String>();
val.add(obj.getString());</BUG>
retMap.put("def", val);
}
<BUG>return retMap;
}</BUG>
return null;
}
public static Map<String, List<String>> createLiteralMapFromString(
| if(StringUtils.isNotBlank(obj.getString())) {
val.add(obj.getString());
return retMap.isEmpty()?null:retMap;
|
23,288 | && StringUtils.isNotBlank(obj.getLang().getLang())) {
List<String> val = retMap
.get((obj.getLang().getLang()));
if (val == null) {
val = new ArrayList<String>();
<BUG>}
val.add(obj.getString());
retMap.put(obj.getLang().getLang(), val);
} else {</BUG>
List<String> val = retMap.get("def");
| [DELETED] |
23,289 | retMap.put(obj.getLang().getLang(), val);
} else {</BUG>
List<String> val = retMap.get("def");
if (val == null) {
val = new ArrayList<String>();
<BUG>}
val.add(obj.getString());
retMap.put("def", val);
}</BUG>
}
| } else {
if(StringUtils.isNotBlank(StringUtils.trimToNull(obj.getString()))) {
|
23,290 | if (retMap.containsKey(lang)) {
val = retMap.get(lang);
} else {
val = new ArrayList<String>();
}
<BUG>val.add(StringUtils.trim(obj.getResource()
.getResource()));
retMap.put(lang, val);
} else {</BUG>
List<String> val = retMap.get("def");
| if(StringUtils.isNotBlank(StringUtils.trimToNull(obj.getResource()
.getResource()))) {
val.add(obj.getString());
|
23,291 | } else {</BUG>
List<String> val = retMap.get("def");
if (val == null) {
val = new ArrayList<String>();
}
<BUG>val.add(StringUtils.trim(obj.getResource()
.getResource()));
retMap.put("def", val);</BUG>
}
| if (retMap.containsKey(lang)) {
val = retMap.get(lang);
} else {
if(StringUtils.isNotBlank(StringUtils.trimToNull(obj.getResource()
.getResource()))) {
val.add(obj.getString());
retMap.put(lang, val);
} else {
|
23,292 | import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.LocalFileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.permission.FsPermission;
import org.apache.hadoop.util.Progressable;
<BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*;
public class S3AFileSystem extends FileSyste... | import static org.apache.hadoop.fs.s3a.Constants.*;
public class S3AFileSystem extends FileSystem {
|
23,293 | public void initialize(URI name, Configuration conf) throws IOException {
super.initialize(name, conf);
uri = URI.create(name.getScheme() + "://" + name.getAuthority());
workingDir = new Path("/user", System.getProperty("user.name")).makeQualified(this.uri,
this.getWorkingDirectory());
<BUG>String accessKey = conf.get(... | String accessKey = conf.get(NEW_ACCESS_KEY, conf.get(OLD_ACCESS_KEY, null));
String secretKey = conf.get(NEW_SECRET_KEY, conf.get(OLD_SECRET_KEY, null));
|
23,294 | } else {
accessKey = userInfo;
}
}
AWSCredentialsProviderChain credentials = new AWSCredentialsProviderChain(
<BUG>new S3ABasicAWSCredentialsProvider(accessKey, secretKey),
new InstanceProfileCredentialsProvider(),
new S3AAnonymousAWSCredentialsProvider()
);</BUG>
bucket = name.getHost();
| new BasicAWSCredentialsProvider(accessKey, secretKey),
new AnonymousAWSCredentialsProvider()
|
23,295 |
awsConf.setSocketTimeout(conf.getInt(SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT));
</BUG>
s3 = new AmazonS3Client(credentials, awsConf);
<BUG>maxKeys = conf.getInt(MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS);
partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(MIN_MULTIPART_THR... | new InstanceProfileCredentialsProvider(),
new AnonymousAWSCredentialsProvider()
bucket = name.getHost();
ClientConfiguration awsConf = new ClientConfiguration();
awsConf.setMaxConnections(conf.getInt(NEW_MAXIMUM_CONNECTIONS, conf.getInt(OLD_MAXIMUM_CONNECTIONS, DEFAULT_MAXIMUM_CONNECTIONS)));
awsConf.setProtocol(conf.g... |
23,296 | cannedACL = null;
}
if (!s3.doesBucketExist(bucket)) {
throw new IOException("Bucket " + bucket + " does not exist");
}
<BUG>boolean purgeExistingMultipart = conf.getBoolean(PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART);
long purgeExistingMultipartAge = conf.getLong(PURGE_EXISTING_MULTIPART_AGE, DEFAULT_... | boolean purgeExistingMultipart = conf.getBoolean(NEW_PURGE_EXISTING_MULTIPART, conf.getBoolean(OLD_PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART));
long purgeExistingMultipartAge = conf.getLong(NEW_PURGE_EXISTING_MULTIPART_AGE, conf.getLong(OLD_PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART... |
23,297 | import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
<BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*;
public class S3AOutputStream extends OutputStream {</BUG>
private OutputStream backupStream;
private File backup... | import static org.apache.hadoop.fs.s3a.Constants.*;
public class S3AOutputStream extends OutputStream {
|
23,298 | this.client = client;
this.progress = progress;
this.fs = fs;
this.cannedACL = cannedACL;
this.statistics = statistics;
<BUG>partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
</BUG>
if (conf.get(BUFFER_DIR, null) ... | partSize = conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
|
23,299 | "set CF1[hello][-31337] = -23876;",
"set CF1[hello][-31337] = long(-23876);",
"set CF1[hello][world2] = 15;",
"get CF1 where world2 = long(15);",
"get cF1 where world2 = long(15);",
<BUG>"get Cf1 where world2 = long(15);",
"set CF1['hello'][time_spent_uuid] = timeuuid(a8098c1a-f86e-11da-bd1a-00112444be1e);",</BUG>
"cre... | "del CF1[utf8('hello')][utf8('world')];",
"del CF1[hello][world2];",
"set CF1['hello'][time_spent_uuid] = timeuuid(a8098c1a-f86e-11da-bd1a-00112444be1e);",
|
23,300 | else
columnName = columnNameAsByteArray(CliCompiler.getColumn(columnFamilySpec, 0), cfDef);
}</BUG>
else if (columnSpecCnt == 2)
<BUG>{
superColumnName = columnNameAsByteArray(CliCompiler.getColumn(columnFamilySpec, 0), cfDef);
columnName = subColumnNameAsByteArray(CliCompiler.getColumn(columnFamilySpec, 1), cfDef);
<... | columnName = columnNameBytes;
assert columnTree != null;
assert subColumnTree != null;
superColumnName = (columnTree.getType() == CliParser.FUNCTION_CALL)
? convertValueByFunction(columnTree, null, null).array()
: columnNameAsByteArray(CliCompiler.getColumn(columnFamilySpec, 0), cfDef);
columnName = (subColumnTree.getT... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.