Projects >> accumulo >>cfbdef1345388767e81a05a154dac22040ad5283

Chunk
Conflicting content
 */
package org.apache.accumulo.core;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

import java.nio.charset.Charset;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
Solution content
 */
package org.apache.accumulo.core;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
File
Constants.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
import com.google.common.base.Charsets;

public class Constants {
<<<<<<< HEAD

=======
  /**
   * @deprecated since 1.5.3, 1.6.2; statically import Guava's {@link Charsets#UTF_8} or Java 7's built-in StandardCharsets.UTF_8 or use
   *             {@link Charset#forName(String)} with "UTF-8" instead
   */
  @Deprecated
  public static final Charset UTF8 = UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  public static final String VERSION = FilteredConstants.VERSION;

  // Zookeeper locations
Solution content
public class Constants {

  public static final String VERSION = FilteredConstants.VERSION;

  // Zookeeper locations
File
Constants.java
Developer's decision
Version 1
Kind of conflict
Annotation
Attribute
Comment
Chunk
Conflicting content
  public static final String BULK_PREFIX = "b-";

  public static final String CLONE_PREFIX = "c-";
<<<<<<< HEAD
  public static final byte[] CLONE_PREFIX_BYTES = CLONE_PREFIX.getBytes(StandardCharsets.UTF_8);
=======
  public static final byte[] CLONE_PREFIX_BYTES = CLONE_PREFIX.getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

  // this affects the table client caching of metadata
  public static final int SCAN_BATCH_SIZE = 1000;
Solution content
  public static final String BULK_PREFIX = "b-";

  public static final String CLONE_PREFIX = "c-";
  public static final byte[] CLONE_PREFIX_BYTES = CLONE_PREFIX.getBytes(UTF_8);

  // this affects the table client caching of metadata
  public static final int SCAN_BATCH_SIZE = 1000;
File
Constants.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.core.cli;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Map.Entry;
Solution content
 */
package org.apache.accumulo.core.cli;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Map.Entry;
File
ClientOpts.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    public byte[] value;
    
    public Password(String dfault) {
<<<<<<< HEAD
      value = dfault.getBytes(StandardCharsets.UTF_8);
=======
      value = dfault.getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    }
    
    @Override
Solution content
    public byte[] value;
    
    public Password(String dfault) {
      value = dfault.getBytes(UTF_8);
    }
    
    @Override
File
ClientOpts.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    
    @Override
    public String toString() {
<<<<<<< HEAD
      return new String(value, StandardCharsets.UTF_8);
=======
      return new String(value, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    }
  }
  
Solution content
    
    @Override
    public String toString() {
      return new String(value, UTF_8);
    }
  }
  
File
ClientOpts.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
import java.util.List;
import java.util.concurrent.TimeUnit;

<<<<<<< HEAD
import org.apache.accumulo.core.client.impl.DurabilityImpl;
=======
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.hadoop.io.Writable;
import org.apache.hadoop.util.StringUtils;
Solution content
import java.util.List;
import java.util.concurrent.TimeUnit;

import org.apache.accumulo.core.client.impl.DurabilityImpl;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.hadoop.io.Writable;
import org.apache.hadoop.util.StringUtils;
File
BatchWriterConfig.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
      addField(fields, "durability", durability);
    String output = StringUtils.join(",", fields);

<<<<<<< HEAD
    byte[] bytes = output.getBytes(StandardCharsets.UTF_8);
    byte[] len = String.format("%6s#", Integer.toString(bytes.length, 36)).getBytes(StandardCharsets.UTF_8);
=======
    byte[] bytes = output.getBytes(UTF_8);
    byte[] len = String.format("%6s#", Integer.toString(bytes.length, 36)).getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    if (len.length != 7)
      throw new IllegalStateException("encoded length does not match expected value");
    out.write(len);
Solution content
      addField(fields, "durability", durability);
    String output = StringUtils.join(",", fields);

    byte[] bytes = output.getBytes(UTF_8);
    byte[] len = String.format("%6s#", Integer.toString(bytes.length, 36)).getBytes(UTF_8);
    if (len.length != 7)
      throw new IllegalStateException("encoded length does not match expected value");
    out.write(len);
File
BatchWriterConfig.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
  public void readFields(DataInput in) throws IOException {
    byte[] len = new byte[7];
    in.readFully(len);
<<<<<<< HEAD
    String strLen = new String(len, StandardCharsets.UTF_8);
=======
    String strLen = new String(len, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    if (!strLen.endsWith("#"))
      throw new IllegalStateException("length was not encoded correctly");
    byte[] bytes = new byte[Integer.parseInt(strLen.substring(strLen.lastIndexOf(' ') + 1, strLen.length() - 1), 36)];
Solution content
  public void readFields(DataInput in) throws IOException {
    byte[] len = new byte[7];
    in.readFully(len);
    String strLen = new String(len, UTF_8);
    if (!strLen.endsWith("#"))
      throw new IllegalStateException("length was not encoded correctly");
    byte[] bytes = new byte[Integer.parseInt(strLen.substring(strLen.lastIndexOf(' ') + 1, strLen.length() - 1), 36)];
File
BatchWriterConfig.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    byte[] bytes = new byte[Integer.parseInt(strLen.substring(strLen.lastIndexOf(' ') + 1, strLen.length() - 1), 36)];
    in.readFully(bytes);

<<<<<<< HEAD
    String strFields = new String(bytes, StandardCharsets.UTF_8);
=======
    String strFields = new String(bytes, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    String[] fields = StringUtils.split(strFields, '\\', ',');
    for (String field : fields) {
      String[] keyValue = StringUtils.split(field, '\\', '=');
Solution content
    byte[] bytes = new byte[Integer.parseInt(strLen.substring(strLen.lastIndexOf(' ') + 1, strLen.length() - 1), 36)];
    in.readFully(bytes);

    String strFields = new String(bytes, UTF_8);
    String[] fields = StringUtils.split(strFields, '\\', ',');
    for (String field : fields) {
      String[] keyValue = StringUtils.split(field, '\\', '=');
File
BatchWriterConfig.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.core.client;

<<<<<<< HEAD
import static com.google.common.base.Preconditions.checkArgument;
=======
import static com.google.common.base.Charsets.UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
Solution content
 */
package org.apache.accumulo.core.client;

import static com.google.common.base.Preconditions.checkArgument;
import static java.nio.charset.StandardCharsets.UTF_8;

import java.nio.ByteBuffer;
File
ZooKeeperInstance.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
        throw new RuntimeException("Instance name " + instanceName
            + " does not exist in zookeeper.  Run \"accumulo org.apache.accumulo.server.util.ListInstances\" to see a list.");
      }
<<<<<<< HEAD
      instanceId = new String(iidb, StandardCharsets.UTF_8);
=======
      instanceId = new String(iidb, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    }

    if (zooCache.get(Constants.ZROOT + "/" + instanceId) == null) {
Solution content
        throw new RuntimeException("Instance name " + instanceName
            + " does not exist in zookeeper.  Run \"accumulo org.apache.accumulo.server.util.ListInstances\" to see a list.");
      }
      instanceId = new String(iidb, UTF_8);
    }

    if (zooCache.get(Constants.ZROOT + "/" + instanceId) == null) {
File
ZooKeeperInstance.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
    OpTimer opTimer = new OpTimer(log, Level.TRACE).start("Looking up master location in zoocache.");
    byte[] loc = ZooUtil.getLockData(zooCache, masterLocPath);
<<<<<<< HEAD
    opTimer.stop("Found master at " + (loc == null ? null : new String(loc, StandardCharsets.UTF_8)) + " in %DURATION%");
=======
    opTimer.stop("Found master at " + (loc == null ? null : new String(loc, UTF_8)) + " in %DURATION%");
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    if (loc == null) {
      return Collections.emptyList();
Solution content
    OpTimer opTimer = new OpTimer(log, Level.TRACE).start("Looking up master location in zoocache.");
    byte[] loc = ZooUtil.getLockData(zooCache, masterLocPath);
    opTimer.stop("Found master at " + (loc == null ? null : new String(loc, UTF_8)) + " in %DURATION%");

    if (loc == null) {
      return Collections.emptyList();
File
ZooKeeperInstance.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
<<<<<<< HEAD
      return Collections.emptyList();
    }

    return Collections.singletonList(new String(loc, StandardCharsets.UTF_8));
=======
    return Collections.singletonList(new String(loc, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }

  @Override
Solution content
      return Collections.emptyList();
    }

    return Collections.singletonList(new String(loc, UTF_8));
  }

  @Override
File
ZooKeeperInstance.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
    OpTimer opTimer = new OpTimer(log, Level.TRACE).start("Looking up root tablet location in zookeeper.");
    byte[] loc = zooCache.get(zRootLocPath);
<<<<<<< HEAD
    opTimer.stop("Found root tablet at " + (loc == null ? null : new String(loc, StandardCharsets.UTF_8)) + " in %DURATION%");
=======
    opTimer.stop("Found root tablet at " + (loc == null ? null : new String(loc, UTF_8)) + " in %DURATION%");
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    if (loc == null) {
      return null;
Solution content
    OpTimer opTimer = new OpTimer(log, Level.TRACE).start("Looking up root tablet location in zookeeper.");
    byte[] loc = zooCache.get(zRootLocPath);
    opTimer.stop("Found root tablet at " + (loc == null ? null : new String(loc, UTF_8)) + " in %DURATION%");

    if (loc == null) {
      return null;
File
ZooKeeperInstance.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
      return null;
    }

<<<<<<< HEAD
    return new String(loc, StandardCharsets.UTF_8).split("\\|")[0];
=======
    return new String(loc, UTF_8).split("\\|")[0];
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }

  @Override
Solution content
      return null;
    }

    return new String(loc, UTF_8).split("\\|")[0];
  }

  @Override
File
ZooKeeperInstance.java
Developer's decision
Version 2
Kind of conflict
Array access
Return statement
Chunk
Conflicting content
<<<<<<< HEAD
    for (String name : zooCache.getChildren(Constants.ZROOT + Constants.ZINSTANCES)) {
      String instanceNamePath = Constants.ZROOT + Constants.ZINSTANCES + "/" + name;
      byte[] bytes = zooCache.get(instanceNamePath);
      UUID iid = UUID.fromString(new String(bytes, StandardCharsets.UTF_8));
=======
      UUID iid = UUID.fromString(new String(bytes, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      if (iid.equals(instanceId)) {
        return name;
      }
Solution content
    for (String name : zooCache.getChildren(Constants.ZROOT + Constants.ZINSTANCES)) {
      String instanceNamePath = Constants.ZROOT + Constants.ZINSTANCES + "/" + name;
      byte[] bytes = zooCache.get(instanceNamePath);
      UUID iid = UUID.fromString(new String(bytes, UTF_8));
      if (iid.equals(instanceId)) {
        return name;
      }
File
ZooKeeperInstance.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.core.client.impl;

<<<<<<< HEAD
import static com.google.common.base.Preconditions.checkArgument;

import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
Solution content
 */
package org.apache.accumulo.core.client.impl;

import static com.google.common.base.Preconditions.checkArgument;
import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
File
InstanceOperationsImpl.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
        List copy = new ArrayList(children);
        Collections.sort(copy);
        byte[] data = cache.get(path + "/" + candidate + "/" + copy.get(0));
<<<<<<< HEAD
        if (data != null && !"master".equals(new String(data, StandardCharsets.UTF_8))) {
=======
        if (data != null && !"master".equals(new String(data, UTF_8))) {
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          results.add(candidate);
        }
      }
Solution content
        List copy = new ArrayList(children);
        Collections.sort(copy);
        byte[] data = cache.get(path + "/" + candidate + "/" + copy.get(0));
        if (data != null && !"master".equals(new String(data, UTF_8))) {
          results.add(candidate);
        }
      }
File
InstanceOperationsImpl.java
Developer's decision
Version 2
Kind of conflict
If statement
Chunk
Conflicting content
 */
package org.apache.accumulo.core.client.impl;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.security.SecurityPermission;
import java.util.LinkedList;
import java.util.List;
Solution content
 */
package org.apache.accumulo.core.client.impl;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.security.SecurityPermission;
import java.util.LinkedList;
import java.util.List;
File
Namespaces.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
      byte[] path = zc.get(ZooUtil.getRoot(instance) + Constants.ZNAMESPACES + "/" + id + Constants.ZNAMESPACE_NAME);
      if (path != null) {
        if (nameAsKey)
<<<<<<< HEAD
          namespaceMap.put(new String(path, StandardCharsets.UTF_8), id);
        else
          namespaceMap.put(id, new String(path, StandardCharsets.UTF_8));
=======
          namespaceMap.put(new String(path, UTF_8), id);
        else
          namespaceMap.put(id, new String(path, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      }
    }
    return namespaceMap;
Solution content
      byte[] path = zc.get(ZooUtil.getRoot(instance) + Constants.ZNAMESPACES + "/" + id + Constants.ZNAMESPACE_NAME);
      if (path != null) {
        if (nameAsKey)
          namespaceMap.put(new String(path, UTF_8), id);
        else
          namespaceMap.put(id, new String(path, UTF_8));
      }
    }
    return namespaceMap;
File
Namespaces.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.core.client.impl;

<<<<<<< HEAD
import static com.google.common.base.Preconditions.checkArgument;

import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.ArrayList;

import org.apache.accumulo.core.Constants;
Solution content
 */
package org.apache.accumulo.core.client.impl;

import static com.google.common.base.Preconditions.checkArgument;
import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.ArrayList;

import org.apache.accumulo.core.Constants;
File
ServerClient.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    for (String tserver : zc.getChildren(ZooUtil.getRoot(instance) + Constants.ZTSERVERS)) {
      String path = ZooUtil.getRoot(instance) + Constants.ZTSERVERS + "/" + tserver;
      byte[] data = ZooUtil.getLockData(zc, path);
<<<<<<< HEAD
      if (data != null && !new String(data, StandardCharsets.UTF_8).equals("master"))
        servers.add(new ThriftTransportKey(new ServerServices(new String(data)).getAddressString(Service.TSERV_CLIENT), rpcTimeout, SslConnectionParams
            .forClient(ClientConfigurationHelper.getClientRpcConfiguration(instance))));
=======
      if (data != null && !new String(data, UTF_8).equals("master"))
        servers.add(new ThriftTransportKey(
          new ServerServices(new String(data)).getAddressString(Service.TSERV_CLIENT),
          rpcTimeout, SslConnectionParams.forClient(ServerConfigurationUtil.getConfiguration(instance))));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    }
    
    boolean opened = false;
Solution content
    for (String tserver : zc.getChildren(ZooUtil.getRoot(instance) + Constants.ZTSERVERS)) {
      String path = ZooUtil.getRoot(instance) + Constants.ZTSERVERS + "/" + tserver;
      byte[] data = ZooUtil.getLockData(zc, path);
      if (data != null && !new String(data, UTF_8).equals("master"))
        servers.add(new ThriftTransportKey(new ServerServices(new String(data)).getAddressString(Service.TSERV_CLIENT), rpcTimeout, SslConnectionParams
            .forClient(ClientConfigurationHelper.getClientRpcConfiguration(instance))));
    }
    
    boolean opened = false;
File
ServerClient.java
Developer's decision
Combination
Kind of conflict
If statement
Chunk
Conflicting content
 */
package org.apache.accumulo.core.client.impl;

<<<<<<< HEAD
import static com.google.common.base.Preconditions.checkArgument;
=======
import static com.google.common.base.Charsets.UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

import java.io.BufferedReader;
import java.io.IOException;
Solution content
 */
package org.apache.accumulo.core.client.impl;

import static com.google.common.base.Preconditions.checkArgument;
import static java.nio.charset.StandardCharsets.UTF_8;

import java.io.BufferedReader;
import java.io.IOException;
File
TableOperationsImpl.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    checkArgument(tableName != null, "tableName is null");
    checkArgument(timeType != null, "timeType is null");

<<<<<<< HEAD
    List args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(StandardCharsets.UTF_8)), ByteBuffer.wrap(timeType.name().getBytes(StandardCharsets.UTF_8)));
=======
    List args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(UTF_8)), ByteBuffer.wrap(timeType.name().getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    Map opts;
    if (limitVersion)
Solution content
    checkArgument(tableName != null, "tableName is null");
    checkArgument(timeType != null, "timeType is null");

    List args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(UTF_8)), ByteBuffer.wrap(timeType.name().getBytes(UTF_8)));

    Map opts;
    if (limitVersion)
File
TableOperationsImpl.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    checkArgument(tableName != null, "tableName is null");
    ByteBuffer EMPTY = ByteBuffer.allocate(0);
<<<<<<< HEAD
    List args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(StandardCharsets.UTF_8)), start == null ? EMPTY : TextUtil.getByteBuffer(start),
=======
    List args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(UTF_8)), start == null ? EMPTY : TextUtil.getByteBuffer(start),
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        end == null ? EMPTY : TextUtil.getByteBuffer(end));
    Map opts = new HashMap();
    try {
Solution content
    checkArgument(tableName != null, "tableName is null");
    ByteBuffer EMPTY = ByteBuffer.allocate(0);
    List args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(UTF_8)), start == null ? EMPTY : TextUtil.getByteBuffer(start),
        end == null ? EMPTY : TextUtil.getByteBuffer(end));
    Map opts = new HashMap();
    try {
File
TableOperationsImpl.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    checkArgument(tableName != null, "tableName is null");
    ByteBuffer EMPTY = ByteBuffer.allocate(0);
<<<<<<< HEAD
    List args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(StandardCharsets.UTF_8)), start == null ? EMPTY : TextUtil.getByteBuffer(start),
=======
    List args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(UTF_8)), start == null ? EMPTY : TextUtil.getByteBuffer(start),
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        end == null ? EMPTY : TextUtil.getByteBuffer(end));
    Map opts = new HashMap();
    try {
Solution content
    checkArgument(tableName != null, "tableName is null");
    ByteBuffer EMPTY = ByteBuffer.allocate(0);
    List args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(UTF_8)), start == null ? EMPTY : TextUtil.getByteBuffer(start),
        end == null ? EMPTY : TextUtil.getByteBuffer(end));
    Map opts = new HashMap();
    try {
File
TableOperationsImpl.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
  public void delete(String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
    checkArgument(tableName != null, "tableName is null");

<<<<<<< HEAD
    List args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(StandardCharsets.UTF_8)));
=======
    List args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    Map opts = new HashMap();

    try {
Solution content
  public void delete(String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
    checkArgument(tableName != null, "tableName is null");

    List args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(UTF_8)));
    Map opts = new HashMap();

    try {
File
TableOperationsImpl.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    if (propertiesToSet == null)
      propertiesToSet = Collections.emptyMap();

<<<<<<< HEAD
    List args = Arrays.asList(ByteBuffer.wrap(srcTableId.getBytes(StandardCharsets.UTF_8)), ByteBuffer.wrap(newTableName.getBytes(StandardCharsets.UTF_8)));
=======
    List args = Arrays.asList(ByteBuffer.wrap(srcTableId.getBytes(UTF_8)), ByteBuffer.wrap(newTableName.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    Map opts = new HashMap();
    for (Entry entry : propertiesToSet.entrySet()) {
      if (entry.getKey().startsWith(CLONE_EXCLUDE_PREFIX))
Solution content
    if (propertiesToSet == null)
      propertiesToSet = Collections.emptyMap();

    List args = Arrays.asList(ByteBuffer.wrap(srcTableId.getBytes(UTF_8)), ByteBuffer.wrap(newTableName.getBytes(UTF_8)));
    Map opts = new HashMap();
    for (Entry entry : propertiesToSet.entrySet()) {
      if (entry.getKey().startsWith(CLONE_EXCLUDE_PREFIX))
File
TableOperationsImpl.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
  public void rename(String oldTableName, String newTableName) throws AccumuloSecurityException, TableNotFoundException, AccumuloException,
      TableExistsException {

<<<<<<< HEAD
    List args = Arrays.asList(ByteBuffer.wrap(oldTableName.getBytes(StandardCharsets.UTF_8)), ByteBuffer.wrap(newTableName.getBytes(StandardCharsets.UTF_8)));
=======
    List args = Arrays.asList(ByteBuffer.wrap(oldTableName.getBytes(UTF_8)), ByteBuffer.wrap(newTableName.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    Map opts = new HashMap();
    doTableFateOperation(oldTableName, TableNotFoundException.class, FateOperation.TABLE_RENAME, args, opts);
  }
Solution content
  public void rename(String oldTableName, String newTableName) throws AccumuloSecurityException, TableNotFoundException, AccumuloException,
      TableExistsException {

    List args = Arrays.asList(ByteBuffer.wrap(oldTableName.getBytes(UTF_8)), ByteBuffer.wrap(newTableName.getBytes(UTF_8)));
    Map opts = new HashMap();
    doTableFateOperation(oldTableName, TableNotFoundException.class, FateOperation.TABLE_RENAME, args, opts);
  }
File
TableOperationsImpl.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    if (flush)
      _flush(tableId, start, end, true);

<<<<<<< HEAD
    List args = Arrays.asList(ByteBuffer.wrap(tableId.getBytes(StandardCharsets.UTF_8)), start == null ? EMPTY : TextUtil.getByteBuffer(start),
=======
    List args = Arrays.asList(ByteBuffer.wrap(tableId.getBytes(UTF_8)), start == null ? EMPTY : TextUtil.getByteBuffer(start),
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        end == null ? EMPTY : TextUtil.getByteBuffer(end), ByteBuffer.wrap(IteratorUtil.encodeIteratorSettings(iterators)));

    Map opts = new HashMap();
Solution content
    if (flush)
      _flush(tableId, start, end, true);

    List args = Arrays.asList(ByteBuffer.wrap(tableId.getBytes(UTF_8)), start == null ? EMPTY : TextUtil.getByteBuffer(start),
        end == null ? EMPTY : TextUtil.getByteBuffer(end), ByteBuffer.wrap(IteratorUtil.encodeIteratorSettings(iterators)));

    Map opts = new HashMap();
File
TableOperationsImpl.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
  public void cancelCompaction(String tableName) throws AccumuloSecurityException, TableNotFoundException, AccumuloException {
    String tableId = Tables.getTableId(instance, tableName);

<<<<<<< HEAD
    List args = Arrays.asList(ByteBuffer.wrap(tableId.getBytes(StandardCharsets.UTF_8)));
=======
    List args = Arrays.asList(ByteBuffer.wrap(tableId.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    Map opts = new HashMap();
    try {
Solution content
  public void cancelCompaction(String tableName) throws AccumuloSecurityException, TableNotFoundException, AccumuloException {
    String tableId = Tables.getTableId(instance, tableName);

    List args = Arrays.asList(ByteBuffer.wrap(tableId.getBytes(UTF_8)));

    Map opts = new HashMap();
    try {
File
TableOperationsImpl.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    Path dirPath = checkPath(dir, "Bulk", "");
    Path failPath = checkPath(failureDir, "Bulk", "failure");

<<<<<<< HEAD
    List args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(StandardCharsets.UTF_8)), ByteBuffer.wrap(dirPath.toString().getBytes(StandardCharsets.UTF_8)),
        ByteBuffer.wrap(failPath.toString().getBytes(StandardCharsets.UTF_8)), ByteBuffer.wrap((setTime + "").getBytes(StandardCharsets.UTF_8)));
=======
    List args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(UTF_8)), ByteBuffer.wrap(dirPath.toString().getBytes(UTF_8)),
        ByteBuffer.wrap(failPath.toString().getBytes(UTF_8)), ByteBuffer.wrap((setTime + "").getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    Map opts = new HashMap();

    try {
Solution content
    Path dirPath = checkPath(dir, "Bulk", "");
    Path failPath = checkPath(failureDir, "Bulk", "failure");

    List args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(UTF_8)), ByteBuffer.wrap(dirPath.toString().getBytes(UTF_8)),
        ByteBuffer.wrap(failPath.toString().getBytes(UTF_8)), ByteBuffer.wrap((setTime + "").getBytes(UTF_8)));
    Map opts = new HashMap();

    try {
File
TableOperationsImpl.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    checkArgument(tableName != null, "tableName is null");
    String tableId = Tables.getTableId(instance, tableName);
<<<<<<< HEAD
    List args = Arrays.asList(ByteBuffer.wrap(tableId.getBytes(StandardCharsets.UTF_8)));
=======
    List args = Arrays.asList(ByteBuffer.wrap(tableId.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    Map opts = new HashMap();

    try {
Solution content
    checkArgument(tableName != null, "tableName is null");
    String tableId = Tables.getTableId(instance, tableName);
    List args = Arrays.asList(ByteBuffer.wrap(tableId.getBytes(UTF_8)));
    Map opts = new HashMap();

    try {
File
TableOperationsImpl.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
  public void online(String tableName, boolean wait) throws AccumuloSecurityException, AccumuloException, TableNotFoundException {
    checkArgument(tableName != null, "tableName is null");
    String tableId = Tables.getTableId(instance, tableName);
<<<<<<< HEAD
    List args = Arrays.asList(ByteBuffer.wrap(tableId.getBytes(StandardCharsets.UTF_8)));
=======
    List args = Arrays.asList(ByteBuffer.wrap(tableId.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    Map opts = new HashMap();

    try {
Solution content
  public void online(String tableName, boolean wait) throws AccumuloSecurityException, AccumuloException, TableNotFoundException {
    checkArgument(tableName != null, "tableName is null");
    String tableId = Tables.getTableId(instance, tableName);
    List args = Arrays.asList(ByteBuffer.wrap(tableId.getBytes(UTF_8)));
    Map opts = new HashMap();

    try {
File
TableOperationsImpl.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
      ZipEntry zipEntry;
      while ((zipEntry = zis.getNextEntry()) != null) {
        if (zipEntry.getName().equals(Constants.EXPORT_TABLE_CONFIG_FILE)) {
<<<<<<< HEAD
          BufferedReader in = new BufferedReader(new InputStreamReader(zis, StandardCharsets.UTF_8));
=======
          BufferedReader in = new BufferedReader(new InputStreamReader(zis, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          try {
            String line;
            while ((line = in.readLine()) != null) {
Solution content
      ZipEntry zipEntry;
      while ((zipEntry = zis.getNextEntry()) != null) {
        if (zipEntry.getName().equals(Constants.EXPORT_TABLE_CONFIG_FILE)) {
          BufferedReader in = new BufferedReader(new InputStreamReader(zis, UTF_8));
          try {
            String line;
            while ((line = in.readLine()) != null) {
File
TableOperationsImpl.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
      Logger.getLogger(this.getClass()).warn("Failed to check if imported table references external java classes : " + ioe.getMessage());
    }

<<<<<<< HEAD
    List args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(StandardCharsets.UTF_8)), ByteBuffer.wrap(importDir.getBytes(StandardCharsets.UTF_8)));
=======
    List args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(UTF_8)), ByteBuffer.wrap(importDir.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    Map opts = Collections.emptyMap();
Solution content
      Logger.getLogger(this.getClass()).warn("Failed to check if imported table references external java classes : " + ioe.getMessage());
    }

    List args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(UTF_8)), ByteBuffer.wrap(importDir.getBytes(UTF_8)));

    Map opts = Collections.emptyMap();
File
TableOperationsImpl.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    checkArgument(tableName != null, "tableName is null");
    checkArgument(exportDir != null, "exportDir is null");

<<<<<<< HEAD
    List args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(StandardCharsets.UTF_8)), ByteBuffer.wrap(exportDir.getBytes(StandardCharsets.UTF_8)));
=======
    List args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(UTF_8)), ByteBuffer.wrap(exportDir.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    Map opts = Collections.emptyMap();
Solution content
    checkArgument(tableName != null, "tableName is null");
    checkArgument(exportDir != null, "exportDir is null");

    List args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes(UTF_8)), ByteBuffer.wrap(exportDir.getBytes(UTF_8)));

    Map opts = Collections.emptyMap();
File
TableOperationsImpl.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.core.client.impl;

<<<<<<< HEAD
import static com.google.common.base.Preconditions.checkArgument;

import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.security.SecurityPermission;
import java.util.HashMap;
import java.util.List;
Solution content
 */
package org.apache.accumulo.core.client.impl;

import static com.google.common.base.Preconditions.checkArgument;
import static java.nio.charset.StandardCharsets.UTF_8;

import java.security.SecurityPermission;
import java.util.HashMap;
import java.util.List;
File
Tables.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
      if (nId == null) {
        namespaceName = null;
      } else {
<<<<<<< HEAD
        String namespaceId = new String(nId, StandardCharsets.UTF_8);
=======
        String namespaceId = new String(nId, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        if (!namespaceId.equals(Namespaces.DEFAULT_NAMESPACE_ID)) {
          try {
            namespaceName = namespaceIdToNameMap.get(namespaceId);
Solution content
      if (nId == null) {
        namespaceName = null;
      } else {
        String namespaceId = new String(nId, UTF_8);
        if (!namespaceId.equals(Namespaces.DEFAULT_NAMESPACE_ID)) {
          try {
            namespaceName = namespaceIdToNameMap.get(namespaceId);
File
Tables.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
        }
      }
      if (tableName != null && namespaceName != null) {
<<<<<<< HEAD
        String tableNameStr = qualified(new String(tableName, StandardCharsets.UTF_8), namespaceName);
=======
        String tableNameStr = qualified(new String(tableName, UTF_8), namespaceName);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        if (nameAsKey)
          tableMap.put(tableNameStr, tableId);
        else
Solution content
        }
      }
      if (tableName != null && namespaceName != null) {
        String tableNameStr = qualified(new String(tableName, UTF_8), namespaceName);
        if (nameAsKey)
          tableMap.put(tableNameStr, tableId);
        else
File
Tables.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    if (state == null)
      return TableState.UNKNOWN;

<<<<<<< HEAD
    return TableState.valueOf(new String(state, StandardCharsets.UTF_8));
=======
    return TableState.valueOf(new String(state, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }

  public static long getCacheResetCount() {
Solution content
    if (state == null)
      return TableState.UNKNOWN;

    return TableState.valueOf(new String(state, UTF_8));
  }

  public static long getCacheResetCount() {
File
Tables.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
      throw new IllegalArgumentException("Table with id " + tableId + " does not exist");
    }

<<<<<<< HEAD
    return new String(n, StandardCharsets.UTF_8);
=======
    return new String(n, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }

}
Solution content
      throw new IllegalArgumentException("Table with id " + tableId + " does not exist");
    }

    return new String(n, UTF_8);
  }

}
File
Tables.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
 */
package org.apache.accumulo.core.client.impl;

<<<<<<< HEAD
import static com.google.common.base.Preconditions.checkArgument;

import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

import org.apache.accumulo.core.client.AccumuloException;
import org.apache.accumulo.core.client.AccumuloSecurityException;
Solution content
 */
package org.apache.accumulo.core.client.impl;

import static com.google.common.base.Preconditions.checkArgument;
import static java.nio.charset.StandardCharsets.UTF_8;

import org.apache.accumulo.core.client.AccumuloException;
import org.apache.accumulo.core.client.AccumuloSecurityException;
File
Writer.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
      TabletLocation tabLoc = TabletLocator.getLocator(instance, table).locateTablet(credentials, new Text(m.getRow()), false, true);
      
      if (tabLoc == null) {
<<<<<<< HEAD
        log.trace("No tablet location found for row " + new String(m.getRow(), StandardCharsets.UTF_8));
=======
        log.trace("No tablet location found for row " + new String(m.getRow(), UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        UtilWaitThread.sleep(500);
        continue;
      }
Solution content
      TabletLocation tabLoc = TabletLocator.getLocator(instance, table).locateTablet(credentials, new Text(m.getRow()), false, true);
      
      if (tabLoc == null) {
        log.trace("No tablet location found for row " + new String(m.getRow(), UTF_8));
        UtilWaitThread.sleep(500);
        continue;
      }
File
Writer.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.core.client.lexicoder;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

/**
 * This lexicoder encodes/decodes a given String to/from bytes without further processing. It can be combined with other encoders like the
Solution content
 */
package org.apache.accumulo.core.client.lexicoder;

import static java.nio.charset.StandardCharsets.UTF_8;

/**
 * This lexicoder encodes/decodes a given String to/from bytes without further processing. It can be combined with other encoders like the
File
StringLexicoder.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
  
  @Override
  public byte[] encode(String data) {
<<<<<<< HEAD
    return data.getBytes(StandardCharsets.UTF_8);
=======
    return data.getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }
  
  @Override
Solution content
  
  @Override
  public byte[] encode(String data) {
    return data.getBytes(UTF_8);
  }
  
  @Override
File
StringLexicoder.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
  
  @Override
  public String decode(byte[] data) {
<<<<<<< HEAD
    return new String(data, StandardCharsets.UTF_8);
=======
    return new String(data, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }
  
}
Solution content
  
  @Override
  public String decode(byte[] data) {
    return new String(data, UTF_8);
  }
  
}
File
StringLexicoder.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
  protected void setPassword(CharBuffer charBuffer) {
    // encode() kicks back a C-string, which is not compatible with the old passwording system
<<<<<<< HEAD
    ByteBuffer bb = StandardCharsets.UTF_8.encode(charBuffer);
=======
    ByteBuffer bb = UTF_8.encode(charBuffer);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    // create array using byter buffer length
    this.password = new byte[bb.remaining()];
    bb.get(this.password);
Solution content
  protected void setPassword(CharBuffer charBuffer) {
    // encode() kicks back a C-string, which is not compatible with the old passwording system
    ByteBuffer bb = UTF_8.encode(charBuffer);
    // create array using byter buffer length
    this.password = new byte[bb.remaining()];
    bb.get(this.password);
File
PasswordToken.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
      int n;
      try {
        while ((n = data.read(buffer)) > 0)
<<<<<<< HEAD
          doc.print(new String(buffer, 0, n, StandardCharsets.UTF_8));
=======
          doc.print(new String(buffer, 0, n, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      } catch (IOException e) {
        log.debug("Encountered IOException while reading InputStream in appendResource().", e);
        return;
Solution content
      int n;
      try {
        while ((n = data.read(buffer)) > 0)
          doc.print(new String(buffer, 0, n, UTF_8));
      } catch (IOException e) {
        log.debug("Encountered IOException while reading InputStream in appendResource().", e);
        return;
File
ConfigurationDocGen.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
   */
  public static void main(String[] args) throws FileNotFoundException, UnsupportedEncodingException {
    if (args.length == 2 && args[0].equals("--generate-html")) {
<<<<<<< HEAD
      new ConfigurationDocGen(new PrintStream(args[1], StandardCharsets.UTF_8.name())).generateHtml();
    } else if (args.length == 2 && args[0].equals("--generate-asciidoc")) {
      new ConfigurationDocGen(new PrintStream(args[1], StandardCharsets.UTF_8.name())).generateAsciidoc();
=======
      new ConfigurationDocGen(new PrintStream(args[1], UTF_8.name())).generateHtml();
    } else if (args.length == 2 && args[0].equals("--generate-latex")) {
      new ConfigurationDocGen(new PrintStream(args[1], UTF_8.name())).generateLaTeX();
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    } else {
      throw new IllegalArgumentException("Usage: " + ConfigurationDocGen.class.getName() + " --generate-html  | --generate-asciidoc ");
    }
Solution content
   */
  public static void main(String[] args) throws FileNotFoundException, UnsupportedEncodingException {
    if (args.length == 2 && args[0].equals("--generate-html")) {
      new ConfigurationDocGen(new PrintStream(args[1], UTF_8.name())).generateHtml();
    } else if (args.length == 2 && args[0].equals("--generate-asciidoc")) {
      new ConfigurationDocGen(new PrintStream(args[1], UTF_8.name())).generateAsciidoc();
    } else {
      throw new IllegalArgumentException("Usage: " + ConfigurationDocGen.class.getName() + " --generate-html  | --generate-asciidoc ");
    }
File
ConfigurationDocGen.java
Developer's decision
Manual
Kind of conflict
If statement
Method invocation
Chunk
Conflicting content
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;

<<<<<<< HEAD
/**
 * An implementation of {@link ByteSequence} that uses a backing byte array.
 */
=======
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
public class ArrayByteSequence extends ByteSequence implements Serializable {
  
  private static final long serialVersionUID = 1L;
Solution content
import java.nio.ByteBuffer;

/**
 * An implementation of {@link ByteSequence} that uses a backing byte array.
 */
public class ArrayByteSequence extends ByteSequence implements Serializable {
  
  private static final long serialVersionUID = 1L;
File
ArrayByteSequence.java
Developer's decision
Version 1
Kind of conflict
Comment
Chunk
Conflicting content
<<<<<<< HEAD
   * @param s string to represent as bytes
   */
  public ArrayByteSequence(String s) {
    this(s.getBytes(StandardCharsets.UTF_8));
=======
    this(s.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }
  
  /**
Solution content
   * @param s string to represent as bytes
   */
  public ArrayByteSequence(String s) {
    this(s.getBytes(UTF_8));
  }
  
  /**
File
ArrayByteSequence.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  }
  
  public String toString() {
<<<<<<< HEAD
    return new String(data, offset, length, StandardCharsets.UTF_8);
=======
    return new String(data, offset, length, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }
}
Solution content
  }
  
  public String toString() {
    return new String(data, offset, length, UTF_8);
  }
}
File
ArrayByteSequence.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
   * @return string form of column
   */
  public String toString() {
<<<<<<< HEAD
    return new String(columnFamily == null ? new byte[0] : columnFamily, StandardCharsets.UTF_8) + ":" + new String(columnQualifier == null ? new byte[0] : columnQualifier, StandardCharsets.UTF_8) + ":"
        + new String(columnVisibility == null ? new byte[0] : columnVisibility, StandardCharsets.UTF_8);
=======
    return new String(columnFamily == null ? new byte[0] : columnFamily, UTF_8) + ":" + new String(columnQualifier == null ? new byte[0] : columnQualifier, UTF_8) + ":"
        + new String(columnVisibility == null ? new byte[0] : columnVisibility, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }
  
  /**
Solution content
   * @return string form of column
   */
  public String toString() {
    return new String(columnFamily == null ? new byte[0] : columnFamily, UTF_8) + ":" + new String(columnQualifier == null ? new byte[0] : columnQualifier, UTF_8) + ":"
        + new String(columnVisibility == null ? new byte[0] : columnVisibility, UTF_8);
  }
  
  /**
File
Column.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Return statement
Chunk
Conflicting content
<<<<<<< HEAD
 */
package org.apache.accumulo.core.data;

import static com.google.common.base.Preconditions.checkArgument;

import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Arrays;
import java.util.HashSet;
Solution content
 */
package org.apache.accumulo.core.data;

import static com.google.common.base.Preconditions.checkArgument;
import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Arrays;
import java.util.HashSet;
File
Condition.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
   * @throws IllegalArgumentException if any argument is null
   */
  public Condition(CharSequence cf, CharSequence cq) {
<<<<<<< HEAD
    checkArgument(cf != null, "cf is null");
    checkArgument(cq != null, "cq is null");
    this.cf = new ArrayByteSequence(cf.toString().getBytes(StandardCharsets.UTF_8));
    this.cq = new ArrayByteSequence(cq.toString().getBytes(StandardCharsets.UTF_8));
=======
    ArgumentChecker.notNull(cf, cq);
    this.cf = new ArrayByteSequence(cf.toString().getBytes(UTF_8));
    this.cq = new ArrayByteSequence(cq.toString().getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    this.cv = EMPTY;
  }
  
Solution content
   * @throws IllegalArgumentException if any argument is null
   */
  public Condition(CharSequence cf, CharSequence cq) {
    checkArgument(cf != null, "cf is null");
    checkArgument(cq != null, "cq is null");
    this.cf = new ArrayByteSequence(cf.toString().getBytes(UTF_8));
    this.cq = new ArrayByteSequence(cq.toString().getBytes(UTF_8));
    this.cv = EMPTY;
  }
  
File
Condition.java
Developer's decision
Combination
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
   * @throws IllegalArgumentException if value is null
   */
  public Condition setValue(CharSequence value) {
<<<<<<< HEAD
    checkArgument(value != null, "value is null");
    this.val = new ArrayByteSequence(value.toString().getBytes(StandardCharsets.UTF_8));
=======
    ArgumentChecker.notNull(value);
    this.val = new ArrayByteSequence(value.toString().getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    return this;
  }
Solution content
   * @throws IllegalArgumentException if value is null
   */
  public Condition setValue(CharSequence value) {
    checkArgument(value != null, "value is null");
    this.val = new ArrayByteSequence(value.toString().getBytes(UTF_8));
    return this;
  }
File
Condition.java
Developer's decision
Combination
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
import java.nio.charset.StandardCharsets;
import java.util.List;

<<<<<<< HEAD
=======
import com.google.common.base.Preconditions;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import org.apache.hadoop.io.BytesWritable;
import org.apache.hadoop.io.WritableComparable;
import org.apache.hadoop.io.WritableComparator;
Solution content
import java.util.List;

import org.apache.hadoop.io.BytesWritable;
import org.apache.hadoop.io.WritableComparable;
import org.apache.hadoop.io.WritableComparator;
File
Value.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
  @Override
  public String toString() {
<<<<<<< HEAD
    return new String(get(), StandardCharsets.UTF_8);
=======
    return new String(get(), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }

  /**
Solution content
  @Override
  public String toString() {
    return new String(get(), UTF_8);
  }

  /**
File
Value.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
    
    for (Integer i : vals) {
      String fi = String.format("%010d", i);
<<<<<<< HEAD
      bmfw.append(new org.apache.accumulo.core.data.Key(new Text("r" + fi), new Text("cf1")), new Value(("v" + fi).getBytes(StandardCharsets.UTF_8)));
      bmfw.append(new org.apache.accumulo.core.data.Key(new Text("r" + fi), new Text("cf2")), new Value(("v" + fi).getBytes(StandardCharsets.UTF_8)));
=======
      bmfw.append(new org.apache.accumulo.core.data.Key(new Text("r" + fi), new Text("cf1")), new Value(("v" + fi).getBytes(UTF_8)));
      bmfw.append(new org.apache.accumulo.core.data.Key(new Text("r" + fi), new Text("cf2")), new Value(("v" + fi).getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    }
    
    long t2 = System.currentTimeMillis();
Solution content
    
    for (Integer i : vals) {
      String fi = String.format("%010d", i);
      bmfw.append(new org.apache.accumulo.core.data.Key(new Text("r" + fi), new Text("cf1")), new Value(("v" + fi).getBytes(UTF_8)));
      bmfw.append(new org.apache.accumulo.core.data.Key(new Text("r" + fi), new Text("cf2")), new Value(("v" + fi).getBytes(UTF_8)));
    }
    
    long t2 = System.currentTimeMillis();
File
BloomFilterLayer.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
      }
      
      this.key = new Key(currentRow.toArray(), currentColf.toArray(), new byte[0], new byte[0], ts);
<<<<<<< HEAD
      this.value = new Value(Integer.toString(count).getBytes(StandardCharsets.UTF_8));
=======
      this.value = new Value(Integer.toString(count).getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      
    } else {
      this.key = null;
Solution content
      }
      
      this.key = new Key(currentRow.toArray(), currentColf.toArray(), new byte[0], new byte[0], ts);
      this.value = new Value(Integer.toString(count).getBytes(UTF_8));
      
    } else {
      this.key = null;
File
ColumnFamilyCounter.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
  public static class StringEncoder implements Encoder {
    @Override
    public byte[] encode(Long v) {
<<<<<<< HEAD
      return Long.toString(v).getBytes(StandardCharsets.UTF_8);
=======
      return Long.toString(v).getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    }
    
    @Override
Solution content
  public static class StringEncoder implements Encoder {
    @Override
    public byte[] encode(Long v) {
      return Long.toString(v).getBytes(UTF_8);
    }
    
    @Override
File
LongCombiner.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
    @Override
    public Long decode(byte[] b) {
      try {
<<<<<<< HEAD
        return Long.parseLong(new String(b, StandardCharsets.UTF_8));
=======
        return Long.parseLong(new String(b, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      } catch (NumberFormatException nfe) {
        throw new ValueFormatException(nfe);
      }
Solution content
    @Override
    public Long decode(byte[] b) {
      try {
        return Long.parseLong(new String(b, UTF_8));
      } catch (NumberFormatException nfe) {
        throw new ValueFormatException(nfe);
      }
File
LongCombiner.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
 */
package org.apache.accumulo.core.iterators.conf;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
Solution content
 */
package org.apache.accumulo.core.iterators.conf;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
File
ColumnSet.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
  static Text decode(String s) {
    Text t = new Text();
    
<<<<<<< HEAD
    byte[] sb = s.getBytes(StandardCharsets.UTF_8);
=======
    byte[] sb = s.getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    
    // very inefficient code
    for (int i = 0; i < sb.length; i++) {
Solution content
  static Text decode(String s) {
    Text t = new Text();
    
    byte[] sb = s.getBytes(UTF_8);
    
    // very inefficient code
    for (int i = 0; i < sb.length; i++) {
File
ColumnSet.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
        t.append(new byte[] {sb[i]}, 0, 1);
      } else {
        byte hex[] = new byte[] {sb[++i], sb[++i]};
<<<<<<< HEAD
        String hs = new String(hex, StandardCharsets.UTF_8);
=======
        String hs = new String(hex, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        int b = Integer.parseInt(hs, 16);
        t.append(new byte[] {(byte) b}, 0, 1);
      }
Solution content
        t.append(new byte[] {sb[i]}, 0, 1);
      } else {
        byte hex[] = new byte[] {sb[++i], sb[++i]};
        String hs = new String(hex, UTF_8);
        int b = Integer.parseInt(hs, 16);
        t.append(new byte[] {(byte) b}, 0, 1);
      }
File
ColumnSet.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
  public static class BigDecimalEncoder implements org.apache.accumulo.core.iterators.TypedValueCombiner.Encoder {
    @Override
    public byte[] encode(BigDecimal v) {
<<<<<<< HEAD
      return v.toString().getBytes(StandardCharsets.UTF_8);
=======
      return v.toString().getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    }
    
    @Override
Solution content
  public static class BigDecimalEncoder implements org.apache.accumulo.core.iterators.TypedValueCombiner.Encoder {
    @Override
    public byte[] encode(BigDecimal v) {
      return v.toString().getBytes(UTF_8);
    }
    
    @Override
File
BigDecimalCombiner.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
    @Override
    public BigDecimal decode(byte[] b) throws ValueFormatException {
      try {
<<<<<<< HEAD
        return new BigDecimal(new String(b, StandardCharsets.UTF_8));
=======
        return new BigDecimal(new String(b, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      } catch (NumberFormatException nfe) {
        throw new ValueFormatException(nfe);
      }
Solution content
    @Override
    public BigDecimal decode(byte[] b) throws ValueFormatException {
      try {
        return new BigDecimal(new String(b, UTF_8));
      } catch (NumberFormatException nfe) {
        throw new ValueFormatException(nfe);
      }
File
BigDecimalCombiner.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
<<<<<<< HEAD
  @Override
  public void init(SortedKeyValueIterator source, Map options, IteratorEnvironment env) throws IOException {
    super.init(source, options, env);
    term = options.get("term").getBytes(StandardCharsets.UTF_8);
=======
    term = options.get("term").getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }
  
  /**
Solution content
  @Override
  public void init(SortedKeyValueIterator source, Map options, IteratorEnvironment env) throws IOException {
    super.init(source, options, env);
    term = options.get("term").getBytes(UTF_8);
  }
  
  /**
File
GrepIterator.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
    String[] columnStrings = columns.split("\n");
    Text[] columnTexts = new Text[columnStrings.length];
    for (int i = 0; i < columnStrings.length; i++) {
<<<<<<< HEAD
      columnTexts[i] = new Text(Base64.decodeBase64(columnStrings[i].getBytes(StandardCharsets.UTF_8)));
=======
      columnTexts[i] = new Text(Base64.decodeBase64(columnStrings[i].getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    }
    return columnTexts;
  }
Solution content
    String[] columnStrings = columns.split("\n");
    Text[] columnTexts = new Text[columnStrings.length];
    for (int i = 0; i < columnStrings.length; i++) {
      columnTexts[i] = new Text(Base64.decodeBase64(columnStrings[i].getBytes(UTF_8)));
    }
    return columnTexts;
  }
File
IntersectingIterator.java
Developer's decision
Version 2
Kind of conflict
Array access
Method invocation
Chunk
Conflicting content
    if (flags == null)
      return null;
    
<<<<<<< HEAD
    byte[] bytes = Base64.decodeBase64(flags.getBytes(StandardCharsets.UTF_8));
=======
    byte[] bytes = Base64.decodeBase64(flags.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    boolean[] bFlags = new boolean[bytes.length];
    for (int i = 0; i < bytes.length; i++) {
      if (bytes[i] == 1)
Solution content
    if (flags == null)
      return null;
    
    byte[] bytes = Base64.decodeBase64(flags.getBytes(UTF_8));
    boolean[] bFlags = new boolean[bytes.length];
    for (int i = 0; i < bytes.length; i++) {
      if (bytes[i] == 1)
File
IntersectingIterator.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
public class LargeRowFilter implements SortedKeyValueIterator, OptionDescriber {
  
<<<<<<< HEAD
  public static final Value SUPPRESS_ROW_VALUE = new Value("SUPPRESS_ROW".getBytes(StandardCharsets.UTF_8));
=======
  public static final Value SUPPRESS_ROW_VALUE = new Value("SUPPRESS_ROW".getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  
  private static final ByteSequence EMPTY = new ArrayByteSequence(new byte[] {});
  
Solution content
 */
public class LargeRowFilter implements SortedKeyValueIterator, OptionDescriber {
  
  public static final Value SUPPRESS_ROW_VALUE = new Value("SUPPRESS_ROW".getBytes(UTF_8));
  
  private static final ByteSequence EMPTY = new ArrayByteSequence(new byte[] {});
  
File
LargeRowFilter.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
  public static final String ENCODING = "encoding";
  public static final String MATCH_SUBSTRING = "matchSubstring";
  
<<<<<<< HEAD
  public static final String ENCODING_DEFAULT = StandardCharsets.UTF_8.name();
=======
  public static final String ENCODING_DEFAULT = UTF_8.name();
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  
  private Matcher rowMatcher;
  private Matcher colfMatcher;
Solution content
  public static final String ENCODING = "encoding";
  public static final String MATCH_SUBSTRING = "matchSubstring";
  
  public static final String ENCODING_DEFAULT = UTF_8.name();
  
  private Matcher rowMatcher;
  private Matcher colfMatcher;
File
RegExFilter.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
        this.encoding = options.get(ENCODING);
        if ("".equals(this.encoding))
          encoding = ENCODING_DEFAULT;
<<<<<<< HEAD
        new String("test".getBytes(StandardCharsets.UTF_8), encoding);
=======
        new String("test".getBytes(UTF_8), encoding);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      } catch (UnsupportedEncodingException e) {
        throw new IllegalArgumentException("invalid encoding " + ENCODING + ":" + this.encoding, e);
      }
Solution content
        this.encoding = options.get(ENCODING);
        if ("".equals(this.encoding))
          encoding = ENCODING_DEFAULT;
        new String("test".getBytes(UTF_8), encoding);
      } catch (UnsupportedEncodingException e) {
        throw new IllegalArgumentException("invalid encoding " + ENCODING + ":" + this.encoding, e);
      }
File
RegExFilter.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
public class RowDeletingIterator implements SortedKeyValueIterator {
  
<<<<<<< HEAD
  public static final Value DELETE_ROW_VALUE = new Value("DEL_ROW".getBytes(StandardCharsets.UTF_8));
=======
  public static final Value DELETE_ROW_VALUE = new Value("DEL_ROW".getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  private SortedKeyValueIterator source;
  private boolean propogateDeletes;
  private ByteSequence currentRow;
Solution content
public class RowDeletingIterator implements SortedKeyValueIterator {
  
  public static final Value DELETE_ROW_VALUE = new Value("DEL_ROW".getBytes(UTF_8));
  private SortedKeyValueIterator source;
  private boolean propogateDeletes;
  private ByteSequence currentRow;
File
RowDeletingIterator.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
        sb.append(",");
        sb.append(Long.toString(la.get(i)));
      }
<<<<<<< HEAD
      return sb.toString().getBytes(StandardCharsets.UTF_8);
=======
      return sb.toString().getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    }
    
    @Override
Solution content
        sb.append(",");
        sb.append(Long.toString(la.get(i)));
      }
      return sb.toString().getBytes(UTF_8);
    }
    
    @Override
File
SummingArrayCombiner.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
    
    @Override
    public List decode(byte[] b) {
<<<<<<< HEAD
      String[] longstrs = new String(b, StandardCharsets.UTF_8).split(",");
=======
      String[] longstrs = new String(b, UTF_8).split(",");
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      List la = new ArrayList(longstrs.length);
      for (String s : longstrs) {
        if (s.length() == 0)
Solution content
    
    @Override
    public List decode(byte[] b) {
      String[] longstrs = new String(b, UTF_8).split(",");
      List la = new ArrayList(longstrs.length);
      for (String s : longstrs) {
        if (s.length() == 0)
File
SummingArrayCombiner.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    if (scanning) {
      String auths = options.get(AUTH_OPT);
      if (auths != null && !auths.isEmpty()) {
<<<<<<< HEAD
        ve = new VisibilityEvaluator(new Authorizations(auths.getBytes(StandardCharsets.UTF_8)));
=======
        ve = new VisibilityEvaluator(new Authorizations(auths.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        visibleCache = new LRUMap(100);
      }
    }
Solution content
    if (scanning) {
      String auths = options.get(AUTH_OPT);
      if (auths != null && !auths.isEmpty()) {
        ve = new VisibilityEvaluator(new Authorizations(auths.getBytes(UTF_8)));
        visibleCache = new LRUMap(100);
      }
    }
File
TransformingIterator.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
    for (Entry option : options.entrySet()) {
      try {
        if (option.getKey().equals(AUTH_OPT)) {
<<<<<<< HEAD
          new Authorizations(option.getValue().getBytes(StandardCharsets.UTF_8));
=======
          new Authorizations(option.getValue().getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        } else if (option.getKey().equals(MAX_BUFFER_SIZE_OPT)) {
          AccumuloConfiguration.getMemoryInBytes(option.getValue());
        }
Solution content
    for (Entry option : options.entrySet()) {
      try {
        if (option.getKey().equals(AUTH_OPT)) {
          new Authorizations(option.getValue().getBytes(UTF_8));
        } else if (option.getKey().equals(MAX_BUFFER_SIZE_OPT)) {
          AccumuloConfiguration.getMemoryInBytes(option.getValue());
        }
File
TransformingIterator.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    
    if (!filterInvalid) {
      String auths = options.get(AUTHS);
<<<<<<< HEAD
      Authorizations authObj = auths == null || auths.isEmpty() ? new Authorizations() : new Authorizations(auths.getBytes(StandardCharsets.UTF_8));
=======
      Authorizations authObj = auths == null || auths.isEmpty() ? new Authorizations() : new Authorizations(auths.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      this.ve = new VisibilityEvaluator(authObj);
      this.defaultVisibility = new Text();
    }
Solution content
    
    if (!filterInvalid) {
      String auths = options.get(AUTHS);
      Authorizations authObj = auths == null || auths.isEmpty() ? new Authorizations() : new Authorizations(auths.getBytes(UTF_8));
      this.ve = new VisibilityEvaluator(authObj);
      this.defaultVisibility = new Text();
    }
File
VisibilityFilter.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.core.schema;

<<<<<<< HEAD:core/src/main/java/org/apache/accumulo/core/schema/Section.java
import org.apache.accumulo.core.data.Range;

public class Section {
  private String rowPrefix;
  private Range range;

  public Section(String startRow, boolean startInclusive, String endRow, boolean endInclusive) {
    rowPrefix = startRow;
    range = new Range(startRow, startInclusive, endRow, endInclusive);
  }

  public String getRowPrefix() {
    return rowPrefix;
  }

  public Range getRange() {
    return range;
=======
import static com.google.common.base.Charsets.UTF_8;

import org.apache.accumulo.core.client.Instance;

public class InstanceUserPassword {
  public Instance instance;
  public String username;
  public byte[] password;
  
  public InstanceUserPassword(Instance instance, String username, String password) {
    this.instance = instance;
    this.username = username;
    this.password = password.getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/trace/InstanceUserPassword.java
  }
}
Solution content
 */
package org.apache.accumulo.core.schema;

import org.apache.accumulo.core.data.Range;

public class Section {
  private String rowPrefix;
  private Range range;

  public Section(String startRow, boolean startInclusive, String endRow, boolean endInclusive) {
    rowPrefix = startRow;
    range = new Range(startRow, startInclusive, endRow, endInclusive);
  }

  public String getRowPrefix() {
    return rowPrefix;
  }

  public Range getRange() {
    return range;
  }
}
File
Section.java
Developer's decision
Version 1
Kind of conflict
Attribute
Class signature
Import
Method declaration
Method invocation
Method signature
Return statement
Chunk
Conflicting content
 */
package org.apache.accumulo.core.security;

<<<<<<< HEAD
import static com.google.common.base.Preconditions.checkArgument;
=======
import static com.google.common.base.Charsets.UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

import java.io.Serializable;
import java.nio.ByteBuffer;
Solution content
 */
package org.apache.accumulo.core.security;

import static com.google.common.base.Preconditions.checkArgument;
import static java.nio.charset.StandardCharsets.UTF_8;

import java.io.Serializable;
import java.nio.ByteBuffer;
File
Authorizations.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    checkArgument(authorizations != null, "authorizations is null");

<<<<<<< HEAD
    String authsString = new String(authorizations, StandardCharsets.UTF_8);
=======
    String authsString = new String(authorizations, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    if (authsString.startsWith(HEADER)) {
      // it's the new format
      authsString = authsString.substring(HEADER.length());
Solution content
    checkArgument(authorizations != null, "authorizations is null");

    String authsString = new String(authorizations, UTF_8);
    if (authsString.startsWith(HEADER)) {
      // it's the new format
      authsString = authsString.substring(HEADER.length());
File
Authorizations.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
      authsString = authsString.substring(HEADER.length());
      if (authsString.length() > 0) {
        for (String encAuth : authsString.split(",")) {
<<<<<<< HEAD
          byte[] auth = Base64.decodeBase64(encAuth.getBytes(StandardCharsets.UTF_8));
=======
          byte[] auth = Base64.decodeBase64(encAuth.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          auths.add(new ArrayByteSequence(auth));
        }
        checkAuths();
Solution content
      authsString = authsString.substring(HEADER.length());
      if (authsString.length() > 0) {
        for (String encAuth : authsString.split(",")) {
          byte[] auth = Base64.decodeBase64(encAuth.getBytes(UTF_8));
          auths.add(new ArrayByteSequence(auth));
        }
        checkAuths();
File
Authorizations.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    auths.clear();
    for (String str : authorizations) {
      str = str.trim();
<<<<<<< HEAD
      auths.add(new ArrayByteSequence(str.getBytes(StandardCharsets.UTF_8)));
=======
      auths.add(new ArrayByteSequence(str.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    }

    checkAuths();
Solution content
    auths.clear();
    for (String str : authorizations) {
      str = str.trim();
      auths.add(new ArrayByteSequence(str.getBytes(UTF_8)));
    }

    checkAuths();
File
Authorizations.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
   * @see #serialize()
   */
  public byte[] getAuthorizationsArray() {
<<<<<<< HEAD
    return serialize().getBytes(StandardCharsets.UTF_8);
=======
    return serialize().getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }

  /**
Solution content
   * @see #serialize()
   */
  public byte[] getAuthorizationsArray() {
    return serialize().getBytes(UTF_8);
  }

  /**
File
Authorizations.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
    for (ByteSequence auth : auths) {
      sb.append(sep);
      sep = ",";
<<<<<<< HEAD
      sb.append(new String(auth.toArray(), StandardCharsets.UTF_8));
=======
      sb.append(new String(auth.toArray(), UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    }

    return sb.toString();
Solution content
    for (ByteSequence auth : auths) {
      sb.append(sep);
      sep = ",";
      sb.append(new String(auth.toArray(), UTF_8));
    }

    return sb.toString();
File
Authorizations.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
   */
  public static void stringify(Node root, byte[] expression, StringBuilder out) {
    if (root.type == NodeType.TERM) {
<<<<<<< HEAD
      out.append(new String(expression, root.start, root.end - root.start, StandardCharsets.UTF_8));
=======
      out.append(new String(expression, root.start, root.end - root.start, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    } else {
      String sep = "";
      for (Node c : root.children) {
Solution content
   */
  public static void stringify(Node root, byte[] expression, StringBuilder out) {
    if (root.type == NodeType.TERM) {
      out.append(new String(expression, root.start, root.end - root.start, UTF_8));
    } else {
      String sep = "";
      for (Node c : root.children) {
File
ColumnVisibility.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    Node normRoot = normalize(node, expression);
    StringBuilder builder = new StringBuilder(expression.length);
    stringify(normRoot, expression, builder);
<<<<<<< HEAD
    return builder.toString().getBytes(StandardCharsets.UTF_8);
=======
    return builder.toString().getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }
  
  private static class ColumnVisibilityParser {
Solution content
    Node normRoot = normalize(node, expression);
    StringBuilder builder = new StringBuilder(expression.length);
    stringify(normRoot, expression, builder);
    return builder.toString().getBytes(UTF_8);
  }
  
  private static class ColumnVisibilityParser {
File
ColumnVisibility.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
      if (expression.length > 0) {
        Node node = parse_(expression);
        if (node == null) {
<<<<<<< HEAD
          throw new BadArgumentException("operator or missing parens", new String(expression, StandardCharsets.UTF_8), index - 1);
        }
        if (parens != 0) {
          throw new BadArgumentException("parenthesis mis-match", new String(expression, StandardCharsets.UTF_8), index - 1);
=======
          throw new BadArgumentException("operator or missing parens", new String(expression, UTF_8), index - 1);
        }
        if (parens != 0) {
          throw new BadArgumentException("parenthesis mis-match", new String(expression, UTF_8), index - 1);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        }
        return node;
      }
Solution content
      if (expression.length > 0) {
        Node node = parse_(expression);
        if (node == null) {
          throw new BadArgumentException("operator or missing parens", new String(expression, UTF_8), index - 1);
        }
        if (parens != 0) {
          throw new BadArgumentException("parenthesis mis-match", new String(expression, UTF_8), index - 1);
        }
        return node;
      }
File
ColumnVisibility.java
Developer's decision
Version 2
Kind of conflict
If statement
Throw statement
Chunk
Conflicting content
    Node processTerm(int start, int end, Node expr, byte[] expression) {
      if (start != end) {
        if (expr != null)
<<<<<<< HEAD
          throw new BadArgumentException("expression needs | or &", new String(expression, StandardCharsets.UTF_8), start);
        return new Node(start, end);
      }
      if (expr == null)
        throw new BadArgumentException("empty term", new String(expression, StandardCharsets.UTF_8), start);
=======
          throw new BadArgumentException("expression needs | or &", new String(expression, UTF_8), start);
        return new Node(start, end);
      }
      if (expr == null)
        throw new BadArgumentException("empty term", new String(expression, UTF_8), start);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      return expr;
    }
    
Solution content
    Node processTerm(int start, int end, Node expr, byte[] expression) {
      if (start != end) {
        if (expr != null)
          throw new BadArgumentException("expression needs | or &", new String(expression, UTF_8), start);
        return new Node(start, end);
      }
      if (expr == null)
        throw new BadArgumentException("empty term", new String(expression, UTF_8), start);
      return expr;
    }
    
File
ColumnVisibility.java
Developer's decision
Version 2
Kind of conflict
If statement
Method invocation
Return statement
Throw statement
Chunk
Conflicting content
            expr = processTerm(subtermStart, index - 1, expr, expression);
            if (result != null) {
              if (!result.type.equals(NodeType.AND))
<<<<<<< HEAD
                throw new BadArgumentException("cannot mix & and |", new String(expression, StandardCharsets.UTF_8), index - 1);
=======
                throw new BadArgumentException("cannot mix & and |", new String(expression, UTF_8), index - 1);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
            } else {
              result = new Node(NodeType.AND, wholeTermStart);
            }
Solution content
            expr = processTerm(subtermStart, index - 1, expr, expression);
            if (result != null) {
              if (!result.type.equals(NodeType.AND))
                throw new BadArgumentException("cannot mix & and |", new String(expression, UTF_8), index - 1);
            } else {
              result = new Node(NodeType.AND, wholeTermStart);
            }
File
ColumnVisibility.java
Developer's decision
Version 2
Kind of conflict
Throw statement
Chunk
Conflicting content
            expr = processTerm(subtermStart, index - 1, expr, expression);
            if (result != null) {
              if (!result.type.equals(NodeType.OR))
<<<<<<< HEAD
                throw new BadArgumentException("cannot mix | and &", new String(expression, StandardCharsets.UTF_8), index - 1);
=======
                throw new BadArgumentException("cannot mix | and &", new String(expression, UTF_8), index - 1);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
            } else {
              result = new Node(NodeType.OR, wholeTermStart);
            }
Solution content
            expr = processTerm(subtermStart, index - 1, expr, expression);
            if (result != null) {
              if (!result.type.equals(NodeType.OR))
                throw new BadArgumentException("cannot mix | and &", new String(expression, UTF_8), index - 1);
            } else {
              result = new Node(NodeType.OR, wholeTermStart);
            }
File
ColumnVisibility.java
Developer's decision
Version 2
Kind of conflict
Throw statement
Chunk
Conflicting content
          case '(': {
            parens++;
            if (subtermStart != index - 1 || expr != null)
<<<<<<< HEAD
              throw new BadArgumentException("expression needs & or |", new String(expression, StandardCharsets.UTF_8), index - 1);
=======
              throw new BadArgumentException("expression needs & or |", new String(expression, UTF_8), index - 1);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
            expr = parse_(expression);
            subtermStart = index;
            subtermComplete = false;
Solution content
          case '(': {
            parens++;
            if (subtermStart != index - 1 || expr != null)
              throw new BadArgumentException("expression needs & or |", new String(expression, UTF_8), index - 1);
            expr = parse_(expression);
            subtermStart = index;
            subtermComplete = false;
File
ColumnVisibility.java
Developer's decision
Version 2
Kind of conflict
Throw statement
Chunk
Conflicting content
            parens--;
            Node child = processTerm(subtermStart, index - 1, expr, expression);
            if (child == null && result == null)
<<<<<<< HEAD
              throw new BadArgumentException("empty expression not allowed", new String(expression, StandardCharsets.UTF_8), index);
=======
              throw new BadArgumentException("empty expression not allowed", new String(expression, UTF_8), index);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
            if (result == null)
              return child;
            if (result.type == child.type)
Solution content
            parens--;
            Node child = processTerm(subtermStart, index - 1, expr, expression);
            if (child == null && result == null)
              throw new BadArgumentException("empty expression not allowed", new String(expression, UTF_8), index);
            if (result == null)
              return child;
            if (result.type == child.type)
File
ColumnVisibility.java
Developer's decision
Version 2
Kind of conflict
Throw statement
Chunk
Conflicting content
          }
          case '"': {
            if (subtermStart != index - 1)
<<<<<<< HEAD
              throw new BadArgumentException("expression needs & or |", new String(expression, StandardCharsets.UTF_8), index - 1);
=======
              throw new BadArgumentException("expression needs & or |", new String(expression, UTF_8), index - 1);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
            
            while (index < expression.length && expression[index] != '"') {
              if (expression[index] == '\\') {
Solution content
          }
          case '"': {
            if (subtermStart != index - 1)
              throw new BadArgumentException("expression needs & or |", new String(expression, UTF_8), index - 1);
            
            while (index < expression.length && expression[index] != '"') {
              if (expression[index] == '\\') {
File
ColumnVisibility.java
Developer's decision
Version 2
Kind of conflict
Throw statement
Chunk
Conflicting content
              if (expression[index] == '\\') {
                index++;
                if (expression[index] != '\\' && expression[index] != '"')
<<<<<<< HEAD
                  throw new BadArgumentException("invalid escaping within quotes", new String(expression, StandardCharsets.UTF_8), index - 1);
=======
                  throw new BadArgumentException("invalid escaping within quotes", new String(expression, UTF_8), index - 1);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
              }
              index++;
            }
Solution content
              if (expression[index] == '\\') {
                index++;
                if (expression[index] != '\\' && expression[index] != '"')
                  throw new BadArgumentException("invalid escaping within quotes", new String(expression, UTF_8), index - 1);
              }
              index++;
            }
File
ColumnVisibility.java
Developer's decision
Version 2
Kind of conflict
Throw statement
Chunk
Conflicting content
            }
            
            if (index == expression.length)
<<<<<<< HEAD
              throw new BadArgumentException("unclosed quote", new String(expression, StandardCharsets.UTF_8), subtermStart);
            
            if (subtermStart + 1 == index)
              throw new BadArgumentException("empty term", new String(expression, StandardCharsets.UTF_8), subtermStart);
=======
              throw new BadArgumentException("unclosed quote", new String(expression, UTF_8), subtermStart);
            
            if (subtermStart + 1 == index)
              throw new BadArgumentException("empty term", new String(expression, UTF_8), subtermStart);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
 
            index++;
            
Solution content
            }
            
            if (index == expression.length)
              throw new BadArgumentException("unclosed quote", new String(expression, UTF_8), subtermStart);
            
            if (subtermStart + 1 == index)
              throw new BadArgumentException("empty term", new String(expression, UTF_8), subtermStart);
 
            index++;
            
File
ColumnVisibility.java
Developer's decision
Version 2
Kind of conflict
If statement
Throw statement
Chunk
Conflicting content
          default: {
          }
            if (subtermComplete)
<<<<<<< HEAD
              throw new BadArgumentException("expression needs & or |", new String(expression, StandardCharsets.UTF_8), index - 1);
            
            byte c = expression[index - 1];
            if (!Authorizations.isValidAuthChar(c))
              throw new BadArgumentException("bad character (" + c + ")", new String(expression, StandardCharsets.UTF_8), index - 1);
=======
              throw new BadArgumentException("expression needs & or |", new String(expression, UTF_8), index - 1);
            
            byte c = expression[index - 1];
            if (!Authorizations.isValidAuthChar(c))
              throw new BadArgumentException("bad character (" + c + ")", new String(expression, UTF_8), index - 1);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          }
        }
      }
Solution content
          }
          default: {
            if (subtermComplete)
              throw new BadArgumentException("expression needs & or |", new String(expression, UTF_8), index - 1);
            
            byte c = expression[index - 1];
            if (!Authorizations.isValidAuthChar(c))
              throw new BadArgumentException("bad character (" + c + ")", new String(expression, UTF_8), index - 1);
          }
        }
      }
File
ColumnVisibility.java
Developer's decision
Version 2
Kind of conflict
Array access
If statement
Throw statement
Variable
Chunk
Conflicting content
        result = child;
      if (result.type != NodeType.TERM)
        if (result.children.size() < 2)
<<<<<<< HEAD
          throw new BadArgumentException("missing term", new String(expression, StandardCharsets.UTF_8), index);
=======
          throw new BadArgumentException("missing term", new String(expression, UTF_8), index);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      return result;
    }
  }
Solution content
        result = child;
      if (result.type != NodeType.TERM)
        if (result.children.size() < 2)
          throw new BadArgumentException("missing term", new String(expression, UTF_8), index);
      return result;
    }
  }
File
ColumnVisibility.java
Developer's decision
Version 2
Kind of conflict
Throw statement
Chunk
Conflicting content
   *          An expression of the rights needed to see this mutation. The expression syntax is defined at the class-level documentation
   */
  public ColumnVisibility(String expression) {
<<<<<<< HEAD
    this(expression.getBytes(StandardCharsets.UTF_8));
=======
    this(expression.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }
  
  /**
Solution content
   *          An expression of the rights needed to see this mutation. The expression syntax is defined at the class-level documentation
   */
  public ColumnVisibility(String expression) {
    this(expression.getBytes(UTF_8));
  }
  
  /**
File
ColumnVisibility.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  
  @Override
  public String toString() {
<<<<<<< HEAD
    return "[" + new String(expression, StandardCharsets.UTF_8) + "]";
=======
    return "[" + new String(expression, UTF_8) + "]";
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }
  
  /**
Solution content
  
  @Override
  public String toString() {
    return "[" + new String(expression, UTF_8) + "]";
  }
  
  /**
File
ColumnVisibility.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
   * @return quoted term (unquoted if unnecessary)
   */
  public static String quote(String term) {
<<<<<<< HEAD
    return new String(quote(term.getBytes(StandardCharsets.UTF_8)), StandardCharsets.UTF_8);
=======
    return new String(quote(term.getBytes(UTF_8)), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }
  
  /**
Solution content
   * @return quoted term (unquoted if unnecessary)
   */
  public static String quote(String term) {
    return new String(quote(term.getBytes(UTF_8)), UTF_8);
  }
  
  /**
File
ColumnVisibility.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
   * @return serialized form of these credentials
   */
  public final String serialize() {
<<<<<<< HEAD
    return (getPrincipal() == null ? "-" : Base64.encodeBase64String(getPrincipal().getBytes(StandardCharsets.UTF_8))) + ":"
        + (getToken() == null ? "-" : Base64.encodeBase64String(getToken().getClass().getName().getBytes(StandardCharsets.UTF_8))) + ":"
=======
    return (getPrincipal() == null ? "-" : Base64.encodeBase64String(getPrincipal().getBytes(UTF_8))) + ":"
        + (getToken() == null ? "-" : Base64.encodeBase64String(getToken().getClass().getName().getBytes(UTF_8))) + ":"
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        + (getToken() == null ? "-" : Base64.encodeBase64String(AuthenticationTokenSerializer.serialize(getToken())));
  }
Solution content
   * @return serialized form of these credentials
   */
  public final String serialize() {
    return (getPrincipal() == null ? "-" : Base64.encodeBase64String(getPrincipal().getBytes(UTF_8))) + ":"
        + (getToken() == null ? "-" : Base64.encodeBase64String(getToken().getClass().getName().getBytes(UTF_8))) + ":"
        + (getToken() == null ? "-" : Base64.encodeBase64String(AuthenticationTokenSerializer.serialize(getToken())));
  }
File
Credentials.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
   */
  public static final Credentials deserialize(String serializedForm) {
    String[] split = serializedForm.split(":", 3);
<<<<<<< HEAD
    String principal = split[0].equals("-") ? null : new String(Base64.decodeBase64(split[0]), StandardCharsets.UTF_8);
    String tokenType = split[1].equals("-") ? null : new String(Base64.decodeBase64(split[1]), StandardCharsets.UTF_8);
=======
    String principal = split[0].equals("-") ? null : new String(Base64.decodeBase64(split[0]), UTF_8);
    String tokenType = split[1].equals("-") ? null : new String(Base64.decodeBase64(split[1]), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    AuthenticationToken token = null;
    if (!split[2].equals("-")) {
      byte[] tokenBytes = Base64.decodeBase64(split[2]);
Solution content
   */
  public static final Credentials deserialize(String serializedForm) {
    String[] split = serializedForm.split(":", 3);
    String principal = split[0].equals("-") ? null : new String(Base64.decodeBase64(split[0]), UTF_8);
    String tokenType = split[1].equals("-") ? null : new String(Base64.decodeBase64(split[1]), UTF_8);
    AuthenticationToken token = null;
    if (!split[2].equals("-")) {
      byte[] tokenBytes = Base64.decodeBase64(split[2]);
File
Credentials.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.core.security;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
Solution content
 */
package org.apache.accumulo.core.security;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Collections;
import java.util.HashSet;
import java.util.List;
File
VisibilityConstraint.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
      byte[] cv = update.getColumnVisibility();
      if (cv.length > 0) {
        String key = null;
<<<<<<< HEAD
        if (ok != null && ok.contains(key = new String(cv, StandardCharsets.UTF_8)))
=======
        if (ok != null && ok.contains(key = new String(cv, UTF_8)))
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          continue;
        
        try {
Solution content
      byte[] cv = update.getColumnVisibility();
      if (cv.length > 0) {
        String key = null;
        if (ok != null && ok.contains(key = new String(cv, UTF_8)))
          continue;
        
        try {
File
VisibilityConstraint.java
Developer's decision
Version 2
Kind of conflict
If statement
Chunk
Conflicting content
 */
package org.apache.accumulo.core.security;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
import java.text.ParseException;

=======
import static com.google.common.base.Charsets.UTF_8;

import java.text.ParseException;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
/**
 * An exception thrown when a visibility string cannot be parsed.
 */
Solution content
 */
package org.apache.accumulo.core.security;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.text.ParseException;

/**
 * An exception thrown when a visibility string cannot be parsed.
 */
File
VisibilityParseException.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
   */
  public VisibilityParseException(String reason, byte[] visibility, int errorOffset) {
    super(reason, errorOffset);
<<<<<<< HEAD
    this.visibility = new String(visibility, StandardCharsets.UTF_8);
=======
    this.visibility = new String(visibility, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }
  
  @Override
Solution content
   */
  public VisibilityParseException(String reason, byte[] visibility, int errorOffset) {
    super(reason, errorOffset);
    this.visibility = new String(visibility, UTF_8);
  }
  
  @Override
File
VisibilityParseException.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
      List hosts = new ArrayList();
      for (String child : children) {
        byte[] data = zoo.getData(path + "/" + child, null);
<<<<<<< HEAD
        hosts.add(new String(data, StandardCharsets.UTF_8));
=======
        hosts.add(new String(data, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      }
      this.hosts.clear();
      this.hosts.addAll(hosts);
Solution content
      List hosts = new ArrayList();
      for (String child : children) {
        byte[] data = zoo.getData(path + "/" + child, null);
        hosts.add(new String(data, UTF_8));
      }
      this.hosts.clear();
      this.hosts.addAll(hosts);
File
ZooTraceClient.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.core.util;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
Solution content
 */
package org.apache.accumulo.core.util;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
File
ByteArraySet.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
  public static ByteArraySet fromStrings(Collection c) {
    List lst = new ArrayList();
    for (String s : c)
<<<<<<< HEAD
      lst.add(s.getBytes(StandardCharsets.UTF_8));
=======
      lst.add(s.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    return new ByteArraySet(lst);
  }
  
Solution content
  public static ByteArraySet fromStrings(Collection c) {
    List lst = new ArrayList();
    for (String s : c)
      lst.add(s.getBytes(UTF_8));
    return new ByteArraySet(lst);
  }
  
File
ByteArraySet.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  }
  
  public static String toString(ByteBuffer bytes) {
<<<<<<< HEAD
    return new String(bytes.array(), bytes.position(), bytes.remaining(), StandardCharsets.UTF_8);
=======
    return new String(bytes.array(), bytes.position(), bytes.remaining(), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }
  
  public static ByteBuffer toByteBuffers(ByteSequence bs) {
Solution content
  }
  
  public static String toString(ByteBuffer bytes) {
    return new String(bytes.array(), bytes.position(), bytes.remaining(), UTF_8);
  }
  
  public static ByteBuffer toByteBuffers(ByteSequence bs) {
File
ByteBufferUtil.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
      if (!tf.exists()) {
        tf.createNewFile();
      }
<<<<<<< HEAD
      PrintStream out = new PrintStream(new FileOutputStream(tf, true), true, StandardCharsets.UTF_8.name());
=======
      PrintStream out = new PrintStream(new FileOutputStream(tf, true), true, UTF_8.name());
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      String outString = principal + ":" + opts.tokenClassName + ":" + tokenBase64;
      out.println(outString);
      out.close();
Solution content
      if (!tf.exists()) {
        tf.createNewFile();
      }
      PrintStream out = new PrintStream(new FileOutputStream(tf, true), true, UTF_8.name());
      String outString = principal + ":" + opts.tokenClassName + ":" + tokenBase64;
      out.println(outString);
      out.close();
File
CreateToken.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.core.util;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

import org.apache.accumulo.core.util.Base64;
import org.apache.hadoop.io.Text;
Solution content
 */
package org.apache.accumulo.core.util;

import static java.nio.charset.StandardCharsets.UTF_8;

import org.apache.accumulo.core.util.Base64;
import org.apache.hadoop.io.Text;
File
Encoding.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    while (node.length() % 4 != 0)
      node += "=";
    /* decode transparently handles URLSafe encodings */
<<<<<<< HEAD
    return Base64.decodeBase64(node.getBytes(StandardCharsets.UTF_8));
=======
    return Base64.decodeBase64(node.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }
  
}
Solution content
    while (node.length() % 4 != 0)
      node += "=";
    /* decode transparently handles URLSafe encodings */
    return Base64.decodeBase64(node.getBytes(UTF_8));
  }
  
}
File
Encoding.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
 */
package org.apache.accumulo.core.util;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

public class FastFormat {
  // this 7 to 8 times faster than String.format("%s%06d",prefix, num)
Solution content
 */
package org.apache.accumulo.core.util;

import static java.nio.charset.StandardCharsets.UTF_8;

public class FastFormat {
  // this 7 to 8 times faster than String.format("%s%06d",prefix, num)
File
FastFormat.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
  public static byte[] toZeroPaddedString(long num, int width, int radix, byte[] prefix) {
    byte ret[] = new byte[width + prefix.length];
    if (toZeroPaddedString(ret, 0, num, width, radix, prefix) != ret.length)
<<<<<<< HEAD
      throw new RuntimeException(" Did not format to expected width " + num + " " + width + " " + radix + " " + new String(prefix, StandardCharsets.UTF_8));
=======
      throw new RuntimeException(" Did not format to expected width " + num + " " + width + " " + radix + " " + new String(prefix, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    return ret;
  }
  
Solution content
  public static byte[] toZeroPaddedString(long num, int width, int radix, byte[] prefix) {
    byte ret[] = new byte[width + prefix.length];
    if (toZeroPaddedString(ret, 0, num, width, radix, prefix) != ret.length)
      throw new RuntimeException(" Did not format to expected width " + num + " " + width + " " + radix + " " + new String(prefix, UTF_8));
    return ret;
  }
  
File
FastFormat.java
Developer's decision
Version 2
Kind of conflict
Throw statement
Chunk
Conflicting content
 */
package org.apache.accumulo.core.util;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
Solution content
 */
package org.apache.accumulo.core.util;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
File
Merge.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
          Entry entry = iterator.next();
          Key key = entry.getKey();
          if (key.getColumnFamily().equals(DataFileColumnFamily.NAME)) {
<<<<<<< HEAD
            String[] sizeEntries = new String(entry.getValue().get(), StandardCharsets.UTF_8).split(",");
=======
            String[] sizeEntries = new String(entry.getValue().get(), UTF_8).split(",");
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
            if (sizeEntries.length == 2) {
              tabletSize += Long.parseLong(sizeEntries[0]);
            }
Solution content
          Entry entry = iterator.next();
          Key key = entry.getKey();
          if (key.getColumnFamily().equals(DataFileColumnFamily.NAME)) {
            String[] sizeEntries = new String(entry.getValue().get(), UTF_8).split(",");
            if (sizeEntries.length == 2) {
              tabletSize += Long.parseLong(sizeEntries[0]);
            }
File
Merge.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.core.util;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.client.Instance;
Solution content
 */
package org.apache.accumulo.core.util;

import static java.nio.charset.StandardCharsets.UTF_8;

import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.client.Instance;
File
MonitorUtil.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
  public static String getLocation(Instance instance) throws KeeperException, InterruptedException {
    ZooReader zr = new ZooReader(instance.getZooKeepers(), 5000);
    byte[] loc = zr.getData(ZooUtil.getRoot(instance) + Constants.ZMONITOR_HTTP_ADDR, null);
<<<<<<< HEAD
    return loc==null ? null : new String(loc, StandardCharsets.UTF_8);
=======
    return loc==null ? null : new String(loc, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }
}
Solution content
  public static String getLocation(Instance instance) throws KeeperException, InterruptedException {
    ZooReader zr = new ZooReader(instance.getZooKeepers(), 5000);
    byte[] loc = zr.getData(ZooUtil.getRoot(instance) + Constants.ZMONITOR_HTTP_ADDR, null);
    return loc==null ? null : new String(loc, UTF_8);
  }
}
File
MonitorUtil.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Variable
Chunk
Conflicting content
      Text newText = new Text();
      newText.append(text.getBytes(), 0, maxLen);
      String suffix = "... TRUNCATED";
<<<<<<< HEAD
      newText.append(suffix.getBytes(StandardCharsets.UTF_8), 0, suffix.length());
=======
      newText.append(suffix.getBytes(UTF_8), 0, suffix.length());
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      return newText;
    }
    
Solution content
      Text newText = new Text();
      newText.append(text.getBytes(), 0, maxLen);
      String suffix = "... TRUNCATED";
      newText.append(suffix.getBytes(UTF_8), 0, suffix.length());
      return newText;
    }
    
File
TextUtil.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    bwConfig = new BatchWriterConfig();
    bwConfig.setMaxWriteThreads(42);
    bytes = createBytes(bwConfig);
<<<<<<< HEAD
    assertEquals("     i#maxWriteThreads=42", new String(bytes, StandardCharsets.UTF_8));
=======
    assertEquals("     i#maxWriteThreads=42", new String(bytes, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    checkBytes(bwConfig, bytes);
    
    // test human-readable with 2 fields
Solution content
    bwConfig = new BatchWriterConfig();
    bwConfig.setMaxWriteThreads(42);
    bytes = createBytes(bwConfig);
    assertEquals("     i#maxWriteThreads=42", new String(bytes, UTF_8));
    checkBytes(bwConfig, bytes);
    
    // test human-readable with 2 fields
File
BatchWriterConfigTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    bwConfig.setMaxWriteThreads(24);
    bwConfig.setTimeout(3, TimeUnit.SECONDS);
    bytes = createBytes(bwConfig);
<<<<<<< HEAD
    assertEquals("     v#maxWriteThreads=24,timeout=3000", new String(bytes, StandardCharsets.UTF_8));
=======
    assertEquals("     v#maxWriteThreads=24,timeout=3000", new String(bytes, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    checkBytes(bwConfig, bytes);
    
    // test human-readable durability
Solution content
    bwConfig.setMaxWriteThreads(24);
    bwConfig.setTimeout(3, TimeUnit.SECONDS);
    bytes = createBytes(bwConfig);
    assertEquals("     v#maxWriteThreads=24,timeout=3000", new String(bytes, UTF_8));
    checkBytes(bwConfig, bytes);
    
    // test human-readable durability
File
BatchWriterConfigTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  @Test
  public void testGetInstanceID_FromCache() {
<<<<<<< HEAD
    expect(zc.get(Constants.ZROOT + Constants.ZINSTANCES + "/instance")).andReturn(IID_STRING.getBytes(StandardCharsets.UTF_8));
=======
    expect(zc.get(Constants.ZROOT + Constants.ZINSTANCES + "/instance")).andReturn(IID_STRING.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    expect(zc.get(Constants.ZROOT + "/" + IID_STRING)).andReturn("yup".getBytes());
    replay(zc);
    assertEquals(IID_STRING, zki.getInstanceID());
Solution content
  @Test
  public void testGetInstanceID_FromCache() {
    expect(zc.get(Constants.ZROOT + Constants.ZINSTANCES + "/instance")).andReturn(IID_STRING.getBytes(UTF_8));
    expect(zc.get(Constants.ZROOT + "/" + IID_STRING)).andReturn("yup".getBytes());
    replay(zc);
    assertEquals(IID_STRING, zki.getInstanceID());
File
ZooKeeperInstanceTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  @Test(expected = RuntimeException.class)
  public void testGetInstanceID_IDMissingForName() {
<<<<<<< HEAD
    expect(zc.get(Constants.ZROOT + Constants.ZINSTANCES + "/instance")).andReturn(IID_STRING.getBytes(StandardCharsets.UTF_8));
=======
    expect(zc.get(Constants.ZROOT + Constants.ZINSTANCES + "/instance")).andReturn(IID_STRING.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    expect(zc.get(Constants.ZROOT + "/" + IID_STRING)).andReturn(null);
    replay(zc);
    zki.getInstanceID();
Solution content
  @Test(expected = RuntimeException.class)
  public void testGetInstanceID_IDMissingForName() {
    expect(zc.get(Constants.ZROOT + Constants.ZINSTANCES + "/instance")).andReturn(IID_STRING.getBytes(UTF_8));
    expect(zc.get(Constants.ZROOT + "/" + IID_STRING)).andReturn(null);
    replay(zc);
    zki.getInstanceID();
File
ZooKeeperInstanceTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    children.add("child1");
    children.add("child2");
    expect(zc.getChildren(Constants.ZROOT + Constants.ZINSTANCES)).andReturn(children);
<<<<<<< HEAD
    expect(zc.get(Constants.ZROOT + Constants.ZINSTANCES + "/child1")).andReturn(UUID.randomUUID().toString().getBytes(StandardCharsets.UTF_8));
    expect(zc.get(Constants.ZROOT + Constants.ZINSTANCES + "/child2")).andReturn(IID_STRING.getBytes(StandardCharsets.UTF_8));
=======
    expect(zc.get(Constants.ZROOT + Constants.ZINSTANCES + "/child1")).andReturn(UUID.randomUUID().toString().getBytes(UTF_8));
    expect(zc.get(Constants.ZROOT + Constants.ZINSTANCES + "/child2")).andReturn(IID_STRING.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    replay(zc);
    assertEquals("child2", zki.getInstanceName());
  }
Solution content
    children.add("child1");
    children.add("child2");
    expect(zc.getChildren(Constants.ZROOT + Constants.ZINSTANCES)).andReturn(children);
    expect(zc.get(Constants.ZROOT + Constants.ZINSTANCES + "/child1")).andReturn(UUID.randomUUID().toString().getBytes(UTF_8));
    expect(zc.get(Constants.ZROOT + Constants.ZINSTANCES + "/child2")).andReturn(IID_STRING.getBytes(UTF_8));
    replay(zc);
    assertEquals("child2", zki.getInstanceName());
  }
File
ZooKeeperInstanceTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    BatchWriter bw = c.createBatchWriter(tableName, new BatchWriterConfig());
    Mutation m = new Mutation("r");
<<<<<<< HEAD
    m.put("a", "b", new Value("abcde".getBytes(StandardCharsets.UTF_8)));
=======
    m.put("a", "b", new Value("abcde".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    bw.addMutation(m);
    bw.flush();
Solution content
    BatchWriter bw = c.createBatchWriter(tableName, new BatchWriterConfig());
    Mutation m = new Mutation("r");
    m.put("a", "b", new Value("abcde".getBytes(UTF_8)));
    bw.addMutation(m);
    bw.flush();
File
MockNamespacesTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  @Test
    }

    CredentialProviderToken token = new CredentialProviderToken("root.password", keystorePath);
<<<<<<< HEAD
    Assert.assertArrayEquals("password".getBytes(StandardCharsets.UTF_8), token.getPassword());

    token = new CredentialProviderToken("bob.password", keystorePath);
    Assert.assertArrayEquals("bob".getBytes(StandardCharsets.UTF_8), token.getPassword());
=======
    Assert.assertArrayEquals("password".getBytes(UTF_8), token.getPassword());

    token = new CredentialProviderToken("bob.password", keystorePath);
    Assert.assertArrayEquals("bob".getBytes(UTF_8), token.getPassword());
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }
Solution content
    }

    CredentialProviderToken token = new CredentialProviderToken("root.password", keystorePath);
    Assert.assertArrayEquals("password".getBytes(UTF_8), token.getPassword());

    token = new CredentialProviderToken("bob.password", keystorePath);
    Assert.assertArrayEquals("bob".getBytes(UTF_8), token.getPassword());
  }

  @Test
File
CredentialProviderTokenTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.core.client.security.tokens;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

import javax.security.auth.DestroyFailedException;
Solution content
 */
package org.apache.accumulo.core.client.security.tokens;

import static java.nio.charset.StandardCharsets.UTF_8;

import javax.security.auth.DestroyFailedException;
File
PasswordTokenTest.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    props.put("password", "五六");
    pt.init(props);
    props.destroy();
<<<<<<< HEAD
    String s = new String(pt.getPassword(), StandardCharsets.UTF_8);
    Assert.assertEquals("五六", s);
    
    pt = new PasswordToken("五六");
    s = new String(pt.getPassword(), StandardCharsets.UTF_8);
=======
    String s = new String(pt.getPassword(), UTF_8);
    Assert.assertEquals("五六", s);
    
    pt = new PasswordToken("五六");
    s = new String(pt.getPassword(), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    Assert.assertEquals("五六", s);
  }
}
Solution content
    props.put("password", "五六");
    pt.init(props);
    props.destroy();
    String s = new String(pt.getPassword(), UTF_8);
    Assert.assertEquals("五六", s);
    
    pt = new PasswordToken("五六");
    s = new String(pt.getPassword(), UTF_8);
    Assert.assertEquals("五六", s);
  }
}
File
PasswordTokenTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;

=======
import org.apache.accumulo.core.client.IteratorSetting;
import org.apache.accumulo.core.security.ColumnVisibility;
import org.apache.hadoop.io.Text;
Solution content
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import org.apache.accumulo.core.client.IteratorSetting;
import org.apache.accumulo.core.security.ColumnVisibility;
import org.apache.hadoop.io.Text;
File
ConditionTest.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
    if (bs == null) {
      return null;
    }
<<<<<<< HEAD
    return new String(bs.toArray(), StandardCharsets.UTF_8);
=======
    return new String(bs.toArray(), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }

  private Condition c;
Solution content
    if (bs == null) {
      return null;
    }
    return new String(bs.toArray(), UTF_8);
  }

  private Condition c;
File
ConditionTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
  @Test
  public void testConstruction_ByteArray() {
<<<<<<< HEAD
    c = new Condition(FAMILY.getBytes(StandardCharsets.UTF_8), QUALIFIER.getBytes(StandardCharsets.UTF_8));
=======
    c = new Condition(FAMILY.getBytes(UTF_8), QUALIFIER.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    assertEquals(FAMILY, toString(c.getFamily()));
    assertEquals(QUALIFIER, toString(c.getQualifier()));
    assertEquals(EMPTY, c.getVisibility());
Solution content
  @Test
  public void testConstruction_ByteArray() {
    c = new Condition(FAMILY.getBytes(UTF_8), QUALIFIER.getBytes(UTF_8));
    assertEquals(FAMILY, toString(c.getFamily()));
    assertEquals(QUALIFIER, toString(c.getQualifier()));
    assertEquals(EMPTY, c.getVisibility());
File
ConditionTest.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
  @Test
  public void testConstruction_ByteSequence() {
<<<<<<< HEAD
    c = new Condition(new ArrayByteSequence(FAMILY.getBytes(StandardCharsets.UTF_8)), new ArrayByteSequence(QUALIFIER.getBytes(StandardCharsets.UTF_8)));
=======
    c = new Condition(new ArrayByteSequence(FAMILY.getBytes(UTF_8)), new ArrayByteSequence(QUALIFIER.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    assertEquals(FAMILY, toString(c.getFamily()));
    assertEquals(QUALIFIER, toString(c.getQualifier()));
    assertEquals(EMPTY, c.getVisibility());
Solution content
  @Test
  public void testConstruction_ByteSequence() {
    c = new Condition(new ArrayByteSequence(FAMILY.getBytes(UTF_8)), new ArrayByteSequence(QUALIFIER.getBytes(UTF_8)));
    assertEquals(FAMILY, toString(c.getFamily()));
    assertEquals(QUALIFIER, toString(c.getQualifier()));
    assertEquals(EMPTY, c.getVisibility());
File
ConditionTest.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
  @Test
  public void testSetValue_ByteArray() {
<<<<<<< HEAD
    c.setValue(VALUE.getBytes(StandardCharsets.UTF_8));
=======
    c.setValue(VALUE.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    assertEquals(VALUE, toString(c.getValue()));
  }
Solution content
  @Test
  public void testSetValue_ByteArray() {
    c.setValue(VALUE.getBytes(UTF_8));
    assertEquals(VALUE, toString(c.getValue()));
  }
File
ConditionTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  @Test
  public void testSetValue_ByteSequence() {
<<<<<<< HEAD
    c.setValue(new ArrayByteSequence(VALUE.getBytes(StandardCharsets.UTF_8)));
=======
    c.setValue(new ArrayByteSequence(VALUE.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    assertEquals(VALUE, toString(c.getValue()));
  }
Solution content
  @Test
  public void testSetValue_ByteSequence() {
    c.setValue(new ArrayByteSequence(VALUE.getBytes(UTF_8)));
    assertEquals(VALUE, toString(c.getValue()));
  }
File
ConditionTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
import org.junit.Test;

public class ConditionalMutationTest {
<<<<<<< HEAD
  private static final byte[] ROW = "row".getBytes(StandardCharsets.UTF_8);
=======
  private static final byte[] ROW = "row".getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  private static final String FAMILY = "family";
  private static final String QUALIFIER = "qualifier";
  private static final String QUALIFIER2 = "qualifier2";
Solution content
import org.junit.Test;

public class ConditionalMutationTest {
  private static final byte[] ROW = "row".getBytes(UTF_8);
  private static final String FAMILY = "family";
  private static final String QUALIFIER = "qualifier";
  private static final String QUALIFIER2 = "qualifier2";
File
ConditionalMutationTest.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
  @Test
  public void testConstruction_ByteArray_StartAndLength() {
    cm = new ConditionalMutation(ROW, 1, 1, c1, c2);
<<<<<<< HEAD
    assertArrayEquals("o".getBytes(StandardCharsets.UTF_8), cm.getRow());
=======
    assertArrayEquals("o".getBytes(UTF_8), cm.getRow());
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    List cs = cm.getConditions();
    assertEquals(2, cs.size());
    assertEquals(c1, cs.get(0));
Solution content
  @Test
  public void testConstruction_ByteArray_StartAndLength() {
    cm = new ConditionalMutation(ROW, 1, 1, c1, c2);
    assertArrayEquals("o".getBytes(UTF_8), cm.getRow());
    List cs = cm.getConditions();
    assertEquals(2, cs.size());
    assertEquals(c1, cs.get(0));
File
ConditionalMutationTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  @Test
  public void testConstruction_CharSequence() {
<<<<<<< HEAD
    cm = new ConditionalMutation(new String(ROW, StandardCharsets.UTF_8), c1, c2);
=======
    cm = new ConditionalMutation(new String(ROW, UTF_8), c1, c2);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    assertArrayEquals(ROW, cm.getRow());
    List cs = cm.getConditions();
    assertEquals(2, cs.size());
Solution content
  @Test
  public void testConstruction_CharSequence() {
    cm = new ConditionalMutation(new String(ROW, UTF_8), c1, c2);
    assertArrayEquals(ROW, cm.getRow());
    List cs = cm.getConditions();
    assertEquals(2, cs.size());
File
ConditionalMutationTest.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
    assertTrue(cm.equals(cm2));
    assertTrue(cm2.equals(cm));

<<<<<<< HEAD
    ConditionalMutation cm3 = new ConditionalMutation("row2".getBytes(StandardCharsets.UTF_8), c1, c2);
=======
    ConditionalMutation cm3 = new ConditionalMutation("row2".getBytes(UTF_8), c1, c2);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    assertFalse(cm.equals(cm3));
    cm3 = new ConditionalMutation(ROW, c2, c1);
    assertFalse(cm.getConditions().equals(cm3.getConditions()));
Solution content
    assertTrue(cm.equals(cm2));
    assertTrue(cm2.equals(cm));

    ConditionalMutation cm3 = new ConditionalMutation("row2".getBytes(UTF_8), c1, c2);
    assertFalse(cm.equals(cm3));
    cm3 = new ConditionalMutation(ROW, c2, c1);
    assertFalse(cm.getConditions().equals(cm3.getConditions()));
File
ConditionalMutationTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    String multiByteRegex = new String(".*" + "\u6F68" + ".*");

    Key k4 = new Key("boo4".getBytes(), "hoo".getBytes(), "20080203".getBytes(), "".getBytes(), 1l);
<<<<<<< HEAD
    Value inVal = new Value(multiByteText.getBytes(StandardCharsets.UTF_8));
=======
    Value inVal = new Value(multiByteText.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    tm.put(k4, inVal);

    is.clearOptions();
Solution content
    String multiByteRegex = new String(".*" + "\u6F68" + ".*");

    Key k4 = new Key("boo4".getBytes(), "hoo".getBytes(), "20080203".getBytes(), "".getBytes(), 1l);
    Value inVal = new Value(multiByteText.getBytes(UTF_8));
    tm.put(k4, inVal);

    is.clearOptions();
File
RegExFilterTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    assertTrue(rei.hasTop());
    Value outValue = rei.getTopValue();
<<<<<<< HEAD
    String outVal = new String(outValue.get(), StandardCharsets.UTF_8);
=======
    String outVal = new String(outValue.get(), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    assertTrue(outVal.equals(multiByteText));

  }
Solution content
    assertTrue(rei.hasTop());
    Value outValue = rei.getTopValue();
    String outVal = new String(outValue.get(), UTF_8);
    assertTrue(outVal.equals(multiByteText));

  }
File
RegExFilterTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
  @Test
  public void testParseTreesOrdering() {
<<<<<<< HEAD
    byte[] expression = "(b&c&d)|((a|m)&y&z)|(e&f)".getBytes(StandardCharsets.UTF_8);
    byte[] flattened = new ColumnVisibility(expression).flatten();

    // Convert to String for indexOf convenience
    String flat = new String(flattened, StandardCharsets.UTF_8);
=======
    byte[] expression = "(b&c&d)|((a|m)&y&z)|(e&f)".getBytes(UTF_8);
    byte[] flattened = new ColumnVisibility(expression).flatten();

    // Convert to String for indexOf convenience
    String flat = new String(flattened, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    assertTrue("shortest expressions sort first", flat.indexOf('e') < flat.indexOf('|'));
    assertTrue("shortest children sort first", flat.indexOf('b') < flat.indexOf('a'));
  }
Solution content
  @Test
  public void testParseTreesOrdering() {
    byte[] expression = "(b&c&d)|((a|m)&y&z)|(e&f)".getBytes(UTF_8);
    byte[] flattened = new ColumnVisibility(expression).flatten();

    // Convert to String for indexOf convenience
    String flat = new String(flattened, UTF_8);
    assertTrue("shortest expressions sort first", flat.indexOf('e') < flat.indexOf('|'));
    assertTrue("shortest children sort first", flat.indexOf('b') < flat.indexOf('a'));
  }
File
ColumnVisibilityTest.java
Developer's decision
Version 2
Kind of conflict
Comment
Method invocation
Variable
Chunk
Conflicting content
    assertEquals(abcNullCreds, abcNullCreds);
    assertEquals(new Credentials("abc", new NullToken()), abcNullCreds);
    // equal, but different token constructors
<<<<<<< HEAD
    assertEquals(new Credentials("abc", new PasswordToken("abc".getBytes(StandardCharsets.UTF_8))), new Credentials("abc", new PasswordToken("abc")));
=======
    assertEquals(new Credentials("abc", new PasswordToken("abc".getBytes(UTF_8))), new Credentials("abc", new PasswordToken("abc")));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    // test not equals
    assertFalse(nullNullCreds.equals(abcBlahCreds));
    assertFalse(nullNullCreds.equals(abcNullCreds));
Solution content
    assertEquals(abcNullCreds, abcNullCreds);
    assertEquals(new Credentials("abc", new NullToken()), abcNullCreds);
    // equal, but different token constructors
    assertEquals(new Credentials("abc", new PasswordToken("abc".getBytes(UTF_8))), new Credentials("abc", new PasswordToken("abc")));
    // test not equals
    assertFalse(nullNullCreds.equals(abcBlahCreds));
    assertFalse(nullNullCreds.equals(abcNullCreds));
File
CredentialsTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  
  @Test
  public void testCredentialsSerialization() throws AccumuloSecurityException {
<<<<<<< HEAD
    Credentials creds = new Credentials("a:b-c", new PasswordToken("d-e-f".getBytes(StandardCharsets.UTF_8)));
=======
    Credentials creds = new Credentials("a:b-c", new PasswordToken("d-e-f".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    String serialized = creds.serialize();
    Credentials result = Credentials.deserialize(serialized);
    assertEquals(creds, result);
Solution content
  
  @Test
  public void testCredentialsSerialization() throws AccumuloSecurityException {
    Credentials creds = new Credentials("a:b-c", new PasswordToken("d-e-f".getBytes(UTF_8)));
    String serialized = creds.serialize();
    Credentials result = Credentials.deserialize(serialized);
    assertEquals(creds, result);
File
CredentialsTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    vc = new VisibilityConstraint();
    mutation = new Mutation("r");

<<<<<<< HEAD
    ArrayByteSequence bs = new ArrayByteSequence("good".getBytes(StandardCharsets.UTF_8));
=======
    ArrayByteSequence bs = new ArrayByteSequence("good".getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    AuthorizationContainer ac = createNiceMock(AuthorizationContainer.class);
    expect(ac.contains(bs)).andReturn(true);
Solution content
    vc = new VisibilityConstraint();
    mutation = new Mutation("r");

    ArrayByteSequence bs = new ArrayByteSequence("good".getBytes(UTF_8));

    AuthorizationContainer ac = createNiceMock(AuthorizationContainer.class);
    expect(ac.contains(bs)).andReturn(true);
File
VisibilityConstraintTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    BlockedOutputStream blockOut = new BlockedOutputStream(baos, blockSize, 1);

    String contentString = "My Blocked Content String";
<<<<<<< HEAD
    byte[] content = contentString.getBytes(StandardCharsets.UTF_8);
=======
    byte[] content = contentString.getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    blockOut.write(content);
    blockOut.flush();
Solution content
    BlockedOutputStream blockOut = new BlockedOutputStream(baos, blockSize, 1);

    String contentString = "My Blocked Content String";
    byte[] content = contentString.getBytes(UTF_8);
    blockOut.write(content);
    blockOut.flush();
File
BlockedIOStreamTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    blockOut.flush();
    String contentString2 = "My Other Blocked Content String";
<<<<<<< HEAD
    byte[] content2 = contentString2.getBytes(StandardCharsets.UTF_8);
=======
    byte[] content2 = contentString2.getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    blockOut.write(content2);
    blockOut.flush();
Solution content
    blockOut.flush();

    String contentString2 = "My Other Blocked Content String";
    byte[] content2 = contentString2.getBytes(UTF_8);
    blockOut.write(content2);
    blockOut.flush();
File
BlockedIOStreamTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    DataInputStream dIn = new DataInputStream(blockIn);

    dIn.readFully(content, 0, content.length);
<<<<<<< HEAD
    String readContentString = new String(content, StandardCharsets.UTF_8);
=======
    String readContentString = new String(content, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    assertEquals(contentString, readContentString);
Solution content
    DataInputStream dIn = new DataInputStream(blockIn);

    dIn.readFully(content, 0, content.length);
    String readContentString = new String(content, UTF_8);

    assertEquals(contentString, readContentString);
File
BlockedIOStreamTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    assertEquals(contentString, readContentString);

    dIn.readFully(content2, 0, content2.length);
<<<<<<< HEAD
    String readContentString2 = new String(content2, StandardCharsets.UTF_8);
=======
    String readContentString2 = new String(content2, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    assertEquals(contentString2, readContentString2);
Solution content
    assertEquals(contentString, readContentString);

    dIn.readFully(content2, 0, content2.length);
    String readContentString2 = new String(content2, UTF_8);

    assertEquals(contentString2, readContentString2);
File
BlockedIOStreamTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
  @Test
  public void testAggregate() {
<<<<<<< HEAD
    data.put(new Key("t", "~tab", "loc"), new Value("srv1".getBytes(StandardCharsets.UTF_8)));
    data.put(new Key("t;19700101", "~tab", "loc", 0), new Value("srv1".getBytes(StandardCharsets.UTF_8)));
    data.put(new Key("t;19700101", "~tab", "loc", 1), new Value("srv2".getBytes(StandardCharsets.UTF_8)));
=======
    data.put(new Key("t", "~tab", "loc"), new Value("srv1".getBytes(UTF_8)));
    data.put(new Key("t;19700101", "~tab", "loc", 0), new Value("srv1".getBytes(UTF_8)));
    data.put(new Key("t;19700101", "~tab", "loc", 1), new Value("srv2".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    formatter.initialize(data.entrySet(), false);
Solution content
  @Test
  public void testAggregate() {
    data.put(new Key("t", "~tab", "loc"), new Value("srv1".getBytes(UTF_8)));
    data.put(new Key("t;19700101", "~tab", "loc", 0), new Value("srv1".getBytes(UTF_8)));
    data.put(new Key("t;19700101", "~tab", "loc", 1), new Value("srv2".getBytes(UTF_8)));

    formatter.initialize(data.entrySet(), false);
File
ShardedTableDistributionFormatterTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 * A utility to administer FATE operations
 */
public class AdminUtil {
<<<<<<< HEAD
  private static final Charset UTF8 = Charset.forName("UTF-8");
  private static final Logger log = Logger.getLogger(AdminUtil.class);
=======
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  
  private boolean exitOnError = false;
  
Solution content
 * A utility to administer FATE operations
 */
public class AdminUtil {
  private static final Logger log = Logger.getLogger(AdminUtil.class);
  
  private boolean exitOnError = false;
  
File
AdminUtil.java
Developer's decision
Combination
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
import org.apache.zookeeper.data.Stat;

public class ZooLock implements Watcher {
<<<<<<< HEAD
  private static final Charset UTF8 = Charset.forName("UTF-8");
  private static final Logger log = Logger.getLogger(ZooLock.class);
=======
  protected static final Logger log = Logger.getLogger(ZooLock.class);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  
  public static final String LOCK_PREFIX = "zlock-";
  
Solution content
import org.apache.zookeeper.data.Stat;

public class ZooLock implements Watcher {
  private static final Logger log = Logger.getLogger(ZooLock.class);
  
  public static final String LOCK_PREFIX = "zlock-";
  
File
ZooLock.java
Developer's decision
Combination
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
    if (in.readBoolean()) {
      String strAuths = in.readUTF();
<<<<<<< HEAD:mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
      auths = new Authorizations(strAuths.getBytes(StandardCharsets.UTF_8));
=======
      auths = new Authorizations(strAuths.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
    }

    if (in.readBoolean()) {
Solution content
    if (in.readBoolean()) {
      String strAuths = in.readUTF();
      auths = new Authorizations(strAuths.getBytes(UTF_8));
    }

    if (in.readBoolean()) {
File
RangeInputSplit.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
      switch (this.tokenSource) {
        case INLINE:
          String tokenClass = in.readUTF();
<<<<<<< HEAD:mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
          byte[] base64TokenBytes = in.readUTF().getBytes(StandardCharsets.UTF_8);
=======
          byte[] base64TokenBytes = in.readUTF().getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
          byte[] tokenBytes = Base64.decodeBase64(base64TokenBytes);

          this.token = AuthenticationTokenSerializer.deserialize(tokenClass, tokenBytes);
Solution content
      switch (this.tokenSource) {
        case INLINE:
          String tokenClass = in.readUTF();
          byte[] base64TokenBytes = in.readUTF().getBytes(UTF_8);
          byte[] tokenBytes = Base64.decodeBase64(base64TokenBytes);

          this.token = AuthenticationTokenSerializer.deserialize(tokenClass, tokenBytes);
File
RangeInputSplit.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.core.client.mapreduce.lib.impl;
<<<<<<< HEAD:mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java
import static com.google.common.base.Preconditions.checkArgument;
=======
import static com.google.common.base.Charsets.UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java

import java.io.IOException;
import java.net.URI;
Solution content
 */
package org.apache.accumulo.core.client.mapreduce.lib.impl;

import static com.google.common.base.Preconditions.checkArgument;
import static java.nio.charset.StandardCharsets.UTF_8;

import java.io.IOException;
import java.net.URI;
File
ConfiguratorBase.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    if (token.startsWith(TokenSource.INLINE.prefix())) {
      String[] args = token.substring(TokenSource.INLINE.prefix().length()).split(":", 2);
      if (args.length == 2)
<<<<<<< HEAD:mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java
        return AuthenticationTokenSerializer.deserialize(args[0], Base64.decodeBase64(args[1].getBytes(StandardCharsets.UTF_8)));
=======
        return AuthenticationTokenSerializer.deserialize(args[0], Base64.decodeBase64(args[1].getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java
    } else if (token.startsWith(TokenSource.FILE.prefix())) {
      String tokenFileName = token.substring(TokenSource.FILE.prefix().length());
      return getTokenFromFile(conf, getPrincipal(implementingClass, conf), tokenFileName);
Solution content
    if (token.startsWith(TokenSource.INLINE.prefix())) {
      String[] args = token.substring(TokenSource.INLINE.prefix().length()).split(":", 2);
      if (args.length == 2)
        return AuthenticationTokenSerializer.deserialize(args[0], Base64.decodeBase64(args[1].getBytes(UTF_8)));
    } else if (token.startsWith(TokenSource.FILE.prefix())) {
      String tokenFileName = token.substring(TokenSource.FILE.prefix().length());
      return getTokenFromFile(conf, getPrincipal(implementingClass, conf), tokenFileName);
File
ConfiguratorBase.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
 */
package org.apache.accumulo.core.client.mapreduce.lib.impl;

<<<<<<< HEAD:mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java
import static com.google.common.base.Preconditions.checkArgument;
=======
import static com.google.common.base.Charsets.UTF_8;
import static org.apache.accumulo.core.util.ArgumentChecker.notNull;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
Solution content
 */
package org.apache.accumulo.core.client.mapreduce.lib.impl;

import static com.google.common.base.Preconditions.checkArgument;
import static java.nio.charset.StandardCharsets.UTF_8;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
File
InputConfigurator.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
   */
  public static Authorizations getScanAuthorizations(Class implementingClass, Configuration conf) {
    String authString = conf.get(enumToConfKey(implementingClass, ScanOpts.AUTHORIZATIONS));
<<<<<<< HEAD:mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java
    return authString == null ? Authorizations.EMPTY : new Authorizations(authString.getBytes(StandardCharsets.UTF_8));
=======
    return authString == null ? Authorizations.EMPTY : new Authorizations(authString.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java
  }

  /**
Solution content
   */
  public static Authorizations getScanAuthorizations(Class implementingClass, Configuration conf) {
    String authString = conf.get(enumToConfKey(implementingClass, ScanOpts.AUTHORIZATIONS));
    return authString == null ? Authorizations.EMPTY : new Authorizations(authString.getBytes(UTF_8));
  }

  /**
File
InputConfigurator.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Variable
Chunk
Conflicting content
    for (String col : serialized) {
      int idx = col.indexOf(":");
<<<<<<< HEAD:mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java
      Text cf = new Text(idx < 0 ? Base64.decodeBase64(col.getBytes(StandardCharsets.UTF_8)) : Base64.decodeBase64(col.substring(0, idx).getBytes(
          StandardCharsets.UTF_8)));
      Text cq = idx < 0 ? null : new Text(Base64.decodeBase64(col.substring(idx + 1).getBytes(StandardCharsets.UTF_8)));
=======
      Text cf = new Text(idx < 0 ? Base64.decodeBase64(col.getBytes(UTF_8)) : Base64.decodeBase64(col.substring(0, idx).getBytes(UTF_8)));
      Text cq = idx < 0 ? null : new Text(Base64.decodeBase64(col.substring(idx + 1).getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java
      columns.add(new Pair(cf, cq));
    }
    return columns;
Solution content
    for (String col : serialized) {
      int idx = col.indexOf(":");
      Text cf = new Text(idx < 0 ? Base64.decodeBase64(col.getBytes(UTF_8)) : Base64.decodeBase64(col.substring(0, idx).getBytes(
          UTF_8)));
      Text cq = idx < 0 ? null : new Text(Base64.decodeBase64(col.substring(idx + 1).getBytes(UTF_8)));
      columns.add(new Pair(cf, cq));
    }
    return columns;
File
InputConfigurator.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    String serialized;
    try {
      bwConfig.write(new DataOutputStream(baos));
<<<<<<< HEAD:mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/OutputConfigurator.java
      serialized = new String(baos.toByteArray(), StandardCharsets.UTF_8);
=======
      serialized = new String(baos.toByteArray(), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/OutputConfigurator.java
      baos.close();
    } catch (IOException e) {
      throw new IllegalArgumentException("unable to serialize " + BatchWriterConfig.class.getName());
Solution content
    String serialized;
    try {
      bwConfig.write(new DataOutputStream(baos));
      serialized = new String(baos.toByteArray(), UTF_8);
      baos.close();
    } catch (IOException e) {
      throw new IllegalArgumentException("unable to serialize " + BatchWriterConfig.class.getName());
File
OutputConfigurator.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
      return bwConfig;
    } else {
      try {
<<<<<<< HEAD:mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/OutputConfigurator.java
        ByteArrayInputStream bais = new ByteArrayInputStream(serialized.getBytes(StandardCharsets.UTF_8));
=======
        ByteArrayInputStream bais = new ByteArrayInputStream(serialized.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/OutputConfigurator.java
        bwConfig.readFields(new DataInputStream(bais));
        bais.close();
        return bwConfig;
Solution content
      return bwConfig;
    } else {
      try {
        ByteArrayInputStream bais = new ByteArrayInputStream(serialized.getBytes(UTF_8));
        bwConfig.readFields(new DataInputStream(bais));
        bais.close();
        return bwConfig;
File
OutputConfigurator.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
        for (Path path : cf) {
          if (path.toUri().getPath().endsWith(cutFileName.substring(cutFileName.lastIndexOf('/')))) {
            TreeSet cutPoints = new TreeSet();
<<<<<<< HEAD:mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/partition/RangePartitioner.java
            Scanner in = new Scanner(new BufferedReader(new InputStreamReader(new FileInputStream(path.toString()), StandardCharsets.UTF_8)));
            try {
              while (in.hasNextLine())
                cutPoints.add(new Text(Base64.decodeBase64(in.nextLine().getBytes(StandardCharsets.UTF_8))));
=======
            Scanner in = new Scanner(new BufferedReader(new InputStreamReader(new FileInputStream(path.toString()), UTF_8)));
            try {
              while (in.hasNextLine())
                cutPoints.add(new Text(Base64.decodeBase64(in.nextLine().getBytes(UTF_8))));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/partition/RangePartitioner.java
            } finally {
              in.close();
            }
Solution content
        for (Path path : cf) {
          if (path.toUri().getPath().endsWith(cutFileName.substring(cutFileName.lastIndexOf('/')))) {
            TreeSet cutPoints = new TreeSet();
            Scanner in = new Scanner(new BufferedReader(new InputStreamReader(new FileInputStream(path.toString()), UTF_8)));
            try {
              while (in.hasNextLine())
                cutPoints.add(new Text(Base64.decodeBase64(in.nextLine().getBytes(UTF_8))));
            } finally {
              in.close();
            }
File
RangePartitioner.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Try statement
Variable
While statement
Chunk
Conflicting content
        for (String name : zrw.getChildren(Constants.ZROOT + Constants.ZINSTANCES)) {
          String instanceNamePath = Constants.ZROOT + Constants.ZINSTANCES + "/" + name;
          byte[] bytes = zrw.getData(instanceNamePath, new Stat());
<<<<<<< HEAD
          String iid = new String(bytes, Charsets.UTF_8);
=======
          String iid = new String(bytes, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          if (iid.equals(instanceIdFromFile)) {
            instanceName = name;
          }
Solution content
        for (String name : zrw.getChildren(Constants.ZROOT + Constants.ZINSTANCES)) {
          String instanceNamePath = Constants.ZROOT + Constants.ZINSTANCES + "/" + name;
          byte[] bytes = zrw.getData(instanceNamePath, new Stat());
          String iid = new String(bytes, UTF_8);
          if (iid.equals(instanceIdFromFile)) {
            instanceName = name;
          }
File
MiniAccumuloClusterImpl.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
  }
  
  protected Connector getConnector(ByteBuffer login) throws Exception {
<<<<<<< HEAD
    String[] pair = new String(login.array(), login.position(), login.remaining(), StandardCharsets.UTF_8).split(",", 2);
=======
    String[] pair = new String(login.array(), login.position(), login.remaining(), UTF_8).split(",", 2);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    if (instance.getInstanceID().equals(pair[0])) {
      Credentials creds = Credentials.deserialize(pair[1]);
      return instance.getConnector(creds.getPrincipal(), creds.getToken());
Solution content
  }
  
  protected Connector getConnector(ByteBuffer login) throws Exception {
    String[] pair = new String(login.array(), login.position(), login.remaining(), UTF_8).split(",", 2);
    if (instance.getInstanceID().equals(pair[0])) {
      Credentials creds = Credentials.deserialize(pair[1]);
      return instance.getConnector(creds.getPrincipal(), creds.getToken());
File
ProxyServer.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
  public ByteBuffer login(String principal, Map loginProperties) throws org.apache.accumulo.proxy.thrift.AccumuloSecurityException, TException {
    try {
      AuthenticationToken token = getToken(principal, loginProperties);
<<<<<<< HEAD
      ByteBuffer login = ByteBuffer.wrap((instance.getInstanceID() + "," + new Credentials(principal, token).serialize()).getBytes(StandardCharsets.UTF_8));
=======
      ByteBuffer login = ByteBuffer.wrap((instance.getInstanceID() + "," + new Credentials(principal, token).serialize()).getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      getConnector(login); // check to make sure user exists
      return login;
    } catch (AccumuloSecurityException e) {
Solution content
  public ByteBuffer login(String principal, Map loginProperties) throws org.apache.accumulo.proxy.thrift.AccumuloSecurityException, TException {
    try {
      AuthenticationToken token = getToken(principal, loginProperties);
      ByteBuffer login = ByteBuffer.wrap((instance.getInstanceID() + "," + new Credentials(principal, token).serialize()).getBytes(UTF_8));
      getConnector(login); // check to make sure user exists
      return login;
    } catch (AccumuloSecurityException e) {
File
ProxyServer.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    
    System.out.println("Creating user: ");
    if (!tpc.proxy().listLocalUsers(login).contains("testuser")) {
<<<<<<< HEAD
      tpc.proxy().createLocalUser(login, "testuser", ByteBuffer.wrap("testpass".getBytes(StandardCharsets.UTF_8)));
=======
      tpc.proxy().createLocalUser(login, "testuser", ByteBuffer.wrap("testpass".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    }
    System.out.println("UserList: " + tpc.proxy().listLocalUsers(login));
    
Solution content
    
    System.out.println("Creating user: ");
    if (!tpc.proxy().listLocalUsers(login).contains("testuser")) {
      tpc.proxy().createLocalUser(login, "testuser", ByteBuffer.wrap("testpass".getBytes(UTF_8)));
    }
    System.out.println("UserList: " + tpc.proxy().listLocalUsers(login));
    
File
TestProxyClient.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    Map> mutations = new HashMap>();
    for (int i = 0; i < maxInserts; i++) {
      String result = String.format(format, i);
<<<<<<< HEAD
      ColumnUpdate update = new ColumnUpdate(ByteBuffer.wrap(("cf" + i).getBytes(StandardCharsets.UTF_8)), ByteBuffer.wrap(("cq" + i).getBytes(StandardCharsets.UTF_8)));
      update.setValue(Util.randStringBuffer(10));
      mutations.put(ByteBuffer.wrap(result.getBytes(StandardCharsets.UTF_8)), Collections.singletonList(update));
=======
      ColumnUpdate update = new ColumnUpdate(ByteBuffer.wrap(("cf" + i).getBytes(UTF_8)), ByteBuffer.wrap(("cq" + i).getBytes(UTF_8)));
      update.setValue(Util.randStringBuffer(10));
      mutations.put(ByteBuffer.wrap(result.getBytes(UTF_8)), Collections.singletonList(update));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      
      if (i % 1000 == 0) {
        tpc.proxy().updateAndFlush(login, testTable, mutations);
Solution content
    Map> mutations = new HashMap>();
    for (int i = 0; i < maxInserts; i++) {
      String result = String.format(format, i);
      ColumnUpdate update = new ColumnUpdate(ByteBuffer.wrap(("cf" + i).getBytes(UTF_8)), ByteBuffer.wrap(("cq" + i).getBytes(UTF_8)));
      update.setValue(Util.randStringBuffer(10));
      mutations.put(ByteBuffer.wrap(result.getBytes(UTF_8)), Collections.singletonList(update));
      
      if (i % 1000 == 0) {
        tpc.proxy().updateAndFlush(login, testTable, mutations);
File
TestProxyClient.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    for (int i = 0; i < maxInserts; i++) {
      String result = String.format(format, i);
      Key pkey = new Key();
<<<<<<< HEAD
      pkey.setRow(result.getBytes(StandardCharsets.UTF_8));
      ColumnUpdate update = new ColumnUpdate(ByteBuffer.wrap(("cf" + i).getBytes(StandardCharsets.UTF_8)), ByteBuffer.wrap(("cq" + i).getBytes(StandardCharsets.UTF_8)));
      update.setValue(Util.randStringBuffer(10));
      mutations.put(ByteBuffer.wrap(result.getBytes(StandardCharsets.UTF_8)), Collections.singletonList(update));
=======
      pkey.setRow(result.getBytes(UTF_8));
      ColumnUpdate update = new ColumnUpdate(ByteBuffer.wrap(("cf" + i).getBytes(UTF_8)), ByteBuffer.wrap(("cq" + i).getBytes(UTF_8)));
      update.setValue(Util.randStringBuffer(10));
      mutations.put(ByteBuffer.wrap(result.getBytes(UTF_8)), Collections.singletonList(update));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      tpc.proxy().update(writer, mutations);
      mutations.clear();
    }
Solution content
    for (int i = 0; i < maxInserts; i++) {
      String result = String.format(format, i);
      Key pkey = new Key();
      pkey.setRow(result.getBytes(UTF_8));
      ColumnUpdate update = new ColumnUpdate(ByteBuffer.wrap(("cf" + i).getBytes(UTF_8)), ByteBuffer.wrap(("cq" + i).getBytes(UTF_8)));
      update.setValue(Util.randStringBuffer(10));
      mutations.put(ByteBuffer.wrap(result.getBytes(UTF_8)), Collections.singletonList(update));
      tpc.proxy().update(writer, mutations);
      mutations.clear();
    }
File
TestProxyClient.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
  }
  
  public static ByteBuffer randStringBuffer(int numbytes) {
<<<<<<< HEAD
    return ByteBuffer.wrap(new BigInteger(numbytes * 5, random).toString(32).getBytes(StandardCharsets.UTF_8));
=======
    return ByteBuffer.wrap(new BigInteger(numbytes * 5, random).toString(32).getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }
  
  public static IteratorSetting iteratorSetting2ProxyIteratorSetting(org.apache.accumulo.core.client.IteratorSetting is) {
Solution content
  }
  
  public static ByteBuffer randStringBuffer(int numbytes) {
    return ByteBuffer.wrap(new BigInteger(numbytes * 5, random).toString(32).getBytes(UTF_8));
  }
  
  public static IteratorSetting iteratorSetting2ProxyIteratorSetting(org.apache.accumulo.core.client.IteratorSetting is) {
File
Util.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
            try {
              byte[] buffer = new byte[10];
              int bytes = is.read(buffer);
<<<<<<< HEAD
              String setting = new String(buffer, 0, bytes, StandardCharsets.UTF_8);
=======
              String setting = new String(buffer, 0, bytes, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
              setting = setting.trim();
              if (bytes > 0 && Integer.parseInt(setting) > 10) {
                log.warn("System swappiness setting is greater than ten (" + setting + ") which can cause time-sensitive operations to be delayed. "
Solution content
            try {
              byte[] buffer = new byte[10];
              int bytes = is.read(buffer);
              String setting = new String(buffer, 0, bytes, UTF_8);
              setting = setting.trim();
              if (bytes > 0 && Integer.parseInt(setting) > 10) {
                log.warn("System swappiness setting is greater than ten (" + setting + ") which can cause time-sensitive operations to be delayed. "
File
Accumulo.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    byte[] loc = zooCache.get(zRootLocPath);

<<<<<<< HEAD
    opTimer.stop("Found root tablet at " + (loc == null ? null : new String(loc, StandardCharsets.UTF_8)) + " in %DURATION%");
=======
    opTimer.stop("Found root tablet at " + (loc == null ? null : new String(loc, UTF_8)) + " in %DURATION%");
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    if (loc == null) {
      return null;
Solution content
    byte[] loc = zooCache.get(zRootLocPath);

    opTimer.stop("Found root tablet at " + (loc == null ? null : new String(loc, UTF_8)) + " in %DURATION%");

    if (loc == null) {
      return null;
File
HdfsZooInstance.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
      return null;
    }

<<<<<<< HEAD
    return new String(loc, StandardCharsets.UTF_8).split("\\|")[0];
=======
    return new String(loc, UTF_8).split("\\|")[0];
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }

  @Override
Solution content
      return null;
    }

    return new String(loc, UTF_8).split("\\|")[0];
  }

  @Override
File
HdfsZooInstance.java
Developer's decision
Version 2
Kind of conflict
Array access
Return statement
Chunk
Conflicting content
    byte[] loc = ZooLock.getLockData(zooCache, masterLocPath, null);

<<<<<<< HEAD
    opTimer.stop("Found master at " + (loc == null ? null : new String(loc, StandardCharsets.UTF_8)) + " in %DURATION%");
=======
    opTimer.stop("Found master at " + (loc == null ? null : new String(loc, UTF_8)) + " in %DURATION%");
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    if (loc == null) {
      return Collections.emptyList();
Solution content
    byte[] loc = ZooLock.getLockData(zooCache, masterLocPath, null);

    opTimer.stop("Found master at " + (loc == null ? null : new String(loc, UTF_8)) + " in %DURATION%");

    if (loc == null) {
      return Collections.emptyList();
File
HdfsZooInstance.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
      return Collections.emptyList();
    }

<<<<<<< HEAD
    return Collections.singletonList(new String(loc, StandardCharsets.UTF_8));
=======
    return Collections.singletonList(new String(loc, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }

  @Override
Solution content
      return Collections.emptyList();
    }

    return Collections.singletonList(new String(loc, UTF_8));
  }

  @Override
File
HdfsZooInstance.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
 */
package org.apache.accumulo.server.conf;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.List;
import java.util.Map;
Solution content
 */
package org.apache.accumulo.server.conf;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.List;
import java.util.Map;
File
ZooCachePropertyAccessor.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
  private String get(String path) {
    byte[] v = propCache.get(path);
    if (v != null) {
<<<<<<< HEAD
      return new String(v, StandardCharsets.UTF_8);
=======
      return new String(v, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    } else {
      return null;
    }
Solution content
  private String get(String path) {
    byte[] v = propCache.get(path);
    if (v != null) {
      return new String(v, UTF_8);
    } else {
      return null;
    }
File
ZooCachePropertyAccessor.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
 */
package org.apache.accumulo.server.conf;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
Solution content
 */
package org.apache.accumulo.server.conf;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Collections;
import java.util.HashMap;
import java.util.List;
File
ZooConfiguration.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    byte[] v = propCache.get(zPath);
    String value = null;
    if (v != null)
<<<<<<< HEAD
      value = new String(v, StandardCharsets.UTF_8);
=======
      value = new String(v, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    return value;
  }
Solution content
    byte[] v = propCache.get(zPath);
    String value = null;
    if (v != null)
      value = new String(v, UTF_8);
    return value;
  }
File
ZooConfiguration.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.server.constraints;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
Solution content
 */
package org.apache.accumulo.server.constraints;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
File
MetadataConstraints.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
          HashSet dataFiles = new HashSet();
          HashSet loadedFiles = new HashSet();

<<<<<<< HEAD
          String tidString = new String(columnUpdate.getValue(), StandardCharsets.UTF_8);
=======
          String tidString = new String(columnUpdate.getValue(), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          int otherTidCount = 0;
          
          for (ColumnUpdate update : mutation.getUpdates()) {
Solution content
          HashSet dataFiles = new HashSet();
          HashSet loadedFiles = new HashSet();

          String tidString = new String(columnUpdate.getValue(), UTF_8);
          int otherTidCount = 0;
          
          for (ColumnUpdate update : mutation.getUpdates()) {
File
MetadataConstraints.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
            } else if (new Text(update.getColumnFamily()).equals(TabletsSection.BulkFileColumnFamily.NAME)) {
              loadedFiles.add(new Text(update.getColumnQualifier()));
              
<<<<<<< HEAD
              if (!new String(update.getValue(), StandardCharsets.UTF_8).equals(tidString)) {
=======
              if (!new String(update.getValue(), UTF_8).equals(tidString)) {
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
                otherTidCount++;
              }
            }
Solution content
            } else if (new Text(update.getColumnFamily()).equals(TabletsSection.BulkFileColumnFamily.NAME)) {
              loadedFiles.add(new Text(update.getColumnQualifier()));
              
              if (!new String(update.getValue(), UTF_8).equals(tidString)) {
                otherTidCount++;
              }
            }
File
MetadataConstraints.java
Developer's decision
Version 2
Kind of conflict
If statement
Chunk
Conflicting content
          }
          
          boolean lockHeld = false;
<<<<<<< HEAD
          String lockId = new String(columnUpdate.getValue(), StandardCharsets.UTF_8);
=======
          String lockId = new String(columnUpdate.getValue(), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          
          try {
            lockHeld = ZooLock.isLockHeld(zooCache, new ZooUtil.LockID(zooRoot, lockId));
Solution content
          }
          
          boolean lockHeld = false;
          String lockId = new String(columnUpdate.getValue(), UTF_8);
          
          try {
            lockHeld = ZooLock.isLockHeld(zooCache, new ZooUtil.LockID(zooRoot, lockId));
File
MetadataConstraints.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    }
    
    if (violations != null) {
<<<<<<< HEAD
      log.debug("violating metadata mutation : " + new String(mutation.getRow(), StandardCharsets.UTF_8));
      for (ColumnUpdate update : mutation.getUpdates()) {
        log.debug(" update: " + new String(update.getColumnFamily(), StandardCharsets.UTF_8) + ":" + new String(update.getColumnQualifier(), StandardCharsets.UTF_8) + " value "
            + (update.isDeleted() ? "[delete]" : new String(update.getValue(), StandardCharsets.UTF_8)));
=======
      log.debug("violating metadata mutation : " + new String(mutation.getRow(), UTF_8));
      for (ColumnUpdate update : mutation.getUpdates()) {
        log.debug(" update: " + new String(update.getColumnFamily(), UTF_8) + ":" + new String(update.getColumnQualifier(), UTF_8) + " value "
            + (update.isDeleted() ? "[delete]" : new String(update.getValue(), UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      }
    }
    
Solution content
    }
    
    if (violations != null) {
      log.debug("violating metadata mutation : " + new String(mutation.getRow(), UTF_8));
      for (ColumnUpdate update : mutation.getUpdates()) {
        log.debug(" update: " + new String(update.getColumnFamily(), UTF_8) + ":" + new String(update.getColumnQualifier(), UTF_8) + " value "
            + (update.isDeleted() ? "[delete]" : new String(update.getValue(), UTF_8)));
      }
    }
    
File
MetadataConstraints.java
Developer's decision
Version 2
Kind of conflict
For statement
Method invocation
Chunk
Conflicting content
  private static void createEntriesForTablet(FileSKVWriter writer, String tableId, String tabletDir, Text tabletPrevEndRow, Text tabletEndRow)
      throws IOException {
    Text extent = new Text(KeyExtent.getMetadataEntry(new Text(tableId), tabletEndRow));
<<<<<<< HEAD
    addEntry(writer, extent, DIRECTORY_COLUMN, new Value(tabletDir.getBytes(StandardCharsets.UTF_8)));
    addEntry(writer, extent, TIME_COLUMN, new Value((TabletTime.LOGICAL_TIME_ID + "0").getBytes(StandardCharsets.UTF_8)));
=======
    addEntry(writer, extent, DIRECTORY_COLUMN, new Value(tabletDir.getBytes(UTF_8)));
    addEntry(writer, extent, TIME_COLUMN, new Value((TabletTime.LOGICAL_TIME_ID + "0").getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    addEntry(writer, extent, PREV_ROW_COLUMN, KeyExtent.encodePrevEndRow(tabletPrevEndRow));
  }
Solution content
  private static void createEntriesForTablet(FileSKVWriter writer, String tableId, String tabletDir, Text tabletPrevEndRow, Text tabletEndRow)
      throws IOException {
    Text extent = new Text(KeyExtent.getMetadataEntry(new Text(tableId), tabletEndRow));
    addEntry(writer, extent, DIRECTORY_COLUMN, new Value(tabletDir.getBytes(UTF_8)));
    addEntry(writer, extent, TIME_COLUMN, new Value((TabletTime.LOGICAL_TIME_ID + "0").getBytes(UTF_8)));
    addEntry(writer, extent, PREV_ROW_COLUMN, KeyExtent.encodePrevEndRow(tabletPrevEndRow));
  }
File
Initialize.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    // setup instance name
    if (opts.clearInstanceName)
      zoo.recursiveDelete(instanceNamePath, NodeMissingPolicy.SKIP);
<<<<<<< HEAD
    zoo.putPersistentData(instanceNamePath, uuid.getBytes(StandardCharsets.UTF_8), NodeExistsPolicy.FAIL);
=======
    zoo.putPersistentData(instanceNamePath, uuid.getBytes(UTF_8), NodeExistsPolicy.FAIL);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    final byte[] EMPTY_BYTE_ARRAY = new byte[0], ZERO_CHAR_ARRAY = new byte[] {'0'};
Solution content
    // setup instance name
    if (opts.clearInstanceName)
      zoo.recursiveDelete(instanceNamePath, NodeMissingPolicy.SKIP);
    zoo.putPersistentData(instanceNamePath, uuid.getBytes(UTF_8), NodeExistsPolicy.FAIL);

    final byte[] EMPTY_BYTE_ARRAY = new byte[0], ZERO_CHAR_ARRAY = new byte[] {'0'};
File
Initialize.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    zoo.putPersistentData(zkInstanceRoot + Constants.ZPROBLEMS, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
    zoo.putPersistentData(zkInstanceRoot + RootTable.ZROOT_TABLET, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
    zoo.putPersistentData(zkInstanceRoot + RootTable.ZROOT_TABLET_WALOGS, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
<<<<<<< HEAD
    zoo.putPersistentData(zkInstanceRoot + RootTable.ZROOT_TABLET_PATH, rootTabletDir.getBytes(StandardCharsets.UTF_8), NodeExistsPolicy.FAIL);
    zoo.putPersistentData(zkInstanceRoot + Constants.ZTRACERS, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
    zoo.putPersistentData(zkInstanceRoot + Constants.ZMASTERS, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
    zoo.putPersistentData(zkInstanceRoot + Constants.ZMASTER_LOCK, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
    zoo.putPersistentData(zkInstanceRoot + Constants.ZMASTER_GOAL_STATE, MasterGoalState.NORMAL.toString().getBytes(StandardCharsets.UTF_8),
        NodeExistsPolicy.FAIL);
=======
    zoo.putPersistentData(zkInstanceRoot + RootTable.ZROOT_TABLET_PATH, rootTabletDir.getBytes(UTF_8), NodeExistsPolicy.FAIL);
    zoo.putPersistentData(zkInstanceRoot + Constants.ZTRACERS, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
    zoo.putPersistentData(zkInstanceRoot + Constants.ZMASTERS, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
    zoo.putPersistentData(zkInstanceRoot + Constants.ZMASTER_LOCK, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
    zoo.putPersistentData(zkInstanceRoot + Constants.ZMASTER_GOAL_STATE, MasterGoalState.NORMAL.toString().getBytes(UTF_8), NodeExistsPolicy.FAIL);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    zoo.putPersistentData(zkInstanceRoot + Constants.ZGC, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
    zoo.putPersistentData(zkInstanceRoot + Constants.ZGC_LOCK, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
    zoo.putPersistentData(zkInstanceRoot + Constants.ZCONFIG, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
Solution content
    zoo.putPersistentData(zkInstanceRoot + Constants.ZPROBLEMS, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
    zoo.putPersistentData(zkInstanceRoot + RootTable.ZROOT_TABLET, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
    zoo.putPersistentData(zkInstanceRoot + RootTable.ZROOT_TABLET_WALOGS, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
    zoo.putPersistentData(zkInstanceRoot + RootTable.ZROOT_TABLET_PATH, rootTabletDir.getBytes(UTF_8), NodeExistsPolicy.FAIL);
    zoo.putPersistentData(zkInstanceRoot + Constants.ZTRACERS, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
    zoo.putPersistentData(zkInstanceRoot + Constants.ZMASTERS, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
    zoo.putPersistentData(zkInstanceRoot + Constants.ZMASTER_LOCK, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
    zoo.putPersistentData(zkInstanceRoot + Constants.ZMASTER_GOAL_STATE, MasterGoalState.NORMAL.toString().getBytes(UTF_8),
        NodeExistsPolicy.FAIL);
    zoo.putPersistentData(zkInstanceRoot + Constants.ZGC, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
    zoo.putPersistentData(zkInstanceRoot + Constants.ZGC_LOCK, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
    zoo.putPersistentData(zkInstanceRoot + Constants.ZCONFIG, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
File
Initialize.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  private static byte[] getRootPassword(Opts opts) throws IOException {
    if (opts.cliPassword != null) {
<<<<<<< HEAD
      return opts.cliPassword.getBytes(StandardCharsets.UTF_8);
=======
      return opts.cliPassword.getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    }
    String rootpass;
    String confirmpass;
Solution content
  private static byte[] getRootPassword(Opts opts) throws IOException {
    if (opts.cliPassword != null) {
      return opts.cliPassword.getBytes(UTF_8);
    }
    String rootpass;
    String confirmpass;
File
Initialize.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
      if (!rootpass.equals(confirmpass))
        log.error("Passwords do not match");
    } while (!rootpass.equals(confirmpass));
<<<<<<< HEAD
    return rootpass.getBytes(StandardCharsets.UTF_8);
=======
    return rootpass.getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }

  private static void initSecurity(Opts opts, String iid) throws AccumuloSecurityException, ThriftSecurityException {
Solution content
      if (!rootpass.equals(confirmpass))
        log.error("Passwords do not match");
    } while (!rootpass.equals(confirmpass));
    return rootpass.getBytes(UTF_8);
  }

  private static void initSecurity(Opts opts, String iid) throws AccumuloSecurityException, ThriftSecurityException {
File
Initialize.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
      }
    } else {
      locklessServers.remove(zPath);
<<<<<<< HEAD
      ServerServices services = new ServerServices(new String(lockData, StandardCharsets.UTF_8));
=======
      ServerServices services = new ServerServices(new String(lockData, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      HostAndPort client = services.getAddress(ServerServices.Service.TSERV_CLIENT);
      TServerInstance instance = new TServerInstance(client, stat.getEphemeralOwner());
Solution content
      }
    } else {
      locklessServers.remove(zPath);
      ServerServices services = new ServerServices(new String(lockData, UTF_8));
      HostAndPort client = services.getAddress(ServerServices.Service.TSERV_CLIENT);
      TServerInstance instance = new TServerInstance(client, stat.getEphemeralOwner());
File
LiveTServerSet.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.server.master.state;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.ArrayList;
import java.util.List;
Solution content
 */
package org.apache.accumulo.server.master.state;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.ArrayList;
import java.util.List;
File
DeadServerList.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
            // in the dead server list.
            continue;
          }
<<<<<<< HEAD
          DeadServer server = new DeadServer(child, stat.getMtime(), new String(data, StandardCharsets.UTF_8));
=======
          DeadServer server = new DeadServer(child, stat.getMtime(), new String(data, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          result.add(server);
        }
      }
Solution content
            // in the dead server list.
            continue;
          }
          DeadServer server = new DeadServer(child, stat.getMtime(), new String(data, UTF_8));
          result.add(server);
        }
      }
File
DeadServerList.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
  public void post(String server, String cause) {
    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
    try {
<<<<<<< HEAD
      zoo.putPersistentData(path + "/" + server, cause.getBytes(StandardCharsets.UTF_8), NodeExistsPolicy.SKIP);
=======
      zoo.putPersistentData(path + "/" + server, cause.getBytes(UTF_8), NodeExistsPolicy.SKIP);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    } catch (Exception ex) {
      log.error(ex, ex);
    }
Solution content
  public void post(String server, String cause) {
    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
    try {
      zoo.putPersistentData(path + "/" + server, cause.getBytes(UTF_8), NodeExistsPolicy.SKIP);
    } catch (Exception ex) {
      log.error(ex, ex);
    }
File
DeadServerList.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  }
  
  public TServerInstance(Value address, Text session) {
<<<<<<< HEAD
    this(AddressUtil.parseAddress(new String(address.get(), StandardCharsets.UTF_8), false), session.toString());
=======
    this(AddressUtil.parseAddress(new String(address.get(), UTF_8), false), session.toString());
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }
  
  public void putLocation(Mutation m) {
Solution content
  }
  
  public TServerInstance(Value address, Text session) {
    this(AddressUtil.parseAddress(new String(address.get(), UTF_8), false), session.toString());
  }
  
  public void putLocation(Mutation m) {
File
TServerInstance.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    return new Text(this.getSession());
  }
  
<<<<<<< HEAD
  private Value asMutationValue() {
    return new Value(getLocation().toString().getBytes(StandardCharsets.UTF_8));
=======
  public Value asMutationValue() {
    return new Value(getLocation().toString().getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }
  
  public HostAndPort getLocation() {
Solution content
    return new Text(this.getSession());
  }
  
  private Value asMutationValue() {
    return new Value(getLocation().toString().getBytes(UTF_8));
  }
  
  public HostAndPort getLocation() {
File
TServerInstance.java
Developer's decision
Combination
Kind of conflict
Method invocation
Method signature
Return statement
Chunk
Conflicting content
      byte[] data = Base64.decodeBase64(merges.getBytes(StandardCharsets.UTF_8));
    try {
      Map result = new HashMap();
      DataInputBuffer buffer = new DataInputBuffer();
<<<<<<< HEAD
=======
      byte[] data = Base64.decodeBase64(merges.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      buffer.reset(data, data.length);
      while (buffer.available() > 0) {
        MergeInfo mergeInfo = new MergeInfo();
Solution content
    try {
      Map result = new HashMap();
      DataInputBuffer buffer = new DataInputBuffer();
      byte[] data = Base64.decodeBase64(merges.getBytes(UTF_8));
      buffer.reset(data, data.length);
      while (buffer.available() > 0) {
        MergeInfo mergeInfo = new MergeInfo();
File
TabletStateChangeIterator.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
      path = relative(path);
      ZooReaderWriter.getInstance().putPersistentData(path, bs, NodeExistsPolicy.OVERWRITE);
      cache.clear();
<<<<<<< HEAD
      log.debug("Wrote " + new String(bs, StandardCharsets.UTF_8) + " to " + path);
=======
      log.debug("Wrote " + new String(bs, UTF_8) + " to " + path);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    } catch (Exception ex) {
      throw new DistributedStoreException(ex);
    }
Solution content
      path = relative(path);
      ZooReaderWriter.getInstance().putPersistentData(path, bs, NodeExistsPolicy.OVERWRITE);
      cache.clear();
      log.debug("Wrote " + new String(bs, UTF_8) + " to " + path);
    } catch (Exception ex) {
      throw new DistributedStoreException(ex);
    }
File
ZooStore.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  }
  
  protected TServerInstance parse(byte[] current) {
<<<<<<< HEAD
    String str = new String(current, StandardCharsets.UTF_8);
=======
    String str = new String(current, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    String[] parts = str.split("[|]", 2);
    HostAndPort address = HostAndPort.fromString(parts[0]);
    if (parts.length > 1 && parts[1] != null && parts[1].length() > 0) {
Solution content
  }
  
  protected TServerInstance parse(byte[] current) {
    String str = new String(current, UTF_8);
    String[] parts = str.split("[|]", 2);
    HostAndPort address = HostAndPort.fromString(parts[0]);
    if (parts.length > 1 && parts[1] != null && parts[1].length() > 0) {
File
ZooTabletStateStore.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    if (current.current != null) {
      throw new DistributedStoreException("Trying to set the root tablet location: it is already set to " + current.current);
    }
<<<<<<< HEAD
    store.put(RootTable.ZROOT_TABLET_FUTURE_LOCATION, value.getBytes(StandardCharsets.UTF_8));
=======
    store.put(RootTable.ZROOT_TABLET_FUTURE_LOCATION, value.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }
  
  @Override
Solution content
    if (current.current != null) {
      throw new DistributedStoreException("Trying to set the root tablet location: it is already set to " + current.current);
    }
    store.put(RootTable.ZROOT_TABLET_FUTURE_LOCATION, value.getBytes(UTF_8));
  }
  
  @Override
File
ZooTabletStateStore.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    if (!current.future.equals(assignment.server)) {
      throw new DistributedStoreException("Root tablet is already assigned to " + current.future);
    }
<<<<<<< HEAD
    store.put(RootTable.ZROOT_TABLET_LOCATION, value.getBytes(StandardCharsets.UTF_8));
    store.put(RootTable.ZROOT_TABLET_LAST_LOCATION, value.getBytes(StandardCharsets.UTF_8));
=======
    store.put(RootTable.ZROOT_TABLET_LOCATION, value.getBytes(UTF_8));
    store.put(RootTable.ZROOT_TABLET_LAST_LOCATION, value.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    // Make the following unnecessary by making the entire update atomic
    store.remove(RootTable.ZROOT_TABLET_FUTURE_LOCATION);
    log.debug("Put down root tablet location");
Solution content
    if (!current.future.equals(assignment.server)) {
      throw new DistributedStoreException("Root tablet is already assigned to " + current.future);
    }
    store.put(RootTable.ZROOT_TABLET_LOCATION, value.getBytes(UTF_8));
    store.put(RootTable.ZROOT_TABLET_LAST_LOCATION, value.getBytes(UTF_8));
    // Make the following unnecessary by making the entire update atomic
    store.remove(RootTable.ZROOT_TABLET_FUTURE_LOCATION);
    log.debug("Put down root tablet location");
File
ZooTabletStateStore.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
        return;
      }
    }
<<<<<<< HEAD
    logWriter = new OutputStreamWriter(new FileOutputStream(logFile, true), StandardCharsets.UTF_8);
=======
    logWriter = new OutputStreamWriter(new FileOutputStream(logFile, true), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }
  
  private void writeToLog(String name) throws IOException {
Solution content
        return;
      }
    }
    logWriter = new OutputStreamWriter(new FileOutputStream(logFile, true), UTF_8);
  }
  
  private void writeToLog(String name) throws IOException {
File
AbstractMetricsImpl.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
        }
      }

<<<<<<< HEAD
      zoo.putEphemeralData(path, logForwardingAddr.getBytes(StandardCharsets.UTF_8));
=======
      zoo.putEphemeralData(path, logForwardingAddr.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

      new Daemon(server).start();
    } catch (Throwable t) {
Solution content
        }
      }

      zoo.putEphemeralData(path, logForwardingAddr.getBytes(UTF_8));

      new Daemon(server).start();
    } catch (Throwable t) {
File
LogService.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  public synchronized String getRootUsername() {
    if (rootUserName == null)
<<<<<<< HEAD
      rootUserName = new String(zooCache.get(ZKUserPath), StandardCharsets.UTF_8);
=======
      rootUserName = new String(zooCache.get(ZKUserPath), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    return rootUserName;
  }
Solution content
  public synchronized String getRootUsername() {
    if (rootUserName == null)
      rootUserName = new String(zooCache.get(ZKUserPath), UTF_8);
    return rootUserName;
  }
File
SecurityOperation.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
    }

    private static SystemToken get(Instance instance) {
<<<<<<< HEAD
      byte[] instanceIdBytes = instance.getInstanceID().getBytes(StandardCharsets.UTF_8);
=======
      byte[] instanceIdBytes = instance.getInstanceID().getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      byte[] confChecksum;
      MessageDigest md;
      try {
Solution content
    }

    private static SystemToken get(Instance instance) {
      byte[] instanceIdBytes = instance.getInstanceID().getBytes(UTF_8);
      byte[] confChecksum;
      MessageDigest md;
      try {
File
SystemCredentials.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
      }

      // seed the config with the version and instance id, so at least it's not empty
<<<<<<< HEAD
      md.update(ServerConstants.WIRE_VERSION.toString().getBytes(StandardCharsets.UTF_8));
=======
      md.update(ServerConstants.WIRE_VERSION.toString().getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      md.update(instanceIdBytes);

      for (Entry entry : SiteConfiguration.getInstance()) {
Solution content
      }

      // seed the config with the version and instance id, so at least it's not empty
      md.update(ServerConstants.WIRE_VERSION.toString().getBytes(UTF_8));
      md.update(instanceIdBytes);

      for (Entry entry : SiteConfiguration.getInstance()) {
File
SystemCredentials.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
      for (Entry entry : SiteConfiguration.getInstance()) {
        // only include instance properties
        if (entry.getKey().startsWith(Property.INSTANCE_PREFIX.toString())) {
<<<<<<< HEAD
          md.update(entry.getKey().getBytes(StandardCharsets.UTF_8));
          md.update(entry.getValue().getBytes(StandardCharsets.UTF_8));
=======
          md.update(entry.getKey().getBytes(UTF_8));
          md.update(entry.getValue().getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        }
      }
      confChecksum = md.digest();
Solution content
      for (Entry entry : SiteConfiguration.getInstance()) {
        // only include instance properties
        if (entry.getKey().startsWith(Property.INSTANCE_PREFIX.toString())) {
          md.update(entry.getKey().getBytes(UTF_8));
          md.update(entry.getValue().getBytes(UTF_8));
        }
      }
      confChecksum = md.digest();
File
SystemCredentials.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.server.security.handler;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.HashSet;
import java.util.Set;
import java.util.TreeSet;
Solution content
 */
package org.apache.accumulo.server.security.handler;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.HashSet;
import java.util.Set;
import java.util.TreeSet;
File
ZKAuthenticator.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
        }

        // prep parent node of users with root username
<<<<<<< HEAD
        zoo.putPersistentData(ZKUserPath, principal.getBytes(StandardCharsets.UTF_8), NodeExistsPolicy.FAIL);
=======
        zoo.putPersistentData(ZKUserPath, principal.getBytes(UTF_8), NodeExistsPolicy.FAIL);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

        constructUser(principal, ZKSecurityTool.createPass(token));
      }
Solution content
        }

        // prep parent node of users with root username
        zoo.putPersistentData(ZKUserPath, principal.getBytes(UTF_8), NodeExistsPolicy.FAIL);

        constructUser(principal, ZKSecurityTool.createPass(token));
      }
File
ZKAuthenticator.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    try {
      // prep parent node of users with root username
      if (!zoo.exists(ZKUserPath))
<<<<<<< HEAD
        zoo.putPersistentData(ZKUserPath, rootuser.getBytes(StandardCharsets.UTF_8), NodeExistsPolicy.FAIL);
=======
        zoo.putPersistentData(ZKUserPath, rootuser.getBytes(UTF_8), NodeExistsPolicy.FAIL);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

      initUser(rootuser);
      zoo.putPersistentData(ZKUserPath + "/" + rootuser + ZKUserAuths, ZKSecurityTool.convertAuthorizations(Authorizations.EMPTY), NodeExistsPolicy.FAIL);
Solution content
    try {
      // prep parent node of users with root username
      if (!zoo.exists(ZKUserPath))
        zoo.putPersistentData(ZKUserPath, rootuser.getBytes(UTF_8), NodeExistsPolicy.FAIL);

      initUser(rootuser);
      zoo.putPersistentData(ZKUserPath + "/" + rootuser + ZKUserAuths, ZKSecurityTool.convertAuthorizations(Authorizations.EMPTY), NodeExistsPolicy.FAIL);
File
ZKAuthorizor.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.server.security.handler;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
Solution content
 */
package org.apache.accumulo.server.security.handler;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
File
ZKPermHandler.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    try {
      // prep parent node of users with root username
      if (!zoo.exists(ZKUserPath))
<<<<<<< HEAD
        zoo.putPersistentData(ZKUserPath, rootuser.getBytes(StandardCharsets.UTF_8), NodeExistsPolicy.FAIL);
=======
        zoo.putPersistentData(ZKUserPath, rootuser.getBytes(UTF_8), NodeExistsPolicy.FAIL);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

      initUser(rootuser);
      zoo.putPersistentData(ZKUserPath + "/" + rootuser + ZKUserSysPerms, ZKSecurityTool.convertSystemPermissions(rootPerms), NodeExistsPolicy.FAIL);
Solution content
    try {
      // prep parent node of users with root username
      if (!zoo.exists(ZKUserPath))
        zoo.putPersistentData(ZKUserPath, rootuser.getBytes(UTF_8), NodeExistsPolicy.FAIL);

      initUser(rootuser);
      zoo.putPersistentData(ZKUserPath + "/" + rootuser + ZKUserSysPerms, ZKSecurityTool.convertSystemPermissions(rootPerms), NodeExistsPolicy.FAIL);
File
ZKPermHandler.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.server.tables;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.security.SecurityPermission;
import java.util.Collections;
import java.util.HashMap;
Solution content
 */
package org.apache.accumulo.server.tables;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.security.SecurityPermission;
import java.util.Collections;
import java.util.HashMap;
File
TableManager.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
    zoo.putPersistentData(zPath, new byte[0], existsPolicy);
<<<<<<< HEAD
    zoo.putPersistentData(zPath + Constants.ZNAMESPACE_NAME, namespace.getBytes(StandardCharsets.UTF_8), existsPolicy);
=======
    zoo.putPersistentData(zPath + Constants.ZNAMESPACE_NAME, namespace.getBytes(UTF_8), existsPolicy);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    zoo.putPersistentData(zPath + Constants.ZNAMESPACE_CONF, new byte[0], existsPolicy);
  }
Solution content
    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
    zoo.putPersistentData(zPath, new byte[0], existsPolicy);
    zoo.putPersistentData(zPath + Constants.ZNAMESPACE_NAME, namespace.getBytes(UTF_8), existsPolicy);
    zoo.putPersistentData(zPath + Constants.ZNAMESPACE_CONF, new byte[0], existsPolicy);
  }
File
TableManager.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
    zoo.putPersistentData(zTablePath, new byte[0], existsPolicy);
    zoo.putPersistentData(zTablePath + Constants.ZTABLE_CONF, new byte[0], existsPolicy);
<<<<<<< HEAD
    zoo.putPersistentData(zTablePath + Constants.ZTABLE_NAMESPACE, namespaceId.getBytes(StandardCharsets.UTF_8), existsPolicy);
    zoo.putPersistentData(zTablePath + Constants.ZTABLE_NAME, tableName.getBytes(StandardCharsets.UTF_8), existsPolicy);
    zoo.putPersistentData(zTablePath + Constants.ZTABLE_FLUSH_ID, ZERO_BYTE, existsPolicy);
    zoo.putPersistentData(zTablePath + Constants.ZTABLE_COMPACT_ID, ZERO_BYTE, existsPolicy);
    zoo.putPersistentData(zTablePath + Constants.ZTABLE_COMPACT_CANCEL_ID, ZERO_BYTE, existsPolicy);
    zoo.putPersistentData(zTablePath + Constants.ZTABLE_STATE, state.name().getBytes(StandardCharsets.UTF_8), existsPolicy);
=======
    zoo.putPersistentData(zTablePath + Constants.ZTABLE_NAMESPACE, namespaceId.getBytes(UTF_8), existsPolicy);
    zoo.putPersistentData(zTablePath + Constants.ZTABLE_NAME, tableName.getBytes(UTF_8), existsPolicy);
    zoo.putPersistentData(zTablePath + Constants.ZTABLE_FLUSH_ID, ZERO_BYTE, existsPolicy);
    zoo.putPersistentData(zTablePath + Constants.ZTABLE_COMPACT_ID, ZERO_BYTE, existsPolicy);
    zoo.putPersistentData(zTablePath + Constants.ZTABLE_COMPACT_CANCEL_ID, ZERO_BYTE, existsPolicy);
    zoo.putPersistentData(zTablePath + Constants.ZTABLE_STATE, state.name().getBytes(UTF_8), existsPolicy);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }

  public synchronized static TableManager getInstance() {
Solution content
    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
    zoo.putPersistentData(zTablePath, new byte[0], existsPolicy);
    zoo.putPersistentData(zTablePath + Constants.ZTABLE_CONF, new byte[0], existsPolicy);
    zoo.putPersistentData(zTablePath + Constants.ZTABLE_NAMESPACE, namespaceId.getBytes(UTF_8), existsPolicy);
    zoo.putPersistentData(zTablePath + Constants.ZTABLE_NAME, tableName.getBytes(UTF_8), existsPolicy);
    zoo.putPersistentData(zTablePath + Constants.ZTABLE_FLUSH_ID, ZERO_BYTE, existsPolicy);
    zoo.putPersistentData(zTablePath + Constants.ZTABLE_COMPACT_ID, ZERO_BYTE, existsPolicy);
    zoo.putPersistentData(zTablePath + Constants.ZTABLE_COMPACT_CANCEL_ID, ZERO_BYTE, existsPolicy);
    zoo.putPersistentData(zTablePath + Constants.ZTABLE_STATE, state.name().getBytes(UTF_8), existsPolicy);
  }

  public synchronized static TableManager getInstance() {
File
TableManager.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    String statePath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_STATE;

    try {
<<<<<<< HEAD
      ZooReaderWriter.getInstance().mutate(statePath, newState.name().getBytes(StandardCharsets.UTF_8), ZooUtil.PUBLIC, new Mutator() {
=======
      ZooReaderWriter.getInstance().mutate(statePath, newState.name().getBytes(UTF_8), ZooUtil.PUBLIC, new Mutator() {
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        @Override
        public byte[] mutate(byte[] oldData) throws Exception {
          TableState oldState = TableState.UNKNOWN;
Solution content
    String statePath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_STATE;

    try {
      ZooReaderWriter.getInstance().mutate(statePath, newState.name().getBytes(UTF_8), ZooUtil.PUBLIC, new Mutator() {
        @Override
        public byte[] mutate(byte[] oldData) throws Exception {
          TableState oldState = TableState.UNKNOWN;
File
TableManager.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
        public byte[] mutate(byte[] oldData) throws Exception {
          TableState oldState = TableState.UNKNOWN;
          if (oldData != null)
<<<<<<< HEAD
            oldState = TableState.valueOf(new String(oldData, StandardCharsets.UTF_8));
=======
            oldState = TableState.valueOf(new String(oldData, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          boolean transition = true;
          // +--------+
          // v |
Solution content
        public byte[] mutate(byte[] oldData) throws Exception {
          TableState oldState = TableState.UNKNOWN;
          if (oldData != null)
            oldState = TableState.valueOf(new String(oldData, UTF_8));
          boolean transition = true;
          // +--------+
          // v |
File
TableManager.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
          if (!transition)
            throw new IllegalTableTransitionException(oldState, newState);
          log.debug("Transitioning state for table " + tableId + " from " + oldState + " to " + newState);
<<<<<<< HEAD
          return newState.name().getBytes(StandardCharsets.UTF_8);
=======
          return newState.name().getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        }
      });
    } catch (Exception e) {
Solution content
          if (!transition)
            throw new IllegalTableTransitionException(oldState, newState);
          log.debug("Transitioning state for table " + tableId + " from " + oldState + " to " + newState);
          return newState.name().getBytes(UTF_8);
        }
      });
    } catch (Exception e) {
File
TableManager.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
      TableState tState = TableState.UNKNOWN;
      byte[] data = zooStateCache.get(ZooUtil.getRoot(instance) + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_STATE);
      if (data != null) {
<<<<<<< HEAD
        String sState = new String(data, StandardCharsets.UTF_8);
=======
        String sState = new String(data, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        try {
          tState = TableState.valueOf(sState);
        } catch (IllegalArgumentException e) {
Solution content
      TableState tState = TableState.UNKNOWN;
      byte[] data = zooStateCache.get(ZooUtil.getRoot(instance) + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_STATE);
      if (data != null) {
        String sState = new String(data, UTF_8);
        try {
          tState = TableState.valueOf(sState);
        } catch (IllegalArgumentException e) {
File
TableManager.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.server.tablets;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Random;

import org.apache.accumulo.core.Constants;
Solution content
 */
package org.apache.accumulo.server.tablets;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Random;

import org.apache.accumulo.core.Constants;
File
UniqueNameAllocator.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
      try {
        byte[] max = ZooReaderWriter.getInstance().mutate(nextNamePath, null, ZooUtil.PRIVATE, new ZooReaderWriter.Mutator() {
          public byte[] mutate(byte[] currentValue) throws Exception {
<<<<<<< HEAD
            long l = Long.parseLong(new String(currentValue, StandardCharsets.UTF_8), Character.MAX_RADIX);
            l += allocate;
            return Long.toString(l, Character.MAX_RADIX).getBytes(StandardCharsets.UTF_8);
          }
        });
        
        maxAllocated = Long.parseLong(new String(max, StandardCharsets.UTF_8), Character.MAX_RADIX);
=======
            long l = Long.parseLong(new String(currentValue, UTF_8), Character.MAX_RADIX);
            l += allocate;
            return Long.toString(l, Character.MAX_RADIX).getBytes(UTF_8);
          }
        });
        
        maxAllocated = Long.parseLong(new String(max, UTF_8), Character.MAX_RADIX);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        next = maxAllocated - allocate;
        
      } catch (Exception e) {
Solution content
      try {
        byte[] max = ZooReaderWriter.getInstance().mutate(nextNamePath, null, ZooUtil.PRIVATE, new ZooReaderWriter.Mutator() {
          public byte[] mutate(byte[] currentValue) throws Exception {
            long l = Long.parseLong(new String(currentValue, UTF_8), Character.MAX_RADIX);
            l += allocate;
            return Long.toString(l, Character.MAX_RADIX).getBytes(UTF_8);
          }
        });
        
        maxAllocated = Long.parseLong(new String(max, UTF_8), Character.MAX_RADIX);
        next = maxAllocated - allocate;
        
      } catch (Exception e) {
File
UniqueNameAllocator.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Return statement
Variable
Chunk
Conflicting content
      }
    }
    
<<<<<<< HEAD
    return new String(FastFormat.toZeroPaddedString(next++, 7, Character.MAX_RADIX, new byte[0]), StandardCharsets.UTF_8);
=======
    return new String(FastFormat.toZeroPaddedString(next++, 7, Character.MAX_RADIX, new byte[0]), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }
  
  private static UniqueNameAllocator instance = null;
Solution content
      }
    }
    
    return new String(FastFormat.toZeroPaddedString(next++, 7, Character.MAX_RADIX, new byte[0]), UTF_8);
  }
  
  private static UniqueNameAllocator instance = null;
File
UniqueNameAllocator.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
 */
package org.apache.accumulo.server.util;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.HashSet;
import java.util.Map.Entry;
import java.util.Set;
Solution content
 */
package org.apache.accumulo.server.util;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.HashSet;
import java.util.Map.Entry;
import java.util.Set;
File
AddFilesWithMissingEntries.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
          String size = Long.toString(file.getLen());
          String entries = "1"; // lie
          String value = size + "," + entries;
<<<<<<< HEAD
          m.put(DataFileColumnFamily.NAME, new Text(filename), new Value(value.getBytes(StandardCharsets.UTF_8)));
=======
          m.put(DataFileColumnFamily.NAME, new Text(filename), new Value(value.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          if (update) {
            writer.getBatchWriter(MetadataTable.NAME).addMutation(m);
          }
Solution content
          String size = Long.toString(file.getLen());
          String entries = "1"; // lie
          String value = size + "," + entries;
          m.put(DataFileColumnFamily.NAME, new Text(filename), new Value(value.getBytes(UTF_8)));
          if (update) {
            writer.getBatchWriter(MetadataTable.NAME).addMutation(m);
          }
File
AddFilesWithMissingEntries.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    });
    String path = "/accumulo/instances/" + inst.getInstanceName();
    orig.recursiveDelete(path, NodeMissingPolicy.SKIP);
<<<<<<< HEAD
    new_.putPersistentData(path, newInstanceId.getBytes(StandardCharsets.UTF_8), NodeExistsPolicy.OVERWRITE);
=======
    new_.putPersistentData(path, newInstanceId.getBytes(UTF_8), NodeExistsPolicy.OVERWRITE);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    return newInstanceId;
  }
  
Solution content
    });
    String path = "/accumulo/instances/" + inst.getInstanceName();
    orig.recursiveDelete(path, NodeMissingPolicy.SKIP);
    new_.putPersistentData(path, newInstanceId.getBytes(UTF_8), NodeExistsPolicy.OVERWRITE);
    return newInstanceId;
  }
  
File
ChangeSecret.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    String root = Constants.ZROOT;
    IZooReaderWriter zk = ZooReaderWriter.getInstance();
    if (opts.auth != null) {
<<<<<<< HEAD
      zk.getZooKeeper().addAuthInfo("digest", ("accumulo:"+opts.auth).getBytes(StandardCharsets.UTF_8));
=======
      zk.getZooKeeper().addAuthInfo("digest", ("accumulo:"+opts.auth).getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    }
    
    try {
Solution content
    String root = Constants.ZROOT;
    IZooReaderWriter zk = ZooReaderWriter.getInstance();
    if (opts.auth != null) {
      zk.getZooKeeper().addAuthInfo("digest", ("accumulo:"+opts.auth).getBytes(UTF_8));
    }
    
    try {
File
CleanZookeeper.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
          for (String instanceName : zk.getChildren(root + Constants.ZINSTANCES)) {
            String instanceNamePath = root + Constants.ZINSTANCES + "/" + instanceName;
            byte[] id = zk.getData(instanceNamePath, null);
<<<<<<< HEAD
            if (id != null && !new String(id, StandardCharsets.UTF_8).equals(HdfsZooInstance.getInstance().getInstanceID())) {
=======
            if (id != null && !new String(id, UTF_8).equals(HdfsZooInstance.getInstance().getInstanceID())) {
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
              try {
                zk.recursiveDelete(instanceNamePath, NodeMissingPolicy.SKIP);
              } catch (KeeperException.NoAuthException ex) {
Solution content
          for (String instanceName : zk.getChildren(root + Constants.ZINSTANCES)) {
            String instanceNamePath = root + Constants.ZINSTANCES + "/" + instanceName;
            byte[] id = zk.getData(instanceNamePath, null);
            if (id != null && !new String(id, UTF_8).equals(HdfsZooInstance.getInstance().getInstanceID())) {
              try {
                zk.recursiveDelete(instanceNamePath, NodeMissingPolicy.SKIP);
              } catch (KeeperException.NoAuthException ex) {
File
CleanZookeeper.java
Developer's decision
Version 2
Kind of conflict
If statement
Chunk
Conflicting content
 */
package org.apache.accumulo.server.util;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.HashSet;
import java.util.Set;
Solution content
 */
package org.apache.accumulo.server.util;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.HashSet;
import java.util.Set;
File
DeleteZooInstance.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
      String path = Constants.ZROOT + Constants.ZINSTANCES + "/" + opts.instance;
      byte[] data = zk.getData(path, null);
      deleteRetry(zk, path);
<<<<<<< HEAD
      deleteRetry(zk, Constants.ZROOT + "/" + new String(data, StandardCharsets.UTF_8));
=======
      deleteRetry(zk, Constants.ZROOT + "/" + new String(data, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    } else if (uuids.contains(opts.instance)) {
      // look for the real instance name
      for (String instance : instances) {
Solution content
      String path = Constants.ZROOT + Constants.ZINSTANCES + "/" + opts.instance;
      byte[] data = zk.getData(path, null);
      deleteRetry(zk, path);
      deleteRetry(zk, Constants.ZROOT + "/" + new String(data, UTF_8));
    } else if (uuids.contains(opts.instance)) {
      // look for the real instance name
      for (String instance : instances) {
File
DeleteZooInstance.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
      for (String instance : instances) {
        String path = Constants.ZROOT + Constants.ZINSTANCES + "/" + instance;
        byte[] data = zk.getData(path, null);
<<<<<<< HEAD
        if (opts.instance.equals(new String(data, StandardCharsets.UTF_8)))
=======
        if (opts.instance.equals(new String(data, UTF_8)))
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          deleteRetry(zk, path);
      }
      deleteRetry(zk, Constants.ZROOT + "/" + opts.instance);
Solution content
      for (String instance : instances) {
        String path = Constants.ZROOT + Constants.ZINSTANCES + "/" + instance;
        byte[] data = zk.getData(path, null);
        if (opts.instance.equals(new String(data, UTF_8)))
          deleteRetry(zk, path);
      }
      deleteRetry(zk, Constants.ZROOT + "/" + opts.instance);
File
DeleteZooInstance.java
Developer's decision
Version 2
Kind of conflict
If statement
Chunk
Conflicting content
      if (data[i] < ' ' || data[i] > '~')
        return new Encoded("base64", Base64.encodeBase64String(data));
    }
<<<<<<< HEAD
    return new Encoded(StandardCharsets.UTF_8.name(), new String(data, StandardCharsets.UTF_8));
=======
    return new Encoded(UTF_8.name(), new String(data, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }
  
  private static void write(PrintStream out, int indent, String fmt, Object... args) {
Solution content
      if (data[i] < ' ' || data[i] > '~')
        return new Encoded("base64", Base64.encodeBase64String(data));
    }
    return new Encoded(UTF_8.name(), new String(data, UTF_8));
  }
  
  private static void write(PrintStream out, int indent, String fmt, Object... args) {
File
DumpZookeeper.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
 */
package org.apache.accumulo.server.util;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Formattable;
import java.util.Formatter;
import java.util.List;
Solution content
 */
package org.apache.accumulo.server.util;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Formattable;
import java.util.Formatter;
import java.util.List;
File
ListInstances.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
      if (master == null) {
        return null;
      }
<<<<<<< HEAD
      return new String(master, StandardCharsets.UTF_8);
=======
      return new String(master, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    } catch (Exception e) {
      handleException(e, printErrors);
      return null;
Solution content
      if (master == null) {
        return null;
      }
      return new String(master, UTF_8);
    } catch (Exception e) {
      handleException(e, printErrors);
      return null;
File
ListInstances.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
    for (String name : names) {
      String instanceNamePath = Constants.ZROOT + Constants.ZINSTANCES + "/" + name;
      try {
<<<<<<< HEAD
        UUID iid = UUID.fromString(new String(zk.getData(instanceNamePath, null), StandardCharsets.UTF_8));
=======
        UUID iid = UUID.fromString(new String(zk.getData(instanceNamePath, null), UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        tm.put(name, iid);
      } catch (Exception e) {
        handleException(e, printErrors);
Solution content
    for (String name : names) {
      String instanceNamePath = Constants.ZROOT + Constants.ZINSTANCES + "/" + name;
      try {
        UUID iid = UUID.fromString(new String(zk.getData(instanceNamePath, null), UTF_8));
        tm.put(name, iid);
      } catch (Exception e) {
        handleException(e, printErrors);
File
ListInstances.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
  private static void putLockID(ZooLock zooLock, Mutation m) {
    TabletsSection.ServerColumnFamily.LOCK_COLUMN.put(m, new Value(zooLock.getLockID().serialize(ZooUtil.getRoot(HdfsZooInstance.getInstance()) + "/")
<<<<<<< HEAD
        .getBytes(StandardCharsets.UTF_8)));
=======
        .getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }

  private static void update(Credentials credentials, Mutation m, KeyExtent extent) {
Solution content
  private static void putLockID(ZooLock zooLock, Mutation m) {
    TabletsSection.ServerColumnFamily.LOCK_COLUMN.put(m, new Value(zooLock.getLockID().serialize(ZooUtil.getRoot(HdfsZooInstance.getInstance()) + "/")
        .getBytes(UTF_8)));
  }

  private static void update(Credentials credentials, Mutation m, KeyExtent extent) {
File
MetadataTableUtil.java
Developer's decision
Version 2
Kind of conflict
Other
Chunk
Conflicting content
  public static void updateTabletFlushID(KeyExtent extent, long flushID, Credentials credentials, ZooLock zooLock) {
    if (!extent.isRootTablet()) {
      Mutation m = new Mutation(extent.getMetadataEntry());
<<<<<<< HEAD
      TabletsSection.ServerColumnFamily.FLUSH_COLUMN.put(m, new Value((flushID + "").getBytes(StandardCharsets.UTF_8)));
=======
      TabletsSection.ServerColumnFamily.FLUSH_COLUMN.put(m, new Value((flushID + "").getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      update(credentials, zooLock, m, extent);
    }
  }
Solution content
  public static void updateTabletFlushID(KeyExtent extent, long flushID, Credentials credentials, ZooLock zooLock) {
    if (!extent.isRootTablet()) {
      Mutation m = new Mutation(extent.getMetadataEntry());
      TabletsSection.ServerColumnFamily.FLUSH_COLUMN.put(m, new Value((flushID + "").getBytes(UTF_8)));
      update(credentials, zooLock, m, extent);
    }
  }
File
MetadataTableUtil.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  public static void updateTabletCompactID(KeyExtent extent, long compactID, Credentials credentials, ZooLock zooLock) {
    if (!extent.isRootTablet()) {
      Mutation m = new Mutation(extent.getMetadataEntry());
<<<<<<< HEAD
      TabletsSection.ServerColumnFamily.COMPACT_COLUMN.put(m, new Value((compactID + "").getBytes(StandardCharsets.UTF_8)));
=======
      TabletsSection.ServerColumnFamily.COMPACT_COLUMN.put(m, new Value((compactID + "").getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      update(credentials, zooLock, m, extent);
    }
  }
Solution content
  public static void updateTabletCompactID(KeyExtent extent, long compactID, Credentials credentials, ZooLock zooLock) {
    if (!extent.isRootTablet()) {
      Mutation m = new Mutation(extent.getMetadataEntry());
      TabletsSection.ServerColumnFamily.COMPACT_COLUMN.put(m, new Value((compactID + "").getBytes(UTF_8)));
      update(credentials, zooLock, m, extent);
    }
  }
File
MetadataTableUtil.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  public static void updateTabletDataFile(long tid, KeyExtent extent, Map estSizes, String time, Credentials credentials, ZooLock zooLock) {
    Mutation m = new Mutation(extent.getMetadataEntry());
<<<<<<< HEAD
    byte[] tidBytes = Long.toString(tid).getBytes(StandardCharsets.UTF_8);
=======
    byte[] tidBytes = Long.toString(tid).getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    for (Entry entry : estSizes.entrySet()) {
      Text file = entry.getKey().meta();
Solution content
  public static void updateTabletDataFile(long tid, KeyExtent extent, Map estSizes, String time, Credentials credentials, ZooLock zooLock) {
    Mutation m = new Mutation(extent.getMetadataEntry());
    byte[] tidBytes = Long.toString(tid).getBytes(UTF_8);

    for (Entry entry : estSizes.entrySet()) {
      Text file = entry.getKey().meta();
File
MetadataTableUtil.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
      m.put(DataFileColumnFamily.NAME, file, new Value(entry.getValue().encode()));
      m.put(TabletsSection.BulkFileColumnFamily.NAME, file, new Value(tidBytes));
    }
<<<<<<< HEAD
    TabletsSection.ServerColumnFamily.TIME_COLUMN.put(m, new Value(time.getBytes(StandardCharsets.UTF_8)));
=======
    TabletsSection.ServerColumnFamily.TIME_COLUMN.put(m, new Value(time.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    update(credentials, zooLock, m, extent);
  }
Solution content
      m.put(DataFileColumnFamily.NAME, file, new Value(entry.getValue().encode()));
      m.put(TabletsSection.BulkFileColumnFamily.NAME, file, new Value(tidBytes));
    }
    TabletsSection.ServerColumnFamily.TIME_COLUMN.put(m, new Value(time.getBytes(UTF_8)));
    update(credentials, zooLock, m, extent);
  }
File
MetadataTableUtil.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  public static void updateTabletDir(KeyExtent extent, String newDir, Credentials creds, ZooLock lock) {
    Mutation m = new Mutation(extent.getMetadataEntry());
<<<<<<< HEAD
    TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(newDir.getBytes(StandardCharsets.UTF_8)));
=======
    TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(newDir.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    update(creds, lock, m, extent);
  }
Solution content
  public static void updateTabletDir(KeyExtent extent, String newDir, Credentials creds, ZooLock lock) {
    Mutation m = new Mutation(extent.getMetadataEntry());
    TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(newDir.getBytes(UTF_8)));
    update(creds, lock, m, extent);
  }
File
MetadataTableUtil.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  public static void addTablet(KeyExtent extent, String path, Credentials credentials, char timeType, ZooLock lock) {
    Mutation m = extent.getPrevRowUpdateMutation();

<<<<<<< HEAD
    TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(path.getBytes(StandardCharsets.UTF_8)));
    TabletsSection.ServerColumnFamily.TIME_COLUMN.put(m, new Value((timeType + "0").getBytes(StandardCharsets.UTF_8)));
=======
    TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(path.getBytes(UTF_8)));
    TabletsSection.ServerColumnFamily.TIME_COLUMN.put(m, new Value((timeType + "0").getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    update(credentials, lock, m, extent);
  }
Solution content
  public static void addTablet(KeyExtent extent, String path, Credentials credentials, char timeType, ZooLock lock) {
    Mutation m = extent.getPrevRowUpdateMutation();

    TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(path.getBytes(UTF_8)));
    TabletsSection.ServerColumnFamily.TIME_COLUMN.put(m, new Value((timeType + "0").getBytes(UTF_8)));

    update(credentials, lock, m, extent);
  }
File
MetadataTableUtil.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
        m.put(DataFileColumnFamily.NAME, entry.getKey().meta(), new Value(entry.getValue().encode()));

      if (newDir != null)
<<<<<<< HEAD
        ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(newDir.getBytes(StandardCharsets.UTF_8)));
=======
        ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(newDir.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

      update(credentials, m, extent);
    }
Solution content
        m.put(DataFileColumnFamily.NAME, entry.getKey().meta(), new Value(entry.getValue().encode()));

      if (newDir != null)
        ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(newDir.getBytes(UTF_8)));

      update(credentials, m, extent);
    }
File
MetadataTableUtil.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  public static void splitTablet(KeyExtent extent, Text oldPrevEndRow, double splitRatio, Credentials credentials, ZooLock zooLock) {
    Mutation m = extent.getPrevRowUpdateMutation(); //

<<<<<<< HEAD
    TabletsSection.TabletColumnFamily.SPLIT_RATIO_COLUMN.put(m, new Value(Double.toString(splitRatio).getBytes(StandardCharsets.UTF_8)));
=======
    TabletsSection.TabletColumnFamily.SPLIT_RATIO_COLUMN.put(m, new Value(Double.toString(splitRatio).getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    TabletsSection.TabletColumnFamily.OLD_PREV_ROW_COLUMN.put(m, KeyExtent.encodePrevEndRow(oldPrevEndRow));
    ChoppedColumnFamily.CHOPPED_COLUMN.putDelete(m);
Solution content
  public static void splitTablet(KeyExtent extent, Text oldPrevEndRow, double splitRatio, Credentials credentials, ZooLock zooLock) {
    Mutation m = extent.getPrevRowUpdateMutation(); //

    TabletsSection.TabletColumnFamily.SPLIT_RATIO_COLUMN.put(m, new Value(Double.toString(splitRatio).getBytes(UTF_8)));

    TabletsSection.TabletColumnFamily.OLD_PREV_ROW_COLUMN.put(m, KeyExtent.encodePrevEndRow(oldPrevEndRow));
    ChoppedColumnFamily.CHOPPED_COLUMN.putDelete(m);
File
MetadataTableUtil.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
    String zpath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + RootTable.ZROOT_TABLET_PATH;
    try {
<<<<<<< HEAD
      zoo.putPersistentData(zpath, dir.getBytes(StandardCharsets.UTF_8), -1, NodeExistsPolicy.OVERWRITE);
=======
      zoo.putPersistentData(zpath, dir.getBytes(UTF_8), -1, NodeExistsPolicy.OVERWRITE);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    } catch (KeeperException e) {
      throw new IOException(e);
    } catch (InterruptedException e) {
Solution content
    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
    String zpath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + RootTable.ZROOT_TABLET_PATH;
    try {
      zoo.putPersistentData(zpath, dir.getBytes(UTF_8), -1, NodeExistsPolicy.OVERWRITE);
    } catch (KeeperException e) {
      throw new IOException(e);
    } catch (InterruptedException e) {
File
MetadataTableUtil.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
    String zpath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + RootTable.ZROOT_TABLET_PATH;
    try {
<<<<<<< HEAD
      return new String(zoo.getData(zpath, null), StandardCharsets.UTF_8);
=======
      return new String(zoo.getData(zpath, null), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    } catch (KeeperException e) {
      throw new IOException(e);
    } catch (InterruptedException e) {
Solution content
    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
    String zpath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + RootTable.ZROOT_TABLET_PATH;
    try {
      return new String(zoo.getData(zpath, null), UTF_8);
    } catch (KeeperException e) {
      throw new IOException(e);
    } catch (InterruptedException e) {
File
MetadataTableUtil.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
      } else {
        // write out marker that this tablet was successfully cloned
        Mutation m = new Mutation(cloneTablet.keySet().iterator().next().getRow());
<<<<<<< HEAD
        m.put(ClonedColumnFamily.NAME, new Text(""), new Value("OK".getBytes(StandardCharsets.UTF_8)));
=======
        m.put(ClonedColumnFamily.NAME, new Text(""), new Value("OK".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        bw.addMutation(m);
      }
    }
Solution content
      } else {
        // write out marker that this tablet was successfully cloned
        Mutation m = new Mutation(cloneTablet.keySet().iterator().next().getRow());
        m.put(ClonedColumnFamily.NAME, new Text(""), new Value("OK".getBytes(UTF_8)));
        bw.addMutation(m);
      }
    }
File
MetadataTableUtil.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
      m.putDelete(k.getColumnFamily(), k.getColumnQualifier());
      String dir = volumeManager.choose(ServerConstants.getBaseUris()) + Constants.HDFS_TABLES_DIR + Path.SEPARATOR + tableId
          + new String(FastFormat.toZeroPaddedString(dirCount++, 8, 16, Constants.CLONE_PREFIX_BYTES));
<<<<<<< HEAD
      TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(dir.getBytes(StandardCharsets.UTF_8)));
=======
      TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(dir.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

      bw.addMutation(m);
    }
Solution content
      m.putDelete(k.getColumnFamily(), k.getColumnQualifier());
      String dir = volumeManager.choose(ServerConstants.getBaseUris()) + Constants.HDFS_TABLES_DIR + Path.SEPARATOR + tableId
          + new String(FastFormat.toZeroPaddedString(dirCount++, 8, 16, Constants.CLONE_PREFIX_BYTES));
      TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(dir.getBytes(UTF_8)));

      bw.addMutation(m);
    }
File
MetadataTableUtil.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  public static void chopped(KeyExtent extent, ZooLock zooLock) {
    Mutation m = new Mutation(extent.getMetadataEntry());
<<<<<<< HEAD
    ChoppedColumnFamily.CHOPPED_COLUMN.put(m, new Value("chopped".getBytes(StandardCharsets.UTF_8)));
=======
    ChoppedColumnFamily.CHOPPED_COLUMN.put(m, new Value("chopped".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    update(SystemCredentials.get(), zooLock, m, extent);
  }
Solution content
  public static void chopped(KeyExtent extent, ZooLock zooLock) {
    Mutation m = new Mutation(extent.getMetadataEntry());
    ChoppedColumnFamily.CHOPPED_COLUMN.put(m, new Value("chopped".getBytes(UTF_8)));
    update(SystemCredentials.get(), zooLock, m, extent);
  }
File
MetadataTableUtil.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    ShellCompletor userCompletor = null;

    if (execFile != null) {
<<<<<<< HEAD:shell/src/main/java/org/apache/accumulo/shell/Shell.java
      java.util.Scanner scanner = new java.util.Scanner(execFile, StandardCharsets.UTF_8.name());
=======
      java.util.Scanner scanner = new java.util.Scanner(execFile, UTF_8.name());
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java
      try {
        while (scanner.hasNextLine() && !hasExited()) {
          execCommand(scanner.nextLine(), true, isVerbose());
Solution content
    ShellCompletor userCompletor = null;

    if (execFile != null) {
      java.util.Scanner scanner = new java.util.Scanner(execFile, UTF_8.name());
      try {
        while (scanner.hasNextLine() && !hasExited()) {
          execCommand(scanner.nextLine(), true, isVerbose());
File
Shell.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    PrintWriter writer;

    public PrintFile(String filename) throws FileNotFoundException {
<<<<<<< HEAD:shell/src/main/java/org/apache/accumulo/shell/Shell.java
      writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(filename), StandardCharsets.UTF_8)));
=======
      writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(filename), UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java
    }

    @Override
Solution content
    PrintWriter writer;

    public PrintFile(String filename) throws FileNotFoundException {
      writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(filename), UTF_8)));
    }

    @Override
File
Shell.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.server.util;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.conf.Property;
Solution content
 */
package org.apache.accumulo.server.util;

import static java.nio.charset.StandardCharsets.UTF_8;

import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.conf.Property;
File
NamespacePropUtil.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    // create the zk node for this property and set it's data to the specified value
    String zPath = zkNamespacePath + "/" + property;
<<<<<<< HEAD
    ZooReaderWriter.getInstance().putPersistentData(zPath, value.getBytes(StandardCharsets.UTF_8), NodeExistsPolicy.OVERWRITE);
=======
    ZooReaderWriter.getInstance().putPersistentData(zPath, value.getBytes(UTF_8), NodeExistsPolicy.OVERWRITE);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    return true;
  }
Solution content
    // create the zk node for this property and set it's data to the specified value
    String zPath = zkNamespacePath + "/" + property;
    ZooReaderWriter.getInstance().putPersistentData(zPath, value.getBytes(UTF_8), NodeExistsPolicy.OVERWRITE);

    return true;
  }
File
NamespacePropUtil.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.server.util;

<<<<<<< HEAD
import static org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN;
=======
import static com.google.common.base.Charsets.UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

import java.io.IOException;
import java.nio.charset.StandardCharsets;
Solution content
 */
package org.apache.accumulo.server.util;

import static java.nio.charset.StandardCharsets.UTF_8;
import static org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN;

import java.io.IOException;
File
RandomizeVolumes.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
import java.nio.charset.StandardCharsets;
import java.util.Map.Entry;

<<<<<<< HEAD
=======
import org.apache.accumulo.server.security.SystemCredentials;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import org.apache.accumulo.core.cli.ClientOnRequiredTable;
import org.apache.accumulo.core.client.AccumuloException;
import org.apache.accumulo.core.client.AccumuloSecurityException;
Solution content
import java.util.Map.Entry;

import org.apache.accumulo.core.cli.ClientOnRequiredTable;
import org.apache.accumulo.core.client.AccumuloException;
import org.apache.accumulo.core.client.AccumuloSecurityException;
File
RandomizeVolumes.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
      }
      Key key = entry.getKey();
      Mutation m = new Mutation(key.getRow());
<<<<<<< HEAD

      String newLocation = vm.choose(ServerConstants.getBaseUris()) + Path.SEPARATOR + ServerConstants.TABLE_DIR + Path.SEPARATOR + tableId + Path.SEPARATOR
          + directory;
      m.put(key.getColumnFamily(), key.getColumnQualifier(), new Value(newLocation.getBytes(StandardCharsets.UTF_8)));
=======
      
      String newLocation = vm.choose(ServerConstants.getBaseUris()) + Path.SEPARATOR + ServerConstants.TABLE_DIR + Path.SEPARATOR + tableId + Path.SEPARATOR + directory;
      m.put(key.getColumnFamily(), key.getColumnQualifier(), new Value(newLocation.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      if (log.isTraceEnabled()) {
        log.trace("Replacing " + oldLocation + " with " + newLocation);
      }
Solution content
      }
      Key key = entry.getKey();
      Mutation m = new Mutation(key.getRow());

      String newLocation = vm.choose(ServerConstants.getBaseUris()) + Path.SEPARATOR + ServerConstants.TABLE_DIR + Path.SEPARATOR + tableId + Path.SEPARATOR
          + directory;
      m.put(key.getColumnFamily(), key.getColumnQualifier(), new Value(newLocation.getBytes(UTF_8)));
      if (log.isTraceEnabled()) {
        log.trace("Replacing " + oldLocation + " with " + newLocation);
      }
File
RandomizeVolumes.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
          cwd.push("");
        else
          cwd.push(root);
<<<<<<< HEAD
        create(root, "", StandardCharsets.UTF_8.name());
=======
        create(root, "", UTF_8.name());
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      }
    }
    
Solution content
          cwd.push("");
        else
          cwd.push(root);
        create(root, "", UTF_8.name());
      }
    }
    
File
RestoreZookeeper.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    
    // assume UTF-8 if not "base64"
    private void create(String path, String value, String encoding) {
<<<<<<< HEAD
      byte[] data = value.getBytes(StandardCharsets.UTF_8);
=======
      byte[] data = value.getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      if ("base64".equals(encoding))
        data = Base64.decodeBase64(data);
      try {
Solution content
    
    // assume UTF-8 if not "base64"
    private void create(String path, String value, String encoding) {
      byte[] data = value.getBytes(UTF_8);
      if ("base64".equals(encoding))
        data = Base64.decodeBase64(data);
      try {
File
RestoreZookeeper.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
        // Parse the server type and name from the log file name
        String threadName = log.getName().substring(0, log.getName().indexOf("."));
        try {
<<<<<<< HEAD
          isReader = new InputStreamReader(new FileInputStream(log), StandardCharsets.UTF_8);
=======
          isReader = new InputStreamReader(new FileInputStream(log), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        } catch (FileNotFoundException e) {
          System.out.println("Unable to find file: " + log.getAbsolutePath());
          throw e;
Solution content
        // Parse the server type and name from the log file name
        String threadName = log.getName().substring(0, log.getName().indexOf("."));
        try {
          isReader = new InputStreamReader(new FileInputStream(log), UTF_8);
        } catch (FileNotFoundException e) {
          System.out.println("Unable to find file: " + log.getAbsolutePath());
          throw e;
File
SendLogToChainsaw.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
            out = convertLine(line, threadName);
            if (null != out) {
              if (socket != null && socket.isConnected())
<<<<<<< HEAD
                socket.getOutputStream().write(out.getBytes(StandardCharsets.UTF_8));
=======
                socket.getOutputStream().write(out.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
              else
                System.err.println("Unable to send data to transport");
            }
Solution content
            out = convertLine(line, threadName);
            if (null != out) {
              if (socket != null && socket.isConnected())
                socket.getOutputStream().write(out.getBytes(UTF_8));
              else
                System.err.println("Unable to send data to transport");
            }
File
SendLogToChainsaw.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
          return null;
      }
      // URL encode the message
<<<<<<< HEAD
      message = URLEncoder.encode(message, StandardCharsets.UTF_8.name());
=======
      message = URLEncoder.encode(message, UTF_8.name());
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      // Assume that we are processing logs from today.
      // If the date in the line is greater than today, then it must be
      // from the previous month.
Solution content
          return null;
      }
      // URL encode the message
      message = URLEncoder.encode(message, UTF_8.name());
      // Assume that we are processing logs from today.
      // If the date in the line is greater than today, then it must be
      // from the previous month.
File
SendLogToChainsaw.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.server.util;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.conf.Property;
Solution content
 */
package org.apache.accumulo.server.util;

import static java.nio.charset.StandardCharsets.UTF_8;

import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.conf.Property;
File
SystemPropUtil.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    
    // create the zk node for this property and set it's data to the specified value
    String zPath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZCONFIG + "/" + property;
<<<<<<< HEAD
    ZooReaderWriter.getInstance().putPersistentData(zPath, value.getBytes(StandardCharsets.UTF_8), NodeExistsPolicy.OVERWRITE);
=======
    ZooReaderWriter.getInstance().putPersistentData(zPath, value.getBytes(UTF_8), NodeExistsPolicy.OVERWRITE);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    
    return true;
  }
Solution content
    
    // create the zk node for this property and set it's data to the specified value
    String zPath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZCONFIG + "/" + property;
    ZooReaderWriter.getInstance().putPersistentData(zPath, value.getBytes(UTF_8), NodeExistsPolicy.OVERWRITE);
    
    return true;
  }
File
SystemPropUtil.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.server.util;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.conf.Property;
Solution content
 */
package org.apache.accumulo.server.util;

import static java.nio.charset.StandardCharsets.UTF_8;

import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.conf.Property;
File
TablePropUtil.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    
    // create the zk node for this property and set it's data to the specified value
    String zPath = zkTablePath + "/" + property;
<<<<<<< HEAD
    ZooReaderWriter.getInstance().putPersistentData(zPath, value.getBytes(StandardCharsets.UTF_8), NodeExistsPolicy.OVERWRITE);
=======
    ZooReaderWriter.getInstance().putPersistentData(zPath, value.getBytes(UTF_8), NodeExistsPolicy.OVERWRITE);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    
    return true;
  }
Solution content
    
    // create the zk node for this property and set it's data to the specified value
    String zPath = zkTablePath + "/" + property;
    ZooReaderWriter.getInstance().putPersistentData(zPath, value.getBytes(UTF_8), NodeExistsPolicy.OVERWRITE);
    
    return true;
  }
File
TablePropUtil.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.server.util;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.List;

import org.apache.accumulo.core.Constants;
Solution content
 */
package org.apache.accumulo.server.util;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.List;

import org.apache.accumulo.core.Constants;
File
TabletServerLocks.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
        byte[] lockData = ZooLock.getLockData(cache, tserverPath + "/" + tabletServer, null);
        String holder = null;
        if (lockData != null) {
<<<<<<< HEAD
          holder = new String(lockData, StandardCharsets.UTF_8);
=======
          holder = new String(lockData, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        }
        
        System.out.printf("%32s %16s%n", tabletServer, holder);
Solution content
        byte[] lockData = ZooLock.getLockData(cache, tserverPath + "/" + tabletServer, null);
        String holder = null;
        if (lockData != null) {
          holder = new String(lockData, UTF_8);
        }
        
        System.out.printf("%32s %16s%n", tabletServer, holder);
File
TabletServerLocks.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.server.watcher;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.zookeeper.ZooUtil;
Solution content
 */
package org.apache.accumulo.server.watcher;

import static java.nio.charset.StandardCharsets.UTF_8;

import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.zookeeper.ZooUtil;
File
MonitorLog4jWatcher.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
   */
  protected void updateMonitorLog4jLocation() {
    try {
<<<<<<< HEAD
      String hostPortString = new String(ZooReaderWriter.getInstance().getData(path, null), StandardCharsets.UTF_8);
=======
      String hostPortString = new String(ZooReaderWriter.getInstance().getData(path, null), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      HostAndPort hostAndPort = HostAndPort.fromString(hostPortString);

      System.setProperty(HOST_PROPERTY_NAME, hostAndPort.getHostText());
Solution content
   */
  protected void updateMonitorLog4jLocation() {
    try {
      String hostPortString = new String(ZooReaderWriter.getInstance().getData(path, null), UTF_8);
      HostAndPort hostAndPort = HostAndPort.fromString(hostPortString);

      System.setProperty(HOST_PROPERTY_NAME, hostAndPort.getHostText());
File
MonitorLog4jWatcher.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.server.zookeeper;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;
Solution content
 */
package org.apache.accumulo.server.zookeeper;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;
File
ZooQueueLock.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
  public static void main(String args[]) throws InterruptedException, KeeperException {
    ZooQueueLock lock = new ZooQueueLock("/lock", true);
<<<<<<< HEAD
    DistributedReadWriteLock rlocker = new DistributedReadWriteLock(lock, "reader".getBytes(StandardCharsets.UTF_8));
    DistributedReadWriteLock wlocker = new DistributedReadWriteLock(lock, "wlocker".getBytes(StandardCharsets.UTF_8));
=======
    DistributedReadWriteLock rlocker = new DistributedReadWriteLock(lock, "reader".getBytes(UTF_8));
    DistributedReadWriteLock wlocker = new DistributedReadWriteLock(lock, "wlocker".getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    final Lock readLock = rlocker.readLock();
    readLock.lock();
    final Lock readLock2 = rlocker.readLock();
Solution content
  public static void main(String args[]) throws InterruptedException, KeeperException {
    ZooQueueLock lock = new ZooQueueLock("/lock", true);
    DistributedReadWriteLock rlocker = new DistributedReadWriteLock(lock, "reader".getBytes(UTF_8));
    DistributedReadWriteLock wlocker = new DistributedReadWriteLock(lock, "wlocker".getBytes(UTF_8));
    final Lock readLock = rlocker.readLock();
    readLock.lock();
    final Lock readLock2 = rlocker.readLock();
File
ZooQueueLock.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    writeLock.lock();
    if (readLock.tryLock(100, TimeUnit.MILLISECONDS))
      throw new RuntimeException("Read lock achieved during write lock!");
<<<<<<< HEAD
    final Lock writeLock2 = DistributedReadWriteLock.recoverLock(lock, "wlocker".getBytes(StandardCharsets.UTF_8));
=======
    final Lock writeLock2 = DistributedReadWriteLock.recoverLock(lock, "wlocker".getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    writeLock2.unlock();
    readLock.lock();
    System.out.println("success");
Solution content
    writeLock.lock();
    if (readLock.tryLock(100, TimeUnit.MILLISECONDS))
      throw new RuntimeException("Read lock achieved during write lock!");
    final Lock writeLock2 = DistributedReadWriteLock.recoverLock(lock, "wlocker".getBytes(UTF_8));
    writeLock2.unlock();
    readLock.lock();
    System.out.println("success");
File
ZooQueueLock.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.server.zookeeper;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

import org.apache.accumulo.core.conf.AccumuloConfiguration;
import org.apache.accumulo.core.conf.Property;
Solution content
 */
package org.apache.accumulo.server.zookeeper;

import static java.nio.charset.StandardCharsets.UTF_8;

import org.apache.accumulo.core.conf.AccumuloConfiguration;
import org.apache.accumulo.core.conf.Property;
File
ZooReaderWriter.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
  private static ZooReaderWriter instance = null;
  
  public ZooReaderWriter(String string, int timeInMillis, String secret) {
<<<<<<< HEAD
    super(string, timeInMillis, SCHEME, (USER + ":" + secret).getBytes(StandardCharsets.UTF_8));
=======
    super(string, timeInMillis, SCHEME, (USER + ":" + secret).getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }
  
  public static synchronized ZooReaderWriter getInstance() {
Solution content
  private static ZooReaderWriter instance = null;
  
  public ZooReaderWriter(String string, int timeInMillis, String secret) {
    super(string, timeInMillis, SCHEME, (USER + ":" + secret).getBytes(UTF_8));
  }
  
  public static synchronized ZooReaderWriter getInstance() {
File
ZooReaderWriter.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.server.zookeeper;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

import org.apache.accumulo.core.conf.AccumuloConfiguration;
import org.apache.accumulo.core.conf.Property;
Solution content
 */
package org.apache.accumulo.server.zookeeper;

import static java.nio.charset.StandardCharsets.UTF_8;

import org.apache.accumulo.core.conf.AccumuloConfiguration;
import org.apache.accumulo.core.conf.Property;
File
ZooReaderWriterFactory.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
   * @return reader/writer
   */
  public IZooReaderWriter getZooReaderWriter(String string, int timeInMillis, String secret) {
<<<<<<< HEAD
    return new ZooReaderWriter(string, timeInMillis, SCHEME, (USER + ":" + secret).getBytes(StandardCharsets.UTF_8));
=======
    return new ZooReaderWriter(string, timeInMillis, SCHEME, (USER + ":" + secret).getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }

  /**
Solution content
   * @return reader/writer
   */
  public IZooReaderWriter getZooReaderWriter(String string, int timeInMillis, String secret) {
    return new ZooReaderWriter(string, timeInMillis, SCHEME, (USER + ":" + secret).getBytes(UTF_8));
  }

  /**
File
ZooReaderWriterFactory.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
 */
package org.apache.accumulo.server.conf;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Collection;
import java.util.List;
import java.util.Map;
Solution content
 */
package org.apache.accumulo.server.conf;

import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.easymock.EasyMock.anyObject;
import static org.easymock.EasyMock.createMock;
import static org.easymock.EasyMock.eq;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.expectLastCall;
import static org.easymock.EasyMock.replay;
import static org.easymock.EasyMock.verify;

import java.util.Collection;
import java.util.List;
import java.util.Map;
File
NamespaceConfigurationTest.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
  public void testGet_InZK() {
    Property p = Property.INSTANCE_SECRET;
    expect(zc.get(ZooUtil.getRoot(iid) + Constants.ZNAMESPACES + "/" + NSID + Constants.ZNAMESPACE_CONF + "/" + p.getKey())).andReturn(
<<<<<<< HEAD
        "sekrit".getBytes(StandardCharsets.UTF_8));
=======
        "sekrit".getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    replay(zc);
    assertEquals("sekrit", c.get(Property.INSTANCE_SECRET));
  }
Solution content
  public void testGet_InZK() {
    Property p = Property.INSTANCE_SECRET;
    expect(zc.get(ZooUtil.getRoot(iid) + Constants.ZNAMESPACES + "/" + NSID + Constants.ZNAMESPACE_CONF + "/" + p.getKey())).andReturn(
        "sekrit".getBytes(UTF_8));
    replay(zc);
    assertEquals("sekrit", c.get(Property.INSTANCE_SECRET));
  }
File
NamespaceConfigurationTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    children.add("ding");
    expect(zc.getChildren(ZooUtil.getRoot(iid) + Constants.ZNAMESPACES + "/" + NSID + Constants.ZNAMESPACE_CONF)).andReturn(children);
    expect(zc.get(ZooUtil.getRoot(iid) + Constants.ZNAMESPACES + "/" + NSID + Constants.ZNAMESPACE_CONF + "/" + "foo")).andReturn(
<<<<<<< HEAD
        "bar".getBytes(StandardCharsets.UTF_8));
    expect(zc.get(ZooUtil.getRoot(iid) + Constants.ZNAMESPACES + "/" + NSID + Constants.ZNAMESPACE_CONF + "/" + "ding")).andReturn(
        "dong".getBytes(StandardCharsets.UTF_8));
=======
        "bar".getBytes(UTF_8));
    expect(zc.get(ZooUtil.getRoot(iid) + Constants.ZNAMESPACES + "/" + NSID + Constants.ZNAMESPACE_CONF + "/" + "ding")).andReturn(
        "dong".getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    replay(zc);
    c.getProperties(props, filter);
    assertEquals(2, props.size());
Solution content
    children.add("ding");
    expect(zc.getChildren(ZooUtil.getRoot(iid) + Constants.ZNAMESPACES + "/" + NSID + Constants.ZNAMESPACE_CONF)).andReturn(children);
    expect(zc.get(ZooUtil.getRoot(iid) + Constants.ZNAMESPACES + "/" + NSID + Constants.ZNAMESPACE_CONF + "/" + "foo")).andReturn(
        "bar".getBytes(UTF_8));
    expect(zc.get(ZooUtil.getRoot(iid) + Constants.ZNAMESPACES + "/" + NSID + Constants.ZNAMESPACE_CONF + "/" + "ding")).andReturn(
        "dong".getBytes(UTF_8));
    replay(zc);
    c.getProperties(props, filter);
    assertEquals(2, props.size());
File
NamespaceConfigurationTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    // need to do a get so the accessor is created
    Property p = Property.INSTANCE_SECRET;
    expect(zc.get(ZooUtil.getRoot(iid) + Constants.ZNAMESPACES + "/" + NSID + Constants.ZNAMESPACE_CONF + "/" + p.getKey())).andReturn(
<<<<<<< HEAD
        "sekrit".getBytes(StandardCharsets.UTF_8));
=======
        "sekrit".getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    zc.clear();
    replay(zc);
    c.get(Property.INSTANCE_SECRET);
Solution content
    // need to do a get so the accessor is created
    Property p = Property.INSTANCE_SECRET;
    expect(zc.get(ZooUtil.getRoot(iid) + Constants.ZNAMESPACES + "/" + NSID + Constants.ZNAMESPACE_CONF + "/" + p.getKey())).andReturn(
        "sekrit".getBytes(UTF_8));
    zc.clear();
    replay(zc);
    c.get(Property.INSTANCE_SECRET);
File
NamespaceConfigurationTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;

=======
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import org.apache.accumulo.core.client.Instance;
import org.apache.accumulo.core.conf.AccumuloConfiguration;
import org.apache.accumulo.core.conf.DefaultConfiguration;
Solution content
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;

import org.apache.accumulo.core.client.Instance;
import org.apache.accumulo.core.conf.AccumuloConfiguration;
import org.apache.accumulo.core.conf.DefaultConfiguration;
File
ServerConfigurationFactoryTest.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
    expect(zc.getChildren(anyObject(String.class))).andReturn(null);
    expectLastCall().anyTimes();
    // ConfigSanityCheck looks at timeout
<<<<<<< HEAD
    expect(zc.get(endsWith("timeout"))).andReturn(("" + ZK_TIMEOUT + "ms").getBytes(StandardCharsets.UTF_8));
=======
    expect(zc.get(endsWith("timeout"))).andReturn(("" + ZK_TIMEOUT + "ms").getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    replay(zc);
  }
Solution content
    expect(zc.getChildren(anyObject(String.class))).andReturn(null);
    expectLastCall().anyTimes();
    // ConfigSanityCheck looks at timeout
    expect(zc.get(endsWith("timeout"))).andReturn(("" + ZK_TIMEOUT + "ms").getBytes(UTF_8));
    replay(zc);
  }
File
ServerConfigurationFactoryTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  @Test
  public void testGet_InZK() {
    Property p = Property.INSTANCE_SECRET;
<<<<<<< HEAD
    expect(zc.get(ZooUtil.getRoot(iid) + Constants.ZTABLES + "/" + TID + Constants.ZTABLE_CONF + "/" + p.getKey())).andReturn(
        "sekrit".getBytes(StandardCharsets.UTF_8));
=======
    expect(zc.get(ZooUtil.getRoot(iid) + Constants.ZTABLES + "/" + TID + Constants.ZTABLE_CONF + "/" + p.getKey()))
        .andReturn("sekrit".getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    replay(zc);
    assertEquals("sekrit", c.get(Property.INSTANCE_SECRET));
  }
Solution content
  @Test
  public void testGet_InZK() {
    Property p = Property.INSTANCE_SECRET;
    expect(zc.get(ZooUtil.getRoot(iid) + Constants.ZTABLES + "/" + TID + Constants.ZTABLE_CONF + "/" + p.getKey())).andReturn(
        "sekrit".getBytes(UTF_8));
    replay(zc);
    assertEquals("sekrit", c.get(Property.INSTANCE_SECRET));
  }
File
TableConfigurationTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    children.add("foo");
    children.add("ding");
    expect(zc.getChildren(ZooUtil.getRoot(iid) + Constants.ZTABLES + "/" + TID + Constants.ZTABLE_CONF)).andReturn(children);
<<<<<<< HEAD
    expect(zc.get(ZooUtil.getRoot(iid) + Constants.ZTABLES + "/" + TID + Constants.ZTABLE_CONF + "/" + "foo"))
        .andReturn("bar".getBytes(StandardCharsets.UTF_8));
    expect(zc.get(ZooUtil.getRoot(iid) + Constants.ZTABLES + "/" + TID + Constants.ZTABLE_CONF + "/" + "ding")).andReturn(
        "dong".getBytes(StandardCharsets.UTF_8));
=======
    expect(zc.get(ZooUtil.getRoot(iid) + Constants.ZTABLES + "/" + TID + Constants.ZTABLE_CONF + "/" + "foo")).andReturn("bar".getBytes(UTF_8));
    expect(zc.get(ZooUtil.getRoot(iid) + Constants.ZTABLES + "/" + TID + Constants.ZTABLE_CONF + "/" + "ding")).andReturn("dong".getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    replay(zc);
    c.getProperties(props, filter);
    assertEquals(2, props.size());
Solution content
    children.add("foo");
    children.add("ding");
    expect(zc.getChildren(ZooUtil.getRoot(iid) + Constants.ZTABLES + "/" + TID + Constants.ZTABLE_CONF)).andReturn(children);
    expect(zc.get(ZooUtil.getRoot(iid) + Constants.ZTABLES + "/" + TID + Constants.ZTABLE_CONF + "/" + "foo"))
        .andReturn("bar".getBytes(UTF_8));
    expect(zc.get(ZooUtil.getRoot(iid) + Constants.ZTABLES + "/" + TID + Constants.ZTABLE_CONF + "/" + "ding")).andReturn(
        "dong".getBytes(UTF_8));
    replay(zc);
    c.getProperties(props, filter);
    assertEquals(2, props.size());
File
TableConfigurationTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  public void testInvalidateCache() {
    // need to do a get so the accessor is created
    Property p = Property.INSTANCE_SECRET;
<<<<<<< HEAD
    expect(zc.get(ZooUtil.getRoot(iid) + Constants.ZTABLES + "/" + TID + Constants.ZTABLE_CONF + "/" + p.getKey())).andReturn(
        "sekrit".getBytes(StandardCharsets.UTF_8));
=======
    expect(zc.get(ZooUtil.getRoot(iid) + Constants.ZTABLES + "/" + TID + Constants.ZTABLE_CONF + "/" + p.getKey()))
        .andReturn("sekrit".getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    zc.clear();
    replay(zc);
    c.get(Property.INSTANCE_SECRET);
Solution content
  public void testInvalidateCache() {
    // need to do a get so the accessor is created
    Property p = Property.INSTANCE_SECRET;
    expect(zc.get(ZooUtil.getRoot(iid) + Constants.ZTABLES + "/" + TID + Constants.ZTABLE_CONF + "/" + p.getKey())).andReturn(
        "sekrit".getBytes(UTF_8));
    zc.clear();
    replay(zc);
    c.get(Property.INSTANCE_SECRET);
File
TableConfigurationTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
<<<<<<< HEAD
  private static final String KEY = PROP.getKey();
  private static final String FULL_PATH = PATH + "/" + KEY;
  private static final String VALUE = "value";
  private static final byte[] VALUE_BYTES = VALUE.getBytes(StandardCharsets.UTF_8);
=======
  private static final byte[] VALUE_BYTES = VALUE.getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

  private ZooCache zc;
  private ZooCachePropertyAccessor a;
Solution content
  private static final String KEY = PROP.getKey();
  private static final String FULL_PATH = PATH + "/" + KEY;
  private static final String VALUE = "value";
  private static final byte[] VALUE_BYTES = VALUE.getBytes(UTF_8);

  private ZooCache zc;
  private ZooCachePropertyAccessor a;
File
ZooCachePropertyAccessorTest.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
        for (String tableId : zoo.getChildren(tables)) {
          String targetNamespace = (MetadataTable.ID.equals(tableId) || RootTable.ID.equals(tableId)) ? Namespaces.ACCUMULO_NAMESPACE_ID
              : Namespaces.DEFAULT_NAMESPACE_ID;
<<<<<<< HEAD
          log.debug("Upgrade moving table " + new String(zoo.getData(tables + "/" + tableId + Constants.ZTABLE_NAME, null), StandardCharsets.UTF_8) + " (ID: "
              + tableId + ") into namespace with ID " + targetNamespace);
          zoo.putPersistentData(tables + "/" + tableId + Constants.ZTABLE_NAMESPACE, targetNamespace.getBytes(StandardCharsets.UTF_8), NodeExistsPolicy.SKIP);
=======
          log.debug("Upgrade moving table " + new String(zoo.getData(tables + "/" + tableId + Constants.ZTABLE_NAME, null), UTF_8) + " (ID: "
              + tableId + ") into namespace with ID " + targetNamespace);
          zoo.putPersistentData(tables + "/" + tableId + Constants.ZTABLE_NAMESPACE, targetNamespace.getBytes(UTF_8), NodeExistsPolicy.SKIP);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        }

        // rename metadata table
Solution content
        for (String tableId : zoo.getChildren(tables)) {
          String targetNamespace = (MetadataTable.ID.equals(tableId) || RootTable.ID.equals(tableId)) ? Namespaces.ACCUMULO_NAMESPACE_ID
              : Namespaces.DEFAULT_NAMESPACE_ID;
          log.debug("Upgrade moving table " + new String(zoo.getData(tables + "/" + tableId + Constants.ZTABLE_NAME, null), UTF_8) + " (ID: "
              + tableId + ") into namespace with ID " + targetNamespace);
          zoo.putPersistentData(tables + "/" + tableId + Constants.ZTABLE_NAMESPACE, targetNamespace.getBytes(UTF_8), NodeExistsPolicy.SKIP);
        }

        // rename metadata table
File
Master.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
        // rename metadata table
        log.debug("Upgrade renaming table " + MetadataTable.OLD_NAME + " (ID: " + MetadataTable.ID + ") to " + MetadataTable.NAME);
<<<<<<< HEAD
        zoo.putPersistentData(tables + "/" + MetadataTable.ID + Constants.ZTABLE_NAME,
            Tables.qualify(MetadataTable.NAME).getSecond().getBytes(StandardCharsets.UTF_8), NodeExistsPolicy.OVERWRITE);
=======
        zoo.putPersistentData(tables + "/" + MetadataTable.ID + Constants.ZTABLE_NAME, Tables.qualify(MetadataTable.NAME).getSecond().getBytes(UTF_8),
            NodeExistsPolicy.OVERWRITE);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

        moveRootTabletToRootTable(zoo);
Solution content
        // rename metadata table
        log.debug("Upgrade renaming table " + MetadataTable.OLD_NAME + " (ID: " + MetadataTable.ID + ") to " + MetadataTable.NAME);
        zoo.putPersistentData(tables + "/" + MetadataTable.ID + Constants.ZTABLE_NAME,
            Tables.qualify(MetadataTable.NAME).getSecond().getBytes(UTF_8), NodeExistsPolicy.OVERWRITE);

        moveRootTabletToRootTable(zoo);
File
Master.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  private void initiateSort(String sortId, String source, final String destination, AccumuloConfiguration aconf)
    throws KeeperException, InterruptedException, IOException {
    String work = source + "|" + destination;
<<<<<<< HEAD
    new DistributedWorkQueue(ZooUtil.getRoot(master.getInstance()) + Constants.ZRECOVERY, aconf).addWork(sortId, work.getBytes(StandardCharsets.UTF_8));
=======
    new DistributedWorkQueue(ZooUtil.getRoot(master.getInstance()) + Constants.ZRECOVERY).addWork(sortId, work.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    synchronized (this) {
      sortsQueued.add(sortId);
Solution content
  private void initiateSort(String sortId, String source, final String destination, AccumuloConfiguration aconf)
    throws KeeperException, InterruptedException, IOException {
    String work = source + "|" + destination;
    new DistributedWorkQueue(ZooUtil.getRoot(master.getInstance()) + Constants.ZRECOVERY, aconf).addWork(sortId, work.getBytes(UTF_8));

    synchronized (this) {
      sortsQueued.add(sortId);
File
RecoveryManager.java
Developer's decision
Manual
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.master.state;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.conf.SiteConfiguration;
Solution content
 */
package org.apache.accumulo.master.state;

import static java.nio.charset.StandardCharsets.UTF_8;

import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.conf.SiteConfiguration;
File
SetGoalState.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    VolumeManager fs = VolumeManagerImpl.get();
    Accumulo.waitForZookeeperAndHdfs(fs);
<<<<<<< HEAD
    ZooReaderWriter.getInstance().putPersistentData(ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZMASTER_GOAL_STATE, args[0].getBytes(StandardCharsets.UTF_8),
=======
    ZooReaderWriter.getInstance().putPersistentData(ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZMASTER_GOAL_STATE, args[0].getBytes(UTF_8),
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        NodeExistsPolicy.OVERWRITE);
  }
  
Solution content
    VolumeManager fs = VolumeManagerImpl.get();
    Accumulo.waitForZookeeperAndHdfs(fs);
    ZooReaderWriter.getInstance().putPersistentData(ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZMASTER_GOAL_STATE, args[0].getBytes(UTF_8),
        NodeExistsPolicy.OVERWRITE);
  }
  
File
SetGoalState.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    HashMap loadedFailures = new HashMap();

    FSDataInputStream failFile = fs.open(new Path(error, BulkImport.FAILURES_TXT));
<<<<<<< HEAD
    BufferedReader in = new BufferedReader(new InputStreamReader(failFile, StandardCharsets.UTF_8));
=======
    BufferedReader in = new BufferedReader(new InputStreamReader(failFile, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    try {
      String line = null;
      while ((line = in.readLine()) != null) {
Solution content
    HashMap loadedFailures = new HashMap();

    FSDataInputStream failFile = fs.open(new Path(error, BulkImport.FAILURES_TXT));
    BufferedReader in = new BufferedReader(new InputStreamReader(failFile, UTF_8));
    try {
      String line = null;
      while ((line = in.readLine()) != null) {
File
BulkImport.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
        if (fs.exists(dest))
          continue;

<<<<<<< HEAD
        bifCopyQueue.addWork(orig.getName(), (failure + "," + dest).getBytes(StandardCharsets.UTF_8));
=======
        bifCopyQueue.addWork(orig.getName(), (failure + "," + dest).getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        workIds.add(orig.getName());
        log.debug("tid " + tid + " added to copyq: " + orig + " to " + dest + ": failed");
      }
Solution content
        if (fs.exists(dest))
          continue;

        bifCopyQueue.addWork(orig.getName(), (failure + "," + dest).getBytes(UTF_8));
        workIds.add(orig.getName());
        log.debug("tid " + tid + " added to copyq: " + orig + " to " + dest + ": failed");
      }
File
BulkImport.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    }

    FSDataOutputStream failFile = fs.create(new Path(errorDir, BulkImport.FAILURES_TXT), true);
<<<<<<< HEAD
    BufferedWriter out = new BufferedWriter(new OutputStreamWriter(failFile, StandardCharsets.UTF_8));
=======
    BufferedWriter out = new BufferedWriter(new OutputStreamWriter(failFile, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    try {
      for (String f : filesToLoad) {
        out.write(f);
Solution content
    }

    FSDataOutputStream failFile = fs.create(new Path(errorDir, BulkImport.FAILURES_TXT), true);
    BufferedWriter out = new BufferedWriter(new OutputStreamWriter(failFile, UTF_8));
    try {
      for (String f : filesToLoad) {
        out.write(f);
File
BulkImport.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.master.tableOps;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.client.Instance;
Solution content
 */
package org.apache.accumulo.master.tableOps;

import static java.nio.charset.StandardCharsets.UTF_8;

import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.client.Instance;
File
CancelCompactions.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    byte[] currentValue = zoo.getData(zCompactID, null);

<<<<<<< HEAD
    String cvs = new String(currentValue, StandardCharsets.UTF_8);
=======
    String cvs = new String(currentValue, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    String[] tokens = cvs.split(",");
    final long flushID = Long.parseLong(tokens[0]);
Solution content
    byte[] currentValue = zoo.getData(zCompactID, null);

    String cvs = new String(currentValue, UTF_8);
    String[] tokens = cvs.split(",");
    final long flushID = Long.parseLong(tokens[0]);
File
CancelCompactions.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    zoo.mutate(zCancelID, null, null, new Mutator() {
      @Override
      public byte[] mutate(byte[] currentValue) throws Exception {
<<<<<<< HEAD
        long cid = Long.parseLong(new String(currentValue, StandardCharsets.UTF_8));

        if (cid < flushID)
          return Long.toString(flushID).getBytes(StandardCharsets.UTF_8);
        else
          return Long.toString(cid).getBytes(StandardCharsets.UTF_8);
=======
        long cid = Long.parseLong(new String(currentValue, UTF_8));

        if (cid < flushID)
          return Long.toString(flushID).getBytes(UTF_8);
        else
          return Long.toString(cid).getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      }
    });
Solution content
    zoo.mutate(zCancelID, null, null, new Mutator() {
      @Override
      public byte[] mutate(byte[] currentValue) throws Exception {
        long cid = Long.parseLong(new String(currentValue, UTF_8));

        if (cid < flushID)
          return Long.toString(flushID).getBytes(UTF_8);
        else
          return Long.toString(cid).getBytes(UTF_8);
      }
    });
File
CancelCompactions.java
Developer's decision
Version 2
Kind of conflict
If statement
Method invocation
Variable
Chunk
Conflicting content
      cid = zoo.mutate(zTablePath, null, null, new Mutator() {
        @Override
        public byte[] mutate(byte[] currentValue) throws Exception {
<<<<<<< HEAD
          String cvs = new String(currentValue, StandardCharsets.UTF_8);
=======
          String cvs = new String(currentValue, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          String[] tokens = cvs.split(",");
          long flushID = Long.parseLong(tokens[0]);
          flushID++;
Solution content
      cid = zoo.mutate(zTablePath, null, null, new Mutator() {
        @Override
        public byte[] mutate(byte[] currentValue) throws Exception {
          String cvs = new String(currentValue, UTF_8);
          String[] tokens = cvs.split(",");
          long flushID = Long.parseLong(tokens[0]);
          flushID++;
File
CompactRange.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
            encodedIterators.append(",");
            encodedIterators.append(txidString);
            encodedIterators.append("=");
<<<<<<< HEAD
            encodedIterators.append(new String(hex.encode(iterators), StandardCharsets.UTF_8));
          }

          return (Long.toString(flushID) + encodedIterators).getBytes(StandardCharsets.UTF_8);
        }
      });

      return new CompactionDriver(Long.parseLong(new String(cid, StandardCharsets.UTF_8).split(",")[0]), tableId, startRow, endRow);
=======
            encodedIterators.append(new String(hex.encode(iterators), UTF_8));
          }

          return (Long.toString(flushID) + encodedIterators).getBytes(UTF_8);
        }
      });

      return new CompactionDriver(Long.parseLong(new String(cid, UTF_8).split(",")[0]), tableId, startRow, endRow);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    } catch (NoNodeException nne) {
      throw new ThriftTableOperationException(tableId, null, TableOperation.COMPACT, TableOperationExceptionType.NOTFOUND, null);
    }
Solution content
            encodedIterators.append(",");
            encodedIterators.append(txidString);
            encodedIterators.append("=");
            encodedIterators.append(new String(hex.encode(iterators), UTF_8));
          }

          return (Long.toString(flushID) + encodedIterators).getBytes(UTF_8);
        }
      });

      return new CompactionDriver(Long.parseLong(new String(cid, UTF_8).split(",")[0]), tableId, startRow, endRow);
    } catch (NoNodeException nne) {
      throw new ThriftTableOperationException(tableId, null, TableOperation.COMPACT, TableOperationExceptionType.NOTFOUND, null);
    }
File
CompactRange.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
    zoo.mutate(zTablePath, null, null, new Mutator() {
      @Override
      public byte[] mutate(byte[] currentValue) throws Exception {
<<<<<<< HEAD
        String cvs = new String(currentValue, StandardCharsets.UTF_8);
=======
        String cvs = new String(currentValue, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        String[] tokens = cvs.split(",");
        long flushID = Long.parseLong(tokens[0]);
Solution content
    zoo.mutate(zTablePath, null, null, new Mutator() {
      @Override
      public byte[] mutate(byte[] currentValue) throws Exception {
        String cvs = new String(currentValue, UTF_8);
        String[] tokens = cvs.split(",");
        long flushID = Long.parseLong(tokens[0]);
File
CompactRange.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
          encodedIterators.append(tokens[i]);
        }

<<<<<<< HEAD
        return (Long.toString(flushID) + encodedIterators).getBytes(StandardCharsets.UTF_8);
=======
        return (Long.toString(flushID) + encodedIterators).getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      }
    });
Solution content
          encodedIterators.append(tokens[i]);
        }

        return (Long.toString(flushID) + encodedIterators).getBytes(UTF_8);
      }
    });
File
CompactRange.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
    try {
      
      zipOut.putNextEntry(new ZipEntry(Constants.EXPORT_INFO_FILE));
<<<<<<< HEAD
      OutputStreamWriter osw = new OutputStreamWriter(dataOut, StandardCharsets.UTF_8);
=======
      OutputStreamWriter osw = new OutputStreamWriter(dataOut, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      osw.append(ExportTable.EXPORT_VERSION_PROP + ":" + ExportTable.VERSION + "\n");
      osw.append("srcInstanceName:" + conn.getInstance().getInstanceName() + "\n");
      osw.append("srcInstanceID:" + conn.getInstance().getInstanceID() + "\n");
Solution content
    try {
      
      zipOut.putNextEntry(new ZipEntry(Constants.EXPORT_INFO_FILE));
      OutputStreamWriter osw = new OutputStreamWriter(dataOut, UTF_8);
      osw.append(ExportTable.EXPORT_VERSION_PROP + ":" + ExportTable.VERSION + "\n");
      osw.append("srcInstanceName:" + conn.getInstance().getInstanceName() + "\n");
      osw.append("srcInstanceID:" + conn.getInstance().getInstanceID() + "\n");
File
ExportTable.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
  }
  
  private static void createDistcpFile(VolumeManager fs, String exportDir, Path exportMetaFilePath, Map uniqueFiles) throws IOException {
<<<<<<< HEAD
    BufferedWriter distcpOut = new BufferedWriter(new OutputStreamWriter(fs.create(new Path(exportDir, "distcp.txt"), false), StandardCharsets.UTF_8));
=======
    BufferedWriter distcpOut = new BufferedWriter(new OutputStreamWriter(fs.create(new Path(exportDir, "distcp.txt"), false), UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    
    try {
      for (String file : uniqueFiles.values()) {
Solution content
  }
  
  private static void createDistcpFile(VolumeManager fs, String exportDir, Path exportMetaFilePath, Map uniqueFiles) throws IOException {
    BufferedWriter distcpOut = new BufferedWriter(new OutputStreamWriter(fs.create(new Path(exportDir, "distcp.txt"), false), UTF_8));
    
    try {
      for (String file : uniqueFiles.values()) {
File
ExportTable.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    ServerConfigurationFactory factory = new ServerConfigurationFactory(conn.getInstance());
    TableConfiguration tableConfig = factory.getTableConfiguration(tableID);
    
<<<<<<< HEAD
    OutputStreamWriter osw = new OutputStreamWriter(dataOut, StandardCharsets.UTF_8);
=======
    OutputStreamWriter osw = new OutputStreamWriter(dataOut, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    
    // only put props that are different than defaults and higher level configurations
    zipOut.putNextEntry(new ZipEntry(Constants.EXPORT_TABLE_CONFIG_FILE));
Solution content
    ServerConfigurationFactory factory = new ServerConfigurationFactory(conn.getInstance());
    TableConfiguration tableConfig = factory.getTableConfiguration(tableID);
    
    OutputStreamWriter osw = new OutputStreamWriter(dataOut, UTF_8);
    
    // only put props that are different than defaults and higher level configurations
    zipOut.putNextEntry(new ZipEntry(Constants.EXPORT_TABLE_CONFIG_FILE));
File
ExportTable.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
  }

  static Map readMappingFile(VolumeManager fs, ImportedTableInfo tableInfo) throws Exception {
<<<<<<< HEAD
    BufferedReader in = new BufferedReader(new InputStreamReader(fs.open(new Path(tableInfo.importDir, "mappings.txt")), StandardCharsets.UTF_8));
=======
    BufferedReader in = new BufferedReader(new InputStreamReader(fs.open(new Path(tableInfo.importDir, "mappings.txt")), UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    try {
      Map map = new HashMap();
Solution content
  }

  static Map readMappingFile(VolumeManager fs, ImportedTableInfo tableInfo) throws Exception {
    BufferedReader in = new BufferedReader(new InputStreamReader(fs.open(new Path(tableInfo.importDir, "mappings.txt")), UTF_8));

    try {
      Map map = new HashMap();
File
ImportTable.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
            if (m == null) {
              // Make a unique directory inside the table's dir. Cannot import multiple tables into one table, so don't need to use unique allocator
<<<<<<< HEAD
              String tabletDir = new String(FastFormat.toZeroPaddedString(dirCount++, 8, 16, Constants.CLONE_PREFIX_BYTES), StandardCharsets.UTF_8);
=======
              String tabletDir = new String(FastFormat.toZeroPaddedString(dirCount++, 8, 16, Constants.CLONE_PREFIX_BYTES), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

              // Build up a full hdfs://localhost:8020/accumulo/tables/$id/c-XXXXXXX
              String absolutePath = getClonedTabletDir(master, tableDirs, tabletDir);
Solution content
            if (m == null) {
              // Make a unique directory inside the table's dir. Cannot import multiple tables into one table, so don't need to use unique allocator
              String tabletDir = new String(FastFormat.toZeroPaddedString(dirCount++, 8, 16, Constants.CLONE_PREFIX_BYTES), UTF_8);

              // Build up a full hdfs://localhost:8020/accumulo/tables/$id/c-XXXXXXX
              String absolutePath = getClonedTabletDir(master, tableDirs, tabletDir);
File
ImportTable.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
              String absolutePath = getClonedTabletDir(master, tableDirs, tabletDir);

              m = new Mutation(metadataRow);
<<<<<<< HEAD
              TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(absolutePath.getBytes(StandardCharsets.UTF_8)));
=======
              TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(absolutePath.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
              currentRow = metadataRow;
            }
Solution content
              String absolutePath = getClonedTabletDir(master, tableDirs, tabletDir);

              m = new Mutation(metadataRow);
              TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(absolutePath.getBytes(UTF_8)));
              currentRow = metadataRow;
            }
File
ImportTable.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
              mbw.addMutation(m);

              // Make a unique directory inside the table's dir. Cannot import multiple tables into one table, so don't need to use unique allocator
<<<<<<< HEAD
              String tabletDir = new String(FastFormat.toZeroPaddedString(dirCount++, 8, 16, Constants.CLONE_PREFIX_BYTES), StandardCharsets.UTF_8);
=======
              String tabletDir = new String(FastFormat.toZeroPaddedString(dirCount++, 8, 16, Constants.CLONE_PREFIX_BYTES), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

              // Build up a full hdfs://localhost:8020/accumulo/tables/$id/c-XXXXXXX
              String absolutePath = getClonedTabletDir(master, tableDirs, tabletDir);
Solution content
              mbw.addMutation(m);

              // Make a unique directory inside the table's dir. Cannot import multiple tables into one table, so don't need to use unique allocator
              String tabletDir = new String(FastFormat.toZeroPaddedString(dirCount++, 8, 16, Constants.CLONE_PREFIX_BYTES), UTF_8);

              // Build up a full hdfs://localhost:8020/accumulo/tables/$id/c-XXXXXXX
              String absolutePath = getClonedTabletDir(master, tableDirs, tabletDir);
File
ImportTable.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
              String absolutePath = getClonedTabletDir(master, tableDirs, tabletDir);

              m = new Mutation(metadataRow);
<<<<<<< HEAD
              TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(absolutePath.getBytes(StandardCharsets.UTF_8)));
=======
              TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(absolutePath.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
            }
            m.put(key.getColumnFamily(), cq, val);
Solution content
              String absolutePath = getClonedTabletDir(master, tableDirs, tabletDir);

              m = new Mutation(metadataRow);
              TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(absolutePath.getBytes(UTF_8)));
            }

            m.put(key.getColumnFamily(), cq, val);
File
ImportTable.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
      UniqueNameAllocator namer = UniqueNameAllocator.getInstance();

<<<<<<< HEAD
      mappingsWriter = new BufferedWriter(new OutputStreamWriter(fs.create(path), StandardCharsets.UTF_8));
=======
      mappingsWriter = new BufferedWriter(new OutputStreamWriter(fs.create(path), UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

      for (FileStatus fileStatus : files) {
        String fileName = fileStatus.getPath().getName();
Solution content
      UniqueNameAllocator namer = UniqueNameAllocator.getInstance();

      mappingsWriter = new BufferedWriter(new OutputStreamWriter(fs.create(path), UTF_8));

      for (FileStatus fileStatus : files) {
        String fileName = fileStatus.getPath().getName();
File
ImportTable.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
      ZipEntry zipEntry;
      while ((zipEntry = zis.getNextEntry()) != null) {
        if (zipEntry.getName().equals(Constants.EXPORT_INFO_FILE)) {
<<<<<<< HEAD
          BufferedReader in = new BufferedReader(new InputStreamReader(zis, StandardCharsets.UTF_8));
=======
          BufferedReader in = new BufferedReader(new InputStreamReader(zis, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          String line = null;
          while ((line = in.readLine()) != null) {
            String sa[] = line.split(":", 2);
Solution content
      ZipEntry zipEntry;
      while ((zipEntry = zis.getNextEntry()) != null) {
        if (zipEntry.getName().equals(Constants.EXPORT_INFO_FILE)) {
          BufferedReader in = new BufferedReader(new InputStreamReader(zis, UTF_8));
          String line = null;
          while ((line = in.readLine()) != null) {
            String sa[] = line.split(":", 2);
File
ImportTable.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.master.tableOps;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.client.Instance;
Solution content
 */
package org.apache.accumulo.master.tableOps;

import static java.nio.charset.StandardCharsets.UTF_8;

import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.client.Instance;
File
RenameTable.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
      zoo.mutate(tap, null, null, new Mutator() {
        @Override
        public byte[] mutate(byte[] current) throws Exception {
<<<<<<< HEAD
          final String currentName = new String(current, StandardCharsets.UTF_8);
=======
          final String currentName = new String(current, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          if (currentName.equals(newName))
            return null; // assume in this case the operation is running again, so we are done
          if (!currentName.equals(oldName)) {
Solution content
      zoo.mutate(tap, null, null, new Mutator() {
        @Override
        public byte[] mutate(byte[] current) throws Exception {
          final String currentName = new String(current, UTF_8);
          if (currentName.equals(newName))
            return null; // assume in this case the operation is running again, so we are done
          if (!currentName.equals(oldName)) {
File
RenameTable.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
            throw new ThriftTableOperationException(null, oldTableName, TableOperation.RENAME, TableOperationExceptionType.NOTFOUND,
                "Name changed while processing");
          }
<<<<<<< HEAD
          return newName.getBytes(StandardCharsets.UTF_8);
=======
          return newName.getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        }
      });
      Tables.clearCache(instance);
Solution content
            throw new ThriftTableOperationException(null, oldTableName, TableOperation.RENAME, TableOperationExceptionType.NOTFOUND,
                "Name changed while processing");
          }
          return newName.getBytes(UTF_8);
        }
      });
      Tables.clearCache(instance);
File
RenameTable.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
      byte[] nid = zoo.mutate(ntp, ZERO_BYTE, ZooUtil.PUBLIC, new Mutator() {
        @Override
        public byte[] mutate(byte[] currentValue) throws Exception {
<<<<<<< HEAD
          BigInteger nextId = new BigInteger(new String(currentValue, StandardCharsets.UTF_8), Character.MAX_RADIX);
          nextId = nextId.add(BigInteger.ONE);
          return nextId.toString(Character.MAX_RADIX).getBytes(StandardCharsets.UTF_8);
        }
      });
      return new String(nid, StandardCharsets.UTF_8);
=======
          BigInteger nextId = new BigInteger(new String(currentValue, UTF_8), Character.MAX_RADIX);
          nextId = nextId.add(BigInteger.ONE);
          return nextId.toString(Character.MAX_RADIX).getBytes(UTF_8);
        }
      });
      return new String(nid, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    } catch (Exception e1) {
      Logger.getLogger(CreateTable.class).error("Failed to assign tableId to " + tableName, e1);
      throw new ThriftTableOperationException(tableId, tableName, TableOperation.CREATE, TableOperationExceptionType.OTHER, e1.getMessage());
Solution content
      byte[] nid = zoo.mutate(ntp, ZERO_BYTE, ZooUtil.PUBLIC, new Mutator() {
        @Override
        public byte[] mutate(byte[] currentValue) throws Exception {
          BigInteger nextId = new BigInteger(new String(currentValue, UTF_8), Character.MAX_RADIX);
          nextId = nextId.add(BigInteger.ONE);
          return nextId.toString(Character.MAX_RADIX).getBytes(UTF_8);
        }
      });
      return new String(nid, UTF_8);
    } catch (Exception e1) {
      Logger.getLogger(CreateTable.class).error("Failed to assign tableId to " + tableName, e1);
      throw new ThriftTableOperationException(tableId, tableName, TableOperation.CREATE, TableOperationExceptionType.OTHER, e1.getMessage());
File
Utils.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Variable
Chunk
Conflicting content
    Instance instance = HdfsZooInstance.getInstance();

    String resvPath = ZooUtil.getRoot(instance) + Constants.ZHDFS_RESERVATIONS + "/"
<<<<<<< HEAD
        + Base64.encodeBase64String(directory.getBytes(StandardCharsets.UTF_8));
=======
        + Base64.encodeBase64String(directory.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    IZooReaderWriter zk = ZooReaderWriter.getInstance();
Solution content
    Instance instance = HdfsZooInstance.getInstance();

    String resvPath = ZooUtil.getRoot(instance) + Constants.ZHDFS_RESERVATIONS + "/"
        + Base64.encodeBase64String(directory.getBytes(UTF_8));

    IZooReaderWriter zk = ZooReaderWriter.getInstance();
File
Utils.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  public static void unreserveHdfsDirectory(String directory, long tid) throws KeeperException, InterruptedException {
    Instance instance = HdfsZooInstance.getInstance();
    String resvPath = ZooUtil.getRoot(instance) + Constants.ZHDFS_RESERVATIONS + "/"
<<<<<<< HEAD
        + Base64.encodeBase64String(directory.getBytes(StandardCharsets.UTF_8));
=======
        + Base64.encodeBase64String(directory.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    ZooReservation.release(ZooReaderWriter.getInstance(), resvPath, String.format("%016x", tid));
  }
Solution content
  public static void unreserveHdfsDirectory(String directory, long tid) throws KeeperException, InterruptedException {
    Instance instance = HdfsZooInstance.getInstance();
    String resvPath = ZooUtil.getRoot(instance) + Constants.ZHDFS_RESERVATIONS + "/"
        + Base64.encodeBase64String(directory.getBytes(UTF_8));
    ZooReservation.release(ZooReaderWriter.getInstance(), resvPath, String.format("%016x", tid));
  }
File
Utils.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  }

  private static Lock getLock(String tableId, long tid, boolean writeLock) throws Exception {
<<<<<<< HEAD
    byte[] lockData = String.format("%016x", tid).getBytes(StandardCharsets.UTF_8);
=======
    byte[] lockData = String.format("%016x", tid).getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    ZooQueueLock qlock = new ZooQueueLock(ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZTABLE_LOCKS + "/" + tableId, false);
    Lock lock = DistributedReadWriteLock.recoverLock(qlock, lockData);
    if (lock == null) {
Solution content
  }

  private static Lock getLock(String tableId, long tid, boolean writeLock) throws Exception {
    byte[] lockData = String.format("%016x", tid).getBytes(UTF_8);
    ZooQueueLock qlock = new ZooQueueLock(ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZTABLE_LOCKS + "/" + tableId, false);
    Lock lock = DistributedReadWriteLock.recoverLock(qlock, lockData);
    if (lock == null) {
File
Utils.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.master.tserverOps;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.master.thrift.TabletServerStatus;
Solution content
 */
package org.apache.accumulo.master.tserverOps;

import static java.nio.charset.StandardCharsets.UTF_8;

import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.master.thrift.TabletServerStatus;
File
ShutdownTServer.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
      ZooLock.deleteLock(path);
      path = ZooUtil.getRoot(master.getInstance()) + Constants.ZDEADTSERVERS + "/" + server.getLocation();
      IZooReaderWriter zoo = ZooReaderWriter.getInstance();
<<<<<<< HEAD
      zoo.putPersistentData(path, "forced down".getBytes(StandardCharsets.UTF_8), NodeExistsPolicy.OVERWRITE);
=======
      zoo.putPersistentData(path, "forced down".getBytes(UTF_8), NodeExistsPolicy.OVERWRITE);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      return null;
    }
    
Solution content
      ZooLock.deleteLock(path);
      path = ZooUtil.getRoot(master.getInstance()) + Constants.ZDEADTSERVERS + "/" + server.getLocation();
      IZooReaderWriter zoo = ZooReaderWriter.getInstance();
      zoo.putPersistentData(path, "forced down".getBytes(UTF_8), NodeExistsPolicy.OVERWRITE);
      return null;
    }
    
File
ShutdownTServer.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
      List locks = zk.getChildren(path, null);
      if (locks != null && locks.size() > 0) {
        Collections.sort(locks);
<<<<<<< HEAD
        address = new ServerServices(new String(zk.getData(path + "/" + locks.get(0), null), StandardCharsets.UTF_8)).getAddress(Service.GC_CLIENT);
=======
        address = new ServerServices(new String(zk.getData(path + "/" + locks.get(0), null), UTF_8)).getAddress(Service.GC_CLIENT);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        GCMonitorService.Client client = ThriftUtil.getClient(new GCMonitorService.Client.Factory(), address, config.getConfiguration());
        try {
          result = client.getStatus(Tracer.traceInfo(), SystemCredentials.get().toThrift(instance));
Solution content
      List locks = zk.getChildren(path, null);
      if (locks != null && locks.size() > 0) {
        Collections.sort(locks);
        address = new ServerServices(new String(zk.getData(path + "/" + locks.get(0), null), UTF_8)).getAddress(Service.GC_CLIENT);
        GCMonitorService.Client client = ThriftUtil.getClient(new GCMonitorService.Client.Factory(), address, config.getConfiguration());
        try {
          result = client.getStatus(Tracer.traceInfo(), SystemCredentials.get().toThrift(instance));
File
Monitor.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
      String monitorAddress = HostAndPort.fromParts(hostname, server.getPort()).toString();

<<<<<<< HEAD
      ZooReaderWriter.getInstance().putPersistentData(ZooUtil.getRoot(instance) + Constants.ZMONITOR_HTTP_ADDR, monitorAddress.getBytes(StandardCharsets.UTF_8),
=======
      ZooReaderWriter.getInstance().putPersistentData(ZooUtil.getRoot(instance) + Constants.ZMONITOR_HTTP_ADDR, monitorAddress.getBytes(UTF_8),
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          NodeExistsPolicy.OVERWRITE);
      log.info("Set monitor address in zookeeper to " + monitorAddress);
    } catch (Exception ex) {
Solution content
      String monitorAddress = HostAndPort.fromParts(hostname, server.getPort()).toString();

      ZooReaderWriter.getInstance().putPersistentData(ZooUtil.getRoot(instance) + Constants.ZMONITOR_HTTP_ADDR, monitorAddress.getBytes(UTF_8),
          NodeExistsPolicy.OVERWRITE);
      log.info("Set monitor address in zookeeper to " + monitorAddress);
    } catch (Exception ex) {
File
Monitor.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.monitor;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Collection;
import java.util.SortedSet;
import java.util.TreeSet;
Solution content
 */
package org.apache.accumulo.monitor;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Collection;
import java.util.SortedSet;
import java.util.TreeSet;
File
ZooKeeperStatus.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
          try {
            transport.flush();
            addr = HostAndPort.fromParts(parts[0], 2181);
          
          transport = TTimeoutTransport.create(addr, 10 * 1000l);
<<<<<<< HEAD
          transport.write("stat\n".getBytes(StandardCharsets.UTF_8), 0, 5);
=======
          transport.write("stat\n".getBytes(UTF_8), 0, 5);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          StringBuilder response = new StringBuilder();
Solution content
            addr = HostAndPort.fromParts(parts[0], 2181);
          
          transport = TTimeoutTransport.create(addr, 10 * 1000l);
          transport.write("stat\n".getBytes(UTF_8), 0, 5);
          StringBuilder response = new StringBuilder();
          try {
            transport.flush();
File
ZooKeeperStatus.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
            byte[] buffer = new byte[1024 * 100];
            int n = 0;
            while ((n = transport.read(buffer, 0, buffer.length)) > 0) {
<<<<<<< HEAD
              response.append(new String(buffer, 0, n, StandardCharsets.UTF_8));
=======
              response.append(new String(buffer, 0, n, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
            }
          } catch (TTransportException ex) {
            // happens at EOF
Solution content
            byte[] buffer = new byte[1024 * 100];
            int n = 0;
            while ((n = transport.read(buffer, 0, buffer.length)) > 0) {
              response.append(new String(buffer, 0, n, UTF_8));
            }
          } catch (TTransportException ex) {
            // happens at EOF
File
ZooKeeperStatus.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  public static String encode(String s) {
    try {
<<<<<<< HEAD
      return URLEncoder.encode(s, StandardCharsets.UTF_8.name());
    } catch (UnsupportedEncodingException e) {
      Logger.getLogger(BasicServlet.class).fatal(StandardCharsets.UTF_8.name() + " is not a recognized encoding", e);
=======
      return URLEncoder.encode(s, UTF_8.name());
    } catch (UnsupportedEncodingException e) {
      Logger.getLogger(BasicServlet.class).fatal(UTF_8.name() + " is not a recognized encoding", e);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      throw new AssertionError(e); // can't happen with UTF-8
    }
  }
Solution content
  public static String encode(String s) {
    try {
      return URLEncoder.encode(s, UTF_8.name());
    } catch (UnsupportedEncodingException e) {
      Logger.getLogger(BasicServlet.class).fatal(UTF_8.name() + " is not a recognized encoding", e);
      throw new AssertionError(e); // can't happen with UTF-8
    }
  }
File
BasicServlet.java
Developer's decision
Version 2
Kind of conflict
Catch clause
Method invocation
Return statement
Chunk
Conflicting content
  public static String decode(String s) {
    try {
<<<<<<< HEAD
      return URLDecoder.decode(s, StandardCharsets.UTF_8.name());
    } catch (UnsupportedEncodingException e) {
      Logger.getLogger(BasicServlet.class).fatal(StandardCharsets.UTF_8.name() + " is not a recognized encoding", e);
=======
      return URLDecoder.decode(s, UTF_8.name());
    } catch (UnsupportedEncodingException e) {
      Logger.getLogger(BasicServlet.class).fatal(UTF_8.name() + " is not a recognized encoding", e);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      throw new AssertionError(e); // can't happen with UTF-8
    }
  }
Solution content
  public static String decode(String s) {
    try {
      return URLDecoder.decode(s, UTF_8.name());
    } catch (UnsupportedEncodingException e) {
      Logger.getLogger(BasicServlet.class).fatal(UTF_8.name() + " is not a recognized encoding", e);
      throw new AssertionError(e); // can't happen with UTF-8
    }
  }
File
BasicServlet.java
Developer's decision
Version 2
Kind of conflict
Catch clause
Method invocation
Return statement
Chunk
Conflicting content
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

<<<<<<< HEAD
import org.apache.accumulo.core.conf.SiteConfiguration;
=======
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import org.apache.accumulo.core.master.thrift.MasterMonitorInfo;
import org.apache.accumulo.core.util.Duration;
import org.apache.accumulo.core.util.NumUtil;
Solution content
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.accumulo.core.conf.SiteConfiguration;
import org.apache.accumulo.core.master.thrift.MasterMonitorInfo;
import org.apache.accumulo.core.util.Duration;
import org.apache.accumulo.core.util.NumUtil;
File
DefaultServlet.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
          while ((n = data.read(buffer)) > 0)
            out.write(buffer, 0, n);
        } else {
<<<<<<< HEAD
          out.write(("could not get resource " + path + "").getBytes(StandardCharsets.UTF_8));
=======
          out.write(("could not get resource " + path + "").getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        }
      } finally {
        if (data != null)
Solution content
          while ((n = data.read(buffer)) > 0)
            out.write(buffer, 0, n);
        } else {
          out.write(("could not get resource " + path + "").getBytes(UTF_8));
        }
      } finally {
        if (data != null)
File
DefaultServlet.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
import jline.console.ConsoleReader;

<<<<<<< HEAD
import org.apache.accumulo.shell.Shell;
=======
import org.apache.accumulo.core.util.shell.Shell;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

public class ShellServlet extends BasicServlet {
  private static final long serialVersionUID = 1L;
Solution content
import jline.console.ConsoleReader;

import org.apache.accumulo.shell.Shell;

public class ShellServlet extends BasicServlet {
  private static final long serialVersionUID = 1L;
File
ShellServlet.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
      this.readWait = false;
      this.output = new StringBuilderOutputStream();
      ConsoleReader reader = new ConsoleReader(this, output);
<<<<<<< HEAD
      this.shell = new Shell(reader, new PrintWriter(new OutputStreamWriter(output, StandardCharsets.UTF_8)));
=======
      this.shell = new Shell(reader, new PrintWriter(new OutputStreamWriter(output, UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      shell.setLogErrorsToConsole();
      if (mock != null) {
        if (shell.config("--fake", "-u", username, "-p", password))
Solution content
      this.readWait = false;
      this.output = new StringBuilderOutputStream();
      ConsoleReader reader = new ConsoleReader(this, output);
      this.shell = new Shell(reader, new PrintWriter(new OutputStreamWriter(output, UTF_8)));
      shell.setLogErrorsToConsole();
      if (mock != null) {
        if (shell.config("--fake", "-u", username, "-p", password))
File
ShellServlet.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.monitor.servlets;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Map.Entry;
import java.util.SortedMap;
import java.util.TreeMap;
Solution content
 */
package org.apache.accumulo.monitor.servlets;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Map.Entry;
import java.util.SortedMap;
import java.util.TreeMap;
File
XMLServlet.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
  
  @Override
  protected void pageStart(HttpServletRequest req, HttpServletResponse resp, StringBuilder sb) {
<<<<<<< HEAD
    resp.setContentType("text/xml;charset=" + StandardCharsets.UTF_8.name());
    sb.append("\n");
=======
    resp.setContentType("text/xml;charset=" + UTF_8.name());
    sb.append("\n");
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    sb.append("\n");
  }
  
Solution content
  
  @Override
  protected void pageStart(HttpServletRequest req, HttpServletResponse resp, StringBuilder sb) {
    resp.setContentType("text/xml;charset=" + UTF_8.name());
    sb.append("\n");
    sb.append("\n");
  }
  
File
XMLServlet.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.monitor.servlets.trace;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Date;
import java.util.Map;
import java.util.Map.Entry;
Solution content
 */
package org.apache.accumulo.monitor.servlets.trace;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Date;
import java.util.Map;
import java.util.Map.Entry;
File
Basic.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    Map loginMap = conf.getAllPropertiesWithPrefix(Property.TRACE_TOKEN_PROPERTY_PREFIX);
    if (loginMap.isEmpty()) {
      Property p = Property.TRACE_PASSWORD;
<<<<<<< HEAD
      at = new PasswordToken(conf.get(p).getBytes(StandardCharsets.UTF_8));
=======
      at = new PasswordToken(conf.get(p).getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    } else {
      Properties props = new Properties();
      int prefixLength = Property.TRACE_TOKEN_PROPERTY_PREFIX.getKey().length();
Solution content
    Map loginMap = conf.getAllPropertiesWithPrefix(Property.TRACE_TOKEN_PROPERTY_PREFIX);
    if (loginMap.isEmpty()) {
      Property p = Property.TRACE_PASSWORD;
      at = new PasswordToken(conf.get(p).getBytes(UTF_8));
    } else {
      Properties props = new Properties();
      int prefixLength = Property.TRACE_TOKEN_PROPERTY_PREFIX.getKey().length();
File
Basic.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
      Mutation spanMutation = new Mutation(new Text(idString));
      Mutation indexMutation = new Mutation(new Text("idx:" + s.svc + ":" + startString));
      long diff = s.stop - s.start;
<<<<<<< HEAD
      indexMutation.put(new Text(s.description), new Text(s.sender), new Value((idString + ":" + Long.toHexString(diff)).getBytes(StandardCharsets.UTF_8)));
=======
      indexMutation.put(new Text(s.description), new Text(s.sender), new Value((idString + ":" + Long.toHexString(diff)).getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      ByteArrayTransport transport = new ByteArrayTransport();
      TCompactProtocol protocol = new TCompactProtocol(transport);
      s.write(protocol);
Solution content
      Mutation spanMutation = new Mutation(new Text(idString));
      Mutation indexMutation = new Mutation(new Text("idx:" + s.svc + ":" + startString));
      long diff = s.stop - s.start;
      indexMutation.put(new Text(s.description), new Text(s.sender), new Value((idString + ":" + Long.toHexString(diff)).getBytes(UTF_8)));
      ByteArrayTransport transport = new ByteArrayTransport();
      TCompactProtocol protocol = new TCompactProtocol(transport);
      s.write(protocol);
File
TraceServer.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
        Map loginMap = conf.getAllPropertiesWithPrefix(Property.TRACE_TOKEN_PROPERTY_PREFIX);
        if (loginMap.isEmpty()) {
          Property p = Property.TRACE_PASSWORD;
<<<<<<< HEAD
          at = new PasswordToken(conf.get(p).getBytes(StandardCharsets.UTF_8));
=======
          at = new PasswordToken(conf.get(p).getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        } else {
          Properties props = new Properties();
          AuthenticationToken token = AccumuloVFSClassLoader.getClassLoader().loadClass(conf.get(Property.TRACE_TOKEN_TYPE)).asSubclass(AuthenticationToken.class)
Solution content
        Map loginMap = conf.getAllPropertiesWithPrefix(Property.TRACE_TOKEN_PROPERTY_PREFIX);
        if (loginMap.isEmpty()) {
          Property p = Property.TRACE_PASSWORD;
          at = new PasswordToken(conf.get(p).getBytes(UTF_8));
        } else {
          Properties props = new Properties();
          AuthenticationToken token = AccumuloVFSClassLoader.getClassLoader().loadClass(conf.get(Property.TRACE_TOKEN_TYPE)).asSubclass(AuthenticationToken.class)
File
TraceServer.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
  private void registerInZooKeeper(String name) throws Exception {
    String root = ZooUtil.getRoot(serverConfiguration.getInstance()) + Constants.ZTRACERS;
    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
<<<<<<< HEAD
    String path = zoo.putEphemeralSequential(root + "/trace-", name.getBytes(StandardCharsets.UTF_8));
=======
    String path = zoo.putEphemeralSequential(root + "/trace-", name.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    zoo.exists(path, this);
  }
Solution content
  private void registerInZooKeeper(String name) throws Exception {
    String root = ZooUtil.getRoot(serverConfiguration.getInstance()) + Constants.ZTRACERS;
    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
    String path = zoo.putEphemeralSequential(root + "/trace-", name.getBytes(UTF_8));
    zoo.exists(path, this);
  }
File
TraceServer.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
import java.io.IOException;
import java.nio.charset.StandardCharsets;

<<<<<<< HEAD
import org.apache.accumulo.core.conf.SiteConfiguration;
=======
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import org.apache.accumulo.core.util.CachedConfiguration;
import org.apache.accumulo.server.fs.VolumeManager;
import org.apache.accumulo.server.fs.VolumeManagerImpl;
Solution content
import java.io.IOException;
import org.apache.accumulo.core.conf.SiteConfiguration;
import org.apache.accumulo.core.util.CachedConfiguration;
import org.apache.accumulo.server.fs.VolumeManager;
import org.apache.accumulo.server.fs.VolumeManagerImpl;
File
BulkFailedCopyProcessor.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
  @Override
  public void process(String workID, byte[] data) {

<<<<<<< HEAD
    String paths[] = new String(data, StandardCharsets.UTF_8).split(",");
=======
    String paths[] = new String(data, UTF_8).split(",");
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    Path orig = new Path(paths[0]);
    Path dest = new Path(paths[1]);
Solution content
  @Override
  public void process(String workID, byte[] data) {

    String paths[] = new String(data, UTF_8).split(",");

    Path orig = new Path(paths[0]);
    Path dest = new Path(paths[1]);
File
BulkFailedCopyProcessor.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
        List ssiList, Map> ssio, List authorizations, boolean waitForWrites, boolean isolated,
        long readaheadThreshold) throws NotServingTabletException, ThriftSecurityException, org.apache.accumulo.core.tabletserver.thrift.TooManyFilesException {

<<<<<<< HEAD
      String tableId = new String(textent.getTable(), StandardCharsets.UTF_8);
      if (!security.canScan(credentials, tableId, Tables.getNamespaceId(getInstance(), tableId), range, columns, ssiList, ssio, authorizations))
=======
      String tableId = new String(textent.getTable(), UTF_8);
      if (!security.canScan(credentials, tableId, Tables.getNamespaceId(instance, tableId), range, columns, ssiList, ssio, authorizations))
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);

      if (!security.userHasAuthorizations(credentials, authorizations))
Solution content
        List ssiList, Map> ssio, List authorizations, boolean waitForWrites, boolean isolated,
        long readaheadThreshold) throws NotServingTabletException, ThriftSecurityException, org.apache.accumulo.core.tabletserver.thrift.TooManyFilesException {

      String tableId = new String(textent.getTable(), UTF_8);
      if (!security.canScan(credentials, tableId, Tables.getNamespaceId(getInstance(), tableId), range, columns, ssiList, ssio, authorizations))
        throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);

      if (!security.userHasAuthorizations(credentials, authorizations))
File
TabletServer.java
Developer's decision
Combination
Kind of conflict
If statement
Method invocation
Variable
Chunk
Conflicting content
      // find all of the tables that need to be scanned
      final HashSet tables = new HashSet();
      for (TKeyExtent keyExtent : tbatch.keySet()) {
<<<<<<< HEAD
        tables.add(new String(keyExtent.getTable(), StandardCharsets.UTF_8));
=======
        tables.add(new String(keyExtent.getTable(), UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      }

      if (tables.size() != 1)
Solution content
      // find all of the tables that need to be scanned
      final HashSet tables = new HashSet();
      for (TKeyExtent keyExtent : tbatch.keySet()) {
        tables.add(new String(keyExtent.getTable(), UTF_8));
      }

      if (tables.size() != 1)
File
TabletServer.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    public void update(TInfo tinfo, TCredentials credentials, TKeyExtent tkeyExtent, TMutation tmutation, TDurability tdurability) throws NotServingTabletException,
        ConstraintViolationException, ThriftSecurityException {

<<<<<<< HEAD
      final String tableId = new String(tkeyExtent.getTable(), StandardCharsets.UTF_8);
      if (!security.canWrite(credentials, tableId, Tables.getNamespaceId(getInstance(), tableId)))
=======
      String tableId = new String(tkeyExtent.getTable(), UTF_8);
      if (!security.canWrite(credentials, tableId, Tables.getNamespaceId(instance, tableId)))
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
      final KeyExtent keyExtent = new KeyExtent(tkeyExtent);
      final Tablet tablet = onlineTablets.get(new KeyExtent(keyExtent));
Solution content
    public void update(TInfo tinfo, TCredentials credentials, TKeyExtent tkeyExtent, TMutation tmutation, TDurability tdurability) throws NotServingTabletException,
        ConstraintViolationException, ThriftSecurityException {

      final String tableId = new String(tkeyExtent.getTable(), UTF_8);
      if (!security.canWrite(credentials, tableId, Tables.getNamespaceId(getInstance(), tableId)))
        throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
      final KeyExtent keyExtent = new KeyExtent(tkeyExtent);
      final Tablet tablet = onlineTablets.get(new KeyExtent(keyExtent));
File
TabletServer.java
Developer's decision
Manual
Kind of conflict
If statement
Method invocation
Variable
Chunk
Conflicting content
        }
      };

<<<<<<< HEAD
      byte[] lockContent = new ServerServices(getClientAddressString(), Service.TSERV_CLIENT).toString().getBytes(StandardCharsets.UTF_8);
=======
      byte[] lockContent = new ServerServices(getClientAddressString(), Service.TSERV_CLIENT).toString().getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      for (int i = 0; i < 120 / 5; i++) {
        zoo.putPersistentData(zPath, new byte[0], NodeExistsPolicy.SKIP);
Solution content
        }
      };

      byte[] lockContent = new ServerServices(getClientAddressString(), Service.TSERV_CLIENT).toString().getBytes(UTF_8);
      for (int i = 0; i < 120 / 5; i++) {
        zoo.putPersistentData(zPath, new byte[0], NodeExistsPolicy.SKIP);
File
TabletServer.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.tserver.log;

<<<<<<< HEAD
=======
import static com.google.common.base.Charsets.UTF_8;
import static org.apache.accumulo.tserver.logger.LogEvents.COMPACTION_FINISH;
import static org.apache.accumulo.tserver.logger.LogEvents.COMPACTION_START;
import static org.apache.accumulo.tserver.logger.LogEvents.DEFINE_TABLET;
import static org.apache.accumulo.tserver.logger.LogEvents.MANY_MUTATIONS;
import static org.apache.accumulo.tserver.logger.LogEvents.OPEN;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.EOFException;
Solution content
 */
package org.apache.accumulo.tserver.log;

import static java.nio.charset.StandardCharsets.UTF_8;
import static org.apache.accumulo.tserver.logger.LogEvents.COMPACTION_FINISH;
import static org.apache.accumulo.tserver.logger.LogEvents.COMPACTION_START;
import static org.apache.accumulo.tserver.logger.LogEvents.DEFINE_TABLET;
import static org.apache.accumulo.tserver.logger.LogEvents.MANY_MUTATIONS;
import static org.apache.accumulo.tserver.logger.LogEvents.OPEN;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.EOFException;
File
DfsLogger.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.atomic.AtomicLong;

<<<<<<< HEAD
import com.google.common.base.Joiner;
import org.apache.accumulo.core.client.Durability;
=======
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import org.apache.accumulo.core.conf.AccumuloConfiguration;
import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.core.data.KeyExtent;
Solution content
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.atomic.AtomicLong;

import com.google.common.base.Joiner;
import org.apache.accumulo.core.client.Durability;
import org.apache.accumulo.core.conf.AccumuloConfiguration;
import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.core.data.KeyExtent;
File
DfsLogger.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
          .getConfiguration().get(Property.CRYPTO_MODULE_CLASS));

      // Initialize the log file with a header and the crypto params used to set up this log file.
<<<<<<< HEAD
      logFile.write(LOG_FILE_HEADER_V3.getBytes(StandardCharsets.UTF_8));
=======
      logFile.write(LOG_FILE_HEADER_V3.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

      CryptoModuleParameters params = CryptoModuleFactory.createParamsObjectFromAccumuloConfiguration(conf.getConfiguration());
Solution content
          .getConfiguration().get(Property.CRYPTO_MODULE_CLASS));

      // Initialize the log file with a header and the crypto params used to set up this log file.
      logFile.write(LOG_FILE_HEADER_V3.getBytes(UTF_8));

      CryptoModuleParameters params = CryptoModuleFactory.createParamsObjectFromAccumuloConfiguration(conf.getConfiguration());
File
DfsLogger.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  }
  
  private static String displayLabels(byte[] labels) {
<<<<<<< HEAD
    String s = new String(labels, StandardCharsets.UTF_8);
=======
    String s = new String(labels, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    s = s.replace("&", " & ");
    s = s.replace("|", " | ");
    return s;
Solution content
  }
  
  private static String displayLabels(byte[] labels) {
    String s = new String(labels, UTF_8);
    s = s.replace("&", " & ");
    s = s.replace("|", " | ");
    return s;
File
LogFileValue.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
        builder.append("...");
        break;
      }
<<<<<<< HEAD
      builder.append("  ").append(new String(m.getRow(), StandardCharsets.UTF_8)).append("\n");
      for (ColumnUpdate update : m.getUpdates()) {
        String value = new String(update.getValue());
        builder.append("      ").append(new String(update.getColumnFamily(), StandardCharsets.UTF_8)).append(":")
                .append(new String(update.getColumnQualifier(), StandardCharsets.UTF_8)).append(" ").append(update.hasTimestamp() ? "[user]:" : "[system]:")
=======
      builder.append("  ").append(new String(m.getRow(), UTF_8)).append("\n");
      for (ColumnUpdate update : m.getUpdates()) {
        String value = new String(update.getValue());
        builder.append("      ").append(new String(update.getColumnFamily(), UTF_8)).append(":")
                .append(new String(update.getColumnQualifier(), UTF_8)).append(" ").append(update.hasTimestamp() ? "[user]:" : "[system]:")
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
                .append(update.getTimestamp()).append(" [").append(displayLabels(update.getColumnVisibility())).append("] ")
                .append(update.isDeleted() ? "" : value).append("\n");
      }
Solution content
        builder.append("...");
        break;
      }
      builder.append("  ").append(new String(m.getRow(), UTF_8)).append("\n");
      for (ColumnUpdate update : m.getUpdates()) {
        String value = new String(update.getValue());
        builder.append("      ").append(new String(update.getColumnFamily(), UTF_8)).append(":")
                .append(new String(update.getColumnQualifier(), UTF_8)).append(" ").append(update.hasTimestamp() ? "[user]:" : "[system]:")
                .append(update.getTimestamp()).append(" [").append(displayLabels(update.getColumnVisibility())).append("] ")
                .append(update.isDeleted() ? "" : value).append("\n");
      }
File
LogFileValue.java
Developer's decision
Version 2
Kind of conflict
For statement
Method invocation
Variable
Chunk
Conflicting content
          }

          if (rowMatcher != null) {
<<<<<<< HEAD
            rowMatcher.reset(new String(m.getRow(), StandardCharsets.UTF_8));
=======
            rowMatcher.reset(new String(m.getRow(), UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
            if (rowMatcher.matches()) {
              found = true;
              break;
Solution content
          }

          if (rowMatcher != null) {
            rowMatcher.reset(new String(m.getRow(), UTF_8));
            if (rowMatcher.matches()) {
              found = true;
              break;
File
LogReader.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    try {
      String zTablePath = Constants.ZROOT + "/" + HdfsZooInstance.getInstance().getInstanceID() + Constants.ZTABLES + "/" + extent.getTableId()
          + Constants.ZTABLE_FLUSH_ID;
<<<<<<< HEAD:server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
      return Long.parseLong(new String(ZooReaderWriter.getInstance().getData(zTablePath, null), StandardCharsets.UTF_8));
=======
      return Long.parseLong(new String(ZooReaderWriter.getInstance().getData(zTablePath, null), UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
    } catch (InterruptedException e) {
      throw new RuntimeException(e);
    } catch (NumberFormatException nfe) {
Solution content
    try {
      String zTablePath = Constants.ZROOT + "/" + HdfsZooInstance.getInstance().getInstanceID() + Constants.ZTABLES + "/" + extent.getTableId()
          + Constants.ZTABLE_FLUSH_ID;
      return Long.parseLong(new String(ZooReaderWriter.getInstance().getData(zTablePath, null), UTF_8));
    } catch (InterruptedException e) {
      throw new RuntimeException(e);
    } catch (NumberFormatException nfe) {
File
Tablet.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
        + Constants.ZTABLE_COMPACT_CANCEL_ID;

    try {
<<<<<<< HEAD:server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
      return Long.parseLong(new String(ZooReaderWriter.getInstance().getData(zTablePath, null), StandardCharsets.UTF_8));
=======
      return Long.parseLong(new String(ZooReaderWriter.getInstance().getData(zTablePath, null), UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
    } catch (KeeperException e) {
      throw new RuntimeException(e);
    } catch (InterruptedException e) {
Solution content
        + Constants.ZTABLE_COMPACT_CANCEL_ID;

    try {
      return Long.parseLong(new String(ZooReaderWriter.getInstance().getData(zTablePath, null), UTF_8));
    } catch (KeeperException e) {
      throw new RuntimeException(e);
    } catch (InterruptedException e) {
File
Tablet.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
      String zTablePath = Constants.ZROOT + "/" + HdfsZooInstance.getInstance().getInstanceID() + Constants.ZTABLES + "/" + extent.getTableId()
          + Constants.ZTABLE_COMPACT_ID;

<<<<<<< HEAD:server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
      String[] tokens = new String(ZooReaderWriter.getInstance().getData(zTablePath, null), StandardCharsets.UTF_8).split(",");
=======
      String[] tokens = new String(ZooReaderWriter.getInstance().getData(zTablePath, null), UTF_8).split(",");
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
      long compactID = Long.parseLong(tokens[0]);

      CompactionIterators iters = new CompactionIterators();
Solution content
      String zTablePath = Constants.ZROOT + "/" + HdfsZooInstance.getInstance().getInstanceID() + Constants.ZTABLES + "/" + extent.getTableId()
          + Constants.ZTABLE_COMPACT_ID;

      String[] tokens = new String(ZooReaderWriter.getInstance().getData(zTablePath, null), UTF_8).split(",");
      long compactID = Long.parseLong(tokens[0]);

      CompactionIterators iters = new CompactionIterators();
File
Tablet.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
      if (tokens.length > 1) {
        Hex hex = new Hex();
<<<<<<< HEAD:server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
        ByteArrayInputStream bais = new ByteArrayInputStream(hex.decode(tokens[1].split("=")[1].getBytes(StandardCharsets.UTF_8)));
=======
        ByteArrayInputStream bais = new ByteArrayInputStream(hex.decode(tokens[1].split("=")[1].getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
        DataInputStream dis = new DataInputStream(bais);

        try {
Solution content
      if (tokens.length > 1) {
        Hex hex = new Hex();
        ByteArrayInputStream bais = new ByteArrayInputStream(hex.decode(tokens[1].split("=")[1].getBytes(UTF_8)));
        DataInputStream dis = new DataInputStream(bais);

        try {
File
Tablet.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.shell.commands;

<<<<<<< HEAD:shell/src/main/java/org/apache/accumulo/shell/commands/AddSplitsCommand.java
=======
import static com.google.common.base.Charsets.UTF_8;

import java.io.File;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddSplitsCommand.java
import java.util.TreeSet;

import org.apache.accumulo.core.client.TableNotFoundException;
Solution content
 */
package org.apache.accumulo.shell.commands;

import java.util.TreeSet;

import org.apache.accumulo.core.client.TableNotFoundException;
File
AddSplitsCommand.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
    final TreeSet splits = new TreeSet();
    
    if (cl.hasOption(optSplitsFile.getOpt())) {
<<<<<<< HEAD:shell/src/main/java/org/apache/accumulo/shell/commands/AddSplitsCommand.java
      splits.addAll(ShellUtil.scanFile(cl.getOptionValue(optSplitsFile.getOpt()), decode));
=======
      final String f = cl.getOptionValue(optSplitsFile.getOpt());
      
      String line;
      java.util.Scanner file = new java.util.Scanner(new File(f), UTF_8.name());
      while (file.hasNextLine()) {
        line = file.nextLine();
        if (!line.isEmpty()) {
          splits.add(decode ? new Text(Base64.decodeBase64(line.getBytes(UTF_8))) : new Text(line));
        }
      }
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddSplitsCommand.java
    } else {
      if (cl.getArgList().isEmpty()) {
        throw new MissingArgumentException("No split points specified");
Solution content
    final TreeSet splits = new TreeSet();
    
    if (cl.hasOption(optSplitsFile.getOpt())) {
      splits.addAll(ShellUtil.scanFile(cl.getOptionValue(optSplitsFile.getOpt()), decode));
    } else {
      if (cl.getArgList().isEmpty()) {
        throw new MissingArgumentException("No split points specified");
File
AddSplitsCommand.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Variable
While statement
Chunk
Conflicting content
      shellState.getReader().println();
      return 0;
    } // user canceled
<<<<<<< HEAD:shell/src/main/java/org/apache/accumulo/shell/commands/AuthenticateCommand.java
    final byte[] password = p.getBytes(StandardCharsets.UTF_8);
=======
    final byte[] password = p.getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/util/shell/commands/AuthenticateCommand.java
    final boolean valid = shellState.getConnector().securityOperations().authenticateUser(user, new PasswordToken(password));
    shellState.getReader().println((valid ? "V" : "Not v") + "alid");
    return 0;
Solution content
      shellState.getReader().println();
      return 0;
    } // user canceled
    final byte[] password = p.getBytes(UTF_8);
    final boolean valid = shellState.getConnector().securityOperations().authenticateUser(user, new PasswordToken(password));
    shellState.getReader().println((valid ? "V" : "Not v") + "alid");
    return 0;
File
AuthenticateCommand.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
import java.util.Map;
 */
package org.apache.accumulo.shell.commands;

<<<<<<< HEAD:shell/src/main/java/org/apache/accumulo/shell/commands/CreateTableCommand.java
=======
import static com.google.common.base.Charsets.UTF_8;

import java.io.File;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateTableCommand.java
import java.io.IOException;
import java.util.Map.Entry;
Solution content
 */
package org.apache.accumulo.shell.commands;

import java.io.IOException;
import java.util.Map;
import java.util.Map.Entry;
File
CreateTableCommand.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
    final boolean decode = cl.hasOption(base64Opt.getOpt());

    if (cl.hasOption(createTableOptSplit.getOpt())) {
<<<<<<< HEAD:shell/src/main/java/org/apache/accumulo/shell/commands/CreateTableCommand.java
      partitions.addAll(ShellUtil.scanFile(cl.getOptionValue(createTableOptSplit.getOpt()), decode));
=======
      final String f = cl.getOptionValue(createTableOptSplit.getOpt());

      String line;
      Scanner file = new Scanner(new File(f), UTF_8.name());
      try {
        while (file.hasNextLine()) {
          line = file.nextLine();
          if (!line.isEmpty())
            partitions.add(decode ? new Text(Base64.decodeBase64(line.getBytes(UTF_8 ))) : new Text(line));
        }
      } finally {
        file.close();
      }
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateTableCommand.java
    } else if (cl.hasOption(createTableOptCopySplits.getOpt())) {
      final String oldTable = cl.getOptionValue(createTableOptCopySplits.getOpt());
      if (!shellState.getConnector().tableOperations().exists(oldTable)) {
Solution content
    final boolean decode = cl.hasOption(base64Opt.getOpt());

    if (cl.hasOption(createTableOptSplit.getOpt())) {
      partitions.addAll(ShellUtil.scanFile(cl.getOptionValue(createTableOptSplit.getOpt()), decode));
    } else if (cl.hasOption(createTableOptCopySplits.getOpt())) {
      final String oldTable = cl.getOptionValue(createTableOptCopySplits.getOpt());
      if (!shellState.getConnector().tableOperations().exists(oldTable)) {
File
CreateTableCommand.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Try statement
Variable
Chunk
Conflicting content
import java.nio.charset.StandardCharsets;
import java.util.Scanner;

<<<<<<< HEAD:shell/src/main/java/org/apache/accumulo/shell/commands/ExecfileCommand.java
import org.apache.accumulo.shell.Shell;
import org.apache.accumulo.shell.Shell.Command;
=======
import org.apache.accumulo.core.util.shell.Shell;
import org.apache.accumulo.core.util.shell.Shell.Command;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/util/shell/commands/ExecfileCommand.java
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
Solution content
import java.util.Scanner;

import org.apache.accumulo.shell.Shell;
import org.apache.accumulo.shell.Shell.Command;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
File
ExecfileCommand.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
  
  @Override
  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws Exception {
<<<<<<< HEAD:shell/src/main/java/org/apache/accumulo/shell/commands/ExecfileCommand.java
    Scanner scanner = new Scanner(new File(cl.getArgs()[0]), StandardCharsets.UTF_8.name());
=======
    Scanner scanner = new Scanner(new File(cl.getArgs()[0]), UTF_8.name());
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/util/shell/commands/ExecfileCommand.java
    try {
      while (scanner.hasNextLine()) {
        shellState.execCommand(scanner.nextLine(), true, cl.hasOption(verboseOption.getOpt()));
Solution content
  
  @Override
  public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws Exception {
    Scanner scanner = new Scanner(new File(cl.getArgs()[0]), UTF_8.name());
    try {
      while (scanner.hasNextLine()) {
        shellState.execCommand(scanner.nextLine(), true, cl.hasOption(verboseOption.getOpt()));
File
ExecfileCommand.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.shell.commands;

<<<<<<< HEAD:shell/src/main/java/org/apache/accumulo/shell/commands/HiddenCommand.java
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/util/shell/commands/HiddenCommand.java
import java.security.SecureRandom;
import java.util.Random;
Solution content
 */
package org.apache.accumulo.shell.commands;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.security.SecureRandom;
import java.util.Random;
File
HiddenCommand.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
      shellState.getReader().println(
          new String(Base64.decodeBase64(("ICAgICAgIC4tLS4KICAgICAgLyAvXCBcCiAgICAgKCAvLS1cICkKICAgICAuPl8gIF88LgogICAgLyB8ICd8ICcgXAog"
              + "ICAvICB8Xy58Xy4gIFwKICAvIC98ICAgICAgfFwgXAogfCB8IHwgfFwvfCB8IHwgfAogfF98IHwgfCAgfCB8IHxffAogICAgIC8gIF9fICBcCiAgICAvICAv"
<<<<<<< HEAD:shell/src/main/java/org/apache/accumulo/shell/commands/HiddenCommand.java
              + "ICBcICBcCiAgIC8gIC8gICAgXCAgXF8KIHwvICAvICAgICAgXCB8IHwKIHxfXy8gICAgICAgIFx8X3wK").getBytes(StandardCharsets.UTF_8)), StandardCharsets.UTF_8));
=======
              + "ICBcICBcCiAgIC8gIC8gICAgXCAgXF8KIHwvICAvICAgICAgXCB8IHwKIHxfXy8gICAgICAgIFx8X3wK").getBytes(UTF_8)), UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/util/shell/commands/HiddenCommand.java
    } else {
      throw new ShellCommandException(ErrorCode.UNRECOGNIZED_COMMAND, getName());
    }
Solution content
      shellState.getReader().println(
          new String(Base64.decodeBase64(("ICAgICAgIC4tLS4KICAgICAgLyAvXCBcCiAgICAgKCAvLS1cICkKICAgICAuPl8gIF88LgogICAgLyB8ICd8ICcgXAog"
              + "ICAvICB8Xy58Xy4gIFwKICAvIC98ICAgICAgfFwgXAogfCB8IHwgfFwvfCB8IHwgfAogfF98IHwgfCAgfCB8IHxffAogICAgIC8gIF9fICBcCiAgICAvICAv"
              + "ICBcICBcCiAgIC8gIC8gICAgXCAgXF8KIHwvICAvICAgICAgXCB8IHwKIHxfXy8gICAgICAgIFx8X3wK").getBytes(UTF_8)), UTF_8));
    } else {
      throw new ShellCommandException(ErrorCode.UNRECOGNIZED_COMMAND, getName());
    }
File
HiddenCommand.java
Developer's decision
Version 2
Kind of conflict
Other
Chunk
Conflicting content
    if (!password.equals(passwordConfirm)) {
      throw new IllegalArgumentException("Passwords do not match");
    }
<<<<<<< HEAD:shell/src/main/java/org/apache/accumulo/shell/commands/PasswdCommand.java
    byte[] pass = password.getBytes(StandardCharsets.UTF_8);
=======
    byte[] pass = password.getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/util/shell/commands/PasswdCommand.java
    shellState.getConnector().securityOperations().changeLocalUserPassword(user, new PasswordToken(pass));
    // update the current credentials if the password changed was for
    // the current user
Solution content
    if (!password.equals(passwordConfirm)) {
      throw new IllegalArgumentException("Passwords do not match");
    }
    byte[] pass = password.getBytes(UTF_8);
    shellState.getConnector().securityOperations().changeLocalUserPassword(user, new PasswordToken(pass));
    // update the current credentials if the password changed was for
    // the current user
File
PasswdCommand.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    
    final byte[] token = new byte[input.length()];
    int tokenLength = 0;
<<<<<<< HEAD:shell/src/main/java/org/apache/accumulo/shell/commands/QuotedStringTokenizer.java
    final byte[] inputBytes = input.getBytes(StandardCharsets.UTF_8);
=======
    final byte[] inputBytes = input.getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/util/shell/commands/QuotedStringTokenizer.java
    for (int i = 0; i < input.length(); ++i) {
      final char ch = input.charAt(i);
      
Solution content
    
    final byte[] token = new byte[input.length()];
    int tokenLength = 0;
    final byte[] inputBytes = input.getBytes(UTF_8);
    for (int i = 0; i < input.length(); ++i) {
      final char ch = input.charAt(i);
      
File
QuotedStringTokenizer.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
      shellState.getReader().println();
      return 0;
    } // user canceled
<<<<<<< HEAD:shell/src/main/java/org/apache/accumulo/shell/commands/UserCommand.java
    pass = p.getBytes(StandardCharsets.UTF_8);
=======
    pass = p.getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/util/shell/commands/UserCommand.java
    shellState.updateUser(user, new PasswordToken(pass));
    return 0;
  }
Solution content
      shellState.getReader().println();
      return 0;
    } // user canceled
    pass = p.getBytes(UTF_8);
    shellState.updateUser(user, new PasswordToken(pass));
    return 0;
  }
File
UserCommand.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
import jline.console.ConsoleReader;

<<<<<<< HEAD:shell/src/main/java/org/apache/accumulo/shell/mock/MockShell.java
import org.apache.accumulo.core.client.mock.MockInstance;
import org.apache.accumulo.shell.Shell;
import org.apache.accumulo.shell.ShellOptionsJC;
=======
import org.apache.accumulo.core.util.shell.Shell;
import org.apache.accumulo.core.util.shell.ShellOptionsJC;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/client/mock/MockShell.java

/**
 * An Accumulo Shell implementation that allows a developer to attach an InputStream and Writer to the Shell for testing purposes.
Solution content
import jline.console.ConsoleReader;

import org.apache.accumulo.core.client.mock.MockInstance;
import org.apache.accumulo.shell.Shell;
import org.apache.accumulo.shell.ShellOptionsJC;

/**
 * An Accumulo Shell implementation that allows a developer to attach an InputStream and Writer to the Shell for testing purposes.
File
MockShell.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
    this.out = out;
  }

<<<<<<< HEAD:shell/src/main/java/org/apache/accumulo/shell/mock/MockShell.java
=======
  /**
   * @deprecated since 1.6.0; use OutputStream version
   */
  @Deprecated
  public MockShell(InputStream in, Writer out) throws IOException {
    this(in, new WriterOutputStream(out, UTF_8.name()));
    this.writer = out;
  }
  
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/client/mock/MockShell.java
  public boolean config(String... args) {
    configError = super.config(args);
    
Solution content
    this.out = out;
  }

  public boolean config(String... args) {
    configError = super.config(args);
    
File
MockShell.java
Developer's decision
Version 1
Kind of conflict
Annotation
Comment
Method declaration
Chunk
Conflicting content
<<<<<<< HEAD:shell/src/main/java/org/apache/accumulo/shell/mock/MockShell.java
      printInfo();
    
    if (execFile != null) {
      java.util.Scanner scanner = new java.util.Scanner(execFile, StandardCharsets.UTF_8.name());
=======
      java.util.Scanner scanner = new java.util.Scanner(execFile, UTF_8.name());
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/client/mock/MockShell.java
      try {
        while (scanner.hasNextLine() && !hasExited()) {
          execCommand(scanner.nextLine(), true, isVerbose());
Solution content
      printInfo();
    
    if (execFile != null) {
      java.util.Scanner scanner = new java.util.Scanner(execFile, UTF_8.name());
      try {
        while (scanner.hasNextLine() && !hasExited()) {
          execCommand(scanner.nextLine(), true, isVerbose());
File
MockShell.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
  }

  /**
<<<<<<< HEAD:shell/src/main/java/org/apache/accumulo/shell/mock/MockShell.java
=======
   * @deprecated since 1.6.0; use the OutputStream version
   */
  @Deprecated
  public void setConsoleWriter(Writer out) {
    setConsoleWriter(new WriterOutputStream(out, UTF_8.name()));
    this.writer = out;
  }
  
  /**
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/client/mock/MockShell.java
   * Convenience method to create the byte-array to hand to the console
   * 
   * @param commands
Solution content
  }

  /**
   * Convenience method to create the byte-array to hand to the console
   * 
   * @param commands
File
MockShell.java
Developer's decision
Version 1
Kind of conflict
Annotation
Comment
Method declaration
Chunk
Conflicting content
      sb.append(command).append(NEWLINE);
    }
    
<<<<<<< HEAD:shell/src/main/java/org/apache/accumulo/shell/mock/MockShell.java
    return new ByteArrayInputStream(sb.toString().getBytes(StandardCharsets.UTF_8));
=======
    return new ByteArrayInputStream(sb.toString().getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/main/java/org/apache/accumulo/core/client/mock/MockShell.java
  }
}
Solution content
      sb.append(command).append(NEWLINE);
    }
    
    return new ByteArrayInputStream(sb.toString().getBytes(UTF_8));
  }
}
File
MockShell.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
 */
package org.apache.accumulo.shell.format;

<<<<<<< HEAD:shell/src/test/java/org/apache/accumulo/shell/format/DeleterFormatterTest.java
=======
import static com.google.common.base.Charsets.UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/test/java/org/apache/accumulo/core/util/format/DeleterFormatterTest.java
import static org.easymock.EasyMock.anyObject;
import static org.easymock.EasyMock.createMock;
import static org.easymock.EasyMock.createNiceMock;
Solution content
 */
package org.apache.accumulo.shell.format;

import static java.nio.charset.StandardCharsets.UTF_8;
import static org.easymock.EasyMock.anyObject;
import static org.easymock.EasyMock.createMock;
import static org.easymock.EasyMock.createNiceMock;
File
DeleterFormatterTest.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    }

    public void set(String in) {
<<<<<<< HEAD:shell/src/test/java/org/apache/accumulo/shell/format/DeleterFormatterTest.java
      bais = new ByteArrayInputStream(in.getBytes(StandardCharsets.UTF_8));
=======
      bais = new ByteArrayInputStream(in.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/test/java/org/apache/accumulo/core/util/format/DeleterFormatterTest.java
    }
  };
Solution content
    }

    public void set(String in) {
      bais = new ByteArrayInputStream(in.getBytes(UTF_8));
    }
  };
File
DeleterFormatterTest.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
    replay(writer, exceptionWriter, shellState);

    data = new TreeMap();
<<<<<<< HEAD:shell/src/test/java/org/apache/accumulo/shell/format/DeleterFormatterTest.java
    data.put(new Key("r", "cf", "cq"), new Value("value".getBytes(StandardCharsets.UTF_8)));
=======
    data.put(new Key("r", "cf", "cq"), new Value("value".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/test/java/org/apache/accumulo/core/util/format/DeleterFormatterTest.java
  }

  @Test
Solution content
    replay(writer, exceptionWriter, shellState);

    data = new TreeMap();
    data.put(new Key("r", "cf", "cq"), new Value("value".getBytes(UTF_8)));
  }

  @Test
File
DeleterFormatterTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  @Test
  public void testNo() throws IOException {
    input.set("no\n");
<<<<<<< HEAD:shell/src/test/java/org/apache/accumulo/shell/format/DeleterFormatterTest.java
    data.put(new Key("z"), new Value("v2".getBytes(StandardCharsets.UTF_8)));
=======
    data.put(new Key("z"), new Value("v2".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/test/java/org/apache/accumulo/core/util/format/DeleterFormatterTest.java
    formatter = new DeleterFormatter(writer, data.entrySet(), true, shellState, false);

    assertTrue(formatter.hasNext());
Solution content
  @Test
  public void testNo() throws IOException {
    input.set("no\n");
    data.put(new Key("z"), new Value("v2".getBytes(UTF_8)));
    formatter = new DeleterFormatter(writer, data.entrySet(), true, shellState, false);

    assertTrue(formatter.hasNext());
File
DeleterFormatterTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  @Test
  public void testNoConfirmation() throws IOException {
    input.set("");
<<<<<<< HEAD:shell/src/test/java/org/apache/accumulo/shell/format/DeleterFormatterTest.java
    data.put(new Key("z"), new Value("v2".getBytes(StandardCharsets.UTF_8)));
=======
    data.put(new Key("z"), new Value("v2".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/test/java/org/apache/accumulo/core/util/format/DeleterFormatterTest.java
    formatter = new DeleterFormatter(writer, data.entrySet(), true, shellState, false);

    assertTrue(formatter.hasNext());
Solution content
  @Test
  public void testNoConfirmation() throws IOException {
    input.set("");
    data.put(new Key("z"), new Value("v2".getBytes(UTF_8)));
    formatter = new DeleterFormatter(writer, data.entrySet(), true, shellState, false);

    assertTrue(formatter.hasNext());
File
DeleterFormatterTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  @Test
  public void testYes() throws IOException {
    input.set("y\nyes\n");
<<<<<<< HEAD:shell/src/test/java/org/apache/accumulo/shell/format/DeleterFormatterTest.java
    data.put(new Key("z"), new Value("v2".getBytes(StandardCharsets.UTF_8)));
=======
    data.put(new Key("z"), new Value("v2".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f:core/src/test/java/org/apache/accumulo/core/util/format/DeleterFormatterTest.java
    formatter = new DeleterFormatter(writer, data.entrySet(), true, shellState, false);

    assertTrue(formatter.hasNext());
Solution content
  @Test
  public void testYes() throws IOException {
    input.set("y\nyes\n");
    data.put(new Key("z"), new Value("v2".getBytes(UTF_8)));
    formatter = new DeleterFormatter(writer, data.entrySet(), true, shellState, false);

    assertTrue(formatter.hasNext());
File
DeleterFormatterTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    if (args.length == 5) {
      System.err.println("Deprecated syntax for BulkImportDirectory, please use the new style (see --help)");
      final String user = args[0];
<<<<<<< HEAD
      final byte[] pass = args[1].getBytes(StandardCharsets.UTF_8);
=======
      final byte[] pass = args[1].getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      final String tableName = args[2];
      final String dir = args[3];
      final String failureDir = args[4];
Solution content
    if (args.length == 5) {
      System.err.println("Deprecated syntax for BulkImportDirectory, please use the new style (see --help)");
      final String user = args[0];
      final byte[] pass = args[1].getBytes(UTF_8);
      final String tableName = args[2];
      final String dir = args[3];
      final String failureDir = args[4];
File
BulkImportDirectory.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
import java.util.Iterator;
 */
package org.apache.accumulo.test;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Map.Entry;
Solution content
 */
package org.apache.accumulo.test;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Iterator;
import java.util.Map.Entry;
File
NativeMapConcurrencyTest.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    for (int i = 0; i < numRows; i++) {
      Mutation m = nm(i + start);
      for (int j = 0; j < numCols; j++) {
<<<<<<< HEAD
        Value val = new Value("test".getBytes(StandardCharsets.UTF_8));
=======
        Value val = new Value("test".getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        pc(m, j, val);
      }
      nm.mutate(m, mc++);
Solution content
    for (int i = 0; i < numRows; i++) {
      Mutation m = nm(i + start);
      for (int j = 0; j < numCols; j++) {
        Value val = new Value("test".getBytes(UTF_8));
        pc(m, j, val);
      }
      nm.mutate(m, mc++);
File
NativeMapConcurrencyTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.test;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Collections;
import java.util.Iterator;
import java.util.Map.Entry;
Solution content
 */
package org.apache.accumulo.test;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Collections;
import java.util.Iterator;
import java.util.Map.Entry;
File
NativeMapPerformanceTest.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
        Mutation m = nm(row);
        for (int j = 0; j < numCols; j++) {
          int col = rand.nextInt(1000000);
<<<<<<< HEAD
          Value val = new Value("test".getBytes(StandardCharsets.UTF_8));
=======
          Value val = new Value("test".getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          pc(m, col, val);
        }
        nm.mutate(m, i);
Solution content
        Mutation m = nm(row);
        for (int j = 0; j < numCols; j++) {
          int col = rand.nextInt(1000000);
          Value val = new Value("test".getBytes(UTF_8));
          pc(m, col, val);
        }
        nm.mutate(m, i);
File
NativeMapPerformanceTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
        for (int j = 0; j < numCols; j++) {
          int col = rand.nextInt(1000000);
          Key key = nk(row, col);
<<<<<<< HEAD
          Value val = new Value("test".getBytes(StandardCharsets.UTF_8));
=======
          Value val = new Value("test".getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          tm.put(key, val);
        }
      }
Solution content
        for (int j = 0; j < numCols; j++) {
          int col = rand.nextInt(1000000);
          Key key = nk(row, col);
          Value val = new Value("test".getBytes(UTF_8));
          tm.put(key, val);
        }
      }
File
NativeMapPerformanceTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.test;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
Solution content
 */
package org.apache.accumulo.test;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
File
NativeMapStressTest.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
  
  private static void put(NativeMap nm, String row, String val, int mc) {
    Mutation m = new Mutation(new Text(row));
<<<<<<< HEAD
    m.put(new Text(), new Text(), Long.MAX_VALUE, new Value(val.getBytes(StandardCharsets.UTF_8)));
=======
    m.put(new Text(), new Text(), Long.MAX_VALUE, new Value(val.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    nm.mutate(m, mc);
  }
  
Solution content
  
  private static void put(NativeMap nm, String row, String val, int mc) {
    Mutation m = new Mutation(new Text(row));
    m.put(new Text(), new Text(), Long.MAX_VALUE, new Value(val.getBytes(UTF_8)));
    nm.mutate(m, mc);
  }
  
File
NativeMapStressTest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.test;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Iterator;
import java.util.Map.Entry;
import java.util.Random;
Solution content
 */
package org.apache.accumulo.test;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Iterator;
import java.util.Map.Entry;
import java.util.Random;
File
TestBinaryRows.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
  public static void runTest(Connector connector, Opts opts, BatchWriterOpts bwOpts, ScannerOpts scanOpts) throws Exception {
    
    final Text CF = new Text("cf"), CQ = new Text("cq");
<<<<<<< HEAD
    final byte[] CF_BYTES = "cf".getBytes(StandardCharsets.UTF_8), CQ_BYTES = "cq".getBytes(StandardCharsets.UTF_8);
=======
    final byte[] CF_BYTES = "cf".getBytes(UTF_8), CQ_BYTES = "cq".getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    if (opts.mode.equals("ingest") || opts.mode.equals("delete")) {
      BatchWriter bw = connector.createBatchWriter(opts.getTableName(), bwOpts.getBatchWriterConfig());
      boolean delete = opts.mode.equals("delete");
Solution content
  public static void runTest(Connector connector, Opts opts, BatchWriterOpts bwOpts, ScannerOpts scanOpts) throws Exception {
    
    final Text CF = new Text("cf"), CQ = new Text("cq");
    final byte[] CF_BYTES = "cf".getBytes(UTF_8), CQ_BYTES = "cq".getBytes(UTF_8);
    if (opts.mode.equals("ingest") || opts.mode.equals("delete")) {
      BatchWriter bw = connector.createBatchWriter(opts.getTableName(), bwOpts.getBatchWriterConfig());
      boolean delete = opts.mode.equals("delete");
File
TestBinaryRows.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
        if (delete) {
          m.putDelete(CF, CQ);
        } else {
<<<<<<< HEAD
          m.put(CF, CQ, new Value(value.getBytes(StandardCharsets.UTF_8)));
=======
          m.put(CF, CQ, new Value(value.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        }
        bw.addMutation(m);
      }
Solution content
        if (delete) {
          m.putDelete(CF, CQ);
        } else {
          m.put(CF, CQ, new Value(value.getBytes(UTF_8)));
        }
        bw.addMutation(m);
      }
File
TestBinaryRows.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    return bytevals;
  }
  
<<<<<<< HEAD
  private static byte ROW_PREFIX[] = "row_".getBytes(StandardCharsets.UTF_8);
  private static byte COL_PREFIX[] = "col_".getBytes(StandardCharsets.UTF_8);
=======
  private static byte ROW_PREFIX[] = "row_".getBytes(UTF_8);
  private static byte COL_PREFIX[] = "col_".getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  
  public static Text generateRow(int rowid, int startRow) {
    return new Text(FastFormat.toZeroPaddedString(rowid + startRow, 10, 10, ROW_PREFIX));
Solution content
    return bytevals;
  }
  
  private static byte ROW_PREFIX[] = "row_".getBytes(UTF_8);
  private static byte COL_PREFIX[] = "col_".getBytes(UTF_8);
  
  public static Text generateRow(int rowid, int startRow) {
    return new Text(FastFormat.toZeroPaddedString(rowid + startRow, 10, 10, ROW_PREFIX));
File
TestIngest.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.test;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.ArrayList;
import java.util.List;
import java.util.Map.Entry;
Solution content
 */
package org.apache.accumulo.test;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.ArrayList;
import java.util.List;
import java.util.Map.Entry;
File
TestMultiTableIngest.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
      // populate
      for (int i = 0; i < opts.count; i++) {
        Mutation m = new Mutation(new Text(String.format("%06d", i)));
<<<<<<< HEAD
        m.put(new Text("col" + Integer.toString((i % 3) + 1)), new Text("qual"), new Value("junk".getBytes(StandardCharsets.UTF_8)));
=======
        m.put(new Text("col" + Integer.toString((i % 3) + 1)), new Text("qual"), new Value("junk".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        b.getBatchWriter(tableNames.get(i % tableNames.size())).addMutation(m);
      }
      try {
Solution content
      // populate
      for (int i = 0; i < opts.count; i++) {
        Mutation m = new Mutation(new Text(String.format("%06d", i)));
        m.put(new Text("col" + Integer.toString((i % 3) + 1)), new Text("qual"), new Value("junk".getBytes(UTF_8)));
        b.getBatchWriter(tableNames.get(i % tableNames.size())).addMutation(m);
      }
      try {
File
TestMultiTableIngest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    visibilities = new ArrayList();
    
    FileSystem fs = FileSystem.get(new Configuration());
<<<<<<< HEAD
    BufferedReader in = new BufferedReader(new InputStreamReader(fs.open(new Path(opts.visFile)), StandardCharsets.UTF_8));
=======
    BufferedReader in = new BufferedReader(new InputStreamReader(fs.open(new Path(opts.visFile)), UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    
    String line;
    
Solution content
    visibilities = new ArrayList();
    
    FileSystem fs = FileSystem.get(new Configuration());
    BufferedReader in = new BufferedReader(new InputStreamReader(fs.open(new Path(opts.visFile)), UTF_8));
    
    String line;
    
File
ContinuousIngest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    
    Random r = new Random();
    
<<<<<<< HEAD
    byte[] ingestInstanceId = UUID.randomUUID().toString().getBytes(StandardCharsets.UTF_8);
    
    System.out.printf("UUID %d %s%n", System.currentTimeMillis(), new String(ingestInstanceId, StandardCharsets.UTF_8));
=======
    byte[] ingestInstanceId = UUID.randomUUID().toString().getBytes(UTF_8);
    
    System.out.printf("UUID %d %s%n", System.currentTimeMillis(), new String(ingestInstanceId, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    
    long count = 0;
    final int flushInterval = 1000000;
Solution content
    
    Random r = new Random();
    
    long count = 0;
    byte[] ingestInstanceId = UUID.randomUUID().toString().getBytes(UTF_8);
    
    System.out.printf("UUID %d %s%n", System.currentTimeMillis(), new String(ingestInstanceId, UTF_8));
    
    final int flushInterval = 1000000;
File
ContinuousIngest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
      
      random = new Random();
      ingestInstanceId = context.getConfiguration().get(CI_ID);
<<<<<<< HEAD
      iiId = ingestInstanceId.getBytes(StandardCharsets.UTF_8);
=======
      iiId = ingestInstanceId.getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      
      count = 0;
    }
Solution content
      
      random = new Random();
      ingestInstanceId = context.getConfiguration().get(CI_ID);
      iiId = ingestInstanceId.getBytes(UTF_8);
      
      count = 0;
    }
File
ContinuousMoru.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
        
        int offset = ContinuousWalk.getPrevRowOffset(val);
        if (offset > 0) {
<<<<<<< HEAD
          long rowLong = Long.parseLong(new String(val, offset, 16, StandardCharsets.UTF_8), 16);
=======
          long rowLong = Long.parseLong(new String(val, offset, 16, UTF_8), 16);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          Mutation m = ContinuousIngest.genMutation(rowLong, random.nextInt(max_cf), random.nextInt(max_cq), EMPTY_VIS, iiId, count++, key.getRowData()
              .toArray(), random, true);
          context.write(null, m);
Solution content
        
        int offset = ContinuousWalk.getPrevRowOffset(val);
        if (offset > 0) {
          long rowLong = Long.parseLong(new String(val, offset, 16, UTF_8), 16);
          Mutation m = ContinuousIngest.genMutation(rowLong, random.nextInt(max_cf), random.nextInt(max_cq), EMPTY_VIS, iiId, count++, key.getRowData()
              .toArray(), random, true);
          context.write(null, m);
File
ContinuousMoru.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.test.continuous;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Map.Entry;
import java.util.Random;
Solution content
 */
package org.apache.accumulo.test.continuous;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Map.Entry;
import java.util.Random;
File
ContinuousQuery.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
      }
      long t2 = System.currentTimeMillis();
      
<<<<<<< HEAD
      System.out.printf("SRQ %d %s %d %d%n", t1, new String(row, StandardCharsets.UTF_8), (t2 - t1), count);
=======
      System.out.printf("SRQ %d %s %d %d%n", t1, new String(row, UTF_8), (t2 - t1), count);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      
      if (opts.sleepTime > 0)
        Thread.sleep(opts.sleepTime);
Solution content
      }
      long t2 = System.currentTimeMillis();
      
      System.out.printf("SRQ %d %s %d %d%n", t1, new String(row, UTF_8), (t2 - t1), count);
      
      if (opts.sleepTime > 0)
        Thread.sleep(opts.sleepTime);
File
ContinuousQuery.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.test.continuous;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Iterator;
import java.util.Map.Entry;
import java.util.Random;
Solution content
 */
package org.apache.accumulo.test.continuous;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Iterator;
import java.util.Map.Entry;
import java.util.Random;
File
ContinuousScanner.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
        // System.out.println("P2 "+delta +" "+numToScan+" "+distance+"  "+((double)numToScan/count ));
      }
      
<<<<<<< HEAD
      System.out.printf("SCN %d %s %d %d%n", t1, new String(scanStart, StandardCharsets.UTF_8), (t2 - t1), count);
=======
      System.out.printf("SCN %d %s %d %d%n", t1, new String(scanStart, UTF_8), (t2 - t1), count);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      
      if (opts.sleepTime > 0)
        UtilWaitThread.sleep(opts.sleepTime);
Solution content
        // System.out.println("P2 "+delta +" "+numToScan+" "+distance+"  "+((double)numToScan/count ));
      }
      
      System.out.printf("SCN %d %s %d %d%n", t1, new String(scanStart, UTF_8), (t2 - t1), count);
      
      if (opts.sleepTime > 0)
        UtilWaitThread.sleep(opts.sleepTime);
File
ContinuousScanner.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
import java.util.Random;
import java.util.Set;

<<<<<<< HEAD
import org.apache.accumulo.core.cli.MapReduceClientOnDefaultTable;
=======
import org.apache.accumulo.core.cli.ClientOnDefaultTable;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import org.apache.accumulo.core.client.Connector;
import org.apache.accumulo.core.client.mapreduce.AccumuloInputFormat;
import org.apache.accumulo.core.data.Key;
Solution content
import java.util.Random;
import java.util.Set;

import org.apache.accumulo.core.cli.MapReduceClientOnDefaultTable;
import org.apache.accumulo.core.client.Connector;
import org.apache.accumulo.core.client.mapreduce.AccumuloInputFormat;
import org.apache.accumulo.core.data.Key;
File
ContinuousVerify.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
      int offset = ContinuousWalk.getPrevRowOffset(val);
      if (offset > 0) {
<<<<<<< HEAD
        ref.set(Long.parseLong(new String(val, offset, 16, StandardCharsets.UTF_8), 16));
=======
        ref.set(Long.parseLong(new String(val, offset, 16, UTF_8), 16));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        vrow.set(r);
        context.write(ref, vrow);
      }
Solution content
      int offset = ContinuousWalk.getPrevRowOffset(val);
      if (offset > 0) {
        ref.set(Long.parseLong(new String(val, offset, 16, UTF_8), 16));
        vrow.set(r);
        context.write(ref, vrow);
      }
File
ContinuousVerify.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
        for (Long ref : refs) {
          sb.append(comma);
          comma = ",";
<<<<<<< HEAD
          sb.append(new String(ContinuousIngest.genRow(ref), StandardCharsets.UTF_8));
=======
          sb.append(new String(ContinuousIngest.genRow(ref), UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        }

        context.write(new Text(ContinuousIngest.genRow(key.get())), new Text(sb.toString()));
Solution content
        for (Long ref : refs) {
          sb.append(comma);
          comma = ",";
          sb.append(new String(ContinuousIngest.genRow(ref), UTF_8));
        }

        context.write(new Text(ContinuousIngest.genRow(key.get())), new Text(sb.toString()));
File
ContinuousVerify.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
      auths = new ArrayList();
      
      FileSystem fs = FileSystem.get(new Configuration());
<<<<<<< HEAD
      BufferedReader in = new BufferedReader(new InputStreamReader(fs.open(new Path(file)), StandardCharsets.UTF_8));
=======
      BufferedReader in = new BufferedReader(new InputStreamReader(fs.open(new Path(file)), UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      try {
        String line;
        while ((line = in.readLine()) != null) {
Solution content
      auths = new ArrayList();
      
      FileSystem fs = FileSystem.get(new Configuration());
      BufferedReader in = new BufferedReader(new InputStreamReader(fs.open(new Path(file)), UTF_8));
      try {
        String line;
        while ((line = in.readLine()) != null) {
File
ContinuousWalk.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    
    long t2 = System.currentTimeMillis();
    
<<<<<<< HEAD
    System.out.printf("FSR %d %s %d %d%n", t1, new String(scanStart, StandardCharsets.UTF_8), (t2 - t1), count);
=======
    System.out.printf("FSR %d %s %d %d%n", t1, new String(scanStart, UTF_8), (t2 - t1), count);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    
    return pr;
  }
Solution content
    
    long t2 = System.currentTimeMillis();
    
    System.out.printf("FSR %d %s %d %d%n", t1, new String(scanStart, UTF_8), (t2 - t1), count);
    
    return pr;
  }
File
ContinuousWalk.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    if (val.length == 0)
      throw new IllegalArgumentException();
    if (val[53] != ':')
<<<<<<< HEAD
      throw new IllegalArgumentException(new String(val, StandardCharsets.UTF_8));
=======
      throw new IllegalArgumentException(new String(val, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    
    // prev row starts at 54
    if (val[54] != ':') {
Solution content
    if (val.length == 0)
      throw new IllegalArgumentException();
    if (val[53] != ':')
      throw new IllegalArgumentException(new String(val, UTF_8));
    
    // prev row starts at 54
    if (val[54] != ':') {
File
ContinuousWalk.java
Developer's decision
Version 2
Kind of conflict
Throw statement
Chunk
Conflicting content
    // prev row starts at 54
    if (val[54] != ':') {
      if (val[54 + 16] != ':')
<<<<<<< HEAD
        throw new IllegalArgumentException(new String(val, StandardCharsets.UTF_8));
=======
        throw new IllegalArgumentException(new String(val, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      return 54;
    }
    
Solution content
    // prev row starts at 54
    if (val[54] != ':') {
      if (val[54 + 16] != ':')
        throw new IllegalArgumentException(new String(val, UTF_8));
      return 54;
    }
    
File
ContinuousWalk.java
Developer's decision
Version 2
Kind of conflict
Throw statement
Chunk
Conflicting content
    byte[] val = value.get();
    int offset = getPrevRowOffset(val);
    if (offset > 0) {
<<<<<<< HEAD
      return new String(val, offset, 16, StandardCharsets.UTF_8);
=======
      return new String(val, offset, 16, UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    }
    
    return null;
Solution content
    byte[] val = value.get();
    int offset = getPrevRowOffset(val);
    if (offset > 0) {
      return new String(val, offset, 16, UTF_8);
    }
    
    return null;
File
ContinuousWalk.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
  static int getChecksumOffset(byte val[]) {
    if (val[val.length - 1] != ':') {
      if (val[val.length - 9] != ':')
<<<<<<< HEAD
        throw new IllegalArgumentException(new String(val, StandardCharsets.UTF_8));
=======
        throw new IllegalArgumentException(new String(val, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      return val.length - 8;
    }
    
Solution content
  static int getChecksumOffset(byte val[]) {
    if (val[val.length - 1] != ':') {
      if (val[val.length - 9] != ':')
        throw new IllegalArgumentException(new String(val, UTF_8));
      return val.length - 8;
    }
    
File
ContinuousWalk.java
Developer's decision
Version 2
Kind of conflict
Throw statement
Chunk
Conflicting content
    if (ckOff < 0)
      return;
    
<<<<<<< HEAD
    long storedCksum = Long.parseLong(new String(value.get(), ckOff, 8, StandardCharsets.UTF_8), 16);
=======
    long storedCksum = Long.parseLong(new String(value.get(), ckOff, 8, UTF_8), 16);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    
    CRC32 cksum = new CRC32();
    
Solution content
    if (ckOff < 0)
      return;
    
    long storedCksum = Long.parseLong(new String(value.get(), ckOff, 8, UTF_8), 16);
    
    CRC32 cksum = new CRC32();
    
File
ContinuousWalk.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    
    FileOutputStream fos = new FileOutputStream(file);
    BufferedOutputStream bos = new BufferedOutputStream(fos);
<<<<<<< HEAD
    PrintStream ps = new PrintStream(bos, false, StandardCharsets.UTF_8.name());
=======
    PrintStream ps = new PrintStream(bos, false, UTF_8.name());
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    
    TreeSet> sortedCounts = new TreeSet>(counts.values());
    for (Iterator> iter = sortedCounts.iterator(); iter.hasNext();) {
Solution content
    
    FileOutputStream fos = new FileOutputStream(file);
    BufferedOutputStream bos = new BufferedOutputStream(fos);
    PrintStream ps = new PrintStream(bos, false, UTF_8.name());
    
    TreeSet> sortedCounts = new TreeSet>(counts.values());
    for (Iterator> iter = sortedCounts.iterator(); iter.hasNext();) {
File
Histogram.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import org.apache.log4j.Logger;

public class PrintScanTimeHistogram {
Solution content
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import org.apache.log4j.Logger;

public class PrintScanTimeHistogram {
File
PrintScanTimeHistogram.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
  
  private static void processFile(InputStream ins, Histogram srqHist, Histogram fsrHist) throws FileNotFoundException, IOException {
    String line;
<<<<<<< HEAD
    BufferedReader in = new BufferedReader(new InputStreamReader(ins, StandardCharsets.UTF_8));
=======
    BufferedReader in = new BufferedReader(new InputStreamReader(ins, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    
    while ((line = in.readLine()) != null) {
      
Solution content
  
  private static void processFile(InputStream ins, Histogram srqHist, Histogram fsrHist) throws FileNotFoundException, IOException {
    String line;
    BufferedReader in = new BufferedReader(new InputStreamReader(ins, UTF_8));
    
    while ((line = in.readLine()) != null) {
      
File
PrintScanTimeHistogram.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    Operation operation = Operation.valueOf(opts.operation);
    SimpleDateFormat sdf = new SimpleDateFormat(opts.dateFormat);
    
<<<<<<< HEAD
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in, StandardCharsets.UTF_8));
=======
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    
    String line = null;
    
Solution content
    Operation operation = Operation.valueOf(opts.operation);
    SimpleDateFormat sdf = new SimpleDateFormat(opts.dateFormat);
    
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in, UTF_8));
    
    String line = null;
    
File
TimeBinner.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    }

    private void parseLog(File log) throws Exception {
<<<<<<< HEAD
      BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(log), StandardCharsets.UTF_8));
=======
      BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(log), UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      String line;
      TreeMap tm = null;
      try {
Solution content
    }

    private void parseLog(File log) throws Exception {
      BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(log), UTF_8));
      String line;
      TreeMap tm = null;
      try {
File
UndefinedAnalyzer.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
      for (File masterLog : masterLogs) {

<<<<<<< HEAD
        BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(masterLog), StandardCharsets.UTF_8));
=======
        BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(masterLog), UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        String line;
        try {
          while ((line = reader.readLine()) != null) {
Solution content
      for (File masterLog : masterLogs) {

        BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(masterLog), UTF_8));
        String line;
        try {
          while ((line = reader.readLine()) != null) {
File
UndefinedAnalyzer.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    List undefs = new ArrayList();

<<<<<<< HEAD
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in, StandardCharsets.UTF_8));
=======
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    String line;
    while ((line = reader.readLine()) != null) {
      String[] tokens = line.split("\\s");
Solution content
    List undefs = new ArrayList();

    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in, UTF_8));
    String line;
    while ((line = reader.readLine()) != null) {
      String[] tokens = line.split("\\s");
File
UndefinedAnalyzer.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
      for (int i = 0; i < numData; i++) {
        byte[] v = zc.get(rootDir + "/data" + i);
        if (v != null)
<<<<<<< HEAD
          readData.put(rootDir + "/data" + i, new String(v, StandardCharsets.UTF_8));
=======
          readData.put(rootDir + "/data" + i, new String(v, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      }
      
      byte[] v = zc.get(rootDir + "/dataS");
Solution content
      for (int i = 0; i < numData; i++) {
        byte[] v = zc.get(rootDir + "/data" + i);
        if (v != null)
          readData.put(rootDir + "/data" + i, new String(v, UTF_8));
      }
      
      byte[] v = zc.get(rootDir + "/dataS");
File
CacheTestReader.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
      
      byte[] v = zc.get(rootDir + "/dataS");
      if (v != null)
<<<<<<< HEAD
        readData.put(rootDir + "/dataS", new String(v, StandardCharsets.UTF_8));
=======
        readData.put(rootDir + "/dataS", new String(v, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      
      List children = zc.getChildren(rootDir + "/dir");
      if (children != null)
Solution content
      
      byte[] v = zc.get(rootDir + "/dataS");
      if (v != null)
        readData.put(rootDir + "/dataS", new String(v, UTF_8));
      
      List children = zc.getChildren(rootDir + "/dir");
      if (children != null)
File
CacheTestReader.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
        
        // change values
        for (int i = 0; i < numData; i++) {
<<<<<<< HEAD
          byte data[] = Long.toString(r.nextLong(), 16).getBytes(StandardCharsets.UTF_8);
          zk.putPersistentData(rootDir + "/data" + i, data, NodeExistsPolicy.OVERWRITE);
          expectedData.put(rootDir + "/data" + i, new String(data, StandardCharsets.UTF_8));
=======
          byte data[] = Long.toString(r.nextLong(), 16).getBytes(UTF_8);
          zk.putPersistentData(rootDir + "/data" + i, data, NodeExistsPolicy.OVERWRITE);
          expectedData.put(rootDir + "/data" + i, new String(data, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        }
        
        // test a data node that does not always exists...
Solution content
        
        // change values
        for (int i = 0; i < numData; i++) {
          byte data[] = Long.toString(r.nextLong(), 16).getBytes(UTF_8);
          zk.putPersistentData(rootDir + "/data" + i, data, NodeExistsPolicy.OVERWRITE);
          expectedData.put(rootDir + "/data" + i, new String(data, UTF_8));
        }
        
        // test a data node that does not always exists...
File
CacheTestWriter.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
        // test a data node that does not always exists...
        if (r.nextFloat() < .5) {
          
<<<<<<< HEAD
          byte data[] = Long.toString(r.nextLong(), 16).getBytes(StandardCharsets.UTF_8);
=======
          byte data[] = Long.toString(r.nextLong(), 16).getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          
          if (!dataSExists) {
            zk.putPersistentData(rootDir + "/dataS", data, NodeExistsPolicy.SKIP);
Solution content
        // test a data node that does not always exists...
        if (r.nextFloat() < .5) {
          
          byte data[] = Long.toString(r.nextLong(), 16).getBytes(UTF_8);
          
          if (!dataSExists) {
            zk.putPersistentData(rootDir + "/dataS", data, NodeExistsPolicy.SKIP);
File
CacheTestWriter.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
            zk.putPersistentData(rootDir + "/dataS", data, NodeExistsPolicy.OVERWRITE);
          }
          
<<<<<<< HEAD
          expectedData.put(rootDir + "/dataS", new String(data, StandardCharsets.UTF_8));
=======
          expectedData.put(rootDir + "/dataS", new String(data, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          
        } else {
          if (dataSExists) {
Solution content
            zk.putPersistentData(rootDir + "/dataS", data, NodeExistsPolicy.OVERWRITE);
          }
          
          expectedData.put(rootDir + "/dataS", new String(data, UTF_8));
          
        } else {
          if (dataSExists) {
File
CacheTestWriter.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
import java.nio.charset.StandardCharsets;
=======
 */
package org.apache.accumulo.test.functional;

<<<<<<< HEAD
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.HashMap;
import java.util.Random;
Solution content
 */
package org.apache.accumulo.test.functional;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.HashMap;
import java.util.Random;
File
ZombieTServer.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
      }
    };
    
<<<<<<< HEAD
    byte[] lockContent = new ServerServices(addressString, Service.TSERV_CLIENT).toString().getBytes(StandardCharsets.UTF_8);
=======
    byte[] lockContent = new ServerServices(addressString, Service.TSERV_CLIENT).toString().getBytes(UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    if (zlock.tryLock(lw, lockContent)) {
      log.debug("Obtained tablet server lock " + zlock.getLockPath());
    }
Solution content
      }
    };
    
    byte[] lockContent = new ServerServices(addressString, Service.TSERV_CLIENT).toString().getBytes(UTF_8);
    if (zlock.tryLock(lw, lockContent)) {
      log.debug("Obtained tablet server lock " + zlock.getLockPath());
    }
File
ZombieTServer.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.test.performance.metadata;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
Solution content
 */
package org.apache.accumulo.test.performance.metadata;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
File
MetadataBatchScanTest.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
        
        String dir = "/t-" + UUID.randomUUID();
        
<<<<<<< HEAD
        TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(mut, new Value(dir.getBytes(StandardCharsets.UTF_8)));
        
        for (int i = 0; i < 5; i++) {
          mut.put(DataFileColumnFamily.NAME, new Text(dir + "/00000_0000" + i + ".map"), new Value("10000,1000000".getBytes(StandardCharsets.UTF_8)));
=======
        TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(mut, new Value(dir.getBytes(UTF_8)));
        
        for (int i = 0; i < 5; i++) {
          mut.put(DataFileColumnFamily.NAME, new Text(dir + "/00000_0000" + i + ".map"), new Value("10000,1000000".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        }
        
        bw.addMutation(mut);
Solution content
        
        String dir = "/t-" + UUID.randomUUID();
        
        TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(mut, new Value(dir.getBytes(UTF_8)));
        
        for (int i = 0; i < 5; i++) {
          mut.put(DataFileColumnFamily.NAME, new Text(dir + "/00000_0000" + i + ".map"), new Value("10000,1000000".getBytes(UTF_8)));
        }
        
        bw.addMutation(mut);
File
MetadataBatchScanTest.java
Developer's decision
Version 2
Kind of conflict
For statement
Method invocation
Chunk
Conflicting content
            else if (value instanceof String || value instanceof Map || value instanceof Collection || value instanceof Number)
              logMsg += value;
            else if (value instanceof byte[])
<<<<<<< HEAD
              logMsg += new String((byte[]) value, StandardCharsets.UTF_8);
            else if (value instanceof PasswordToken)
              logMsg += new String(((PasswordToken) value).getPassword(), StandardCharsets.UTF_8);
=======
              logMsg += new String((byte[]) value, UTF_8);
            else if (value instanceof PasswordToken)
              logMsg += new String(((PasswordToken) value).getPassword(), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
            else
              logMsg += value.getClass() + " - " + value;
Solution content
            else if (value instanceof String || value instanceof Map || value instanceof Collection || value instanceof Number)
              logMsg += value;
            else if (value instanceof byte[])
              logMsg += new String((byte[]) value, UTF_8);
            else if (value instanceof PasswordToken)
              logMsg += new String(((PasswordToken) value).getPassword(), UTF_8);
            else
              logMsg += value.getClass() + " - " + value;
File
Module.java
Developer's decision
Version 2
Kind of conflict
If statement
Method invocation
Variable
Chunk
Conflicting content
<<<<<<< HEAD
package org.apache.accumulo.test.randomwalk.bulk;
 */

import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.test.randomwalk.Environment;
Solution content
 */
package org.apache.accumulo.test.randomwalk.bulk;

import static java.nio.charset.StandardCharsets.UTF_8;

import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.test.randomwalk.Environment;
File
BulkMinusOne.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
public class BulkMinusOne extends BulkImportTest {

<<<<<<< HEAD
  private static final Value negOne = new Value("-1".getBytes(StandardCharsets.UTF_8));
=======
  private static final Value negOne = new Value("-1".getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

  @Override
  protected void runLater(State state, Environment env) throws Exception {
Solution content
public class BulkMinusOne extends BulkImportTest {

  private static final Value negOne = new Value("-1".getBytes(UTF_8));

  @Override
  protected void runLater(State state, Environment env) throws Exception {
File
BulkMinusOne.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.test.randomwalk.bulk;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Arrays;
import java.util.Iterator;
import java.util.Map.Entry;
Solution content
 */
package org.apache.accumulo.test.randomwalk.bulk;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Arrays;
import java.util.Iterator;
import java.util.Map.Entry;
File
Verify.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
  }
  
  private static void report(Text startBadRow, Text lastBadRow, Value value) {
<<<<<<< HEAD
    System.out.println("Bad value " + new String(value.get(), StandardCharsets.UTF_8));
=======
    System.out.println("Bad value " + new String(value.get(), UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    System.out.println(" Range [" + startBadRow + " -> " + lastBadRow + "]");
  }
  
Solution content
  }
  
  private static void report(Text startBadRow, Text lastBadRow, Value value) {
    System.out.println("Bad value " + new String(value.get(), UTF_8));
    System.out.println(" Range [" + startBadRow + " -> " + lastBadRow + "]");
  }
  
File
Verify.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.test.randomwalk.concurrent;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.List;
import java.util.Properties;
import java.util.Random;
Solution content
 */
package org.apache.accumulo.test.randomwalk.concurrent;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.List;
import java.util.Properties;
import java.util.Random;
File
BatchWrite.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
          Mutation m = new Mutation(String.format("%016x", rand.nextLong() & 0x7fffffffffffffffl));
          long val = rand.nextLong() & 0x7fffffffffffffffl;
          for (int j = 0; j < 10; j++) {
<<<<<<< HEAD
            m.put("cf", "cq" + j, new Value(String.format("%016x", val).getBytes(StandardCharsets.UTF_8)));
=======
            m.put("cf", "cq" + j, new Value(String.format("%016x", val).getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          }
          
          bw.addMutation(m);
Solution content
          Mutation m = new Mutation(String.format("%016x", rand.nextLong() & 0x7fffffffffffffffl));
          long val = rand.nextLong() & 0x7fffffffffffffffl;
          for (int j = 0; j < 10; j++) {
            m.put("cf", "cq" + j, new Value(String.format("%016x", val).getBytes(UTF_8)));
          }
          
          bw.addMutation(m);
File
BatchWrite.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
          Mutation m = new Mutation(String.format("%016x", row));
          long val = rand.nextLong() & 0x7fffffffffffffffl;
          for (int j = 0; j < 10; j++) {
<<<<<<< HEAD
            m.put("cf", "cq" + j, new Value(String.format("%016x", val).getBytes(StandardCharsets.UTF_8)));
=======
            m.put("cf", "cq" + j, new Value(String.format("%016x", val).getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          }
          
          bw.addMutation(m);
Solution content
          Mutation m = new Mutation(String.format("%016x", row));
          long val = rand.nextLong() & 0x7fffffffffffffffl;
          for (int j = 0; j < 10; j++) {
            m.put("cf", "cq" + j, new Value(String.format("%016x", val).getBytes(UTF_8)));
          }
          
          bw.addMutation(m);
File
BulkImport.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.test.randomwalk.concurrent;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
Solution content
 */
package org.apache.accumulo.test.randomwalk.concurrent;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
File
ChangeAuthorizations.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
      if (rand.nextBoolean()) {
        String authorization = String.format("a%d", rand.nextInt(5000));
        log.debug("adding authorization " + authorization);
<<<<<<< HEAD
        auths.add(authorization.getBytes(StandardCharsets.UTF_8));
      } else {
        if (auths.size() > 0) {
          log.debug("removing authorization " + new String(auths.remove(0), StandardCharsets.UTF_8));
=======
        auths.add(authorization.getBytes(UTF_8));
      } else {
        if (auths.size() > 0) {
          log.debug("removing authorization " + new String(auths.remove(0), UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        }
      }
      conn.securityOperations().changeUserAuthorizations(userName, new Authorizations(auths));
Solution content
      if (rand.nextBoolean()) {
        String authorization = String.format("a%d", rand.nextInt(5000));
        log.debug("adding authorization " + authorization);
        auths.add(authorization.getBytes(UTF_8));
      } else {
        if (auths.size() > 0) {
          log.debug("removing authorization " + new String(auths.remove(0), UTF_8));
        }
      }
      conn.securityOperations().changeUserAuthorizations(userName, new Authorizations(auths));
File
ChangeAuthorizations.java
Developer's decision
Version 2
Kind of conflict
If statement
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.test.randomwalk.concurrent;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
Solution content
 */
package org.apache.accumulo.test.randomwalk.concurrent;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
File
StopTabletServer.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
          Collections.sort(children);
          Stat stat = new Stat();
          byte[] data = rdr.getData(base + "/" + child + "/" + children.get(0), stat);
<<<<<<< HEAD
          if (!"master".equals(new String(data, StandardCharsets.UTF_8))) {
=======
          if (!"master".equals(new String(data, UTF_8))) {
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
            result.add(new TServerInstance(AddressUtil.parseAddress(child, false), stat.getEphemeralOwner()));
          }
        }
Solution content
          Collections.sort(children);
          Stat stat = new Stat();
          byte[] data = rdr.getData(base + "/" + child + "/" + children.get(0), stat);
          if (!"master".equals(new String(data, UTF_8))) {
            result.add(new TServerInstance(AddressUtil.parseAddress(child, false), stat.getEphemeralOwner()));
          }
        }
File
StopTabletServer.java
Developer's decision
Version 2
Kind of conflict
If statement
Chunk
Conflicting content
 */
package org.apache.accumulo.test.randomwalk.image;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.security.MessageDigest;
import java.util.Iterator;
import java.util.Map.Entry;
Solution content
 */
package org.apache.accumulo.test.randomwalk.image;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.security.MessageDigest;
import java.util.Iterator;
import java.util.Map.Entry;
File
Verify.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    String uuid = UUID.randomUUID().toString();
    
    MessageDigest alg = MessageDigest.getInstance("SHA-1");
<<<<<<< HEAD
    alg.update(uuid.getBytes(StandardCharsets.UTF_8));
=======
    alg.update(uuid.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    
    indexScanner.setRange(new Range(new Text(alg.digest()), null));
    indexScanner.setBatchSize(numVerifications);
Solution content
    String uuid = UUID.randomUUID().toString();
    
    MessageDigest alg = MessageDigest.getInstance("SHA-1");
    alg.update(uuid.getBytes(UTF_8));
    
    indexScanner.setRange(new Range(new Text(alg.digest()), null));
    indexScanner.setBatchSize(numVerifications);
File
Verify.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.test.randomwalk.image;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.security.MessageDigest;
import java.util.Properties;
import java.util.Random;
Solution content
 */
package org.apache.accumulo.test.randomwalk.image;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.security.MessageDigest;
import java.util.Properties;
import java.util.Random;
File
Write.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    m.put(CONTENT_COLUMN_FAMILY, IMAGE_COLUMN_QUALIFIER, new Value(imageBytes));
    
    // store size
<<<<<<< HEAD
    m.put(META_COLUMN_FAMILY, new Text("size"), new Value(String.format("%d", numBytes).getBytes(StandardCharsets.UTF_8)));
=======
    m.put(META_COLUMN_FAMILY, new Text("size"), new Value(String.format("%d", numBytes).getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    
    // store hash
    MessageDigest alg = MessageDigest.getInstance("SHA-1");
Solution content
    m.put(CONTENT_COLUMN_FAMILY, IMAGE_COLUMN_QUALIFIER, new Value(imageBytes));
    
    // store size
    m.put(META_COLUMN_FAMILY, new Text("size"), new Value(String.format("%d", numBytes).getBytes(UTF_8)));
    
    // store hash
    MessageDigest alg = MessageDigest.getInstance("SHA-1");
File
Write.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    state.set("totalWrites", totalWrites);
    
    // set count
<<<<<<< HEAD
    m.put(META_COLUMN_FAMILY, COUNT_COLUMN_QUALIFIER, new Value(String.format("%d", totalWrites).getBytes(StandardCharsets.UTF_8)));
=======
    m.put(META_COLUMN_FAMILY, COUNT_COLUMN_QUALIFIER, new Value(String.format("%d", totalWrites).getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    
    // add mutation
    imagesBW.addMutation(m);
Solution content
    state.set("totalWrites", totalWrites);
    
    // set count
    m.put(META_COLUMN_FAMILY, COUNT_COLUMN_QUALIFIER, new Value(String.format("%d", totalWrites).getBytes(UTF_8)));
    
    // add mutation
    imagesBW.addMutation(m);
File
Write.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    // now add mutation to index
    Text row = new Text(hash);
    m = new Mutation(row);
<<<<<<< HEAD
    m.put(META_COLUMN_FAMILY, UUID_COLUMN_QUALIFIER, new Value(uuid.getBytes(StandardCharsets.UTF_8)));
=======
    m.put(META_COLUMN_FAMILY, UUID_COLUMN_QUALIFIER, new Value(uuid.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    
    indexBW.addMutation(m);
    
Solution content
    // now add mutation to index
    Text row = new Text(hash);
    m = new Mutation(row);
    m.put(META_COLUMN_FAMILY, UUID_COLUMN_QUALIFIER, new Value(uuid.getBytes(UTF_8)));
    
    indexBW.addMutation(m);
    
File
Write.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.test.randomwalk.multitable;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.security.MessageDigest;
import java.util.ArrayList;
import java.util.Properties;
Solution content
 */
package org.apache.accumulo.test.randomwalk.multitable;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.security.MessageDigest;
import java.util.ArrayList;
import java.util.Properties;
File
Write.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    m.put(meta, new Text("payload"), new Value(payloadBytes));
    
    // store size
<<<<<<< HEAD
    m.put(meta, new Text("size"), new Value(String.format("%d", numBytes).getBytes(StandardCharsets.UTF_8)));
=======
    m.put(meta, new Text("size"), new Value(String.format("%d", numBytes).getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    
    // store hash
    MessageDigest alg = MessageDigest.getInstance("SHA-1");
Solution content
    m.put(meta, new Text("payload"), new Value(payloadBytes));
    
    // store size
    m.put(meta, new Text("size"), new Value(String.format("%d", numBytes).getBytes(UTF_8)));
    
    // store hash
    MessageDigest alg = MessageDigest.getInstance("SHA-1");
File
Write.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  }
  
  public static void setSysUserPass(State state, byte[] sysUserPass) {
<<<<<<< HEAD
    log.debug("Setting system user pass to " + new String(sysUserPass, StandardCharsets.UTF_8));
=======
    log.debug("Setting system user pass to " + new String(sysUserPass, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    state.set(masterPass, sysUserPass);
    state.set(masterPass + "time", System.currentTimeMillis());
    
Solution content
  }
  
  public static void setSysUserPass(State state, byte[] sysUserPass) {
    log.debug("Setting system user pass to " + new String(sysUserPass, UTF_8));
    state.set(masterPass, sysUserPass);
    state.set(masterPass + "time", System.currentTimeMillis());
    
File
SecurityHelper.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  }
  
  public static void setTabUserPass(State state, byte[] tabUserPass) {
<<<<<<< HEAD
    log.debug("Setting table user pass to " + new String(tabUserPass, StandardCharsets.UTF_8));
=======
    log.debug("Setting table user pass to " + new String(tabUserPass, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    state.set(tUserPass, tabUserPass);
    state.set(tUserPass + "time", System.currentTimeMillis());
  }
Solution content
  }
  
  public static void setTabUserPass(State state, byte[] tabUserPass) {
    log.debug("Setting table user pass to " + new String(tabUserPass, UTF_8));
    state.set(tUserPass, tabUserPass);
    state.set(tUserPass + "time", System.currentTimeMillis());
  }
File
SecurityHelper.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.test.randomwalk.security;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Iterator;
import java.util.Map.Entry;
import java.util.Properties;
Solution content
 */
package org.apache.accumulo.test.randomwalk.security;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Iterator;
import java.util.Map.Entry;
import java.util.Properties;
File
TableOp.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
          }
          if (!canRead && !ambiguousZone)
            throw new AccumuloException("Was able to read when I shouldn't have had the perm with connection user " + conn.whoami() + " table " + tableName);
<<<<<<< HEAD
          for (Entry entry : WalkingSecurity.get(state,env).getAuthsMap().entrySet()) {
            if (auths.contains(entry.getKey().getBytes(StandardCharsets.UTF_8)))
=======
          for (Entry entry : WalkingSecurity.get(state).getAuthsMap().entrySet()) {
            if (auths.contains(entry.getKey().getBytes(UTF_8)))
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
              seen = seen - entry.getValue();
          }
          if (seen != 0 && !ambiguousAuths)
Solution content
          }
          if (!canRead && !ambiguousZone)
            throw new AccumuloException("Was able to read when I shouldn't have had the perm with connection user " + conn.whoami() + " table " + tableName);
          for (Entry entry : WalkingSecurity.get(state,env).getAuthsMap().entrySet()) {
            if (auths.contains(entry.getKey().getBytes(UTF_8)))
              seen = seen - entry.getValue();
          }
          if (seen != 0 && !ambiguousAuths)
File
TableOp.java
Developer's decision
Combination
Kind of conflict
For statement
If statement
Chunk
Conflicting content
        
        String key = WalkingSecurity.get(state,env).getLastKey() + "1";
        Mutation m = new Mutation(new Text(key));
<<<<<<< HEAD
        for (String s : WalkingSecurity.get(state,env).getAuthsArray()) {
          m.put(new Text(), new Text(), new ColumnVisibility(s), new Value("value".getBytes(StandardCharsets.UTF_8)));
=======
        for (String s : WalkingSecurity.get(state).getAuthsArray()) {
          m.put(new Text(), new Text(), new ColumnVisibility(s), new Value("value".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        }
        BatchWriter writer = null;
        try {
Solution content
        
        String key = WalkingSecurity.get(state,env).getLastKey() + "1";
        Mutation m = new Mutation(new Text(key));
        for (String s : WalkingSecurity.get(state,env).getAuthsArray()) {
          m.put(new Text(), new Text(), new ColumnVisibility(s), new Value("value".getBytes(UTF_8)));
        }
        BatchWriter writer = null;
        try {
File
TableOp.java
Developer's decision
Combination
Kind of conflict
For statement
Method invocation
Chunk
Conflicting content
        f.startDefaultLocalityGroup();
        fs.mkdirs(fail);
        for (Key k : keys)
<<<<<<< HEAD
          f.append(k, new Value("Value".getBytes(StandardCharsets.UTF_8)));
=======
          f.append(k, new Value("Value".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        f.close();
        try {
          conn.tableOperations().importDirectory(tableName, dir.toString(), fail.toString(), true);
Solution content
        f.startDefaultLocalityGroup();
        fs.mkdirs(fail);
        for (Key k : keys)
          f.append(k, new Value("Value".getBytes(UTF_8)));
        f.close();
        try {
          conn.tableOperations().importDirectory(tableName, dir.toString(), fail.toString(), true);
File
TableOp.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.test.randomwalk.sequential;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Properties;

import org.apache.accumulo.core.client.BatchWriter;
Solution content
 */
package org.apache.accumulo.test.randomwalk.sequential;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Properties;

import org.apache.accumulo.core.client.BatchWriter;
File
Write.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    state.set("totalWrites", totalWrites);
    
    Mutation m = new Mutation(new Text(String.format("%010d", totalWrites)));
<<<<<<< HEAD
    m.put(new Text("cf"), new Text("cq"), new Value("val".getBytes(StandardCharsets.UTF_8)));
=======
    m.put(new Text("cf"), new Text("cq"), new Value("val".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    bw.addMutation(m);
  }
}
Solution content
    state.set("totalWrites", totalWrites);
    
    Mutation m = new Mutation(new Text(String.format("%010d", totalWrites)));
    m.put(new Text("cf"), new Text("cq"), new Value("val".getBytes(UTF_8)));
    bw.addMutation(m);
  }
}
File
Write.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  
  private void sort(State state, Environment env, FileSystem fs, String tableName, String seqFile, String outputDir, String workDir, int maxSplits) throws Exception {
    
<<<<<<< HEAD
    PrintStream out = new PrintStream(new BufferedOutputStream(fs.create(new Path(workDir + "/splits.txt"))), false, StandardCharsets.UTF_8.name());
=======
    PrintStream out = new PrintStream(new BufferedOutputStream(fs.create(new Path(workDir + "/splits.txt"))), false, UTF_8.name());
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    
    Connector conn = env.getConnector();
    
Solution content
  
  private void sort(State state, Environment env, FileSystem fs, String tableName, String seqFile, String outputDir, String workDir, int maxSplits) throws Exception {
    
    PrintStream out = new PrintStream(new BufferedOutputStream(fs.create(new Path(workDir + "/splits.txt"))), false, UTF_8.name());
    
    Connector conn = env.getConnector();
    
File
BulkInsert.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    long t3 = System.currentTimeMillis();

    // copy files
<<<<<<< HEAD
    BufferedReader reader = new BufferedReader(new InputStreamReader(fs.open(new Path(exportDir, "distcp.txt")), StandardCharsets.UTF_8));
=======
    BufferedReader reader = new BufferedReader(new InputStreamReader(fs.open(new Path(exportDir, "distcp.txt")), UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    String file = null;
    while ((file = reader.readLine()) != null) {
      Path src = new Path(file);
Solution content
    long t3 = System.currentTimeMillis();

    // copy files
    BufferedReader reader = new BufferedReader(new InputStreamReader(fs.open(new Path(exportDir, "distcp.txt")), UTF_8));
    String file = null;
    while ((file = reader.readLine()) != null) {
      Path src = new Path(file);
File
ExportIndex.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.test.scalability;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
import java.util.Random;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
=======
import static com.google.common.base.Charsets.UTF_8;

import java.util.Random;
import java.util.UUID;
import java.util.concurrent.TimeUnit;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import org.apache.accumulo.core.client.BatchWriter;
import org.apache.accumulo.core.client.BatchWriterConfig;
import org.apache.accumulo.core.client.Connector;
Solution content
 */
package org.apache.accumulo.test.scalability;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Random;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import org.apache.accumulo.core.client.BatchWriter;
import org.apache.accumulo.core.client.BatchWriterConfig;
import org.apache.accumulo.core.client.Connector;
File
Ingest.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    while (count < numIngestEntries) {
      count++;
      long rowId = ContinuousIngest.genLong(minRow, maxRow, r);
<<<<<<< HEAD
      Mutation m = ContinuousIngest.genMutation(rowId, r.nextInt(maxColF), r.nextInt(maxColQ), cv, ingestInstanceId.getBytes(StandardCharsets.UTF_8), count, null, r, false);
=======
      Mutation m = ContinuousIngest.genMutation(rowId, r.nextInt(maxColF), r.nextInt(maxColQ), cv, ingestInstanceId.getBytes(UTF_8), count, null, r, false);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      totalBytes += m.numBytes();
      try {
        bw.addMutation(m);
Solution content
    while (count < numIngestEntries) {
      count++;
      long rowId = ContinuousIngest.genLong(minRow, maxRow, r);
      Mutation m = ContinuousIngest.genMutation(rowId, r.nextInt(maxColF), r.nextInt(maxColQ), cv, ingestInstanceId.getBytes(UTF_8), count, null, r, false);
      totalBytes += m.numBytes();
      try {
        bw.addMutation(m);
File
Ingest.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    for (File file : getCluster().getConfig().getLogDir().listFiles()) {
      // We want to grab the files called .out
      if (file.getName().contains(".out") && file.isFile() && file.canRead()) {
<<<<<<< HEAD
        LineIterator it = FileUtils.lineIterator(file, StandardCharsets.UTF_8.name());
=======
        LineIterator it = FileUtils.lineIterator(file, UTF_8.name());
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        try {
          while (it.hasNext()) {
            String line = it.nextLine();
Solution content
    for (File file : getCluster().getConfig().getLogDir().listFiles()) {
      // We want to grab the files called .out
      if (file.getName().contains(".out") && file.isFile() && file.canRead()) {
        LineIterator it = FileUtils.lineIterator(file, UTF_8.name());
        try {
          while (it.hasNext()) {
            String line = it.nextLine();
File
AuditMessageIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
=======
    // We've exported the table metadata to the MiniAccumuloCluster root dir. Grab the .rf file path to re-import it
    File distCpTxt = new File(exportDir.toString() + "/distcp.txt");
    File importFile = null;
<<<<<<< HEAD
    LineIterator it = FileUtils.lineIterator(distCpTxt, StandardCharsets.UTF_8.name());
    LineIterator it = FileUtils.lineIterator(distCpTxt, UTF_8.name());
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    // Just grab the first rf file, it will do for now.
    String filePrefix = "file:";
Solution content
    // We've exported the table metadata to the MiniAccumuloCluster root dir. Grab the .rf file path to re-import it
    File distCpTxt = new File(exportDir.toString() + "/distcp.txt");
    File importFile = null;
    LineIterator it = FileUtils.lineIterator(distCpTxt, UTF_8.name());

    // Just grab the first rf file, it will do for now.
    String filePrefix = "file:";
File
AuditMessageIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    Mutation m1 = new Mutation("r1");
    Mutation m2 = new Mutation("r2");
    Mutation m3 = new Mutation("r3");
<<<<<<< HEAD
    m1.put("a", "b", new Value("abcde".getBytes(StandardCharsets.UTF_8)));
    m2.put("e", "f", new Value("123".getBytes(StandardCharsets.UTF_8)));
    m3.put("c", "d", new Value("zyxwv".getBytes(StandardCharsets.UTF_8)));
=======
    m1.put("a", "b", new Value("abcde".getBytes(UTF_8)));
    m2.put("e", "f", new Value("123".getBytes(UTF_8)));
    m3.put("c", "d", new Value("zyxwv".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    BatchWriter bw = c.createBatchWriter(t1, new BatchWriterConfig());
    bw.addMutations(Arrays.asList(m1, m2, m3));
    try {
Solution content
    Mutation m1 = new Mutation("r1");
    Mutation m2 = new Mutation("r2");
    Mutation m3 = new Mutation("r3");
    m1.put("a", "b", new Value("abcde".getBytes(UTF_8)));
    m2.put("e", "f", new Value("123".getBytes(UTF_8)));
    m3.put("c", "d", new Value("zyxwv".getBytes(UTF_8)));
    BatchWriter bw = c.createBatchWriter(t1, new BatchWriterConfig());
    bw.addMutations(Arrays.asList(m1, m2, m3));
    try {
File
NamespacesIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    // check that root tablet is not on volume 1
    String zpath = ZooUtil.getRoot(new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers())) + RootTable.ZROOT_TABLET_PATH;
    ZooKeeper zookeeper = new ZooKeeper(cluster.getZooKeepers(), 30000, null);
<<<<<<< HEAD
    String rootTabletDir = new String(zookeeper.getData(zpath, false, null), StandardCharsets.UTF_8);
=======
    String rootTabletDir = new String(zookeeper.getData(zpath, false, null), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    Assert.assertTrue(rootTabletDir.startsWith(v2.toString()));
    zookeeper.close();
Solution content
    // check that root tablet is not on volume 1
    String zpath = ZooUtil.getRoot(new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers())) + RootTable.ZROOT_TABLET_PATH;
    ZooKeeper zookeeper = new ZooKeeper(cluster.getZooKeepers(), 30000, null);
    String rootTabletDir = new String(zookeeper.getData(zpath, false, null), UTF_8);
    Assert.assertTrue(rootTabletDir.startsWith(v2.toString()));
    zookeeper.close();
File
VolumeIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    // check that root tablet is not on volume 1 or 2
    String zpath = ZooUtil.getRoot(new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers())) + RootTable.ZROOT_TABLET_PATH;
    ZooKeeper zookeeper = new ZooKeeper(cluster.getZooKeepers(), 30000, null);
<<<<<<< HEAD
    String rootTabletDir = new String(zookeeper.getData(zpath, false, null), StandardCharsets.UTF_8);
=======
    String rootTabletDir = new String(zookeeper.getData(zpath, false, null), UTF_8);
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    Assert.assertTrue(rootTabletDir.startsWith(v8.toString()) || rootTabletDir.startsWith(v9.toString()));
    zookeeper.close();
Solution content
    // check that root tablet is not on volume 1 or 2
    String zpath = ZooUtil.getRoot(new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers())) + RootTable.ZROOT_TABLET_PATH;
    ZooKeeper zookeeper = new ZooKeeper(cluster.getZooKeepers(), 30000, null);
    String rootTabletDir = new String(zookeeper.getData(zpath, false, null), UTF_8);
    Assert.assertTrue(rootTabletDir.startsWith(v8.toString()) || rootTabletDir.startsWith(v9.toString()));
    zookeeper.close();
File
VolumeIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.test.functional;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Collection;
import java.util.Iterator;
import java.util.Map.Entry;
Solution content
 */
package org.apache.accumulo.test.functional;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Collection;
import java.util.Iterator;
import java.util.Map.Entry;
File
AddSplitIT.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
      String row = String.format("%09d", i);

      Mutation m = new Mutation(new Text(row));
<<<<<<< HEAD
      m.put(new Text("cf1"), new Text("cq1"), ts, new Value(Integer.toString(i).getBytes(StandardCharsets.UTF_8)));
=======
      m.put(new Text("cf1"), new Text("cq1"), ts, new Value(Integer.toString(i).getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      bw.addMutation(m);
    }
Solution content
      String row = String.format("%09d", i);

      Mutation m = new Mutation(new Text(row));
      m.put(new Text("cf1"), new Text("cq1"), ts, new Value(Integer.toString(i).getBytes(UTF_8)));
      bw.addMutation(m);
    }
File
AddSplitIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    BatchWriter bw = c.createBatchWriter(tableName, new BatchWriterConfig());

    Mutation m = new Mutation(new Text("r1"));
<<<<<<< HEAD
    m.put(new Text("acf"), new Text(tableName), new Value("1".getBytes(StandardCharsets.UTF_8)));
=======
    m.put(new Text("acf"), new Text(tableName), new Value("1".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    bw.addMutation(m);
    bw.close();
Solution content
    BatchWriter bw = c.createBatchWriter(tableName, new BatchWriterConfig());

    Mutation m = new Mutation(new Text("r1"));
    m.put(new Text("acf"), new Text(tableName), new Value("1".getBytes(UTF_8)));

    bw.addMutation(m);
    bw.close();
File
BadIteratorMincIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    c.tableOperations().attachIterator(tableName, is, EnumSet.of(IteratorScope.minc));
    bw = c.createBatchWriter(tableName, new BatchWriterConfig());
    m = new Mutation(new Text("r2"));
<<<<<<< HEAD
    m.put(new Text("acf"), new Text(tableName), new Value("1".getBytes(StandardCharsets.UTF_8)));
=======
    m.put(new Text("acf"), new Text(tableName), new Value("1".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    bw.addMutation(m);
    bw.close();
Solution content
    c.tableOperations().attachIterator(tableName, is, EnumSet.of(IteratorScope.minc));
    bw = c.createBatchWriter(tableName, new BatchWriterConfig());
    m = new Mutation(new Text("r2"));
    m.put(new Text("acf"), new Text(tableName), new Value("1".getBytes(UTF_8)));
    bw.addMutation(m);
    bw.close();
File
BadIteratorMincIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
package org.apache.accumulo.test.functional;
 */
<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
Solution content
 */
package org.apache.accumulo.test.functional;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
File
BatchScanSplitIT.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    for (int i = 0; i < numRows; i++) {
      Mutation m = new Mutation(new Text(String.format("%09x", i)));
<<<<<<< HEAD
      m.put(new Text("cf1"), new Text("cq1"), new Value(String.format("%016x", numRows - i).getBytes(StandardCharsets.UTF_8)));
=======
      m.put(new Text("cf1"), new Text("cq1"), new Value(String.format("%016x", numRows - i).getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      bw.addMutation(m);
    }
Solution content
    for (int i = 0; i < numRows; i++) {
      Mutation m = new Mutation(new Text(String.format("%09x", i)));
      m.put(new Text("cf1"), new Text("cq1"), new Value(String.format("%016x", numRows - i).getBytes(UTF_8)));
      bw.addMutation(m);
    }
File
BatchScanSplitIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    for (int i = 0; i < 100; i++) {
      int r = random.nextInt(numRows);
      Text row = new Text(String.format("%09x", r));
<<<<<<< HEAD
      expected.put(row, new Value(String.format("%016x", numRows - r).getBytes(StandardCharsets.UTF_8)));
=======
      expected.put(row, new Value(String.format("%016x", numRows - r).getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      ranges.add(new Range(row));
    }
Solution content
    for (int i = 0; i < 100; i++) {
      int r = random.nextInt(numRows);
      Text row = new Text(String.format("%09x", r));
      expected.put(row, new Value(String.format("%016x", numRows - r).getBytes(UTF_8)));
      ranges.add(new Range(row));
    }
File
BatchScanSplitIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.test.functional;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Iterator;
import java.util.Map.Entry;
import java.util.Random;
Solution content
 */
package org.apache.accumulo.test.functional;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Iterator;
import java.util.Map.Entry;
import java.util.Random;
File
BatchWriterFlushIT.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    Scanner scanner = getConnector().createScanner(tableName, Authorizations.EMPTY);

    Mutation m = new Mutation(new Text(String.format("r_%10d", 1)));
<<<<<<< HEAD
    m.put(new Text("cf"), new Text("cq"), new Value("1".getBytes(StandardCharsets.UTF_8)));
=======
    m.put(new Text("cf"), new Text("cq"), new Value("1".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    bw.addMutation(m);

    UtilWaitThread.sleep(500);
Solution content
    Scanner scanner = getConnector().createScanner(tableName, Authorizations.EMPTY);

    Mutation m = new Mutation(new Text(String.format("r_%10d", 1)));
    m.put(new Text("cf"), new Text("cq"), new Value("1".getBytes(UTF_8)));
    bw.addMutation(m);

    UtilWaitThread.sleep(500);
File
BatchWriterFlushIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.test.functional;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Iterator;
import java.util.Map.Entry;
import java.util.SortedSet;
Solution content
 */
package org.apache.accumulo.test.functional;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Iterator;
import java.util.Map.Entry;
import java.util.SortedSet;
File
BulkFileIT.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
  private void writeData(FileSKVWriter w, int s, int e) throws Exception {
    for (int i = s; i <= e; i++) {
<<<<<<< HEAD
      w.append(new Key(new Text(String.format("%04d", i))), new Value(Integer.toString(i).getBytes(StandardCharsets.UTF_8)));
=======
      w.append(new Key(new Text(String.format("%04d", i))), new Value(Integer.toString(i).getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    }
  }
Solution content
  private void writeData(FileSKVWriter w, int s, int e) throws Exception {
    for (int i = s; i <= e; i++) {
      w.append(new Key(new Text(String.format("%04d", i))), new Value(Integer.toString(i).getBytes(UTF_8)));
    }
  }
File
BulkFileIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.test.functional;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Collections;
import java.util.EnumSet;
Solution content
 */
package org.apache.accumulo.test.functional;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Collections;
import java.util.EnumSet;
File
ConcurrencyIT.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    BatchWriter bw = c.createBatchWriter("cct", new BatchWriterConfig());
    for (int i = 0; i < 50; i++) {
      Mutation m = new Mutation(new Text(String.format("%06d", i)));
<<<<<<< HEAD
      m.put(new Text("cf1"), new Text("cq1"), new Value("foo".getBytes(StandardCharsets.UTF_8)));
=======
      m.put(new Text("cf1"), new Text("cq1"), new Value("foo".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      bw.addMutation(m);
    }
    bw.flush();
Solution content
    BatchWriter bw = c.createBatchWriter("cct", new BatchWriterConfig());
    for (int i = 0; i < 50; i++) {
      Mutation m = new Mutation(new Text(String.format("%06d", i)));
      m.put(new Text("cf1"), new Text("cq1"), new Value("foo".getBytes(UTF_8)));
      bw.addMutation(m);
    }
    bw.flush();
File
ConcurrencyIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    
    for (int i = 0; i < 50; i++) {
      Mutation m = new Mutation(new Text(String.format("%06d", i)));
<<<<<<< HEAD
      m.put(new Text("cf1"), new Text("cq1"), new Value("foo".getBytes(StandardCharsets.UTF_8)));
=======
      m.put(new Text("cf1"), new Text("cq1"), new Value("foo".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      bw.addMutation(m);
    }
    
Solution content
    
    for (int i = 0; i < 50; i++) {
      Mutation m = new Mutation(new Text(String.format("%06d", i)));
      m.put(new Text("cf1"), new Text("cq1"), new Value("foo".getBytes(UTF_8)));
      bw.addMutation(m);
    }
    
File
ConcurrencyIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.test.functional;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
Solution content
 */
package org.apache.accumulo.test.functional;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
File
ConstraintIT.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    BatchWriter bw = getConnector().createBatchWriter(tableName, new BatchWriterConfig());

    Mutation mut1 = new Mutation(new Text("r1"));
<<<<<<< HEAD
    mut1.put(new Text("cf1"), new Text("cq1"), new Value("123".getBytes(StandardCharsets.UTF_8)));
=======
    mut1.put(new Text("cf1"), new Text("cq1"), new Value("123".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    bw.addMutation(mut1);
Solution content
    BatchWriter bw = getConnector().createBatchWriter(tableName, new BatchWriterConfig());

    Mutation mut1 = new Mutation(new Text("r1"));
    mut1.put(new Text("cf1"), new Text("cq1"), new Value("123".getBytes(UTF_8)));

    bw.addMutation(mut1);
File
ConstraintIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    // create a mutation with a non numeric value
    Mutation mut2 = new Mutation(new Text("r1"));
<<<<<<< HEAD
    mut2.put(new Text("cf1"), new Text("cq1"), new Value("123a".getBytes(StandardCharsets.UTF_8)));
=======
    mut2.put(new Text("cf1"), new Text("cq1"), new Value("123a".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    bw.addMutation(mut2);
Solution content
    // create a mutation with a non numeric value
    Mutation mut2 = new Mutation(new Text("r1"));
    mut2.put(new Text("cf1"), new Text("cq1"), new Value("123a".getBytes(UTF_8)));

    bw.addMutation(mut2);
File
ConstraintIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    Entry entry = iter.next();

    if (!entry.getKey().getRow().equals(new Text("r1")) || !entry.getKey().getColumnFamily().equals(new Text("cf1"))
<<<<<<< HEAD
        || !entry.getKey().getColumnQualifier().equals(new Text("cq1")) || !entry.getValue().equals(new Value("123".getBytes(StandardCharsets.UTF_8)))) {
=======
        || !entry.getKey().getColumnQualifier().equals(new Text("cq1")) || !entry.getValue().equals(new Value("123".getBytes(UTF_8)))) {
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      throw new Exception("Unexpected key or value " + entry.getKey() + " " + entry.getValue());
    }
Solution content
    Entry entry = iter.next();

    if (!entry.getKey().getRow().equals(new Text("r1")) || !entry.getKey().getColumnFamily().equals(new Text("cf1"))
        || !entry.getKey().getColumnQualifier().equals(new Text("cq1")) || !entry.getValue().equals(new Value("123".getBytes(UTF_8)))) {
      throw new Exception("Unexpected key or value " + entry.getKey() + " " + entry.getValue());
    }
File
ConstraintIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    entry = iter.next();

    if (!entry.getKey().getRow().equals(new Text("r1")) || !entry.getKey().getColumnFamily().equals(new Text("cf1"))
<<<<<<< HEAD
        || !entry.getKey().getColumnQualifier().equals(new Text("cq1")) || !entry.getValue().equals(new Value("123a".getBytes(StandardCharsets.UTF_8)))) {
=======
        || !entry.getKey().getColumnQualifier().equals(new Text("cq1")) || !entry.getValue().equals(new Value("123a".getBytes(UTF_8)))) {
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      throw new Exception("Unexpected key or value " + entry.getKey() + " " + entry.getValue());
    }
Solution content
    entry = iter.next();

    if (!entry.getKey().getRow().equals(new Text("r1")) || !entry.getKey().getColumnFamily().equals(new Text("cf1"))
        || !entry.getKey().getColumnQualifier().equals(new Text("cq1")) || !entry.getValue().equals(new Value("123a".getBytes(UTF_8)))) {
      throw new Exception("Unexpected key or value " + entry.getKey() + " " + entry.getValue());
    }
File
ConstraintIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    bw = getConnector().createBatchWriter(tableName, new BatchWriterConfig());

    Mutation mut3 = new Mutation(new Text("r1"));
<<<<<<< HEAD
    mut3.put(new Text("cf1"), new Text("cq1"), new Value("foo".getBytes(StandardCharsets.UTF_8)));
=======
    mut3.put(new Text("cf1"), new Text("cq1"), new Value("foo".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

    bw.addMutation(mut3);
Solution content
    bw = getConnector().createBatchWriter(tableName, new BatchWriterConfig());

    Mutation mut3 = new Mutation(new Text("r1"));
    mut3.put(new Text("cf1"), new Text("cq1"), new Value("foo".getBytes(UTF_8)));

    bw.addMutation(mut3);
File
ConstraintIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    entry = iter.next();

    if (!entry.getKey().getRow().equals(new Text("r1")) || !entry.getKey().getColumnFamily().equals(new Text("cf1"))
<<<<<<< HEAD
        || !entry.getKey().getColumnQualifier().equals(new Text("cq1")) || !entry.getValue().equals(new Value("123a".getBytes(StandardCharsets.UTF_8)))) {
=======
        || !entry.getKey().getColumnQualifier().equals(new Text("cq1")) || !entry.getValue().equals(new Value("123a".getBytes(UTF_8)))) {
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      throw new Exception("Unexpected key or value " + entry.getKey() + " " + entry.getValue());
    }
Solution content
    entry = iter.next();

    if (!entry.getKey().getRow().equals(new Text("r1")) || !entry.getKey().getColumnFamily().equals(new Text("cf1"))
        || !entry.getKey().getColumnQualifier().equals(new Text("cq1")) || !entry.getValue().equals(new Value("123a".getBytes(UTF_8)))) {
      throw new Exception("Unexpected key or value " + entry.getKey() + " " + entry.getValue());
    }
File
ConstraintIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    entry = iter.next();

    if (!entry.getKey().getRow().equals(new Text("r1")) || !entry.getKey().getColumnFamily().equals(new Text("cf1"))
<<<<<<< HEAD
        || !entry.getKey().getColumnQualifier().equals(new Text("cq1")) || !entry.getValue().equals(new Value("foo".getBytes(StandardCharsets.UTF_8)))) {
=======
        || !entry.getKey().getColumnQualifier().equals(new Text("cq1")) || !entry.getValue().equals(new Value("foo".getBytes(UTF_8)))) {
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      throw new Exception("Unexpected key or value " + entry.getKey() + " " + entry.getValue());
    }
Solution content
    entry = iter.next();

    if (!entry.getKey().getRow().equals(new Text("r1")) || !entry.getKey().getColumnFamily().equals(new Text("cf1"))
        || !entry.getKey().getColumnQualifier().equals(new Text("cq1")) || !entry.getValue().equals(new Value("foo".getBytes(UTF_8)))) {
      throw new Exception("Unexpected key or value " + entry.getKey() + " " + entry.getValue());
    }
File
ConstraintIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  private Mutation newMut(String row, String cf, String cq, String val) {
    Mutation mut1 = new Mutation(new Text(row));
<<<<<<< HEAD
    mut1.put(new Text(cf), new Text(cq), new Value(val.getBytes(StandardCharsets.UTF_8)));
=======
    mut1.put(new Text(cf), new Text(cq), new Value(val.getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    return mut1;
  }
Solution content
  private Mutation newMut(String row, String cf, String cq, String val) {
    Mutation mut1 = new Mutation(new Text(row));
    mut1.put(new Text(cf), new Text(cq), new Value(val.getBytes(UTF_8)));
    return mut1;
  }
File
ConstraintIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    Entry entry = iter.next();

    if (!entry.getKey().getRow().equals(new Text("r1")) || !entry.getKey().getColumnFamily().equals(new Text("cf1"))
<<<<<<< HEAD
        || !entry.getKey().getColumnQualifier().equals(new Text("cq1")) || !entry.getValue().equals(new Value("123".getBytes(StandardCharsets.UTF_8)))) {
=======
        || !entry.getKey().getColumnQualifier().equals(new Text("cq1")) || !entry.getValue().equals(new Value("123".getBytes(UTF_8)))) {
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      throw new Exception("Unexpected key or value " + entry.getKey() + " " + entry.getValue());
    }
Solution content
    Entry entry = iter.next();

    if (!entry.getKey().getRow().equals(new Text("r1")) || !entry.getKey().getColumnFamily().equals(new Text("cf1"))
        || !entry.getKey().getColumnQualifier().equals(new Text("cq1")) || !entry.getValue().equals(new Value("123".getBytes(UTF_8)))) {
      throw new Exception("Unexpected key or value " + entry.getKey() + " " + entry.getValue());
    }
File
ConstraintIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    entry = iter.next();

    if (!entry.getKey().getRow().equals(new Text("r1")) || !entry.getKey().getColumnFamily().equals(new Text("cf1"))
<<<<<<< HEAD
        || !entry.getKey().getColumnQualifier().equals(new Text("cq4")) || !entry.getValue().equals(new Value("789".getBytes(StandardCharsets.UTF_8)))) {
=======
        || !entry.getKey().getColumnQualifier().equals(new Text("cq4")) || !entry.getValue().equals(new Value("789".getBytes(UTF_8)))) {
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      throw new Exception("Unexpected key or value " + entry.getKey() + " " + entry.getValue());
    }
Solution content
    entry = iter.next();

    if (!entry.getKey().getRow().equals(new Text("r1")) || !entry.getKey().getColumnFamily().equals(new Text("cf1"))
        || !entry.getKey().getColumnQualifier().equals(new Text("cq4")) || !entry.getValue().equals(new Value("789".getBytes(UTF_8)))) {
      throw new Exception("Unexpected key or value " + entry.getKey() + " " + entry.getValue());
    }
File
ConstraintIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.test.functional;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Map.Entry;
Solution content
 */
package org.apache.accumulo.test.functional;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.Map.Entry;
File
CreateAndUseIT.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    for (int i = 1; i < 257; i++) {
      Mutation m = new Mutation(new Text(String.format("%08x", (i << 8) - 16)));
<<<<<<< HEAD
      m.put(cf, cq, new Value(Integer.toString(i).getBytes(StandardCharsets.UTF_8)));
=======
      m.put(cf, cq, new Value(Integer.toString(i).getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

      bw.addMutation(m);
    }
Solution content
    for (int i = 1; i < 257; i++) {
      Mutation m = new Mutation(new Text(String.format("%08x", (i << 8) - 16)));
      m.put(cf, cq, new Value(Integer.toString(i).getBytes(UTF_8)));

      bw.addMutation(m);
    }
File
CreateAndUseIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
    c.tableOperations().create("de");
    BatchWriter bw = getConnector().createBatchWriter("de", new BatchWriterConfig());
    Mutation m = new Mutation(new Text("foo"));
<<<<<<< HEAD
    m.put(new Text("bar"), new Text("1910"), new Value("5".getBytes(StandardCharsets.UTF_8)));
=======
    m.put(new Text("bar"), new Text("1910"), new Value("5".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    bw.addMutation(m);
    bw.flush();
    
Solution content
    c.tableOperations().create("de");
    BatchWriter bw = getConnector().createBatchWriter("de", new BatchWriterConfig());
    Mutation m = new Mutation(new Text("foo"));
    m.put(new Text("bar"), new Text("1910"), new Value("5".getBytes(UTF_8)));
    bw.addMutation(m);
    bw.flush();
    
File
DeleteEverythingIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
  static final SortedSet SPLITS = new TreeSet();
  static final List ROWS = new ArrayList();
  static {
<<<<<<< HEAD
    for (byte b : LETTERS.getBytes(StandardCharsets.UTF_8)) {
      SPLITS.add(new Text(new byte[] {b}));
      ROWS.add(new String(new byte[] {b}, StandardCharsets.UTF_8));
=======
    for (byte b : LETTERS.getBytes(UTF_8)) {
      SPLITS.add(new Text(new byte[] {b}));
      ROWS.add(new String(new byte[] {b}, UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    }
  }
Solution content
  static final SortedSet SPLITS = new TreeSet();
  static final List ROWS = new ArrayList();
  static {
    for (byte b : LETTERS.getBytes(UTF_8)) {
      SPLITS.add(new Text(new byte[] {b}));
      ROWS.add(new String(new byte[] {b}, UTF_8));
    }
  }
File
DeleteRowsSplitIT.java
Developer's decision
Version 2
Kind of conflict
For statement
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.test.functional;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Collections;
import java.util.Map.Entry;
import java.util.Random;
Solution content
 */
package org.apache.accumulo.test.functional;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Collections;
import java.util.Map.Entry;
import java.util.Random;
File
LargeRowIT.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
      TestIngest.toPrintableChars(rowData);

      Mutation mut = new Mutation(new Text(rowData));
<<<<<<< HEAD
      mut.put(new Text(""), new Text(""), new Value(Integer.toString(i).getBytes(StandardCharsets.UTF_8)));
=======
      mut.put(new Text(""), new Text(""), new Value(Integer.toString(i).getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      bw.addMutation(mut);
    }
Solution content
      TestIngest.toPrintableChars(rowData);

      Mutation mut = new Mutation(new Text(rowData));
      mut.put(new Text(""), new Text(""), new Value(Integer.toString(i).getBytes(UTF_8)));
      bw.addMutation(mut);
    }
File
LargeRowIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
        if (!entry.getKey().getRow().equals(new Text(rowData))) {
          throw new Exception("verification failed, unexpected row i =" + i);
        }
<<<<<<< HEAD
        if (!entry.getValue().equals(Integer.toString(i).getBytes(StandardCharsets.UTF_8))) {
=======
        if (!entry.getValue().equals(Integer.toString(i).getBytes(UTF_8))) {
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          throw new Exception("verification failed, unexpected value i =" + i + " value = " + entry.getValue());
        }
        count++;
Solution content
        if (!entry.getKey().getRow().equals(new Text(rowData))) {
          throw new Exception("verification failed, unexpected row i =" + i);
        }
        if (!entry.getValue().equals(Integer.toString(i).getBytes(UTF_8))) {
          throw new Exception("verification failed, unexpected value i =" + i + " value = " + entry.getValue());
        }
        count++;
File
LargeRowIT.java
Developer's decision
Version 2
Kind of conflict
If statement
Chunk
Conflicting content
  }

  private Value nv(int v) {
<<<<<<< HEAD
    return new Value(String.format("r%09d", v).getBytes(StandardCharsets.UTF_8));
=======
    return new Value(String.format("r%09d", v).getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
  }

  public static File nativeMapLocation() {
Solution content
  }

  private Value nv(int v) {
    return new Value(String.format("r%09d", v).getBytes(UTF_8));
  }

  public static File nativeMapLocation() {
File
NativeMapIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
          for (int l = 0; l < num; l++) {
            for (int ts = 0; ts < num; ts++) {
              Key key = nk(i, j, k, l, ts, true);
<<<<<<< HEAD
              Value value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + true + "_" + run).getBytes(StandardCharsets.UTF_8));
=======
              Value value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + true + "_" + run).getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

              nm.put(key, value);
Solution content
          for (int l = 0; l < num; l++) {
            for (int ts = 0; ts < num; ts++) {
              Key key = nk(i, j, k, l, ts, true);
              Value value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + true + "_" + run).getBytes(UTF_8));

              nm.put(key, value);
File
NativeMapIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
              nm.put(key, value);

              key = nk(i, j, k, l, ts, false);
<<<<<<< HEAD
              value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + false + "_" + run).getBytes(StandardCharsets.UTF_8));
=======
              value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + false + "_" + run).getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

              nm.put(key, value);
            }
Solution content
              nm.put(key, value);

              key = nk(i, j, k, l, ts, false);
              value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + false + "_" + run).getBytes(UTF_8));

              nm.put(key, value);
            }
File
NativeMapIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
          for (int l = 0; l < num; l++) {
            for (int ts = num - 1; ts >= 0; ts--) {
              Key key = nk(i, j, k, l, ts, true);
<<<<<<< HEAD
              Value value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + true + "_" + run).getBytes(StandardCharsets.UTF_8));
=======
              Value value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + true + "_" + run).getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

              assertTrue(iter.hasNext());
              Entry entry = iter.next();
Solution content
          for (int l = 0; l < num; l++) {
            for (int ts = num - 1; ts >= 0; ts--) {
              Key key = nk(i, j, k, l, ts, true);
              Value value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + true + "_" + run).getBytes(UTF_8));

              assertTrue(iter.hasNext());
              Entry entry = iter.next();
File
NativeMapIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
              assertEquals(value, entry.getValue());

              key = nk(i, j, k, l, ts, false);
<<<<<<< HEAD
              value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + false + "_" + run).getBytes(StandardCharsets.UTF_8));
=======
              value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + false + "_" + run).getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
              assertTrue(iter.hasNext());
              entry = iter.next();
Solution content
              assertEquals(value, entry.getValue());

              key = nk(i, j, k, l, ts, false);
              value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + false + "_" + run).getBytes(UTF_8));

              assertTrue(iter.hasNext());
              entry = iter.next();
File
NativeMapIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
          for (int l = 0; l < num; l++) {
            for (int ts = 0; ts < num; ts++) {
              Key key = nk(i, j, k, l, ts, true);
<<<<<<< HEAD
              Value value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + true + "_" + run).getBytes(StandardCharsets.UTF_8));
=======
              Value value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + true + "_" + run).getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

              assertEquals(value, nm.get(key));
Solution content
          for (int l = 0; l < num; l++) {
            for (int ts = 0; ts < num; ts++) {
              Key key = nk(i, j, k, l, ts, true);
              Value value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + true + "_" + run).getBytes(UTF_8));

              assertEquals(value, nm.get(key));
File
NativeMapIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
              assertEquals(value, entry.getValue());

              key = nk(i, j, k, l, ts, false);
<<<<<<< HEAD
              value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + false + "_" + run).getBytes(StandardCharsets.UTF_8));
=======
              value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + false + "_" + run).getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

              assertEquals(value, nm.get(key));
Solution content
              assertEquals(value, entry.getValue());

              key = nk(i, j, k, l, ts, false);
              value = new Value((i + "_" + j + "_" + k + "_" + l + "_" + ts + "_" + false + "_" + run).getBytes(UTF_8));

              assertEquals(value, nm.get(key));
File
NativeMapIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 */
package org.apache.accumulo.test.functional;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
Solution content
 */
package org.apache.accumulo.test.functional;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
File
ScanIteratorIT.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    for (int i = 0; i < 1000; i++) {
      Mutation m = new Mutation(new Text(String.format("%06d", i)));
<<<<<<< HEAD
      m.put(new Text("cf1"), new Text("cq1"), new Value(Integer.toString(1000 - i).getBytes(StandardCharsets.UTF_8)));
      m.put(new Text("cf1"), new Text("cq2"), new Value(Integer.toString(i - 1000).getBytes(StandardCharsets.UTF_8)));
=======
      m.put(new Text("cf1"), new Text("cq1"), new Value(Integer.toString(1000 - i).getBytes(UTF_8)));
      m.put(new Text("cf1"), new Text("cq2"), new Value(Integer.toString(i - 1000).getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f

      bw.addMutation(m);
    }
Solution content
    for (int i = 0; i < 1000; i++) {
      Mutation m = new Mutation(new Text(String.format("%06d", i)));
      m.put(new Text("cf1"), new Text("cq1"), new Value(Integer.toString(1000 - i).getBytes(UTF_8)));
      m.put(new Text("cf1"), new Text("cq2"), new Value(Integer.toString(i - 1000).getBytes(UTF_8)));

      bw.addMutation(m);
    }
File
ScanIteratorIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.test.functional;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Map.Entry;
import java.util.TreeSet;
Solution content
 */
package org.apache.accumulo.test.functional;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Map.Entry;
import java.util.TreeSet;
File
ScanRangeIT.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
      for (int j = 0; j < CF_LIMIT; j++) {
        for (int k = 0; k < CQ_LIMIT; k++) {
          for (int t = 0; t < TS_LIMIT; t++) {
<<<<<<< HEAD
            m.put(createCF(j), createCQ(k), t, new Value(String.format("%06d_%03d_%03d_%03d", i, j, k, t).getBytes(StandardCharsets.UTF_8)));
=======
            m.put(createCF(j), createCQ(k), t, new Value(String.format("%06d_%03d_%03d_%03d", i, j, k, t).getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
          }
        }
      }
Solution content
      for (int j = 0; j < CF_LIMIT; j++) {
        for (int k = 0; k < CQ_LIMIT; k++) {
          for (int t = 0; t < TS_LIMIT; t++) {
            m.put(createCF(j), createCQ(k), t, new Value(String.format("%06d_%03d_%03d_%03d", i, j, k, t).getBytes(UTF_8)));
          }
        }
      }
File
ScanRangeIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.test.functional;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.Collections;
import java.util.Iterator;
import java.util.Map.Entry;
Solution content
 */
package org.apache.accumulo.test.functional;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.Collections;
import java.util.Iterator;
import java.util.Map.Entry;
File
ScanSessionTimeOutIT.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
    for (int i = 0; i < 100000; i++) {
      Mutation m = new Mutation(new Text(String.format("%08d", i)));
      for (int j = 0; j < 3; j++)
<<<<<<< HEAD
        m.put(new Text("cf1"), new Text("cq" + j), new Value((i + "_" + j).getBytes(StandardCharsets.UTF_8)));
=======
        m.put(new Text("cf1"), new Text("cq" + j), new Value((i + "_" + j).getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
      
      bw.addMutation(m);
    }
Solution content
    for (int i = 0; i < 100000; i++) {
      Mutation m = new Mutation(new Text(String.format("%08d", i)));
      for (int j = 0; j < 3; j++)
        m.put(new Text("cf1"), new Text("cq" + j), new Value((i + "_" + j).getBytes(UTF_8)));
      
      bw.addMutation(m);
    }
File
ScanSessionTimeOutIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
      public void unableToMonitorLockNode(Throwable e) {
        System.exit(-1);
      }
<<<<<<< HEAD
    }, "foo".getBytes(StandardCharsets.UTF_8));
=======
    }, "foo".getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    
    if (!gotLock) {
      System.err.println("Failed to get lock " + zPath);
Solution content
      public void unableToMonitorLockNode(Throwable e) {
        System.exit(-1);
      }
    }, "foo".getBytes(UTF_8));
    
    if (!gotLock) {
      System.err.println("Failed to get lock " + zPath);
File
SplitRecoveryIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
      // populate
      for (int i = 0; i < N; i++) {
        Mutation m = new Mutation(new Text(String.format("%05d", i)));
<<<<<<< HEAD
        m.put(new Text("col" + Integer.toString((i % 3) + 1)), new Text("qual"), new Value("junk".getBytes(StandardCharsets.UTF_8)));
=======
        m.put(new Text("col" + Integer.toString((i % 3) + 1)), new Text("qual"), new Value("junk".getBytes(UTF_8)));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
        b.addMutation(m);
      }
      b.close();
Solution content
      // populate
      for (int i = 0; i < N; i++) {
        Mutation m = new Mutation(new Text(String.format("%05d", i)));
        m.put(new Text("col" + Integer.toString((i % 3) + 1)), new Text("qual"), new Value("junk".getBytes(UTF_8)));
        b.addMutation(m);
      }
      b.close();
File
TabletIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
 */
package org.apache.accumulo.test.functional;

<<<<<<< HEAD
import java.nio.charset.StandardCharsets;
=======
import static com.google.common.base.Charsets.UTF_8;

>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
Solution content
 */
package org.apache.accumulo.test.functional;

import static java.nio.charset.StandardCharsets.UTF_8;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
File
VisibilityIT.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
  }

  private void mput(Mutation m, String cf, String cq, String cv, String val) {
<<<<<<< HEAD
    ColumnVisibility le = new ColumnVisibility(cv.getBytes(StandardCharsets.UTF_8));
    m.put(new Text(cf), new Text(cq), le, new Value(val.getBytes(StandardCharsets.UTF_8)));
  }

  private void mputDelete(Mutation m, String cf, String cq, String cv) {
    ColumnVisibility le = new ColumnVisibility(cv.getBytes(StandardCharsets.UTF_8));
=======
    ColumnVisibility le = new ColumnVisibility(cv.getBytes(UTF_8));
    m.put(new Text(cf), new Text(cq), le, new Value(val.getBytes(UTF_8)));
  }

  private void mputDelete(Mutation m, String cf, String cq, String cv) {
    ColumnVisibility le = new ColumnVisibility(cv.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    m.putDelete(new Text(cf), new Text(cq), le);
  }
Solution content
  }

  private void mput(Mutation m, String cf, String cq, String cv, String val) {
    ColumnVisibility le = new ColumnVisibility(cv.getBytes(UTF_8));
    m.put(new Text(cf), new Text(cq), le, new Value(val.getBytes(UTF_8)));
  }

  private void mputDelete(Mutation m, String cf, String cq, String cv) {
    ColumnVisibility le = new ColumnVisibility(cv.getBytes(UTF_8));
    m.putDelete(new Text(cf), new Text(cq), le);
  }
File
VisibilityIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Method signature
Variable
Chunk
Conflicting content
  private ByteArraySet nbas(Set auths) {
    ByteArraySet bas = new ByteArraySet();
    for (String auth : auths) {
<<<<<<< HEAD
      bas.add(auth.getBytes(StandardCharsets.UTF_8));
=======
      bas.add(auth.getBytes(UTF_8));
>>>>>>> 9b20a9d4062f9ac0d34ce4b2acd7b9b72524a84f
    }
    return bas;
  }
Solution content
  private ByteArraySet nbas(Set auths) {
    ByteArraySet bas = new ByteArraySet();
    for (String auth : auths) {
      bas.add(auth.getBytes(UTF_8));
    }
    return bas;
  }
File
VisibilityIT.java
Developer's decision
Version 2
Kind of conflict
Method invocation