auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void setPublisherConfirms(boolean publisherConfirms) { Assert.isTrue(!publisherConfirms || !ConfirmType.SIMPLE.equals(this.confirmType), "Cannot set both publisherConfirms and simplePublisherConfirms"); <START> if (publisherConfirms) { <END> setPublisherConfirmType(ConfirmType.CORRELATED); } }</code><technical_language>imaging situation I call setPublisherConfirms(true) a setPublisherConfirmType(ConfirmType.CORRELATED) I call setPublisherConfirms(false), I setPublisherConfirmType(ConfirmType.NONE). Is possible</technical_language>

Target:
public void setPublisherConfirms(boolean publisherConfirms) { Assert.isTrue(!publisherConfirms || !ConfirmType.SIMPLE.equals(this.confirmType), "Cannot set both publisherConfirms and simplePublisherConfirms"); if (publisherConfirms) { setPublisherConfirmType(ConfirmType.CORRELATED); } else if (this.confirmType.equals(ConfirmType.CORRELATED)) { setPublisherConfirmType(ConfirmType.NONE); } }
Source:
<code><START> public void setAllowDescriptionEdit(boolean allow) { <END> allowDescriptionEdit = allow; }</code><technical_language>I recommend calling updateText() in case this method is called setting description</technical_language>

Target:
public void setAllowDescriptionEdit(boolean allow) { allowDescriptionEdit = allow; updateText(); }
Source:
<code>private void resetRecordsDeliveryStateOnSubscriptionOnInit() { if (!recordsDeliveryQueue.isEmpty()) { log.warn("{}: Found non-empty queue while starting subscription. This indicates unsuccessful clean up of" <START> + "previous subscription - {}. rid {}", shardId, subscribeToShardId, getLastRequestId()); <END> recordsDeliveryQueue.clear(); } }</code><technical_language>more readable like. RequestId - { }. Applicable places</technical_language>

Target:
private void resetRecordsDeliveryStateOnSubscriptionOnInit() { if (!recordsDeliveryQueue.isEmpty()) { log.warn("{}: Found non-empty queue while starting subscription. This indicates unsuccessful clean up of" + "previous subscription - {}. Last successful request details -- {}", shardId, subscribeToShardId, lastSuccessfulRequestDetails); recordsDeliveryQueue.clear(); } }
Source:
<code>public static List<Target> readTargetFile(final File targetsFile) { Utils.regularReadableUserFile(targetsFile); <START> logger.log(Level.INFO, String.format("Reading target intervals from exome file '%s' ...", targetsFile.getAbsolutePath())); <END> final List<Target> inputTargets; try (final TargetTableReader reader = new TargetTableReader(targetsFile)) { inputTargets = reader.toList(); } catch (final IOException ex) { throw new UserException.CouldNotReadInputFile("Could not read input targets file", ex); } return inputTargets; }</code><technical_language>Get rid of word "exome"</technical_language>

Target:
public static List<Target> readTargetFile(final File targetsFile) { Utils.regularReadableUserFile(targetsFile); logger.log(Level.INFO, String.format("Reading targets from file '%s' ...", targetsFile.getAbsolutePath())); final List<Target> inputTargets; try (final TargetTableReader reader = new TargetTableReader(targetsFile)) { inputTargets = reader.toList(); } catch (final IOException ex) { throw new UserException.CouldNotReadInputFile("Could not read input targets file", ex); } return inputTargets; }
Source:
<code>public void resume() { checkRealm(); <START> pauseDepth--; <END> if (pauseDepth == 0) { sideEffects.forEach(s -> s.resume()); } }</code><technical_language>Throw IllegalStateException if pauseDepth negative</technical_language>

Target:
public void resume() { checkRealm(); pauseDepth--; if (pauseDepth < 0) { throw new IllegalStateException( "Resume has unessesarily been called too often, so that the pauseDepth is below zero."); } else if (pauseDepth == 0) { sideEffects.forEach(s -> s.resume()); } }
Source:
<code>private IMethod[] relatedTypeDeclaresMethodName(IProgressMonitor pm, IMethod method, String newName) throws CoreException { try{ Set<IMethod> result= new HashSet<>(); Set<IType> types= getRelatedTypes(); pm.beginTask("", types.size()); for (IType <START> iType : <END> types) { final IMethod found= Checks.findMethod(method, iType); final IType declaring= found.getDeclaringType(); result.addAll(Arrays.asList(hierarchyDeclaresMethodName(new SubProgressMonitor(pm, 1), declaring.newTypeHierarchy(new SubProgressMonitor(pm, 1)), found, newName))); } return result.toArray(new IMethod[result.size()]); } finally { pm.done(); } }</code><technical_language>rename type</technical_language>

Target:
private IMethod[] relatedTypeDeclaresMethodName(IProgressMonitor pm, IMethod method, String newName) throws CoreException { try{ Set<IMethod> result= new HashSet<>(); Set<IType> types= getRelatedTypes(); pm.beginTask("", types.size()); for (IType type : types) { final IMethod found= Checks.findMethod(method, type); final IType declaring= found.getDeclaringType(); result.addAll(Arrays.asList(hierarchyDeclaresMethodName(new SubProgressMonitor(pm, 1), declaring.newTypeHierarchy(new SubProgressMonitor(pm, 1)), found, newName))); } return result.toArray(new IMethod[result.size()]); } finally { pm.done(); } }
Source:
<code>public byte getGoodMaternal() { if (maternal >= 0) return maternal; <START> if (chr.isY() || chr.isMT()) { <END> return (byte) (Math.min(1, alts.length)); } return (byte) (Math.min(2, alts.length)); }</code><technical_language>this isMT isY in getGoodPaternal()</technical_language>

Target:
public byte getGoodMaternal() { if (maternal >= 0) return maternal; if (chr.isMT()) { return (byte) (Math.min(1, alts.length)); } if (chr.isY()) { return (byte) 0; } return (byte) (Math.min(2, alts.length)); }
Source:
<code>public static void preInit(FMLPreInitializationEvent event) { if (FMLForgePlugin.RUNTIME_DEOBF) { try { ZipFile zipFile = new ZipFile(event.getSourceFile()); Enumeration enumeration = zipFile.entries(); while (enumeration.hasMoreElements()) { processPath(((ZipEntry)enumeration.nextElement()).getName()); } zipFile.close(); } catch (Exception e) { } } else { <START> File folder = new File(event.getSourceFile().getParentFile().getAbsolutePath()); <END> for (File file : FileUtils.listFiles(folder, new String[] { "png" }, true)) { processPath(file.getAbsolutePath().replace("\\", "/")); } } ModLogger.log(Level.INFO, "Designs found: Bed(" + listBed.size() + "), Chisel(" + listChisel.size() + "), FlowerPot(" + listFlowerPot.size() + "), Tile(" + listTile.size() + ")"); }</code><technical_language>this change do</technical_language>

Target:
public static void preInit(FMLPreInitializationEvent event) { if (FMLForgePlugin.RUNTIME_DEOBF) { try { ZipFile zipFile = new ZipFile(event.getSourceFile()); Enumeration enumeration = zipFile.entries(); while (enumeration.hasMoreElements()) { processPath(((ZipEntry)enumeration.nextElement()).getName()); } zipFile.close(); } catch (Exception e) { } } else { File folder = new File(event.getSourceFile().getAbsolutePath()); for (File file : FileUtils.listFiles(folder, new String[] { "png" }, true)) { processPath(file.getAbsolutePath().replace("\\", "/")); } } ModLogger.log(Level.INFO, "Designs found: Bed(" + listBed.size() + "), Chisel(" + listChisel.size() + "), FlowerPot(" + listFlowerPot.size() + "), Tile(" + listTile.size() + ")"); }
Source:
<code>public void testSTGeometries() { <START> assertSTGeometries("POINT empty", null); <END> assertSTGeometries("POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))", ImmutableList.of("POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))")); assertSTGeometries("MULTIPOINT (1 2, 4 8, 16 32)", ImmutableList.of("POINT (1 2)", "POINT (4 8)", "POINT (16 32)")); assertSTGeometries("MULTILINESTRING ((1 1, 2 2))", ImmutableList.of("LINESTRING (1 1, 2 2)")); assertSTGeometries("MULTIPOLYGON (((0 0, 1 0, 1 1, 0 1, 0 0)), ((1 1, 3 1, 3 3, 1 3, 1 1)))", ImmutableList.of("POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))", "POLYGON ((1 1, 3 1, 3 3, 1 3, 1 1))")); }</code><technical_language>s/POINT empty/POINT EMPTY</technical_language>

Target:
public void testSTGeometries() { assertFunction("ST_Geometries(ST_GeometryFromText('POINT EMPTY'))", new ArrayType(GEOMETRY), null); assertSTGeometries("POINT (1 5)", "POINT (1 5)"); assertSTGeometries("LINESTRING (77.29 29.07, 77.42 29.26, 77.27 29.31, 77.29 29.07)", "LINESTRING (77.29 29.07, 77.42 29.26, 77.27 29.31, 77.29 29.07)"); assertSTGeometries("POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))", "POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))"); assertSTGeometries("MULTIPOINT (1 2, 4 8, 16 32)", "POINT (1 2)", "POINT (4 8)", "POINT (16 32)"); assertSTGeometries("MULTILINESTRING ((1 1, 2 2))", "LINESTRING (1 1, 2 2)"); assertSTGeometries("MULTIPOLYGON (((0 0, 1 0, 1 1, 0 1, 0 0)), ((1 1, 3 1, 3 3, 1 3, 1 1)))", "POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))", "POLYGON ((1 1, 3 1, 3 3, 1 3, 1 1))"); assertSTGeometries("GEOMETRYCOLLECTION (POINT (2 3), LINESTRING (2 3, 3 4))", "POINT (2 3)", "LINESTRING (2 3, 3 4)"); }
Source:
<code>public ThrowingRunnableAdapter(Runnable supplier) { <START> this.supplier = supplier; <END> }</code><technical_language>assertion supplier null</technical_language>

Target:
public ThrowingRunnableAdapter(Runnable supplier) { if (supplier == null) { throw new IllegalArgumentException("You must specify a supplier (was null)."); } this.supplier = supplier; }
Source:
<code>void shutdown() throws InterruptedException, StoreException, IOException { final Timer.Context context = metrics.hardDeleteShutdownTimeInMs.time(); try { if (enabled.get()) { logger.info("Hard delete shutdown initiated"); enabled.set(false); hardDeleteLock.lock(); try { pauseCondition.signal(); } finally { hardDeleteLock.unlock(); } <START> if (!shutdownLatch.await(5, TimeUnit.SECONDS)) { <END> logger.error("HardDelete shutdown took more than 5 secs "); } logger.info("Hard delete shutdown complete"); throttler.close(); pruneHardDeleteRecoveryRange(); persistCleanupToken(); } } finally { context.stop(); } }</code><technical_language>Is 5 seconds enough time for a store shutdown? I thought hard delete ~10 seconds stop</technical_language>

Target:
void shutdown() throws InterruptedException, StoreException, IOException { long startTimeInMs = time.milliseconds(); try { if (enabled.get()) { logger.info("Hard delete shutdown initiated"); enabled.set(false); hardDeleteLock.lock(); try { pauseCondition.signal(); } finally { hardDeleteLock.unlock(); } shutdownLatch.await(); logger.info("Hard delete shutdown complete"); throttler.close(); pruneHardDeleteRecoveryRange(); persistCleanupToken(); } } finally { metrics.hardDeleteShutdownTimeInMs.update(time.milliseconds() - startTimeInMs); } }
Source:
<code>TokenSecurityRealm(Builder configuration) { Assert.checkNotNullParam("configuration", configuration); if (configuration.principalClaimName == null) { this.principalClaimName = "username"; } else { this.principalClaimName = configuration.principalClaimName; } <START> this.strategy = Assert.checkNotNullParam("tokenValidationStrategy(", configuration.strategy); <END> }</code><technical_language>This some kind of typo</technical_language>

Target:
TokenSecurityRealm(Builder configuration) { Assert.checkNotNullParam("configuration", configuration); if (configuration.principalClaimName == null) { this.principalClaimName = "username"; } else { this.principalClaimName = configuration.principalClaimName; } this.strategy = Assert.checkNotNullParam("tokenValidationStrategy", configuration.strategy); }
Source:
<code>public void execute(CommandSender sender, String[] args) { if (args.length != 0) { sender.sendMessage( ChatColor.RED + "You do not need to specify a name. If you wish to know where another player is, use /whereis <player>"); } else { <START> ProxiedPlayer player = ProxyServer.getInstance().getPlayer( sender.getName() ); <END> sender.sendMessage( ChatColor.BLUE + "You are in the " + player.getServer().getInfo().getName() + "."); } }</code><technical_language>This NullPointerException if console. this : java if (sender instanceof ProxiedPlayer) { ProxiedPlayer player = (ProxiedPlayer) sender; player.sendMessage( ChatColor.BLUE + "You in " + player.getServer().getInfo().getName() + "."); } else { sender.sendMessage( "This command ingame" ); } that</technical_language>

Target:
public void execute(CommandSender sender, String[] args) { if (args.length != 0) { sender.sendMessage( ChatColor.RED + "You do not need to specify a name. If you wish to know where another player is, use /whereis <player>"); } else { ProxiedPlayer player = ProxyServer.getInstance().getPlayer( sender.getName() ); if (sender instanceof ProxiedPlayer) { sender.sendMessage( ChatColor.BLUE + "You are in the " + player.getServer().getInfo().getName() + "." ); } else { sender.sendMessage( "You are in the console." ); } } }
Source:
<code>public void displayMessage(@NonNull final OSInAppMessage message) { if (!inAppMessagingEnabled) { OneSignal.onesignalLog(OneSignal.LOG_LEVEL.VERBOSE, "In app messaging is currently paused, iam will not be shown!"); return; } inAppMessageShowing = true; String htmlPath = htmlPathForMessage(message); OneSignalRestClient.getSync(htmlPath, new ResponseHandler() { @Override void onFailure(int statusCode, String response, Throwable throwable) { inAppMessageShowing = false; evaluateInAppMessages(); printHttpErrorForInAppMessageRequest("html", statusCode, response); } @Override void onSuccess(String response) { <START> inAppMessageShowing = true; <END> try { JSONObject jsonResponse = new JSONObject(response); String htmlStr = jsonResponse.getString("html"); double displayDuration = jsonResponse.optDouble("display_duration"); message.setDisplayDuration(displayDuration); WebViewManager.showHTMLString(message, htmlStr); } catch (JSONException e) { e.printStackTrace(); } } }, null); }</code><technical_language>This needed here</technical_language>

Target:
private void displayMessage(@NonNull final OSInAppMessage message) { if (!inAppMessagingEnabled) { OneSignal.onesignalLog(OneSignal.LOG_LEVEL.VERBOSE, "In app messaging is currently paused, iam will not be shown!"); return; } inAppMessageShowing = true; String htmlPath = htmlPathForMessage(message); OneSignalRestClient.getSync(htmlPath, new ResponseHandler() { @Override void onFailure(int statusCode, String response, Throwable throwable) { inAppMessageShowing = false; printHttpErrorForInAppMessageRequest("html", statusCode, response); if (!OSUtils.shouldRetryNetworkRequest(statusCode) || htmlNetworkRequestAttemptCount >= OSUtils.MAX_NETWORK_REQUEST_ATTEMPT_COUNT) { htmlNetworkRequestAttemptCount = 0; messageWasDismissed(message); return; } htmlNetworkRequestAttemptCount++; queueMessageForDisplay(message); } @Override void onSuccess(String response) { htmlNetworkRequestAttemptCount = 0; try { JSONObject jsonResponse = new JSONObject(response); String htmlStr = jsonResponse.getString("html"); double displayDuration = jsonResponse.optDouble("display_duration"); message.setDisplayDuration(displayDuration); WebViewManager.showHTMLString(message, htmlStr); } catch (JSONException e) { e.printStackTrace(); } } }, null); }
Source:
<code><START> public Boolean implies(SymbolicValueRelation relation) { <END> if (v1.equals(relation.v1) && v2.equals(relation.v2)) { return relation.isImpliedBy(this); } else if (v1.equals(relation.v2) && v2.equals(relation.v1)) { return relation.isImpliedBy(symmetric()); } return null; }</code><technical_language>public other protected</technical_language>

Target:
protected Boolean implies(SymbolicValueRelation relation) { if (v1.equals(relation.v1) && v2.equals(relation.v2)) { return relation.isImpliedBy(this); } else if (v1.equals(relation.v2) && v2.equals(relation.v1)) { return relation.isImpliedBy(symmetric()); } return null; }
Source:
<code>public String getFailureMessage() { StringBuilder sb = new StringBuilder(); <START> Iterable<ICondition> failures = Iterables.filter(conditions, Predicates.not(Predicates.in(okConditions))); <END> if (conditions.size() - okConditions.size() == 1) { sb.append("The following condition has not been met: "); sb.append(failures.iterator().next().getFailureMessage()); } else { sb.append("Several conditions have not been met:\n"); for (ICondition condition : failures) { sb.append(".").append(condition.getFailureMessage()).append("\n"); } } return sb.toString(); }</code><technical_language>early "return false" in test() failure means okCondition passing conditions, message computed is accurate be, erroneous. Testing conditions get a complete/accurate message more costly, options I see: 1. failure message is reworded clear provides partial information. 2. test() is changed test condition a complete record of passed failed. This catching exceptions currently abort test() method early. 3. support modes a flag CompoundCondition users decide if want accuracy speed</technical_language>

Target:
public String getFailureMessage() { StringBuilder sb = new StringBuilder(); if (failures.size() == 1) { sb.append("The following condition has not been met: "); sb.append(failures.iterator().next().getFailureMessage()); } else { sb.append("Several conditions have not been met:\n"); for (ICondition condition : failures) { sb.append(".").append(condition.getFailureMessage()).append("\n"); } } return sb.toString(); }
Source:
<code>private void doInit(ExtMap inputMap, ExtMap outputMap) { context = inputMap.<ExtMap> get(Base.InvokeKeys.CONTEXT); configuration = context.<Properties> get(Base.ContextKeys.CONFIGURATION); broker = LdapFactory.getInstance(getAuthzName()); context.<List<String>> get( Base.ContextKeys.CONFIGURATION_SENSITIVE_KEYS ).add("config.authn.user.password"); context.mput( Base.ContextKeys.AUTHOR, "The oVirt Project").mput( Base.ContextKeys.EXTENSION_NAME, "Kerberos/Ldap Authn (Built-in)" ).mput( Base.ContextKeys.LICENSE, "ASL 2.0" ).mput( Base.ContextKeys.HOME_URL, "<LINK_0>" ).mput( Base.ContextKeys.VERSION, "N/A" ).mput( Authn.ContextKeys.CAPABILITIES, Authn.Capabilities.AUTHENTICATE_PASSWORD ).mput( Base.ContextKeys.BUILD_INTERFACE_VERSION, Base.INTERFACE_VERSION_CURRENT); KerberosManager.getInstance(configuration); <START> UsersDomainsCacheManagerService.getInstance().init(configuration); <END> }</code><technical_language>this is singleton?!?</technical_language>

Target:
private void doInit(ExtMap inputMap, ExtMap outputMap) { context = inputMap.<ExtMap> get(Base.InvokeKeys.CONTEXT); configuration = context.<Properties> get(Base.ContextKeys.CONFIGURATION); Utils.putDefaultsIfMissing(configuration); broker = LdapFactory.getInstance(getAuthzName()); context.<List<String>> get( Base.ContextKeys.CONFIGURATION_SENSITIVE_KEYS ).add("config.authn.user.password"); context.mput( Base.ContextKeys.AUTHOR, "The oVirt Project").mput( Base.ContextKeys.EXTENSION_NAME, "Kerberos/Ldap Authn (Built-in)" ).mput( Base.ContextKeys.LICENSE, "ASL 2.0" ).mput( Base.ContextKeys.HOME_URL, "<LINK_0>" ).mput( Base.ContextKeys.VERSION, "N/A" ).mput( Authn.ContextKeys.CAPABILITIES, Authn.Capabilities.AUTHENTICATE_PASSWORD ).mput( Base.ContextKeys.BUILD_INTERFACE_VERSION, Base.INTERFACE_VERSION_CURRENT); KerberosManager.getInstance(configuration); UsersDomainsCacheManagerService.getInstance().init(configuration); }
Source:
<code>private void attachDiskToTemplate(Guid templateId) { DiskImage templateDiskImage = getParameters().getDiskImage(); DiskVmElement dve = new DiskVmElement(templateDiskImage.getId(), templateId); dve.setDiskInterface(DiskInterface.VirtIO); <START> DbFacade.getInstance().getDiskVmElementDao().save(dve); <END> VmDeviceUtils.addDiskDevice(templateId, templateDiskImage.getId()); }</code><technical_language>getDiskVmElementDao(), please apply dao calls in class</technical_language>

Target:
private void attachDiskToTemplate(Guid templateId) { DiskImage templateDiskImage = getParameters().getDiskImage(); DiskVmElement dve = new DiskVmElement(templateDiskImage.getId(), templateId); dve.setDiskInterface(DiskInterface.VirtIO); getDiskVmElementDao().save(dve); VmDeviceUtils.addDiskDevice(templateId, templateDiskImage.getId()); }
Source:
<code>public JobExecutionStateMachineImpl( final List<ExecutionStage> executionStages, final ExecutionContext executionContext, final Collection<JobExecutionListener> listeners ) { this.executionStages = executionStages; this.executionContext = executionContext; <START> this.taskExecutor = new TaskExecutorBuilder() <END> .corePoolSize(1) .maxPoolSize(1) .threadNamePrefix("StateMachine") .build(); this.taskExecutor.initialize(); this.listener = new CompositeListener(listeners); }</code><technical_language>new invocations moved injected dependencies</technical_language>

Target:
public JobExecutionStateMachineImpl( final List<ExecutionStage> executionStages, final ExecutionContext executionContext, final Collection<JobExecutionListener> listeners ) { this.executionStages = executionStages; this.executionContext = executionContext; this.listener = new CompositeListener(ImmutableSet.copyOf(listeners)); }
Source:
<code>public void test() { fix().addInputLines( "Test.java", "import java.util.Objects;", "public class Test {", " void f(Object a, Object[] b, String[] c) {", " Objects.hash(a);", " Objects.hash(a, a);", <START> " Objects.hash(b);", " Objects.hash(c);", <END> " }", "}") .addOutputLines( "Test.java", "import java.util.Objects;", "public class Test {", " void f(Object a, Object[] b, String[] c) {", " Objects.hashCode(a);", " Objects.hash(a, a);", " Objects.hash(b);", " Objects.hashCode(c);", " }", "}") .doTest(); }</code><technical_language>a bit sketchy cases compiler issued lint message warning: non-varargs call of varargs method inexact argument type for parameter;</technical_language>

Target:
public void test() { fix().addInputLines( "Test.java", "import java.util.Objects;", "public class Test {", " void f(Object a, Object[] b, String[] c, String d) {", " Objects.hash(a);", " Objects.hash(a, a);", " Objects.hash(b);", " Objects.hash(c);", " Objects.hash(d);", " }", "}") .addOutputLines( "Test.java", "import java.util.Objects;", "public class Test {", " void f(Object a, Object[] b, String[] c, String d) {", " Objects.hashCode(a);", " Objects.hash(a, a);", " Objects.hash(b);", " " Objects.hash(c);", " Objects.hashCode(d);", " }", "}") .doTest(); }
Source:
<code>public boolean inBank() { <START> Area bankArea = new Area(new Tile(3179, 3447), new Tile(3191,3433)); <END> return bankArea.contains(ctx.players.local()); }</code><technical_language>bankArea a class-wide variable populated script starts. Currently, poll() method possibility of creating bankArea times, is a waste of resources potentially slow script</technical_language>

Target:
public boolean inBank() { return bankArea.contains(ctx.players.local()); }
Source:
<code>public void testBalancerWithNullLocalityManager() { Set<TaskModel> taskModels = generateTaskModels(3); Set<ContainerModel> containers = new GroupByContainerCount(3).balance(taskModels, null); Map<String, ContainerModel> containersMap = new HashMap<>(); for (ContainerModel container : containers) { containersMap.put(container.getProcessorId(), container); } assertEquals(3, containers.size()); ContainerModel container0 = containersMap.get("0"); ContainerModel container1 = containersMap.get("1"); ContainerModel container2 = containersMap.get("2"); assertNotNull(container0); assertNotNull(container1); assertNotNull(container2); <START> assertEquals("0", container0.getProcessorId()); <END> assertEquals("1", container1.getProcessorId()); assertEquals("2", container2.getProcessorId()); assertEquals(1, container0.getTasks().size()); assertEquals(1, container1.getTasks().size()); assertEquals(1, container2.getTasks().size()); assertTrue(container0.getTasks().containsKey(getTaskName(0))); assertTrue(container1.getTasks().containsKey(getTaskName(1))); assertTrue(container2.getTasks().containsKey(getTaskName(2))); }</code><technical_language>this redundant in sense this is definition loop 868</technical_language>

Target:
public void testBalancerWithNullLocalityManager() { Set<TaskModel> taskModels = generateTaskModels(3); Set<ContainerModel> groupContainers = new GroupByContainerCount(3).group(taskModels); Set<ContainerModel> balanceContainers = new GroupByContainerCount(3).balance(taskModels, null); assertEquals(groupContainers, balanceContainers); }
Source:
<code><START> protected ChangeJdbcTransactionAttributes(Builder builder) { <END> useJdbcStore = builder.useJdbcStore; actionStoreDropTable = builder.actionStoreDropTable; actionStoreTablePrefix = builder.actionStoreTablePrefix; communicationStoreDropTable = builder.communicationStoreDropTable; communicationStoreTablePrefix = builder.communicationStoreTablePrefix; stateStoreTablePrefix = builder.stateStoreTablePrefix; storeDatasource = builder.storeDatasource; stateStoreDropTable = builder.stateStoreDropTable; }</code><technical_language>protected if class is final</technical_language>

Target:
private ChangeJdbcTransactionAttributes(Builder builder) { useJdbcStore = builder.useJdbcStore; actionStoreDropTable = builder.actionStoreDropTable; actionStoreTablePrefix = builder.actionStoreTablePrefix; communicationStoreDropTable = builder.communicationStoreDropTable; communicationStoreTablePrefix = builder.communicationStoreTablePrefix; stateStoreTablePrefix = builder.stateStoreTablePrefix; storeDatasource = builder.storeDatasource; stateStoreDropTable = builder.stateStoreDropTable; }
Source:
<code>public void testInsertFirstAndAdd3() throws Exception { KieSession ksession = session.getStateful(); insertNotEvent(ksession); ksession.fireAllRules(); Assertions.assertThat(firedRules.isRuleFired(RULE1)).as(RULE1).isFalse(); Assertions.assertThat(firedRules.isRuleFired(RULE3)).as(RULE3).isFalse(); insertNotEvent(ksession, "different value"); ksession.fireAllRules(); insertNotEvent(ksession, "different value"); ksession.fireAllRules(); insertNotEvent(ksession, "different value"); ksession.fireAllRules(); insertNotEvent(ksession, "different value"); <START> ksession.fireAllRules(); <END> Assertions.assertThat(firedRules.isRuleFired(RULE3)).as(RULE3).isTrue(); Assertions.assertThat(firedRules.isRuleFired(RULE1)).as(RULE1).isTrue(); }</code><technical_language>a loop</technical_language>

Target:
public void testInsertFirstAndAdd3() throws Exception { KieSession ksession = session.getStateful(); insertNotEvent(ksession); ksession.fireAllRules(); Assertions.assertThat(firedRules.isRuleFired(RULE1)).as(RULE1).isFalse(); Assertions.assertThat(firedRules.isRuleFired(RULE3)).as(RULE3).isFalse(); for (int i = 0; i < 4; i++) { insertNotEvent(ksession, "different value"); ksession.fireAllRules(); } Assertions.assertThat(firedRules.isRuleFired(RULE3)).as(RULE3).isTrue(); Assertions.assertThat(firedRules.isRuleFired(RULE1)).as(RULE1).isTrue(); }
Source:
<code>private Map<String, LabelInfo> labelsFor(ChangeData cd, boolean standard, boolean detailed) throws OrmException { if (!standard && !detailed) { return null; } ChangeControl ctl = control(cd); if (ctl == null) { <START> return Collections.emptyMap(); <END> } LabelTypes labelTypes = ctl.getLabelTypes(); if (cd.getChange().getStatus().isOpen()) { return labelsForOpenChange(cd, labelTypes, standard, detailed); } else { return labelsForClosedChange(cd, labelTypes, standard, detailed); } }</code><technical_language>control() clear returns null patch sets</technical_language>

Target:
private Map<String, LabelInfo> labelsFor(ChangeData cd, boolean standard, boolean detailed) throws OrmException { if (!standard && !detailed) { return null; } ChangeControl ctl = control(cd); if (ctl == null) { return null; } LabelTypes labelTypes = ctl.getLabelTypes(); if (cd.getChange().getStatus().isOpen()) { return labelsForOpenChange(cd, labelTypes, standard, detailed); } else { return labelsForClosedChange(cd, labelTypes, standard, detailed); } }
Source:
<code>public Object visitGetKeysInGroupCommand(final InvocationContext ctx, GetKeysInGroupCommand command) throws Throwable { final String groupName = command.getGroupName(); if (!command.isGroupOwner()) { return invokeNextInterceptor(ctx, command); } dataContainer.executeTask(new GroupFilter<>(groupName, groupManager), new ParallelIterableMap.KeyValueAction<Object, InternalCacheEntry<? super Object, ? super Object>>() { @Override public void apply(Object o, InternalCacheEntry<? super Object, ? super Object> internalCacheEntry) { <START> synchronized (ctx) { <END> ctx.putLookedUpEntry(o, null); } } }); return invokeNextInterceptor(ctx, command); }</code><technical_language>If other is fine, this well</technical_language>

Target:
public Object visitGetKeysInGroupCommand(final InvocationContext ctx, GetKeysInGroupCommand command) throws Throwable { final String groupName = command.getGroupName(); if (!command.isGroupOwner()) { return invokeNextInterceptor(ctx, command); } final KeyFilter<Object> keyFilter = new CompositeKeyFilter<>(new GroupFilter<>(groupName, groupManager), new CollectionKeyFilter<>(ctx.getLookedUpEntries().keySet())); dataContainer.executeTask(keyFilter, new ParallelIterableMap.KeyValueAction<Object, InternalCacheEntry<? super Object, ? super Object>>() { @Override public void apply(Object o, InternalCacheEntry<? super Object, ? super Object> internalCacheEntry) { synchronized (ctx) { entryFactory.wrapEntryForReading(ctx, o, internalCacheEntry).setSkipLookup(true); } } }); return invokeNextInterceptor(ctx, command); }
Source:
<code><START> private E toEntity(I id, EntityStorageRecord record) { <END> return toEntity(id, record, null); }</code><technical_language>Please check methods if static</technical_language>

Target:
private E toEntity(I id, EntityStorageRecord record) { return toEntity(id, record, FieldMask.getDefaultInstance()); }
Source:
<code>public FileVisitResult visitFile(final Path path, final BasicFileAttributes attrs)throws IOException{ if(!includeHiddenFiles && Files.isHidden(path) && !path.endsWith(".keep")){ logger.debug("Skipping since we are ignoring hidden files", path); } else{ try(final InputStream is = new BufferedInputStream(Files.newInputStream(path, StandardOpenOption.READ))){ final byte[] buffer = new byte[CHUNK_SIZE]; <START> int read = is.read(buffer); <END> while(read != -1) { for(final Hasher hasher : bagitNameToHasherMap.values()){ hasher.update(buffer, read); } read = is.read(buffer); } for(final Entry<String, Hasher> entry: bagitNameToHasherMap.entrySet()){ bagitNameToManifestMap.get(entry.getKey()).getFileToChecksumMap().put(path, entry.getValue().getCalculatedValue()); entry.getValue().clear(); } } } return FileVisitResult.CONTINUE; }</code><technical_language>read is a pretty common term - I count in lines - this bytesRead for easier reading</technical_language>

Target:
public FileVisitResult visitFile(final Path path, final BasicFileAttributes attrs)throws IOException{ if(!includeHiddenFiles && Files.isHidden(path) && !path.endsWith(".keep")){ logger.debug("Skipping since we are ignoring hidden files", path); } else{ try(final InputStream inputStream = new BufferedInputStream(Files.newInputStream(path, StandardOpenOption.READ))){ final byte[] buffer = new byte[CHUNK_SIZE]; int numberOfBytesRead = inputStream.read(buffer); while(numberOfBytesRead != -1) { for(final Hasher hasher : bagitNameToHasherMap.values()){ hasher.update(buffer, numberOfBytesRead); } numberOfBytesRead = inputStream.read(buffer); } for(final Entry<String, Hasher> entry: bagitNameToHasherMap.entrySet()){ bagitNameToManifestMap.get(entry.getKey()).getFileToChecksumMap().put(path, entry.getValue().getCalculatedValue()); entry.getValue().clear(); } } } return FileVisitResult.CONTINUE; }
Source:
<code>public FeedbackMsqQuestionDetails() { super(FeedbackQuestionType.MSQ); this.msqChoices = new ArrayList<>(); this.otherEnabled = false; this.generateOptionsFor = FeedbackParticipantType.NONE; this.maxSelectableChoices = 0; <START> this.minSelectableChoices = 0; <END> this.hasAssignedWeights = false; this.msqWeights = new ArrayList<>(); this.msqOtherWeight = 0; }</code><technical_language>0 is a legitimate option for min. selectable choices. -1</technical_language>

Target:
public FeedbackMsqQuestionDetails() { super(FeedbackQuestionType.MSQ); this.msqChoices = new ArrayList<>(); this.otherEnabled = false; this.generateOptionsFor = FeedbackParticipantType.NONE; this.maxSelectableChoices = -1; this.minSelectableChoices = -1; this.hasAssignedWeights = false; this.msqWeights = new ArrayList<>(); this.msqOtherWeight = 0; }
Source:
<code>public Object start(IApplicationContext context) throws Exception { @SuppressWarnings("rawtypes") final Map args = context.getArguments(); String[] appArg = (String[])args.get("application.args"); if (appArg == null) { appArg = new String[] {}; <START> } <END> AbstractLogicalCommand cmd; Object returnCode; try { returnCode = execute(appArg); } catch (Die error) { return handleDieError(error); } if (System.out.checkError() || System.err.checkError()) { System.out.println("Unknown error"); returnCode = ERROR; } return returnCode; }</code><technical_language>Unused variable</technical_language>

Target:
public Object start(IApplicationContext context) throws Exception { @SuppressWarnings("rawtypes") final Map args = context.getArguments(); String[] appArg = (String[])args.get("application.args"); if (appArg == null) { appArg = new String[] {}; } Object returnCode; try { returnCode = execute(appArg); } catch (Die error) { return handleDieError(error); } if (System.out.checkError() || System.err.checkError()) { System.out.println("Unknown error"); returnCode = ERROR; } return returnCode; }
Source:
<code><START> private Publisher getSource(SearchHit hit) { <END> if (hit == null || hit.field(EsContent.SOURCE) == null) { return null; } String source = hit.field(EsContent.SOURCE).<String>value(); Maybe<Publisher> publisherMaybe = Publisher.fromKey(source); return publisherMaybe.valueOrNull(); }</code><technical_language>While private, this return Optional</technical_language>

Target:
private Optional<Publisher> getSource(SearchHit hit) { if (hit == null || hit.field(EsContent.SOURCE) == null) { return Optional.empty(); } String source = hit.field(EsContent.SOURCE).<String>value(); Maybe<Publisher> publisherMaybe = Publisher.fromKey(source); return Optional.ofNullable(publisherMaybe.valueOrNull()); }
Source:
<code>private void executeBlocking(final ActionRequest action) { try { final RestHighLevelClient client = getDataContext().getRestHighLevelClient(); final ActionResponse result; <START> if (action instanceof BulkRequest) { result = client.bulk((BulkRequest) action, RequestOptions.DEFAULT); } else if (action instanceof IndexRequest) { result = client.index((IndexRequest) action, RequestOptions.DEFAULT); } else if (action instanceof DeleteRequest) { result = client.delete((DeleteRequest) action, RequestOptions.DEFAULT); } else if (action instanceof ClearScrollRequest) { result = client.clearScroll((ClearScrollRequest) action, RequestOptions.DEFAULT); } else if (action instanceof SearchScrollRequest) { result = client.scroll((SearchScrollRequest) action, RequestOptions.DEFAULT); <END> } else { result = null; } if (result instanceof BulkResponse && ((BulkResponse) result).hasFailures()) { BulkItemResponse[] failedItems = ((BulkResponse) result).getItems(); for (int i = 0; i < failedItems.length; i++) { if (failedItems[i].isFailed()) { final BulkItemResponse failedItem = failedItems[i]; logger .error("Bulk failed with item no. of {}: id={} op={} status={} error={}", i + 1, failedItems.length, failedItem.getId(), failedItem.getOpType(), failedItem .status(), failedItem.getFailureMessage()); } } } } catch (IOException e) { logger.warn("Could not execute command ", action, e); throw new MetaModelException("Could not execute " + action, e); } }</code><technical_language>That's... nasty. do nothing, is this needed? (this long Java, though)</technical_language>

Target:
private void executeBlocking(final ActionRequest action) { try { final ActionResponse result = executeActionRequest(action); if (result instanceof BulkResponse && ((BulkResponse) result).hasFailures()) { BulkItemResponse[] failedItems = ((BulkResponse) result).getItems(); for (int i = 0; i < failedItems.length; i++) { if (failedItems[i].isFailed()) { final BulkItemResponse failedItem = failedItems[i]; logger .error("Bulk failed with item no. of {}: id={} op={} status={} error={}", i + 1, failedItems.length, failedItem.getId(), failedItem.getOpType(), failedItem .status(), failedItem.getFailureMessage()); } } } } catch (IOException e) { logger.warn("Could not execute command ", action, e); throw new MetaModelException("Could not execute " + action, e); } }
Source:
<code>protected Constraint periodPenalty(ConstraintFactory constraintFactory) { return constraintFactory.from(Exam.class) <START> .ifExists(Period.class, equal(Exam::getPeriod, Function.identity()), filtering((exam, period) -> period.getPenalty() != 0)) <END> .penalize("Period penalty", HardSoftScore.ONE_SOFT, exam -> exam.getPeriod().getPenalty()); }</code><technical_language>filter(exam -> exam.getPeriod().getPenalty() != 0)</technical_language>

Target:
protected Constraint periodPenalty(ConstraintFactory constraintFactory) { return constraintFactory.from(Exam.class) .filter(exam -> exam.getPeriod().getPenalty() != 0) .penalizeConfigurable("periodPenalty", exam -> exam.getPeriod().getPenalty()); }
Source:
<code>protected void decodeValue(Klv klv) { byte[] bytes = klv.getValue(); CharsetDetector charsetDetector = new CharsetDetector(); charsetDetector.setText(bytes); CharsetMatch charsetMatch = charsetDetector.detect(); try { <START> if (charsetMatch != null) { <END> value = new String(bytes, charsetMatch.getName()); return; } } catch (UnsupportedEncodingException e) { LOGGER.trace( "Unsupported encoding of %s, falling back to default encoding", charsetMatch.getName()); } value = new String(bytes, Charset.defaultCharset()); }</code><technical_language>a fan of this if try try completely useless if charsetMatch is null. a check if is null try returning new String(bytes, Charset.defaultCharset())</technical_language>

Target:
protected void decodeValue(Klv klv) { byte[] bytes = klv.getValue(); CharsetDetector charsetDetector = new CharsetDetector(); charsetDetector.setText(bytes); CharsetMatch charsetMatch = charsetDetector.detect(); Charset charset = Charset.defaultCharset(); if (charsetMatch != null) { try { charset = Charset.forName(charsetMatch.getName()); } catch (IllegalArgumentException e) { LOGGER.trace( "Unsupported encoding of %s, falling back to default encoding", charsetMatch.getName()); } } value = new String(bytes, charset); }
Source:
<code>public String getBaseUrl() { <START> return thingIfApi.getBaseUrl(); <END> }</code><technical_language>Adding this a field is good manner</technical_language>

Target:
public String getBaseUrl() { return this.thingIfApi.getBaseUrl(); }
Source:
<code>public Object fill(final Object... args) { <START> return ops().run(Ops.Image.Fill.NAME, args); <END> }</code><technical_language>Please call Fill.class</technical_language>

Target:
public Object fill(final Object... args) { return ops().run(Ops.Image.Fill.class, args); }
Source:
<code>private void destroyServerStore(ClientDescriptor clientDescriptor, DestroyServerStore destroyServerStore) throws ClusterException { validateClusteredTierManagerConfigured(clientDescriptor); String name = destroyServerStore.getName(); final Set<ClientDescriptor> clients = storeClientMap.get(name); if (clients != null && !clients.isEmpty()) { throw new ResourceBusyException("Cannot destroy clustered tier '" + name + "': in use by " + clients.size() + " other client(s)"); } boolean isDuplicate = isLifeCycleMessageDuplicate(destroyServerStore); if (!isDuplicate) { ServerStoreImpl store = ehcacheStateService.getStore(name); if (store != null) { <START> StatisticsManager.nodeFor(store.getPageSource()).clean(); <END> } LOGGER.info("Client destroying clustered tier '{}'", clientDescriptor, name); ehcacheStateService.destroyServerStore(name); } storeClientMap.remove(name); }</code><technical_language>StatisticsManager.nodeFor(store.getPageSource()) return null if node for a pagesource</technical_language>

Target:
private void destroyServerStore(ClientDescriptor clientDescriptor, DestroyServerStore destroyServerStore) throws ClusterException { validateClusteredTierManagerConfigured(clientDescriptor); String name = destroyServerStore.getName(); final Set<ClientDescriptor> clients = storeClientMap.get(name); if (clients != null && !clients.isEmpty()) { throw new ResourceBusyException("Cannot destroy clustered tier '" + name + "': in use by " + clients.size() + " other client(s)"); } boolean isDuplicate = isLifeCycleMessageDuplicate(destroyServerStore); if (!isDuplicate) { LOGGER.info("Client destroying clustered tier '{}'", clientDescriptor, name); management.serverStoreDestroyed(name); ehcacheStateService.destroyServerStore(name); } storeClientMap.remove(name); }
Source:
<code>public static void classSetup() { originalEclipseHomeLocation = System.getProperty("eclipse.home.location", ""); <START> System.setProperty("eclipse.home.location", "file:/C:/Users/Test/"); <END> originalEclipseLauncher = System.getProperty("eclipse.launcher", ""); System.setProperty("eclipse.launcher", "C:\\Users\\Test\\eclipse.exe"); }</code><technical_language>is done in setUp, therefor needed</technical_language>

Target:
public static void classSetup() { originalEclipseHomeLocation = System.getProperty("eclipse.home.location", ""); originalEclipseLauncher = System.getProperty("eclipse.launcher", ""); }
Source:
<code>static boolean shouldCheck(Class<?> clazz) { String name = clazz.getName(); <START> return !name.startsWith("java") && !name.startsWith("android"); <END> }</code><technical_language>need "." "javasucks.Class" "androidsucks.Class" names incorrectly return true</technical_language>

Target:
static boolean shouldCheck(Class<?> clazz) { if (clazz == null) { return false; } String name = clazz.getName(); return !name.startsWith("java.") && !name.startsWith("android."); }
Source:
<code>private List<String> export(ExportConfiguration defaultConfiguration) { form.disableUI(); terminationFuture.reset(); List<String> errors = forms.getSelectedForms().parallelStream() .peek(FormStatus::clearStatusHistory) .map(formStatus -> (BriefcaseFormDefinition) formStatus.getFormDefinition()) <START> .flatMap(formDefinition -> this.export(defaultConfiguration, formDefinition).stream()) <END> .collect(toList()); form.enableUI(); return errors; }</code><technical_language>work this., yes</technical_language>

Target:
private List<String> export(ExportConfiguration defaultConfiguration) { form.disableUI(); terminationFuture.reset(); List<String> errors = forms.getSelectedForms().parallelStream() .peek(FormStatus::clearStatusHistory) .map(formStatus -> (BriefcaseFormDefinition) formStatus.getFormDefinition()) .flatMap(formDefinition -> ExportAction.export(formDefinition, forms.getConfiguration(formDefinition).orElse(defaultConfiguration), terminationFuture).stream()) .collect(toList()); form.enableUI(); return errors; }
Source:
<code>public void authenticate(String dn, String password) throws AuthenticationException { if (password == null || password.isEmpty()) { throw new AuthenticationException("Empty password used"); } LdapContext authCtx = null; try { Hashtable<Object, Object> env = LDAPContextManager.getConnectionProperties(config); env.put("com.sun.jndi.ldap.connect.pool", "false"); <START> <END> env.put(Context.SECURITY_AUTHENTICATION, this.config.getAuthType()); env.put(Context.SECURITY_PRINCIPAL, dn); env.put(Context.SECURITY_CREDENTIALS, password); authCtx = new InitialLdapContext(env, null); if (config.isStartTls()) { LDAPContextManager.startTLS(authCtx); } } catch (AuthenticationException ae) { if (logger.isDebugEnabled()) { logger.debugf(ae, "Authentication failed for DN [%s]", dn); } throw ae; } catch (Exception e) { logger.errorf(e, "Unexpected exception when validating password of DN [%s]", dn); throw new AuthenticationException("Unexpected exception when validating password of user"); } finally { if (authCtx != null) { try { authCtx.close(); } catch (NamingException e) { } } } }</code><technical_language>mentioned other place, good change this behaviour startTLS</technical_language>

Target:
public void authenticate(String dn, String password) throws AuthenticationException { if (password == null || password.isEmpty()) { throw new AuthenticationException("Empty password used"); } LdapContext authCtx = null; StartTlsResponse tlsResponse = null; try { Hashtable<Object, Object> env = LDAPContextManager.getConnectionProperties(config); env.put("com.sun.jndi.ldap.connect.pool", "false"); if(!this.config.isStartTls()) { env.put(Context.SECURITY_AUTHENTICATION, this.config.getAuthType()); env.put(Context.SECURITY_PRINCIPAL, dn); env.put(Context.SECURITY_CREDENTIALS, password); } authCtx = new InitialLdapContext(env, null); if (config.isStartTls()) { tlsResponse = LDAPContextManager.startTLS(authCtx, this.config.getAuthType(), dn, password.toCharArray()); } } catch (AuthenticationException ae) { if (logger.isDebugEnabled()) { logger.debugf(ae, "Authentication failed for DN [%s]", dn); } throw ae; } catch (Exception e) { logger.errorf(e, "Unexpected exception when validating password of DN [%s]", dn); throw new AuthenticationException("Unexpected exception when validating password of user"); } finally { if (tlsResponse != null) { try { tlsResponse.close(); } catch (IOException e) { e.printStackTrace(); } } if (authCtx != null) { try { authCtx.close(); } catch (NamingException e) { e.printStackTrace(); } } } }
Source:
<code>public boolean isEndOfInput() { <START> return lastByteWasWritten; <END> }</code><technical_language>call this endOfInput</technical_language>

Target:
public boolean isEndOfInput() { return endOfInput; }
Source:
<code>public void connectionChanged(@Nonnull EnderLiquidConduit con, @Nonnull EnumFacing conDir) { NetworkTankKey key = new NetworkTankKey(con, conDir); NetworkTank tank = new NetworkTank(con, conDir); boolean sort = false; NetworkTank oldTank = tankMap.get(key); if (oldTank != null && oldTank.priority != tank.priority) { sort = true; } int oldIndex = tanks.indexOf(oldTank); if (oldIndex == -1) { <START> tanks.add(tank); <END> } else { tanks.set(oldIndex, tank); } tankMap.remove(key); tankMap.put(key, tank); if (sort) { tanks.sort(new Comparator<NetworkTank>() { @Override public int compare(NetworkTank arg0, NetworkTank arg1) { return arg1.priority - arg0.priority; } }); } }</code><technical_language>need sort list in this case, too? (I if a self-sorting list solution.)</technical_language>

Target:
public void connectionChanged(@Nonnull EnderLiquidConduit con, @Nonnull EnumFacing conDir) { NetworkTankKey key = new NetworkTankKey(con, conDir); NetworkTank tank = new NetworkTank(con, conDir); tanks.remove(tank); tanks.add(tank); tankMap.remove(key); tankMap.put(key, tank); tanks.sort((left, right) -> right.priority - left.priority); }
Source:
<code>private FateStatus getFateStatus() throws KeeperException, InterruptedException { Instance instance = getConnector().getInstance(); AdminUtil<String> admin = new AdminUtil<>(false); <START> String secret = "DONTTELL"; <END> IZooReaderWriter zk = new ZooReaderWriter(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut(), SCHEME, (USER + ":" + secret).getBytes()); ZooStore<String> zs = new ZooStore<String>(ZooUtil.getRoot(instance) + Constants.ZFATE, zk); FateStatus fateStatus = admin.getStatus(zs, zk, ZooUtil.getRoot(instance) + Constants.ZTABLE_LOCKS, null, null); return fateStatus; }</code><technical_language>right place get AccumuloCluster getCluster() static method AccumuloClusterIT. Sadly, this is presently exposed. I adding a AccumuloConfiguration getServerConfiguration(); method AccumuloCluster is proper fix. there, a MiniAccumuloClusterImpl create AccumuloConfiguration accumulo-site.xml file a StandaloneAccumuloCluster create serverAccumuloConfDir variable</technical_language>

Target:
private FateStatus getFateStatus() throws KeeperException, InterruptedException { Instance instance = getConnector().getInstance(); AdminUtil<String> admin = new AdminUtil<>(false); String secret = getCluster().getSiteConfiguration().get(Property.INSTANCE_SECRET); IZooReaderWriter zk = new ZooReaderWriterFactory().getZooReaderWriter(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut(), secret); ZooStore<String> zs = new ZooStore<String>(ZooUtil.getRoot(instance) + Constants.ZFATE, zk); FateStatus fateStatus = admin.getStatus(zs, zk, ZooUtil.getRoot(instance) + Constants.ZTABLE_LOCKS, null, null); return fateStatus; }