auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void releaseWriteLock(int establishReadLocks, boolean flush) { synchronized (this.mutex) { Thread current = Thread.currentThread(); if (current != this.writeLockOwner) { throw new IllegalStateException("Index wasn't locked by this thread!!!"); } this.writeLockOwner = null; } boolean wasInterrupted = false; try { if (establishReadLocks == 0) { processDeletions(); this.db.putLong(Database.WRITE_NUMBER_OFFSET, ++this.fWriteNumber); clearResultCache(); } wasInterrupted = this.db.giveUpExclusiveLock() || wasInterrupted; } finally { <START> assert this.lockCount == -1; this.lastWriteAccess = System.currentTimeMillis(); synchronized (this.mutex) { if (sDEBUG_LOCKS) { long timeHeld = this.lastWriteAccess - this.timeWriteLockAcquired; if (timeHeld >= LONG_WRITE_LOCK_REPORT_THRESHOLD) { System.out.println("Index write lock held for " + timeHeld + " ms"); } decWriteLock(establishReadLocks + 1); } if (this.lockCount < 0) { this.lockCount = establishReadLocks + 1; } this.mutex.notifyAll(); this.db.setLocked(true); } try { this.db.flush(); } finally { releaseReadLock(); } <END> } if (wasInterrupted) { throw new OperationCanceledException(); } }</code><technical_language>This finally block grew big. Consider moving contents a separate method. concerned exceptions thrown this method. current code exceptions hide exceptions thrown body of try statement</technical_language>

Target:
public void releaseWriteLock(int establishReadLocks, boolean flush) { synchronized (this.mutex) { Thread current = Thread.currentThread(); if (current != this.writeLockOwner) { throw new IllegalStateException("Index wasn't locked by this thread!!!"); } this.writeLockOwner = null; } RuntimeException exception = null ; boolean wasInterrupted = false; try { if (establishReadLocks == 0) { processDeletions(); this.db.putLong(Database.WRITE_NUMBER_OFFSET, ++this.fWriteNumber); clearResultCache(); } wasInterrupted = this.db.giveUpExclusiveLock() || wasInterrupted; } catch (RuntimeException e) { exception = e; } finally { assert this.lockCount == -1; this.lastWriteAccess = System.currentTimeMillis(); try { releaseWriteLockAndFlush(establishReadLocks); } catch (RuntimeException e) { if (exception != null) { e.addSuppressed(exception); } throw e; } } if (wasInterrupted) { throw new OperationCanceledException(); } }
Source:
<code>public boolean isAvailable(@NotNull Project project, Editor editor, @NotNull PsiElement element) { <START> if (!element.isValid() || !element.isWritable()) return false; <END> GoAssignmentStatement assignment = getValidAssignmentParent(element); GoReferenceExpression selectedFieldReference = assignment != null ? getFieldReference(element, assignment) : null; return selectedFieldReference != null && !getUninitializedSingleFieldReferences(assignment, selectedFieldReference).isEmpty(); }</code><technical_language>A lot of duplicate code invoke. extract method processor create DTO object</technical_language>

Target:
public boolean isAvailable(@NotNull Project project, Editor editor, @NotNull PsiElement element) { Pair<List<GoReferenceExpression>, GoCompositeLit> pair = getFieldReferencesAndStructLiteral(element); return !pair.first.isEmpty() && pair.second != null; }
Source:
<code>public String getDatacenterName(byte id) { if (id == ClusterMapUtils.UNKNOWN_DATACENTER_ID) { return null; } <START> return hardwareLayout.getDatacenterById(id).getName(); <END> }</code><technical_language>this throw a null pointer exception if a datacenter id</technical_language>

Target:
public String getDatacenterName(byte id) { Datacenter datacenter = hardwareLayout.findDatacenter(id); return datacenter == null ? null : datacenter.getName(); }
Source:
<code>public static String toJson(final Config config, final String path) { <START> return config.withFallback(ConfigFactory.systemProperties()).resolve().getObject(path).render(ConfigRenderOptions.concise()); <END> }</code><technical_language>concerned fallback here. of fallbacks applied config initialized</technical_language>

Target:
public static String toJson(final Config config, final String path) { return config.getObject(path).render(ConfigRenderOptions.concise()); }
Source:
<code>public void getDockerRegistryOrganizationRepositoriesTest() { ApiClient client = getOpenAPIWebClient(USER_1_USERNAME, testingPostgres); UsersApi usersApi = new UsersApi(client); <START> List<String> actualRepositories = usersApi.getDockerRegistryOrganizationRepositories("quay.io", "dockstoretestuser"); <END> List<String> expectedRepositories = Arrays.asList("noautobuild", "nobuildsatall", "quayandbitbucket", "quayandbitbucketalternate", "quayandgithub", "quayandgithubalternate", "quayandgithubwdl", "quayandgitlab", "quayandgitlabalternate", "test_input_json"); Collections.sort(actualRepositories); Collections.sort(expectedRepositories); Assert.assertEquals("Should have the expected repositories", expectedRepositories, actualRepositories); }</code><technical_language>Ditto, this break if add repos point</technical_language>

Target:
public void getDockerRegistryOrganizationRepositoriesTest() { ApiClient client = getOpenAPIWebClient(USER_1_USERNAME, testingPostgres); UsersApi usersApi = new UsersApi(client); List<String> actualRepositories = usersApi.getDockerRegistryOrganizationRepositories("quay.io", "dockstoretestuser"); List<String> expectedRepositories = Arrays.asList("noautobuild", "nobuildsatall", "quayandbitbucket", "quayandbitbucketalternate", "quayandgithub", "quayandgithubalternate", "quayandgithubwdl", "quayandgitlab", "quayandgitlabalternate", "test_input_json"); expectedRepositories.forEach(repository -> { Assert.assertTrue("Should have the expected repositories", actualRepositories.contains(repository)); }); }
Source:
<code>public void visitCallExpression(CallExpression callExpression) { Symbol calleeSymbol = callExpression.calleeSymbol(); <START> shouldNotReportIssue |= calleeSymbol != null && "globals".equals(calleeSymbol.fullyQualifiedName()); <END> super.visitCallExpression(callExpression); }</code><technical_language>_nitpick_ I find statements this a bit hard read, I either: - surround right hand side in parentheses: shouldNotReportIssue |= (calleeSymbol != null && "globals".equals(calleeSymbol.fullyQualifiedName())); - create a helper method do this check reuse in line 190, e.g.: shouldNotReportIssue |= isSymbolWithName(calleeSymbol, "globals")</technical_language>

Target:
public void visitCallExpression(CallExpression callExpression) { Symbol calleeSymbol = callExpression.calleeSymbol(); shouldNotReportIssue |= isSymbolWithFQN(calleeSymbol, "globals"); super.visitCallExpression(callExpression); }
Source:
<code>private void calibrateLimits() { users.entrySet().removeIf(entry -> entry.getValue().getOneMinuteRate() <= idleThreshold); int userCount = users.size(); if (userCount > 0) { <START> long total = users.reduceValuesToLong(10, Throughput::getRoundedOneMinuteRate, 0, ((left, right) -> left + right)); <END> long mean = total / userCount; long desiredMean = desired / userCount; users.entrySet() .stream() .filter(entry -> entry.getValue().getRoundedOneMinuteRate() >= mean) .forEach(entry -> entry.getValue().max = desiredMean); } }</code><technical_language>Introduce a private method for right hand side please, I ;)</technical_language>

Target:
private void calibrateLimits() { users.entrySet().removeIf(entry -> entry.getValue().getOneMinuteRate() <= idleThreshold); int userCount = users.size(); if (userCount > 0) { long total = users.reduceValuesToLong(Long.MAX_VALUE, Throughput::getRoundedOneMinuteRate, 0, ((left, right) -> left + right)); long mean = total / userCount; long desiredMean = desired / userCount; users.entrySet() .stream() .filter(entry -> entry.getValue().getRoundedOneMinuteRate() >= mean) .forEach(entry -> entry.getValue().max = desiredMean); } }
Source:
<code>protected void testValidatorByte(ConstraintValidator<?, Byte> constraint, boolean inclusive, boolean isMax) { <START> if ( inclusive ) { <END> assertTrue( constraint.isValid( (byte) 15, null ) ); } else { assertFalse( constraint.isValid( (byte) 15, null ) ); } assertTrue( constraint.isValid( null, null ) ); assertEquals( constraint.isValid( Byte.MIN_VALUE, null ), isMax ); assertEquals( constraint.isValid( Byte.MAX_VALUE, null ), !isMax ); }</code><technical_language>need a new line above</technical_language>

Target:
protected void testValidatorByte(ConstraintValidator<?, Byte> constraint, boolean inclusive, boolean isMax) { if ( inclusive ) { assertTrue( constraint.isValid( (byte) 15, null ) ); } else { assertFalse( constraint.isValid( (byte) 15, null ) ); } assertTrue( constraint.isValid( null, null ) ); assertEquals( constraint.isValid( (byte) 14, null ), isMax ); assertEquals( constraint.isValid( (byte) 16, null ), !isMax ); assertEquals( constraint.isValid( Byte.MIN_VALUE, null ), isMax ); assertEquals( constraint.isValid( Byte.MAX_VALUE, null ), !isMax ); }
Source:
<code>Map getNetworkStatsMap(VM vm) { List<Device> nicDevices = vm.getDevicesByType(Device.DeviceType.NIC); String macAddress = vm.getMacAddress(); if( macAddress.equals(VM.NONE_STRING) ) { log.debug("no mac address for vm {}", vm.getId()); return map(); } Map resultMap = map(); int count = 0; for(Device device : nicDevices) { Map netStats = map(); String dName = "vnet" + count; netStats.put("txErrors", "0"); netStats.put("state", "unknown"); netStats.put("macAddr", device.getMacAddr()); netStats.put("name", dName); netStats.put("txDropped", "0"); netStats.put("txRate", <START> Utils.rangeParsser(AppConfig.getInstance().getNetworkLoadValues())); <END> netStats.put("rxErrors", "0"); netStats.put("rxRate", Utils.rangeParsser(AppConfig.getInstance().getNetworkLoadValues())); netStats.put("tx", Utils.rangeParsser(AppConfig.getInstance().getNetworkLoadValues())); netStats.put("rx", Utils.rangeParsser(AppConfig.getInstance().getNetworkLoadValues())); netStats.put("rxDropped", "0"); netStats.put("speed", "1000"); netStats.put("sampleTime", "4318787.08"); resultMap.put(dName, netStats); ++count; } return resultMap; }</code><technical_language>do 4 times</technical_language>

Target:
Map getNetworkStatsMap(VM vm) { List<Device> nicDevices = vm.getDevicesByType(Device.DeviceType.NIC); String macAddress = vm.getMacAddress(); if( macAddress.equals(VM.NONE_STRING) ) { log.debug("no mac address for vm {}", vm.getId()); return map(); } Map resultMap = map(); int count = 0; for(Device device : nicDevices) { ArrayList loadValues = AppConfig.getInstance().getNetworkLoadValues(); Map netStats = map(); String dName = "vnet" + count; netStats.put("txErrors", "0"); netStats.put("state", "unknown"); netStats.put("macAddr", device.getMacAddr()); netStats.put("name", dName); netStats.put("txDropped", "0"); netStats.put("txRate", Utils.rangeParsser(loadValues)); netStats.put("rxErrors", "0"); netStats.put("rxRate", Utils.rangeParsser(loadValues)); netStats.put("tx", Utils.rangeParsser(loadValues)); netStats.put("rx", Utils.rangeParsser(loadValues)); netStats.put("rxDropped", "0"); netStats.put("speed", "1000"); netStats.put("sampleTime", "4318787.08"); resultMap.put(dName, netStats); ++count; } return resultMap; }
Source:
<code>public void testSerializeCrateExecutableInfo() throws Throwable { Configuration configuration = new Configuration(); configuration.clusterName = "foo"; configuration.dataPath = "/mnt/ssd1/crate"; configuration.blobPath= "/mnt/data1/crate"; CrateInstances instances = new CrateInstances(); instances.addInstance(new CrateInstance("host1", "1", "0.48.0", 4300)); List<Protos.Attribute> attr = ImmutableList.of( Protos.Attribute.newBuilder() .setType(Protos.Value.Type.TEXT) .setName("zone") .setText(Protos.Value.Text.newBuilder().setValue("a").build()) .build() ); CrateExecutableInfo info = new CrateExecutableInfo(configuration, "host1", instances, attr); byte[] serializedInfo = info.toStream(); CrateExecutableInfo newInfo = CrateExecutableInfo.fromStream(serializedInfo); <START> Protos.Environment.Variable heap = Protos.Environment.Variable.newBuilder() <END> .setName("CRATE_HEAP_SIZE") .setValue(String.format("%sm", configuration.resHeap.longValue())) .build(); assertThat(newInfo.environment(), Matchers.hasItem(heap)); assertThat(newInfo.arguments(), Matchers.hasItem("-Des.cluster.name=foo")); assertThat(newInfo.arguments(), Matchers.hasItem("-Des.path.data=/mnt/ssd1/crate")); assertThat(newInfo.arguments(), Matchers.hasItem("-Des.path.blobs=/mnt/data1/crate")); }</code><technical_language>heap is unused here</technical_language>

Target:
public void testSerializeCrateExecutableInfo() throws Throwable { Configuration configuration = new Configuration(); configuration.clusterName = "foo"; configuration.dataPath = "/mnt/ssd1/crate"; configuration.blobPath= "/mnt/data1/crate"; CrateInstances instances = new CrateInstances(); instances.addInstance(new CrateInstance("host1", "1", "0.48.0", 4300)); List<Protos.Attribute> attr = ImmutableList.of( Protos.Attribute.newBuilder() .setType(Protos.Value.Type.TEXT) .setName("zone") .setText(Protos.Value.Text.newBuilder().setValue("a").build()) .build() ); CrateExecutableInfo info = new CrateExecutableInfo(configuration, "host1", instances, attr); byte[] serializedInfo = info.toStream(); CrateExecutableInfo newInfo = CrateExecutableInfo.fromStream(serializedInfo); Protos.Environment.Variable heap = Protos.Environment.Variable.newBuilder() .setName("CRATE_HEAP_SIZE") .setValue(String.format("%sm", configuration.resHeap.longValue())) .build(); assertThat(newInfo.environment(), Matchers.hasItem(heap)); assertThat(newInfo.arguments(), Matchers.hasItem("-Des.cluster.name=foo")); assertThat(newInfo.arguments(), Matchers.hasItem("-Des.path.data=/mnt/ssd1/crate")); assertThat(newInfo.arguments(), Matchers.hasItem("-Des.path.blobs=/mnt/data1/crate")); assertThat(newInfo.arguments(), Matchers.hasItem("-Des.node.mesos_zone=a")); }
Source:
<code>public void setup() { LOG.info("Setting up worker context: " + this); File py4jDependencyFile = new File("./" + PY4J_SRC_ZIP_FILE_NAME); pythonEnvPath = System.getenv(ENV_VAR_PYTHONPATH); LOG.info("Found python environment path : " + pythonEnvPath); if (pythonEnvPath != null) { pythonEnvPath = py4jDependencyFile.getAbsolutePath() + ":" + pythonEnvPath; } else { pythonEnvPath = py4jDependencyFile.getAbsolutePath(); } <START> LOG.debug("Final python environment path with Py4j depenency path: " + pythonEnvPath); <END> LOG.info("FINAL DEPENDENCY PATH: " + environmentData.get(PY4J_DEPENDENCY_PATH)); if ((this.dependencyPath = environmentData.get(PY4J_DEPENDENCY_PATH)) == null) { this.dependencyPath = py4jDependencyFile.getAbsolutePath(); } LOG.info("FINAL WORKER PATH: " + environmentData.get(PYTHON_WORKER_PATH)); if ((this.workerFilePath = environmentData.get(PYTHON_WORKER_PATH)) == null) { File pythonWorkerFile = new File("./" + PYTHON_WORKER_FILE_NAME); this.workerFilePath = pythonWorkerFile.getAbsolutePath(); } LOG.info("Python dependency Path " + this.dependencyPath + " worker Path " + this.workerFilePath); }</code><technical_language>{} in LOG statements</technical_language>

Target:
public void setup() { LOG.info("Setting up worker context: {}", this); LOG.debug("Final python environment path with Py4j depenency path: {}", pythonEnvPath); if ((this.apexSourcePath = environmentData.get(PYTHON_APEX_PATH)) == null) { this.apexSourcePath = new File("./" + PYTHON_APEX_ZIP_NAME).getAbsolutePath(); } if ((this.py4jDependencyPath = environmentData.get(PY4J_DEPENDENCY_PATH)) == null) { this.py4jDependencyPath = new File("./" + PY4J_SRC_ZIP_FILE_NAME).getAbsolutePath(); } LOG.info("FINAL WORKER PATH: {}", environmentData.get(PYTHON_WORKER_PATH)); if ((this.workerFilePath = environmentData.get(PYTHON_WORKER_PATH)) == null) { File pythonWorkerFile = new File("./" + PYTHON_WORKER_FILE_NAME); this.workerFilePath = pythonWorkerFile.getAbsolutePath(); } List<String> dependencyFilePaths = new ArrayList<String>(); dependencyFilePaths.add(this.apexSourcePath); dependencyFilePaths.add(this.py4jDependencyPath); pythonEnvPath = System.getenv(ENV_VAR_PYTHONPATH); LOG.info("Found python environment path: {}", pythonEnvPath); if (pythonEnvPath != null) { dependencyFilePaths.add(pythonEnvPath); pythonEnvPath = StringUtils.join(dependencyFilePaths, ":"); } else { pythonEnvPath = StringUtils.join(dependencyFilePaths, ":"); } LOG.info("Python dependency Path worker Path {}", this.py4jDependencyPath, this.workerFilePath); }
Source:
<code>public AnnotatedTypeMirror fromElement(Element elt) { if (shouldCache && elementCache.containsKey(elt)) { return elementCache.get(elt).deepCopy(); } if (elt.getKind() == ElementKind.PACKAGE) { return toAnnotatedType(elt.asType(), false); } AnnotatedTypeMirror type; Tree decl = declarationFromElement(elt); if (decl == null) { type = stubTypes.getAnnotatedTypeMirror(elt); if (type == null) { type = toAnnotatedType(elt.asType(), ElementUtils.isTypeDeclaration(elt)); ElementAnnotationApplier.apply(type, elt, this); } } else if (decl instanceof ClassTree) { type = fromClass((ClassTree) decl); } else if (decl instanceof VariableTree) { type = fromMember(decl); } else if (decl instanceof MethodTree) { type = fromMember(decl); } else if (decl.getKind() == Tree.Kind.TYPE_PARAMETER) { type = fromTypeTree(decl); } else { throw new BugInCF( "AnnotatedTypeFactory.fromElement: cannot be here. decl: " + decl.getKind() + " elt: " + elt); } if (checker.hasOption("prioritizeStubs")) { AnnotatedTypeMirror stubType = stubTypes.getAnnotatedTypeMirror(elt); <START> boolean stubTypeHasAnAnnotation = stubType != null && stubType.toString().contains("@"); <END> boolean typeHasAnAnnotation = type != null && type.toString().contains("@"); if (stubTypeHasAnAnnotation && !typeHasAnAnnotation) { type = stubType; } else if (stubTypeHasAnAnnotation && typeHasAnAnnotation) { AnnotatedTypeMerger.merge(stubType, type); } } if (shouldCache && !stubTypes.isParsing()) { elementCache.put(elt, type.deepCopy()); } return type; }</code><technical_language>Replace a TypeScanner: new SimpleAnnotatedTypeScanner<Boolean, Void>() { @Override protected Boolean defaultAction(AnnotatedTypeMirror type, Void aVoid) { return type.getAnnotations().isEmpty(); } @Override protected Boolean reduce(Boolean r1, Boolean r2) { r1 = r1 == null ? false : r1; r2 = r2 == null ? false : r2; return r1 || r2; } };</technical_language>

Target:
public AnnotatedTypeMirror fromElement(Element elt) { if (shouldCache && elementCache.containsKey(elt)) { return elementCache.get(elt).deepCopy(); } if (elt.getKind() == ElementKind.PACKAGE) { return toAnnotatedType(elt.asType(), false); } AnnotatedTypeMirror type; Tree decl = declarationFromElement(elt); if (decl == null) { type = stubTypes.getAnnotatedTypeMirror(elt); if (type == null) { type = toAnnotatedType(elt.asType(), ElementUtils.isTypeDeclaration(elt)); ElementAnnotationApplier.apply(type, elt, this); } } else if (decl instanceof ClassTree) { type = fromClass((ClassTree) decl); } else if (decl instanceof VariableTree) { type = fromMember(decl); } else if (decl instanceof MethodTree) { type = fromMember(decl); } else if (decl.getKind() == Tree.Kind.TYPE_PARAMETER) { type = fromTypeTree(decl); } else { throw new BugInCF( "AnnotatedTypeFactory.fromElement: cannot be here. decl: " + decl.getKind() + " elt: " + elt); } if (checker.hasOption("mergeStubsWithSource")) { type = mergeStubsIntoType(type, elt); } if (shouldCache && !stubTypes.isParsing()) { elementCache.put(elt, type.deepCopy()); } return type; }
Source:
<code>public String send(String msg) { <START> System.setProperty("drools-server", "abcd"); <END> ClassPathXmlApplicationContext springContext = new ClassPathXmlApplicationContext("classpath:/camel-client.xml"); System.out.println("REST URL :: "+springContext.getBean("restUrl")); String batch = ""; batch += "<batch-execution lookup=\"ksession1\">\n"; batch += " <insert out-identifier=\"message\">\n"; batch += " <org.drools.server.Message>\n"; batch += " <text>" + msg + "</text>\n"; batch += " </org.drools.server.Message>\n"; batch += " </insert>\n"; batch += "</batch-execution>\n"; CamelServerApp test = new CamelServerApp(); String response = test.execute( batch, ( CamelContext ) springContext.getBean( "camel" ) ); return response; }</code><technical_language>Sorry, I understanding this: explain setting this system property</technical_language>

Target:
public String send(String msg) { ClassPathXmlApplicationContext springContext = new ClassPathXmlApplicationContext("classpath:/src/main/filtered-resoures/camel-client.xml"); String batch = ""; batch += "<batch-execution lookup=\"ksession1\">\n"; batch += " <insert out-identifier=\"message\">\n"; batch += " <org.drools.server.Message>\n"; batch += " <text>" + msg + "</text>\n"; batch += " </org.drools.server.Message>\n"; batch += " </insert>\n"; batch += "</batch-execution>\n"; CamelServerApp test = new CamelServerApp(); String response = test.execute( batch, ( CamelContext ) springContext.getBean( "camel" ) ); return response; }
Source:
<code>private void generateEnumReadOne(EnumType type) { JavaClassName typeName = javaTypes.getEnumName(type); javaBuffer.addImport(typeName); javaBuffer.addImport(JsonReader.class); javaBuffer.addImport(JsonParser.Event.class); javaBuffer.addLine("public static %1$s readOne(JsonReader reader) {", typeName.getSimpleName()); javaBuffer.addLine( "return readOne(reader, true);"); javaBuffer.addLine("}"); javaBuffer.addLine(); javaBuffer.addLine("public static %1$s readOne(JsonReader reader, boolean started) {", typeName.getSimpleName()); javaBuffer.addLine( "if (!started) {"); javaBuffer.addLine( "reader.expect(Event.START_OBJECT);"); javaBuffer.addLine( "}"); javaBuffer.addLine( "return %1$s.fromValue(reader.readString());", typeName.getSimpleName()); javaBuffer.addLine("}"); <START> javaBuffer.addLine(); <END> }</code><technical_language>I this method called passing "false" parameter, "readOne" method, receive it, behaves current receives "true"</technical_language>

Target:
private void generateEnumReadOne(EnumType type) { JavaClassName typeName = javaTypes.getEnumName(type); javaBuffer.addImport(typeName); javaBuffer.addImport(JsonReader.class); javaBuffer.addImport(JsonParser.Event.class); javaBuffer.addLine("public static %1$s readOne(JsonReader reader) {", typeName.getSimpleName()); javaBuffer.addLine( "return %1$s.fromValue(reader.readString());", typeName.getSimpleName()); javaBuffer.addLine("}"); javaBuffer.addLine(); }
Source:
<code>public void onRoutingTableChange(RoutingTableSnapshot routingTableSnapshot, Object context) { logger.info("Routing table change triggered from {}", dcName); <START> synchronized (notificationLock) { <END> dcToRoutingTableSnapshotRef.get(dcName).getAndSet(routingTableSnapshot); helixClusterManagerMetrics.routingTableChangeTriggerCount.inc(); } }</code><technical_language>Yeah, this needs extra sync</technical_language>

Target:
public void onRoutingTableChange(RoutingTableSnapshot routingTableSnapshot, Object context) { logger.info("Routing table change triggered from {}", dcName); dcToRoutingTableSnapshotRef.get(dcName).getAndSet(routingTableSnapshot); helixClusterManagerMetrics.routingTableChangeTriggerCount.inc(); }
Source:
<code>public void onMessage(Message message) { try { <START> log.infof("onMessage received message: %s '%s'", message, ((TextMessage) message).getText()); <END> if(checker.getRolledback() > 0) { log.infof("Discarding message '%s' as onMessage called for second time", message); return; } final Destination replyTo = message.getJMSReplyTo(); if (replyTo == null) { throw new RuntimeException("ReplyTo info in message was not specified" + " and bean does not know where to reply to"); } TxTestUtil.enlistTestXAResource(tm.getTransaction()); try ( JMSContext context = factory.createContext() ) { context.createProducer() .setJMSCorrelationID(message.getJMSMessageID()) .send(replyTo, REPLY_PREFIX + ((TextMessage) message).getText()); } TxTestUtil.waitForTimeout(tm); } catch (Exception e) { throw new RuntimeException("onMessage method execution failed", e); } }</code><technical_language>log.trace if</technical_language>

Target:
public void onMessage(Message message) { try { log.tracef("onMessage received message: %s '%s'", message, ((TextMessage) message).getText()); if(checker.getRolledback() > 0) { log.tracef("Discarding message '%s' as onMessage called for second time", message); return; } final Destination replyTo = message.getJMSReplyTo(); if (replyTo == null) { throw new RuntimeException("ReplyTo info in message was not specified" + " and bean does not know where to reply to"); } TxTestUtil.enlistTestXAResource(tm.getTransaction()); try ( JMSContext context = factory.createContext() ) { context.createProducer() .setJMSCorrelationID(message.getJMSMessageID()) .send(replyTo, REPLY_PREFIX + ((TextMessage) message).getText()); } TxTestUtil.waitForTimeout(tm); } catch (Exception e) { throw new RuntimeException("onMessage method execution failed", e); } }
Source:
<code><START> public static boolean isBlockCompressed(final Path path) throws IOException { <END> return isBlockCompressed(path, true); }</code><technical_language>I default behavior ignore extension crack open file. do expected, efficient. If people understand opt more dangerous faster check</technical_language>

Target:
public static boolean isBlockCompressed(final Path path) throws IOException { return isBlockCompressed(path, false); }
Source:
<code>public void should_fail_if_completable_future_has_failed() { CompletableFuture<String> future = new CompletableFuture<>(); future.completeExceptionally(new RuntimeException()); assertThatThrownBy(() -> assertThat(future).hasNotFailed()).isInstanceOf(AssertionError.class) .hasMessageMatching(shouldNotHaveFailed(future).create(emptyDescription(), <START> new FailedCompletableFutureRepresentation())); <END> }</code><technical_language>keen a FailedCompletableFutureRepresentation kind of duplicate production code. I simply verify some subpart of stack trace is present (a subpart in stack trace) hasMessageMatching hasMessageContaining, rationale is if subpart exists stack trace too. do applied other tests</technical_language>

Target:
public void should_fail_if_completable_future_has_failed() { CompletableFuture<String> future = new CompletableFuture<>(); future.completeExceptionally(new RuntimeException()); assertThatThrownBy(() -> assertThat(future).hasNotFailed()).isInstanceOf(AssertionError.class) .hasMessageStartingWith(format("%nExpecting%n <CompletableFuture[Failed: java.lang.RuntimeException]%n")) .hasMessageContaining("Caused by: java.lang.RuntimeException") .hasMessageEndingWith(format("to not have failed.%n%s", WARNING)); }
Source:
<code>public void testSaveCredentials_resolution() { mHandler.getOperation().observeForever(mResultObserver); ResolvableApiException mockRae = mock(ResolvableApiException.class); when(mMockCredentials.save(any(Credential.class))) .thenReturn(AutoCompleteTask.<Void>forFailure(mockRae)); mHandler.saveCredentials(TestHelper.getMockFirebaseUser(), TestConstants.PASSWORD, null); ArgumentCaptor<Resource<Void>> resolveCaptor = ArgumentCaptor.forClass(Resource.class); <START> verify(mResultObserver, times(2)).onChanged(resolveCaptor.capture()); <END> PendingIntentRequiredException e = ((PendingIntentRequiredException) resolveCaptor.getValue().getException()); mHandler.onActivityResult(e.getRequestCode(), Activity.RESULT_OK); verify(mResultObserver).onChanged(argThat(ResourceMatchers.<Void>isSuccess())); }</code><technical_language>change test verify onChanged events separately? Kind of confusing verify time is a PendingIntentRequiredException assert/care event is</technical_language>

Target:
public void testSaveCredentials_resolution() { mHandler.getOperation().observeForever(mResultObserver); ResolvableApiException mockRae = mock(ResolvableApiException.class); when(mMockCredentials.save(any(Credential.class))) .thenReturn(AutoCompleteTask.<Void>forFailure(mockRae)); mHandler.saveCredentials(TestHelper.getMockFirebaseUser(), TestConstants.PASSWORD, null); InOrder inOrder = inOrder(mResultObserver); inOrder.verify(mResultObserver).onChanged(argThat(ResourceMatchers.<Void>isLoading())); ArgumentCaptor<Resource<Void>> resolveCaptor = ArgumentCaptor.forClass(Resource.class); inOrder.verify(mResultObserver).onChanged(resolveCaptor.capture()); PendingIntentRequiredException e = ((PendingIntentRequiredException) resolveCaptor.getValue().getException()); mHandler.onActivityResult(e.getRequestCode(), Activity.RESULT_OK); inOrder.verify(mResultObserver).onChanged(argThat(ResourceMatchers.<Void>isSuccess())); }
Source:
<code>HttpURLConnection getConnection(URL url) throws IOException { if (config.getProxyHost() != null) { SocketAddress socketAddress; if (config.getProxyPort() != -1) { socketAddress = new InetSocketAddress(config.getProxyHost(), config.getProxyPort()); } else { <START> socketAddress = new InetSocketAddress(config.getProxyHost(), 80); <END> } proxy = new Proxy(Proxy.Type.HTTP, socketAddress); if (config.getProxyUsername() != null && config.getProxyPassword() != null) { Authenticator authenticator = new Authenticator() { @Override protected PasswordAuthentication getPasswordAuthentication() { return (new PasswordAuthentication(config.getProxyUsername(), config.getProxyPassword().toCharArray())); } }; Authenticator.setDefault(authenticator); } } final HttpURLConnection connection; if (proxy != null) { connection = (HttpURLConnection) url.openConnection(proxy); } else { connection = (HttpURLConnection) url.openConnection(); } return connection; }</code><technical_language>This default 443</technical_language>

Target:
HttpURLConnection getConnection(URL url) throws IOException { final HttpURLConnection connection; if (proxy != null) { connection = (HttpURLConnection) url.openConnection(proxy); } else { connection = (HttpURLConnection) url.openConnection(); } return connection; }
Source:
<code>private Set<Cookie> convertHttpToJavaCookies(Set<io.netty.handler.codec.http.Cookie> httpCookies) { Set<javax.servlet.http.Cookie> cookies = new HashSet<Cookie>(); for (io.netty.handler.codec.http.Cookie cookie : httpCookies) { try { javax.servlet.http.Cookie javaCookie = new javax.servlet.http.Cookie(cookie.getName(), cookie.getValue()); cookies.add(javaCookie); } catch (IllegalArgumentException e) { <START> logger.debug("Could not create cookie", e); <END> } } return cookies; }</code><technical_language>do want add cookie name/value in message</technical_language>

Target:
private Set<Cookie> convertHttpToJavaCookies(Set<io.netty.handler.codec.http.Cookie> httpCookies) { Set<javax.servlet.http.Cookie> cookies = new HashSet<Cookie>(); for (io.netty.handler.codec.http.Cookie cookie : httpCookies) { try { javax.servlet.http.Cookie javaCookie = new javax.servlet.http.Cookie(cookie.getName(), cookie.getValue()); cookies.add(javaCookie); } catch (IllegalArgumentException e) { logger.debug("Could not create cookie with name [{}]", cookie.getName(), e); } } return cookies; }
Source:
<code><START> public void getSetBits(int batchSize, boolean[] vector) <END> throws IOException { for (int i = 0; i < batchSize; i++) { vector[i] = nextBit(); } }</code><technical_language>@dain, this return int in aligning getUnsetBits? existing getSetBits (write bits a BlockBuilder) returns void tough</technical_language>

Target:
public int getSetBits(int batchSize, boolean[] vector) throws IOException { int count = 0; for (int i = 0; i < batchSize; i++) { vector[i] = nextBit(); count += vector[i] ? 1 : 0; } return count; }
Source:
<code>private String tokenFromRequest( HttpServletRequest request ) { final String authorizationInfo; final String authorizationHeader = getAuthorizationTokenFromHeader( request ); if ( authorizationHeader != null ) { authorizationInfo = authorizationHeader; } else { authorizationInfo = getRequestCookie( request, AUTHORIZATION_COOKIE ); final String csrfTokenFromCookie = getRequestCookie( request, CSRF_COOKIE ); final String csrfTokenFromParams = request.getParameter( CSRF_COOKIE ); if ( csrfTokenFromCookie == null || csrfTokenFromParams == null ) { return null; } if ( !StringUtils.equals( csrfTokenFromCookie, csrfTokenFromParams ) ) { return null; } } <START> if ( authorizationInfo == null || !authorizationInfo.startsWith( BEARER_PREFIX ) ) { <END> return null; } final String[] parts = authorizationInfo.split( " " ); if ( parts.length != 2 ) { return null; } return parts[ 1 ]; }</code><technical_language>I a vague recollection this broken in added in toLowerCase fix it</technical_language>

Target:
private String tokenFromRequest( HttpServletRequest request ) { final String authorizationInfo; final String authorizationHeader = getAuthorizationTokenFromHeader( request ); if ( authorizationHeader != null ) { authorizationInfo = authorizationHeader; } else { authorizationInfo = getRequestCookie( request, AUTHORIZATION_COOKIE ); final String csrfTokenFromCookie = getRequestCookie( request, CSRF_COOKIE ); final String csrfTokenFromParams = request.getParameter( CSRF_PARAM ); if ( csrfTokenFromCookie == null || csrfTokenFromParams == null ) { return null; } if ( !StringUtils.equals( csrfTokenFromCookie, csrfTokenFromParams ) ) { return null; } } if ( authorizationInfo == null || !authorizationInfo.startsWith( BEARER_PREFIX ) ) { return null; } final String[] parts = authorizationInfo.split( " " ); if ( parts.length != 2 ) { return null; } return parts[ 1 ]; }
Source:
<code>public final void alterTable(final AlterTableDesc desc) throws UndefinedTableException, DuplicateColumnException, InsufficientPrivilegeException, DuplicateTableException { try { final BlockingInterface stub = getStub(); <START> final ReturnState state = stub.alterTable(null, desc.getProto()); <END> throwsIfThisError(state, DuplicateColumnException.class); throwsIfThisError(state, DuplicateTableException.class); throwsIfThisError(state, DuplicateColumnException.class); throwsIfThisError(state, UndefinedTableException.class); throwsIfThisError(state, InsufficientPrivilegeException.class); ensureOk(state); } catch (ServiceException e) { throw new RuntimeException(e); } }</code><technical_language>CatalogServer.alterTable() throws UndefinedTableException. add handling other exceptions for future work? did, I DuplicateTableException occur</technical_language>

Target:
public final void alterTable(final AlterTableDesc desc) throws DuplicateDatabaseException, DuplicateTableException, DuplicateColumnException, DuplicatePartitionException, UndefinedDatabaseException, UndefinedTableException, UndefinedColumnException, UndefinedPartitionMethodException, InsufficientPrivilegeException, UndefinedPartitionException { try { final BlockingInterface stub = getStub(); final ReturnState state = stub.alterTable(null, desc.getProto()); throwsIfThisError(state, DuplicateTableException.class); throwsIfThisError(state, DuplicateColumnException.class); throwsIfThisError(state, DuplicatePartitionException.class); throwsIfThisError(state, UndefinedDatabaseException.class); throwsIfThisError(state, UndefinedTableException.class); throwsIfThisError(state, UndefinedColumnException.class); throwsIfThisError(state, UndefinedPartitionException.class); throwsIfThisError(state, UndefinedPartitionMethodException.class); throwsIfThisError(state, InsufficientPrivilegeException.class); ensureOk(state); } catch (ServiceException e) { throw new RuntimeException(e); } }
Source:
<code>public Job annotateVariantsJob(JobBuilderFactory jobBuilderFactory) { <START> logger.debug("Building '"+NAME_ANNOTATE_VARIANTS_JOB+"'"); <END> JobBuilder jobBuilder = jobBuilderFactory .get(NAME_ANNOTATE_VARIANTS_JOB) .incrementer(new RunIdIncrementer()); return jobBuilder.start(annotation).build().build(); }</code><technical_language>whitespaces strings signs. Applies rest of jobs</technical_language>

Target:
public Job annotateVariantsJob(JobBuilderFactory jobBuilderFactory) { logger.debug("Building '" + ANNOTATE_VARIANTS_JOB + "'"); JobBuilder jobBuilder = jobBuilderFactory .get(ANNOTATE_VARIANTS_JOB) .incrementer(new RunIdIncrementer()); return jobBuilder.start(annotation).build().build(); }
Source:
<code>public static RealMatrix convertINDArrayToApacheMatrix(@Nonnull final INDArray matrix) { if (matrix.rank() != 2) { throw new IllegalArgumentException("Input rank is not 2 (not matrix)"); } final int[] shape = matrix.shape(); final BlockRealMatrix out = new BlockRealMatrix(shape[0], shape[1]); <START> for (int i=0; i<shape[0]; i++) { <END> for (int j=0; j<shape[1]; j++) { out.setEntry(i, j, matrix.getDouble(i, j)); } } return out; }</code><technical_language>I slightly prefer a Visitor: java out..walkInOptimizedOrder(new DefaultRealMatrixChangingVisitor() { public double visit(final int i, final int j, final double value) { return matrix.getDouble(i,j); } });</technical_language>

Target:
public static RealMatrix convertINDArrayToApacheMatrix(@Nonnull final INDArray matrix) { Utils.validateArg(matrix.rank() == 2, "Input rank is not 2 (not matrix)"); final int[] shape = matrix.shape(); final INDArray concreteMatrix = matrix.isView() ? matrix.dup() : matrix; final double[] data = concreteMatrix.data().asDouble(); final char ordering = concreteMatrix.ordering(); if (ordering == 'c') { return new BlockRealMatrix(monoToBiDiArrayRowMajor(data, shape[0], shape[1])); } else { return new BlockRealMatrix(monoToBiDiArrayColumnMajor(data, shape[0], shape[1])); } }
Source:
<code>public void visitToken(final DetailAST node) { final DetailAST generic = DiamondOperatorCheck.getFirstChildNodeOfType( node.findFirstToken(TokenTypes.TYPE), TokenTypes.TYPE_ARGUMENTS ); final DetailAST assign = node.findFirstToken(TokenTypes.ASSIGN); final DetailAST instance; if (assign == null || generic == null) { instance = null; } else { instance = assign.getFirstChild().getFirstChild(); } if (instance != null && instance.getType() == TokenTypes.LITERAL_NEW && DiamondOperatorCheck.isNotObjectBlock(instance) && DiamondOperatorCheck.isNotArray(instance)) { final DetailAST type = DiamondOperatorCheck.getFirstChildNodeOfType( instance, TokenTypes.TYPE_ARGUMENTS ); if (generic.equalsTree(type)) { log( type, <START> "Better to use diamond operator where possible" <END> ); } } }</code><technical_language>@vkuchyn message is "Use diamond operator"</technical_language>

Target:
public void visitToken(final DetailAST node) { final DetailAST generic = DiamondOperatorCheck.getFirstChildNodeOfType( node.findFirstToken(TokenTypes.TYPE), TokenTypes.TYPE_ARGUMENTS ); final DetailAST assign = node.findFirstToken(TokenTypes.ASSIGN); final DetailAST instance; if (assign == null || generic == null) { instance = null; } else { instance = assign.getFirstChild().getFirstChild(); } if (instance != null && instance.getType() == TokenTypes.LITERAL_NEW && DiamondOperatorCheck.isNotObjectBlock(instance) && DiamondOperatorCheck.isNotArray(instance)) { final DetailAST type = DiamondOperatorCheck.getFirstChildNodeOfType( instance, TokenTypes.TYPE_ARGUMENTS ); if (generic.equalsTree(type)) { log(type, "Use diamond operator"); } } }
Source:
<code><START> private void handleExecutorNotAliveCase( <END> final Entry<Optional<Executor>, List<ExecutableFlow>> entry, final Executor executor, final ExecutorManagerException e) { this.logger.error("Failed to get update from executor " + executor.getId(), e); this.executorFailureCount.put(executor.getId(), this.executorFailureCount.getOrDefault (executor.getId(), 0) + 1); if (this.executorFailureCount.get(executor.getId()) % this.executorMaxFailureCount == 0 && !this.alertEmails.isEmpty()) { entry.getValue().stream().forEach(flow -> flow .getExecutionOptions().setFailureEmails(this.alertEmails)); this.alerterHolder.get("email").alertOnFailedUpdate(executor, entry.getValue(), e); } }</code><technical_language>alert if failure contact executor is consecutive? If Azkaban is for a long time, intermittent failures contact executor, eventually add 6, failure a days ago</technical_language>

Target:
private void handleExecutorNotAliveCase( final Entry<Optional<Executor>, List<ExecutableFlow>> entry, final Executor executor, final ExecutorManagerException e) { logger.error("Failed to get update from executor " + executor.getId(), e); this.executorFailureCount.put(executor.getId(), this.executorFailureCount.getOrDefault (executor.getId(), 0) + 1); if (this.executorFailureCount.get(executor.getId()) % this.executorMaxFailureCount == 0 && !this.alertEmails.isEmpty()) { entry.getValue().stream().forEach(flow -> flow .getExecutionOptions().setFailureEmails(this.alertEmails)); logger.info(String.format("Executor failure count is %d. Sending alert emails to %s.", this.executorFailureCount.get(executor.getId()), this.alertEmails)); this.alerterHolder.get("email").alertOnFailedUpdate(executor, entry.getValue(), e); } }
Source:
<code>protected IRuntimeClasspathEntry[] defaultEntries(ILaunchConfiguration config) { try { String server = new JBossLaunchConfigProperties().getServerId(config); IServer s = ServerCore.findServer(server); IControllableServerBehavior beh = JBossServerBehaviorUtils.getControllableBehavior(config); if( beh != null ) { ISubsystemController cont = beh.getController(IControllableServerBehavior.SYSTEM_LAUNCH); if( cont instanceof ILaunchConfigConfiguratorProvider ) { ILaunchConfigConfigurator c = ((ILaunchConfigConfiguratorProvider)cont).getLaunchConfigurator(); <START> if( c != null ) { <END> if( c instanceof IDefaultClasspathLaunchConfigurator ) { return ((IDefaultClasspathLaunchConfigurator)c).getDefaultClasspathEntries(config); } } } } return new IRuntimeClasspathEntry[0]; } catch (CoreException ce) { JBossServerCorePlugin.log(ce.getStatus()); } try { return super.computeUnresolvedClasspath(config); } catch (CoreException ce) { JBossServerCorePlugin.log(ce.getStatus()); } return new IRuntimeClasspathEntry[] {}; }</code><technical_language>c != null check is redundant instanceof check</technical_language>

Target:
protected IRuntimeClasspathEntry[] defaultEntries(ILaunchConfiguration config) { try { String server = new JBossLaunchConfigProperties().getServerId(config); IServer s = ServerCore.findServer(server); IControllableServerBehavior beh = JBossServerBehaviorUtils.getControllableBehavior(config); if( beh != null ) { ISubsystemController cont = beh.getController(IControllableServerBehavior.SYSTEM_LAUNCH); if( cont instanceof ILaunchConfigConfiguratorProvider ) { ILaunchConfigConfigurator c = ((ILaunchConfigConfiguratorProvider)cont).getLaunchConfigurator(); if( c instanceof IDefaultClasspathLaunchConfigurator ) { return ((IDefaultClasspathLaunchConfigurator)c).getDefaultClasspathEntries(config); } } } return new IRuntimeClasspathEntry[0]; } catch (CoreException ce) { JBossServerCorePlugin.log(ce.getStatus()); } try { return super.computeUnresolvedClasspath(config); } catch (CoreException ce) { JBossServerCorePlugin.log(ce.getStatus()); } return new IRuntimeClasspathEntry[] {}; }
Source:
<code>void addChanges(Collection<String> filesToUpdate, Collection<IResource> resourcesToUpdate) { synchronized (lock) { files.addAll(filesToUpdate); resources.addAll(resourcesToUpdate); } <START> if (!filesToUpdate.isEmpty()) { <END> schedule(defaultDelay); } }</code><technical_language>Small style nit: braces simple statements</technical_language>

Target:
void addChanges(Collection<String> filesToUpdate, Collection<IResource> resourcesToUpdate) { synchronized (lock) { files.addAll(filesToUpdate); resources.addAll(resourcesToUpdate); } if (!filesToUpdate.isEmpty()) schedule(defaultDelay); }
Source:
<code>public void testUserAgentHeaderString() throws Exception { ClientBuilder builder = ClientBuilder.account("test"); Class clazz = builder.getClass(); <START> Field interceptor = clazz.getDeclaredField("USER_AGENT_INTERCEPTOR"); <END> interceptor.setAccessible(true); UserAgentInterceptor userAgentInterceptor = (UserAgentInterceptor) interceptor.get(builder); Class interceptorClazz = userAgentInterceptor.getClass(); Field uaField = interceptorClazz.getDeclaredField("userAgent"); uaField.setAccessible(true); String userAgentHeader = (String) uaField.get(userAgentInterceptor); assertTrue("The value of the User-Agent header: " + userAgentHeader + " should match the " + "format: " + userAgentFormat, userAgentHeader.matches(userAgentRegex)); }</code><technical_language>I if move logic UserAgentInterceptor new prefix string avoid reflection</technical_language>

Target:
public void testUserAgentHeaderString() throws Exception { String userAgentHeader = new UserAgentInterceptor(UserAgentInterceptor.class.getClassLoader(), "META-INF/com.cloudant.client.properties").getUserAgent(); assertTrue("The value of the User-Agent header: " + userAgentHeader + " should match the " + "format: " + userAgentFormat, userAgentHeader.matches(userAgentUnknownRegex)); }
Source:
<code>public void putRequest(ExecuteRequest req) throws ExceptionReport { try { <START> lock.tryLock(TIME_OUT_SECONDS, TimeUnit.SECONDS); END> UUID requestId = req.getUniqueId(); if (isRedundantRequestEnabled()) { if (hasRan(req)) { LOGGER.info("Current request has ran previously. Getting file response URI..."); String responseId = getPreviousResponseId(requestId); LOGGER.info("Response ID, " + responseId + " found for request with ID..." + requestId.toString()); } else { addRequest(req); } } else { LOGGER.info("Adding request to Throttle Queue with ID:" + requestId.toString()); addRequest(req); } } catch (InterruptedException e) { LOGGER.info("Attempt to acquire lock to add request to the throttle timed out: " + e.getMessage()); } finally { lock.unlock(); } }</code><technical_language>This locking technique is fine for now, if want able scale multiple processing nodes, able rely a lock is a process/thread</technical_language>

Target:
public void putRequest(ExecuteRequest req) throws ExceptionReport { try { lock.tryLock(TIME_OUT_SECONDS, TimeUnit.SECONDS); UUID requestId = req.getUniqueId(); if (isRedundantRequestEnabled()) { if (hasRan(req)) { LOGGER.debug("Current request has ran previously. Getting file response URI..."); String responseId = getPreviousResponseId(requestId); LOGGER.debug("Response ID, " + responseId + " found for request with ID..." + requestId.toString()); } else { addRequest(req); } } else { LOGGER.debug("Adding request to Throttle Queue with ID:" + requestId.toString()); addRequest(req); } } catch (InterruptedException e) { LOGGER.debug("Attempt to acquire lock to add request to the throttle timed out: " + e.getMessage()); } finally { lock.unlock(); } }
Source:
<code>final void releaseContextFromPool(final C context) { this.lock.lock(); try { if (this.cached == context) { return; } if (this.cached == null) { this.cached = context; return; } <START> this.contextPool.push(context); <END> } finally { this.lock.unlock(); } }</code><technical_language>grant PhaseTracker instance pool avoid lock altogether</technical_language>

Target:
final void releaseContextFromPool(final C context) { if (Thread.currentThread() != context.createdTracker.getSidedThread()) { throw new IllegalStateException("Asynchronous Thread Access to PhaseTracker: " + context.createdTracker); } if (this.cached == context) { return; } if (this.cached == null) { this.cached = context; return; } context.createdTracker.getContextPoolFor(this).push(context); }
Source:
<code>MetaFixer(MasterServices masterServices) { this.masterServices = masterServices; this.maxMergeCount = this.masterServices.getConfiguration(). <START> getInt("hbase.master.metafixer.max.merge.count", 10); <END> }</code><technical_language>configurable this change? add <property> <name>hbase.master.metafixer.max.merge.count</name> <value>11</value> <description>configure max merge count</description> </property> ... hbase-site.xml go? deserves mention in hbase-default.xml operators find easier? If so, suggest a fuller description. Thanks</technical_language>

Target:
MetaFixer(MasterServices masterServices) { this.masterServices = masterServices; this.maxMergeCount = this.masterServices.getConfiguration(). getInt(MAX_MERGE_COUNT_KEY, MAX_MERGE_COUNT_DEFAULT); }