auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testExecuteQueryComplete() throws InterruptedException { AsyncQuery queryObj = mock(AsyncQuery.class); String query = "/group?sort=commonName&fields%5Bgroup%5D=commonName,description"; String id = "edc4a871-dff2-4054-804e-d80075cf827d"; ElideResponse response = mock(ElideResponse.class); <START> when(queryObj.getQuery()).thenReturn(query); <END> when(queryObj.getId()).thenReturn(id); when(queryObj.getQueryType()).thenReturn(QueryType.JSONAPI_V1_0); when(response.getResponseCode()).thenReturn(200); when(response.getBody()).thenReturn("ResponseBody"); when(queryObj.getAsyncAfterSeconds()).thenReturn(10); service.executeQuery(queryObj, testUser, NO_VERSION); verify(queryObj, times(1)).setStatus(QueryStatus.PROCESSING); verify(queryObj, times(1)).setStatus(QueryStatus.COMPLETE); }</code><technical_language>worth mocking objects beans - behavior - POJOs. tests brittle if initialize a query object for test</technical_language>

Target:
public void testExecuteQueryComplete() throws InterruptedException { AsyncQuery queryObj = mock(AsyncQuery.class); String query = "/group?sort=commonName&fields%5Bgroup%5D=commonName,description"; String id = "edc4a871-dff2-4054-804e-d80075cf827d"; when(queryObj.getQuery()).thenReturn(query); when(queryObj.getId()).thenReturn(id); when(queryObj.getQueryType()).thenReturn(QueryType.JSONAPI_V1_0); when(queryObj.getAsyncAfterSeconds()).thenReturn(10); service.executeQuery(queryObj, testUser, NO_VERSION); verify(queryObj, times(1)).setStatus(QueryStatus.PROCESSING); verify(queryObj, times(1)).setStatus(QueryStatus.COMPLETE); }
Source:
<code>public void initialize(final URL location, final ResourceBundle resources) { listen(Message.OPENED, (controller, subject, args) -> { assert controller instanceof MenuController; if (!"tree".equals(subject)) { return; } assert args.length == 1; assert args[0] instanceof File; try { loadTree((File) args[0]); } catch (FileNotFoundException e) { Logging.exception(e); } }); listen(Message.LOADED, (controller, subject, args) -> { if (!"sequences".equals(subject)) { return; } assert args[0] instanceof Map<?, ?>; @SuppressWarnings("unchecked") Map<String, Sequence> newSequences = (Map<String, Sequence>) args[0]; sequences = newSequences; repaint(); }); listen(Message.FILTERED, (controller, subject, args) -> { assert args.length == 1; assert args[0] instanceof Set<?>; if (!(controller instanceof TreeController)) { @SuppressWarnings("unchecked") Set<Sequence> newSequences = (Set<Sequence>) args[0]; setVisible(newSequences); } }); view.setController(this); view.setBounds(wrapper.layoutBoundsProperty().get()); wrapper.layoutBoundsProperty().addListener( <START> (observableBounds, oldValue, newValue) -> { <END> view.setBounds(newValue); }); }</code><technical_language>Redundant curly brackets</technical_language>

Target:
public void initialize(final URL location, final ResourceBundle resources) { listen(Message.OPENED, (controller, subject, args) -> { assert controller instanceof MenuController; if (!"tree".equals(subject)) { return; } assert args.length == 1; assert args[0] instanceof File; try { loadTree((File) args[0]); } catch (FileNotFoundException e) { Logging.exception(e); } }); listen(Message.LOADED, (controller, subject, args) -> { if (!"sequences".equals(subject)) { return; } assert args[0] instanceof Map<?, ?>; @SuppressWarnings("unchecked") Map<String, Sequence> newSequences = (Map<String, Sequence>) args[0]; sequences = newSequences; repaint(); }); listen(Message.FILTERED, (controller, subject, args) -> { assert args.length == 1; assert args[0] instanceof Set<?>; if (!(controller instanceof TreeController)) { @SuppressWarnings("unchecked") Set<Sequence> newSequences = (Set<Sequence>) args[0]; setVisible(newSequences); } }); view.setController(this); view.setBounds(wrapper.layoutBoundsProperty().get()); wrapper.layoutBoundsProperty().addListener( (observableBounds, oldValue, newValue) -> view .setBounds(newValue)); }
Source:
<code>private void forceAcquire() { try { lockStore.forceAcquire(lock.getLockId()); } catch (Exception e) { <START> log.error("Lock: could not force-acquire lease {}", lock.getLockId(), e); <END> } }</code><technical_language>extra {}</technical_language>

Target:
private void forceAcquire() throws LockStoreException { lockStore.forceAcquire(lock.getLockId()); }
Source:
<code>public void open() throws Exception { this.joinCondition = generatedJoinCondition.newInstance(getRuntimeContext().getUserCodeClassLoader()); FunctionUtils.setFunctionRuntimeContext(joinCondition, getRuntimeContext()); FunctionUtils.openFunction(joinCondition, new Configuration()); ValueStateDescriptor<RowData> rightStateDesc = new ValueStateDescriptor<>("right", rightType); this.rightState = getRuntimeContext().getState(rightStateDesc); this.collector = new TimestampedCollector<>(output); this.outRow = new JoinedRowData(); super.processWatermark2(Watermark.MAX_WATERMARK); <START> super.open(); <END> }</code><technical_language>move function call of super beginning</technical_language>

Target:
public void open() throws Exception { super.open(); this.joinCondition = generatedJoinCondition.newInstance(getRuntimeContext().getUserCodeClassLoader()); FunctionUtils.setFunctionRuntimeContext(joinCondition, getRuntimeContext()); FunctionUtils.openFunction(joinCondition, new Configuration()); ValueStateDescriptor<RowData> rightStateDesc = new ValueStateDescriptor<>("right", rightType); this.rightState = getRuntimeContext().getState(rightStateDesc); this.collector = new TimestampedCollector<>(output); this.outRow = new JoinedRowData(); super.processWatermark2(Watermark.MAX_WATERMARK); }
Source:
<code>protected void ExecuteVdsBrokerCommand() { boolean isFilled = false; if (getParameters().getStoragePoolId() != null) { <START> if (FeatureSupported.saferGetAllTasksRequest(getVds().getVdsGroupCompatibilityVersion())) { <END> _result = getBroker().getAllTasksInfo(getParameters().getStoragePoolId().toString()); isFilled = true; } } if (!isFilled) { _result = getBroker().getAllTasksInfo(); } ProceedProxyReturnValue(); setReturnValue(ParseTaskInfoList(_result.TaskInfoList)); }</code><technical_language>sense send 2 versions of verb hosts in data center? (if is older 3.3 other is 3.3) i storage pool compatibility consistent hosts in storage pool</technical_language>

Target:
protected void ExecuteVdsBrokerCommand() { Version compatibilityVersion = getParameters().getCompatibilityVersion(); if ((getParameters().getStoragePoolId() != null) && (compatibilityVersion != null) && FeatureSupported.saferGetAllTasksRequest(compatibilityVersion)) { _result = getBroker().getAllTasksInfo(getParameters().getStoragePoolId().toString()); } else { _result = getBroker().getAllTasksInfo(); } ProceedProxyReturnValue(); setReturnValue(ParseTaskInfoList(_result.TaskInfoList)); }
Source:
<code><START> public static byte[] getSaltedKey(ImmutableBytesWritable key, int bucketNum) { <END> byte[] keyBytes = new byte[key.getSize()]; byte saltByte = getSaltingByte(key.get(), key.getOffset() + 1, key.getLength() - 1, bucketNum); keyBytes[0] = saltByte; System.arraycopy(key.get(), key.getOffset() + 1, keyBytes, 1, key.getSize() - 1); return keyBytes; }</code><technical_language>key.getLength() (instead of key.getSize())</technical_language>

Target:
public static byte[] getSaltedKey(ImmutableBytesWritable key, int bucketNum) { byte[] keyBytes = new byte[key.getLength()]; byte saltByte = getSaltingByte(key.get(), key.getOffset() + 1, key.getLength() - 1, bucketNum); keyBytes[0] = saltByte; System.arraycopy(key.get(), key.getOffset() + 1, keyBytes, 1, key.getLength() - 1); return keyBytes; }
Source:
<code>private void parseResourceArray(Element element, Map<TypeElement, BindingClass> targetClassMap, Set<String> erasedTargetNames) { boolean hasError = false; TypeElement enclosingElement = (TypeElement) element.getEnclosingElement(); String methodName = getArrayResourceMethodName(element); if (methodName == null) { error(element, <START> "@%s field type must be one of: " + "'String[], int[], CharSequence[], %s'. (%s.%s)", <END> BindArray.class.getSimpleName(), TYPED_ARRAY_TYPE, enclosingElement.getQualifiedName(), element.getSimpleName()); hasError = true; } hasError |= isInaccessibleViaGeneratedCode(BindArray.class, "fields", element); hasError |= isBindingInWrongPackage(BindArray.class, element); if (hasError) { return; } String name = element.getSimpleName().toString(); int id = element.getAnnotation(BindArray.class).value(); BindingClass bindingClass = getOrCreateTargetClass(targetClassMap, enclosingElement); FieldResourceBinding binding = new FieldResourceBinding(id, name, methodName); bindingClass.addResource(binding); erasedTargetNames.add(enclosingElement.toString()); }</code><technical_language>needless + string contstants</technical_language>

Target:
private void parseResourceArray(Element element, Map<TypeElement, BindingClass> targetClassMap, Set<String> erasedTargetNames) { boolean hasError = false; TypeElement enclosingElement = (TypeElement) element.getEnclosingElement(); String methodName = getArrayResourceMethodName(element); if (methodName == null) { error(element, "@%s field type must be one of: String[], int[], CharSequence[], %s. (%s.%s)", BindArray.class.getSimpleName(), TYPED_ARRAY_TYPE, enclosingElement.getQualifiedName(), element.getSimpleName()); hasError = true; } hasError |= isInaccessibleViaGeneratedCode(BindArray.class, "fields", element); hasError |= isBindingInWrongPackage(BindArray.class, element); if (hasError) { return; } String name = element.getSimpleName().toString(); int id = element.getAnnotation(BindArray.class).value(); BindingClass bindingClass = getOrCreateTargetClass(targetClassMap, enclosingElement); FieldResourceBinding binding = new FieldResourceBinding(id, name, methodName); bindingClass.addResource(binding); erasedTargetNames.add(enclosingElement.toString()); }
Source:
<code>public void checkChain(X509Certificate[] chain) throws CertificateException { for (int i = 0; i < chain.length - 1; i++) { X509Certificate certificate = chain[i]; X509Certificate issuer = chain[i + 1]; <START> try { <END> CertId certId = CertId.fromCertificate(certificate, issuer); OcspStatus status = checker.obtainStatus(certId, issuer, getResponder(certificate), signatureVerifier); ElytronMessages.ocsp.tracef("OCSP status of %s: %s", certificate, status); if (status.getStatus() == OcspStatus.CertStatus.REVOKED || (status.getStatus() == OcspStatus.CertStatus.UNKNOWN && ! acceptUnknownCertificates)) { throw ElytronMessages.ocsp.certificateIsRevoked(certificate.getSerialNumber(), responder); } } catch (IOException e) { ElytronMessages.ocsp.trace("OCSP validation has failed", e); if (! acceptWhenStatusUnavailable) { throw ElytronMessages.ocsp.ocspValidationHasFailed(certificate.toString(), e); } } } }</code><technical_language>ArrayIndexOutOfBoundsException</technical_language>

Target:
public void checkChain(X509Certificate[] chain) throws CertificateException { ElytronMessages.ocsp.tracef("OCSP validation of chain of %d certificates", chain.length); for (int i = 0; i < chain.length - 1; i++) { X509Certificate certificate = chain[i]; X509Certificate issuer = chain[i + 1]; try { URL responder = getResponder(certificate); if (responder == null) { ElytronMessages.ocsp.tracef("OCSP validation of %s skipped - no OCSP responder", certificate); continue; } CertId certId = CertId.fromCertificate(certificate, issuer); OcspStatus status = checker.obtainStatus(certId, issuer, responder, signatureVerifier); ElytronMessages.ocsp.tracef("OCSP status of %s: %s", certificate, status); if (status.getStatus() == OcspStatus.CertStatus.REVOKED || (status.getStatus() == OcspStatus.CertStatus.UNKNOWN && ! acceptUnknownCertificates)) { throw ElytronMessages.ocsp.certificateIsRevoked(certificate.getSerialNumber(), responder); } } catch (IOException e) { ElytronMessages.ocsp.tracef(e, "OCSP validation of %s has failed", certificate); if (! acceptWhenStatusUnavailable) { throw ElytronMessages.ocsp.ocspValidationHasFailed(certificate.toString(), e); } } } }
Source:
<code>static void addInternalClassesToWhiteList(ClassWhiteList list) { list.addClasses( BackupSender.BringSiteOnlineResponse.class, BackupSender.TakeSiteOfflineResponse.class, CacheMode.class, XSiteAdminCommand.AdminOperation.class, XSiteAdminCommand.Status.class ); <START> list.addClasses(Enum.class, Number.class, Object.class, Object[].class, SerializedLambda.class); <END> }</code><technical_language>This allow removing Enum this list. Object class Serializable, is this here</technical_language>

Target:
static void addInternalClassesToWhiteList(ClassWhiteList list) { list.addClasses(Number.class, Object.class, Object[].class, SerializedLambda.class); }
Source:
<code>public void testJMXServiceRegisterMBean() throws Exception { TestObject testObject = new TestObject(); ObjectName testObjectName = new ObjectName("org.apache.flink.management", "key", "value"); MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer(); try { <START> JMXServer server = JMXService.getInstance(); <END> mBeanServer.registerMBean(testObject, testObjectName); JMXServiceURL url = new JMXServiceURL("service:jmx:rmi://localhost:" + server.getPort() + "/jndi/rmi://localhost:" + server.getPort() + "/jmxrmi"); JMXConnector jmxConn = JMXConnectorFactory.connect(url); MBeanServerConnection mbeanConnConn = jmxConn.getMBeanServerConnection(); assertEquals(1, mbeanConnConn.getAttribute(testObjectName, "Foo")); mBeanServer.unregisterMBean(testObjectName); try { mbeanConnConn.getAttribute(testObjectName, "Foo"); } catch (Exception e) { assertTrue(e instanceof InstanceNotFoundException); } } finally { JMXService.stopInstance(); } }</code><technical_language>unused</technical_language>

Target:
public void testJMXServiceRegisterMBean() throws Exception { TestObject testObject = new TestObject(); ObjectName testObjectName = new ObjectName("org.apache.flink.management", "key", "value"); MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer(); try { Optional<JMXServer> server = JMXService.getInstance(); assertTrue(server.isPresent()); mBeanServer.registerMBean(testObject, testObjectName); JMXServiceURL url = new JMXServiceURL("service:jmx:rmi://localhost:" + server.get().getPort() + "/jndi/rmi://localhost:" + server.get().getPort() + "/jmxrmi"); JMXConnector jmxConn = JMXConnectorFactory.connect(url); MBeanServerConnection mbeanConnConn = jmxConn.getMBeanServerConnection(); assertEquals(1, mbeanConnConn.getAttribute(testObjectName, "Foo")); mBeanServer.unregisterMBean(testObjectName); try { mbeanConnConn.getAttribute(testObjectName, "Foo"); } catch (Exception e) { assertTrue(e instanceof InstanceNotFoundException); } } finally { JMXService.stopInstance(); } }
Source:
<code>protected boolean shouldValidateOnBudgetTotal() { <START> Boolean validateOnBudgetTotal = parameterService.getParameterValueAsBoolean(ArConstants.AR_NAMESPACE_CODE, ArConstants.CONTRACTS_GRANTS_INVOICE_COMPONENT, CuArConstants.CG_INVOICE_AMT_BILLED_SUSPENION_BY_BUDGET_TOTAL); <END> if (LOG.isDebugEnabled()) { if (validateOnBudgetTotal == null) { LOG.debug("shouldValidateOnBudgetTotal, no parameter named " + CuArConstants.CG_INVOICE_AMT_BILLED_SUSPENION_BY_BUDGET_TOTAL + " in KFS-AR name space, so defaulting to true."); } else { LOG.debug("shouldValidateOnBudgetTotal, the value of " + CuArConstants.CG_INVOICE_AMT_BILLED_SUSPENION_BY_BUDGET_TOTAL + " is " + validateOnBudgetTotal.booleanValue()); } } return validateOnBudgetTotal == null ? true : validateOnBudgetTotal.booleanValue(); }</code><technical_language>ParameterService a version of getParameterValueAsBoolean() method accepts a default Boolean input, returned if parameter found. If modify this code method, need manual null-value checks below</technical_language>

Target:
protected boolean shouldValidateOnBudgetTotal() { Boolean validateOnBudgetTotal = parameterService.getParameterValueAsBoolean(ArConstants.AR_NAMESPACE_CODE, ArConstants.CONTRACTS_GRANTS_INVOICE_COMPONENT, CuArConstants.CG_INVOICE_AMT_BILLED_SUSPENSION_BY_BUDGET_TOTAL, Boolean.TRUE.booleanValue()); if (LOG.isDebugEnabled()) { LOG.debug("shouldValidateOnBudgetTotal, the value of " + CuArConstants.CG_INVOICE_AMT_BILLED_SUSPENSION_BY_BUDGET_TOTAL + " is " + validateOnBudgetTotal.booleanValue()); } return validateOnBudgetTotal.booleanValue(); }
Source:
<code>public synchronized void configureBackground(IFigure fig) { if (resolveDDiagram().some() && fig != null) { DSemanticDiagram dSemanticDiagram = (DSemanticDiagram) this.resolveDDiagram().get(); ColorDescription colorDesc = dSemanticDiagram.getDescription().getBackgroundColor(); RGBValues rgb = WHITE; if (colorDesc != null) { rgb = new AbstractColorUpdater().getRGBValuesFromColorDescription(dSemanticDiagram.getTarget(), colorDesc); } Color previousColor = fig.getBackgroundColor(); if (!sameColor(previousColor, rgb)) { EditPartViewer viewer = this.getViewer(); Color backgroundColor; if (WHITE.equals(rgb)) { backgroundColor = null; } else { backgroundColor = new Color(viewer.getControl().getDisplay(), rgb.getRed(), rgb.getGreen(), rgb.getBlue()); } fig.setBackgroundColor(backgroundColor); fig.setOpaque(backgroundColor != null); <START> if (viewer instanceof SiriusDiagramGraphicalViewer) <END> ((SiriusDiagramGraphicalViewer) viewer).setBackgroundColor(backgroundColor); } } }</code><technical_language>test done earlier (where cast done initially): this avoid computing (and more importantly allocating) Color if it. I this version introduce a resource leak: color is allocated, disposed. SiriusDiagramGraphicalViewer.setBackgroundColor(Color) disposes previous color a new is set (or graphical viewer is disposed). If allocate new colors set graphical viewer, disposed</technical_language>

Target:
public synchronized void configureBackground(IFigure fig) { if (resolveDDiagram().some() && fig != null) { DSemanticDiagram dSemanticDiagram = (DSemanticDiagram) this.resolveDDiagram().get(); ColorDescription colorDesc = dSemanticDiagram.getDescription().getBackgroundColor(); RGBValues rgb = WHITE; if (colorDesc != null) { rgb = new AbstractColorUpdater().getRGBValuesFromColorDescription(dSemanticDiagram.getTarget(), colorDesc); } Color previousColor = fig.getBackgroundColor(); if (!sameColor(previousColor, rgb)) { EditPartViewer viewer = this.getViewer(); if (viewer instanceof SiriusDiagramGraphicalViewer) { Color backgroundColor; if (WHITE.equals(rgb)) { backgroundColor = null; } else { backgroundColor = new Color(viewer.getControl().getDisplay(), rgb.getRed(), rgb.getGreen(), rgb.getBlue()); } fig.setBackgroundColor(backgroundColor); fig.setOpaque(backgroundColor != null); ((SiriusDiagramGraphicalViewer) viewer).setBackgroundColor(backgroundColor); } } } }
Source:
<code>public String getMapLink(int mapIndex) { String mapLink = mapList.get(mapIndex).getAttribute("href"); <START> return mapLink; <END> }</code><technical_language>return in line</technical_language>

Target:
public String getMapLink(int mapIndex) { return mapList.get(mapIndex).getAttribute("href"); }
Source:
<code>private Model constructModel() { File file = path.toFile(); Model model = new Model(); model.setModelVersion(POM_MODEL_VERSION); if (publishable.getPomTemplate().isPresent()) { model = constructModel(publishable.getPomTemplate().get().toFile(), model); } if (file.isFile()) { Model fromFile = constructModel(file, model); <START> model = merge(model, fromFile); <END> } return model; }</code><technical_language>constructModel called merge there</technical_language>

Target:
private Model constructModel() { File file = path.toFile(); Model model = new Model(); model.setModelVersion(POM_MODEL_VERSION); if (publishable.getPomTemplate().isPresent()) { model = constructModel(publishable.getPomTemplate().get().toFile(), model); } if (file.isFile()) { model = constructModel(file, model); } return model; }
Source:
<code><START> public static String implodeStrings(String[] strings) { <END> StringBuffer buffer = new StringBuffer(); for( int i = 0; i < strings.length; i++ ) buffer.append(strings[i]).append(','); return buffer.toString(); }</code><technical_language>this belong here. If a generic concatenation method in foundation already, [StringUtils.join commons-lang](<LINK_0>[]%29) [Joiner guava](<LINK_1></technical_language>

Target:
public static String implodeStrings(String[] strings) { StringBuilder buffer = new StringBuilder(); for( int i = 0; i < strings.length; i++ ) buffer.append(strings[i]).append(','); return buffer.toString(); }
Source:
<code>private Mono<Void> sendInternalTracingEnabled(Flux<EventData> events, String partitionKey) { return sendLinkMono.flatMap(link -> { final AtomicReference<Context> sendSpanContext = new AtomicReference<>(Context.NONE); return link.getLinkSize() .flatMap(size -> { final int batchSize = size > 0 ? size : MAX_MESSAGE_LENGTH_BYTES; final BatchOptions batchOptions = new BatchOptions() .setPartitionKey(partitionKey) .setMaximumSizeInBytes(batchSize); final AtomicReference<Boolean> isFirst = new AtomicReference<>(true); return events.map(eventData -> { Context parentContext = eventData.getContext(); if (isFirst.getAndSet(false)) { <START> Context entityContext = parentContext.addData("entity-Path", link.getEntityPath()); <END> sendSpanContext.set(tracerProvider.startSpan( entityContext.addData("hostname", link.getHostname()), ProcessKind.SEND)); } return setSpanContext(eventData, parentContext); }).collect(new EventDataCollector(batchOptions, 1, link::getErrorContext)); }) .flatMap(list -> sendInternal(Flux.fromIterable(list))) .doOnEach(signal -> { tracerProvider.endSpan(sendSpanContext.get(), signal); }); }); }</code><technical_language>Instead of redefining strings. is a constants class put into. top of file. is "entity-Path" intend</technical_language>

Target:
private Mono<Void> sendInternalTracingEnabled(Flux<EventData> events, String partitionKey) { return sendLinkMono.flatMap(link -> { final AtomicReference<Context> sendSpanContext = new AtomicReference<>(Context.NONE); return link.getLinkSize() .flatMap(size -> { final int batchSize = size > 0 ? size : MAX_MESSAGE_LENGTH_BYTES; final BatchOptions batchOptions = new BatchOptions() .setPartitionKey(partitionKey) .setMaximumSizeInBytes(batchSize); final AtomicReference<Boolean> isFirst = new AtomicReference<>(true); return events.map(eventData -> { Context parentContext = eventData.getContext(); if (isFirst.getAndSet(false)) { Context entityContext = parentContext.addData(ENTITY_PATH_KEY, link.getEntityPath()); sendSpanContext.set(tracerProvider.startSpan( entityContext.addData(HOST_NAME_KEY, link.getHostname()), ProcessKind.SEND)); } return setSpanContext(eventData, parentContext); }).collect(new EventDataCollector(batchOptions, 1, link::getErrorContext)); }) .flatMap(list -> sendInternal(Flux.fromIterable(list))) .doOnEach(signal -> { tracerProvider.endSpan(sendSpanContext.get(), signal); }); }); }
Source:
<code>public int compareTo(NumberOrString that) { int cmp = compareBooleans(that.isNumeric, this.isNumeric); if (cmp != 0) { return cmp; } if (isNumeric) { <START> return this.number - that.number; <END> } return this.original.compareTo(that.original); }</code><technical_language>Integer.compare() here, inline written here: <LINK_0> x - y trick issues w/ overflow</technical_language>

Target:
public int compareTo(NumberOrString that) { int cmp = compareBooleans(that.isNumeric, this.isNumeric); if (cmp != 0) { return cmp; } if (isNumeric) { return compareIntegers(this.number, that.number); } return this.original.compareTo(that.original); }
Source:
<code>public HashSet<AbstractLocation> getLocations(SkillMetadata skillMetadata) { <START> BukkitTagContext tagContext = new BukkitTagContext(null, null, null, false, null); <END> tagContext.contextSource = source; source.contexts.put("entity", new EntityTag(skillMetadata.getCaster().getEntity().getBukkitEntity())); ObjectTag object = TagManager.tagObject( tag , tagContext); List<LocationTag> list = (object.asType(ListTag.class, tagContext)).filter(LocationTag.class, tagContext); HashSet<AbstractLocation> locations = new HashSet<AbstractLocation>(); for (LocationTag location : list) { locations.add(BukkitAdapter.adapt(location)); } return locations; }</code><technical_language>again, CoreUtilities.noDebugContext</technical_language>

Target:
public HashSet<AbstractLocation> getLocations(SkillMetadata skillMetadata) { TagContext tagContext = CoreUtilities.noDebugContext.clone(); tagContext.contextSource = source; source.contexts.put("entity", new EntityTag(skillMetadata.getCaster().getEntity().getBukkitEntity())); ObjectTag object = TagManager.tagObject( tag , tagContext); List<LocationTag> list = (object.asType(ListTag.class, tagContext)).filter(LocationTag.class, tagContext); HashSet<AbstractLocation> locations = new HashSet<AbstractLocation>(); for (LocationTag location : list) { locations.add(BukkitAdapter.adapt(location)); } return locations; }
Source:
<code><START> public boolean canSubmit() { <END> Collection<RefRight> refRights = getRefRights(); final Set<AccountGroup.Id> groups = projectControl.getCurrentUser().getEffectiveGroups(); int val = Integer.MIN_VALUE; for (final RefRight right : refRights) { if (right.getApprovalCategoryId().equals(SUBMIT) && groups.contains(right.getAccountGroupId()) && matches(refName, right.getRefPattern())) { if (val < 0 && right.getMaxValue() > 0) { val = right.getMaxValue(); } else { val = Math.max(right.getMaxValue(), val); } } } return val >= 1; }</code><technical_language>This method is logically correct. basically call canPerform(...) in ProjectControl. abstract a canPerform here, reuse this new canPerform function of canUpload() too, reduce code duplication</technical_language>

Target:
public boolean canSubmit() { return canPerform(SUBMIT, (short) 1); }
Source:
<code>public void testGetAllVersionsDuringStateTransfer() throws Exception { final int key = 1; final int value = 1; createCluster(); getCache(2).put(key, value); splitCluster(); delayStateTransferCompletion(); RehashListener listener = new RehashListener(); getCache(2).addListener(listener); Future<Map<Address, InternalCacheValue<Object>>> versionFuture = fork(() -> { while (!listener.isRehashInProgress.get()) TestingUtil.sleepThread(100); return getAllVersions(0, key); }); fork(() -> partition(0).merge(partition(1))); <START> Map<Address, InternalCacheValue<Object>> versionMap = versionFuture.get(STATE_TRANSFER_DELAY * 16, TimeUnit.MILLISECONDS); <END> assertTrue(versionMap != null); assertTrue(!versionMap.isEmpty()); assertEquals(String.format("Returned versionMap %s", versionMap),2, versionMap.size()); versionMap.values().forEach(icv -> assertEquals(value, icv.getValue())); }</code><technical_language>magic multipliers chosen</technical_language>

Target:
public void testGetAllVersionsDuringStateTransfer() throws Exception { final int key = 1; final int value = 1; createCluster(); getCache(2).put(key, value); splitCluster(); RehashListener listener = new RehashListener(); getCache(0).addListener(listener); CountDownLatch latch = new CountDownLatch(1); delayStateTransferCompletion(latch); Future<?> mergeFuture = fork(() -> partition(0).merge(partition(1))); assertTrue(listener.latch.await(10, TimeUnit.SECONDS)); Future<Map<Address, InternalCacheValue<Object>>> versionFuture = fork(() -> getAllVersions(0, key)); Exceptions.expectException(TimeoutException.class, () -> versionFuture.get(100, TimeUnit.MILLISECONDS)); latch.countDown(); mergeFuture.get(30, TimeUnit.SECONDS); Map<Address, InternalCacheValue<Object>> versionMap = versionFuture.get(60, TimeUnit.SECONDS); assertTrue(versionMap != null); assertTrue(!versionMap.isEmpty()); assertEquals(String.format("Returned versionMap %s", versionMap),2, versionMap.size()); versionMap.values().forEach(icv -> assertEquals(value, icv.getValue())); }
Source:
<code>public long getArea() { long area = 1; <START> for ( int i = 0; i < min.length; i++ ) <END> { area *= max[i] - min[i]; } return area; }</code><technical_language>nbrDim instead of min.length</technical_language>

Target:
public long getArea() { long area = 1; for ( int i = 0; i < nbrDim; i++ ) { area *= max[i] - min[i]; } return area; }
Source:
<code>public CommitInfoSearchRequestBuilder filterByTimeStamp(final long timeStamp) { <START> return addOption(TIME_STAMP, TIME_STAMP); <END> }</code><technical_language>parameter method parameter</technical_language>

Target:
public CommitInfoSearchRequestBuilder filterByTimeStamp(final long timeStamp) { return addOption(TIME_STAMP, timeStamp); }
Source:
<code>public void testInflateAndRender() throws InitializationException, ParserConfigurationException, IOException, SAXException { VirtualFile <START> myLayout = <END> myFixture.copyFileToProject("themeEditor/theme_preview_layout.xml", "res/layout/theme_preview_layout.xml"); Configuration configuration = myFacet.getConfigurationManager().getConfiguration(myLayout); DomPullParser parser = new DomPullParser( DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(myLayout.getInputStream()).getDocumentElement()); BufferedImage image = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB); GraphicsLayoutRenderer renderer = GraphicsLayoutRenderer.create(configuration, parser, false, false); assertEquals("Expected (0,0) before render", EMPTY_DIMENSION, renderer.getPreferredSize()); assertTrue(renderer.render((Graphics2D)image.getGraphics())); assertNotEquals(EMPTY_DIMENSION, renderer.getPreferredSize()); renderer.setSize(new Dimension(50, 50)); assertTrue(renderer.render((Graphics2D)image.getGraphics())); }</code><technical_language>is this myLayout? layout</technical_language>

Target:
public void testInflateAndRender() throws InitializationException, ParserConfigurationException, IOException, SAXException { VirtualFile layout = myFixture.copyFileToProject("themeEditor/theme_preview_layout.xml", "res/layout/theme_preview_layout.xml"); Configuration configuration = myFacet.getConfigurationManager().getConfiguration(layout); DomPullParser parser = new DomPullParser( DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(layout.getInputStream()).getDocumentElement()); BufferedImage image = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB); GraphicsLayoutRenderer renderer = GraphicsLayoutRenderer.create(configuration, parser, false, false); assertEquals("Expected (0,0) before render", EMPTY_DIMENSION, renderer.getPreferredSize()); assertTrue(renderer.render((Graphics2D)image.getGraphics())); assertNotEquals(EMPTY_DIMENSION, renderer.getPreferredSize()); renderer.setSize(new Dimension(50, 50)); assertTrue(renderer.render((Graphics2D)image.getGraphics())); }
Source:
<code>public void ArticleFeaturesCRUDUser_012_modifyTable( int border, int width, int height, int cellspacing, int cellpadding, Alignment alignment ) { WikiBasePageObject base = new WikiBasePageObject(driver); base.logInCookie(credentials.userName, credentials.password, wikiURL); ArticlePageObject article = base.openRandomArticle(wikiURL); SourceEditModePageObject sourceEditMode = article.openCurrectArticleSourceMode(); sourceEditMode.clearSource(); String table = sourceEditMode.buildTablePropertiesContent( border, width, height, cellspacing, cellpadding, alignment ); sourceEditMode.addContent(table); sourceEditMode.submitArticle(); article.verifyTableBorder(border); article.verifyTableCellspacing(cellspacing); article.verifyTableCellpadding(cellpadding); VisualEditModePageObject visualEditMode = article.goToCurrentArticleEditPage(); visualEditMode.clickPropertiesTableButton(); TableBuilderComponentObject addTable = new TableBuilderComponentObject(driver); <START> addTable.typeBorderSize(border + 10); <END> addTable.typeCellSpacing(cellspacing + 10); addTable.typeCellPadding(cellpadding +10); addTable.submitTable(); visualEditMode.submitArticle(); article.verifyTableBorder(border + 10); article.verifyTableCellspacing(cellspacing + 10); article.verifyTableCellpadding(cellpadding + 10); }</code><technical_language>put 10 variable test method</technical_language>

Target:
public void ArticleFeaturesCRUDUser_012_modifyTable( int border, int width, int height, int cellspacing, int cellpadding, Alignment alignment ) { WikiBasePageObject base = new WikiBasePageObject(driver); base.logInCookie(credentials.userName, credentials.password, wikiURL); ArticlePageObject article = base.openRandomArticle(wikiURL); SourceEditModePageObject sourceEditMode = article.openCurrectArticleSourceMode(); sourceEditMode.clearSource(); String table = sourceEditMode.buildTablePropertiesContent( border, width, height, cellspacing, cellpadding, alignment ); sourceEditMode.addContent(table); sourceEditMode.submitArticle(); article.verifyTableBorder(border); article.verifyTableCellspacing(cellspacing); article.verifyTableCellpadding(cellpadding); VisualEditModePageObject visualEditMode = article.goToCurrentArticleEditPage(); visualEditMode.clickPropertiesTableButton(); TableBuilderComponentObject addTable = new TableBuilderComponentObject(driver); addTable.typeBorderSize(border + additionalPropertyValue); addTable.typeCellSpacing(cellspacing + additionalPropertyValue); addTable.typeCellPadding(cellpadding +additionalPropertyValue); addTable.submitTable(); visualEditMode.submitArticle(); article.verifyTableBorder(border + additionalPropertyValue); article.verifyTableCellspacing(cellspacing + additionalPropertyValue); article.verifyTableCellpadding(cellpadding + additionalPropertyValue); }
Source:
<code>public Mono<Key> createKey(KeyCreateOptions keyCreateOptions) { return withContext(context -> createKey(keyCreateOptions, context)) <START> .flatMap(keyResponse -> Mono.justOrEmpty(keyResponse.value())); <END> }</code><technical_language>a fan of lines of code for flatMap. I suggest moving this out a utility method in azure-core, .flatMap(FluxUtils::flattenResponse), flattenResponse code above</technical_language>

Target:
public Mono<Key> createKey(KeyCreateOptions keyCreateOptions) { return withContext(context -> createKeyWithResponse(keyCreateOptions)) .flatMap(FluxUtil::toMono); }
Source:
<code>public void onBindParentViewHolder(ParentViewHolder parentViewHolder, int position) { CustomParentViewHolder customParentViewHolder = (CustomParentViewHolder) parentViewHolder; CustomParentObject parentObject = (CustomParentObject) mItemList.get(position); <START> customParentViewHolder.numberText.setText(parentObject.getNumber() + ""); <END> customParentViewHolder.dataText.setText(parentObject.getData()); }</code><technical_language>+ ""</technical_language>

Target:
public void onBindParentViewHolder(ParentViewHolder parentViewHolder, int position) { CustomParentViewHolder customParentViewHolder = (CustomParentViewHolder) parentViewHolder; CustomParentObject parentObject = (CustomParentObject) mItemList.get(position); customParentViewHolder.numberText.setText(Integer.toString(parentObject.getNumber())); customParentViewHolder.dataText.setText(parentObject.getData()); }
Source:
<code>public void setPortParameters(SerialPortParameters parameters) throws XBeeException, InvalidOperatingModeException { <START> baudRate = parameters.baudrate; <END> this.parameters = parameters; if (isConnected()) { disconnect(); connect(); } }</code><technical_language>Check for null value</technical_language>

Target:
public void setPortParameters(SerialPortParameters parameters) throws XBeeException, InvalidOperatingModeException { if (parameters == null) throw new NullPointerException("Serial port parameters cannot be null."); baudRate = parameters.baudrate; this.parameters = parameters; if (isOpen()) { close(); open(); } }
Source:
<code>public SnipeData(Sniper vs) { owner = vs; <START> voxelState = Sponge.getRegistry().getType(BlockState.class, VoxelSniperConfiguration.DEFAULT_VOXEL_ID) <END> .orElse(BlockTypes.AIR.getDefaultState()); replaceState = Sponge.getRegistry().getType(BlockState.class, VoxelSniperConfiguration.DEFAULT_REPLACE_ID) .orElse(BlockTypes.AIR.getDefaultState()); brushSize = VoxelSniperConfiguration.DEFAULT_BRUSH_SIZE; voxelList = new VoxelList(); voxelHeight = VoxelSniperConfiguration.DEFAULT_VOXEL_HEIGHT; cCen = VoxelSniperConfiguration.DEFAULT_CYLINDER_CENTER; range = 0; ranged = false; lightning = false; voxelInkTraits = new HashMap<>(); replaceInkTraits = new HashMap<>(); }</code><technical_language>I get a majority of this is moving defaults set field initializers constructor, cluttering actual changes making, is ink trait maps. For sake of reviewing PR, changes a minimum, this sort of change is extra noise</technical_language>

Target:
public SnipeData(Sniper vs) { this.owner = vs; this.voxelState = Sponge.getRegistry().getType(BlockState.class, VoxelSniperConfiguration.DEFAULT_VOXEL_ID) .orElse(BlockTypes.AIR.getDefaultState()); this.replaceState = Sponge.getRegistry().getType(BlockState.class, VoxelSniperConfiguration.DEFAULT_REPLACE_ID) .orElse(BlockTypes.AIR.getDefaultState()); this.brushSize = VoxelSniperConfiguration.DEFAULT_BRUSH_SIZE; this.voxelList = new VoxelList(); this.voxelHeight = VoxelSniperConfiguration.DEFAULT_VOXEL_HEIGHT; this.cylinderCenter = VoxelSniperConfiguration.DEFAULT_CYLINDER_CENTER; this.range = 0; voxelInkTraits = new HashMap<>(); replaceInkTraits = new HashMap<>(); }
Source:
<code><START> public void deleteCreatedStacks() { <END> dashboard.selectStacksItemOnDashboard(); stacks.waitToolbarTitleName(); stacks.selectAllStacksByBulk(); stacks.clickOnDeleteStackButton(); stacks.clickOnDeleteDialogButton(); dashboard.waitNotificationMessage("Selected stacks have been successfully removed."); dashboard.waitNotificationIsClosed(); }</code><technical_language>This method throw error if stacks created form some reasons</technical_language>

Target:
public void deleteCreatedStacks() { dashboard.selectStacksItemOnDashboard(); stacks.waitToolbarTitleName(); stacks.selectAllStacksByBulk(); if (stacks.isDeleteStackButtonEnabled()) { stacks.clickOnDeleteStackButton(); stacks.clickOnDeleteDialogButton(); dashboard.waitNotificationMessage("Selected stacks have been successfully removed."); dashboard.waitNotificationIsClosed(); } }
Source:
<code>public void testContainsKeyNull() throws Exception { final MockStore realStore = new MockStore(Collections.<String, String>emptyMap()); this.store = spy(realStore); final Ehcache<String, String> ehcache = this.getEhcache(); try { ehcache.containsKey(null); fail(); <START> } catch (Exception e) { <END> } verifyZeroInteractions(this.cacheLoader); verifyZeroInteractions(this.cacheWriter); verifyZeroInteractions(this.spiedResilienceStrategy); }</code><technical_language>I catch block catch specific exception type expect a generic</technical_language>

Target:
public void testContainsKeyNull() throws Exception { final FakeStore realStore = new FakeStore(Collections.<String, String>emptyMap()); this.store = spy(realStore); final Ehcache<String, String> ehcache = this.getEhcache(); try { ehcache.containsKey(null); fail(); } catch (NullPointerException e) { } verifyZeroInteractions(this.cacheLoader); verifyZeroInteractions(this.cacheWriter); verifyZeroInteractions(this.spiedResilienceStrategy); }
Source:
<code>public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if ("equals".equals(method.getName())) { try { Object otherHandler = args.length > 0 && args[0] != null ? Proxy.getInvocationHandler(args[0]) : null; return equals(otherHandler); } catch (IllegalArgumentException e) { return false; } } else if ("hashCode".equals(method.getName())) { return hashCode(); } else if ("toString".equals(method.getName())) { return toString(); } else if (Util.isDefault(method)) { <START> return invokeDefault(proxy,method, args); <END> } return dispatch.get(method).invoke(args); }</code><technical_language>formatting space methods</technical_language>

Target:
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if ("equals".equals(method.getName())) { try { Object otherHandler = args.length > 0 && args[0] != null ? Proxy.getInvocationHandler(args[0]) : null; return equals(otherHandler); } catch (IllegalArgumentException e) { return false; } } else if ("hashCode".equals(method.getName())) { return hashCode(); } else if ("toString".equals(method.getName())) { return toString(); } return dispatch.get(method).invoke(args); }
Source:
<code>private static boolean isEnclosingClassFinal(ExpressionTree expressionTree) { if (expressionTree.is(IDENTIFIER)) { Tree parent = expressionTree.parent(); while (!parent.is(METHOD)) { parent = parent.parent(); } return ((MethodTree) parent).symbol().owner().isFinal(); <START> } else { <END> return ((MemberSelectExpressionTree) expressionTree).expression().symbolType().symbol().isFinal(); } }</code><technical_language>I remove else return end of if</technical_language>

Target:
private static boolean isEnclosingClassFinal(ExpressionTree expressionTree) { if (expressionTree.is(IDENTIFIER)) { Tree parent = expressionTree.parent(); while (!parent.is(METHOD)) { parent = parent.parent(); } return ((MethodTree) parent).symbol().owner().isFinal(); } return ((MemberSelectExpressionTree) expressionTree).expression().symbolType().symbol().isFinal(); }
Source:
<code>protected ValidationInfo doValidate() { Pattern pattern = Pattern.compile("^[\\w\\d\\-_]+([\\.\\/][\\w\\d\\-_]+)*$"); <START> if(!pattern.matcher(viewNameEditor.getText()).find()) return new ValidationInfo("Wrong view name", viewNameEditor.getComponent()); <END> return null; }</code><technical_language>please if liner if(!pattern.matcher(viewNameEditor.getText()).find()) { ... }</technical_language>

Target:
protected ValidationInfo doValidate() { if(!viewNamePattern.matcher(viewNameEditor.getText()).find()) { return new ValidationInfo("Wrong view name", viewNameEditor.getComponent()); } return null; }
Source:
<code>private boolean needsInitialisation() { <START> return loginService == null && chatService == null && channelService == null && firebaseAnalytics == null; <END> }</code><technical_language>enough of is null</technical_language>

Target:
private boolean needsInitialisation() { return loginService == null || chatService == null || channelService == null || firebaseAnalytics == null; }
Source:
<code>public List<EnrolledCoursesResponse> getUserEnrolledCourses(@NonNull String username, boolean tryCache) throws RetroHttpException { List<EnrolledCoursesResponse> ret = null; String json = null; final String cacheKey = config.getApiHostURL() + "/api/mobile/v0.5/users/" + username + "/course_enrollments"; if (tryCache) { try { json = cache.get(cacheKey); } catch (IOException | NoSuchAlgorithmException e) { logger.debug(e.toString()); } } if (json == null) { Response response = null; try { response = userService.getUserEnrolledCourses(username); } <START> catch (Throwable e) { <END> logger.debug(e.toString()); } if (response != null) { TypedInput input = response.getBody(); if (input != null) { try { InputStream is = input.in(); json = fromStream(is); is.close(); } catch (IOException e) { json = null; logger.debug(e.toString()); } } } } if (json != null) { try { cache.put(cacheKey, json); } catch (IOException | NoSuchAlgorithmException e) { logger.debug(e.toString()); } ret = new ArrayList<>(); JsonArray ary = gson.fromJson(json, JsonArray.class); for (int cnt=0; cnt<ary.size(); ++cnt) { ret.add(gson.fromJson(ary.get(cnt), EnrolledCoursesResponse.class)); } } return ret; }</code><technical_language>catch this exception, caller handle it</technical_language>

Target:
public List<EnrolledCoursesResponse> getUserEnrolledCourses(@NonNull String username, boolean tryCache) throws RetroHttpException { List<EnrolledCoursesResponse> ret = null; String json = null; final String cacheKey = getUserEnrolledCoursesURL(username); if (tryCache) { try { json = cache.get(cacheKey); } catch (IOException | NoSuchAlgorithmException e) { logger.debug(e.toString()); } } if (json == null) { Response response = userService.getUserEnrolledCourses(username); if (response != null) { TypedInput input = response.getBody(); if (input != null) { try { json = IOUtils.toString(input.in()); } catch (IOException e) { json = null; logger.debug(e.toString()); } } } } if (json != null) { try { cache.put(cacheKey, json); } catch (IOException | NoSuchAlgorithmException e) { logger.debug(e.toString()); } JsonArray ary = gson.fromJson(json, JsonArray.class); ret = new ArrayList<>(ary.size()); for (int cnt=0; cnt<ary.size(); ++cnt) { ret.add(gson.fromJson(ary.get(cnt), EnrolledCoursesResponse.class)); } } return ret; }
Source:
<code>private void init() { try (InputStream stream = EE.class.getResourceAsStream(name() + ".properties")) { if (stream == null) { packages = new Parameters(); modules = new Parameters(); } <START> UTF8Properties props = new UTF8Properties(); <END> props.load(stream); String packagesProp = props.getProperty("org.osgi.framework.system.packages"); packages = new Parameters(packagesProp); String modulesProp = props.getProperty("jpms.modules"); modules = new Parameters(modulesProp); } catch (IOException ioe) { throw Exceptions.duck(ioe); } }</code><technical_language>I need a return in null check NPE below</technical_language>

Target:
private void init() { try (InputStream stream = EE.class.getResourceAsStream(name() + ".properties")) { if (stream == null) { packages = new Parameters(); modules = new Parameters(); return; } UTF8Properties props = new UTF8Properties(); props.load(stream); String packagesProp = props.getProperty("org.osgi.framework.system.packages"); packages = new Parameters(packagesProp); String modulesProp = props.getProperty("jpms.modules"); modules = new Parameters(modulesProp); } catch (IOException ioe) { throw Exceptions.duck(ioe); } }
Source:
<code>private void handleHandshakeAttempt(Optional<VersionMessage> optionalVersionMessage) { if (!optionalVersionMessage.isPresent()) { detected = Optional.of(false); wellConfigured = Optional.of(false); log.info("No local Bitcoin node detected on port {}," + " or the connection was prematurely closed" + " (before a version messages could be coerced)", port); } else { detected = Optional.of(true); log.info("Local Bitcoin node detected on port {}", port); var versionMessage = optionalVersionMessage.get(); var configurationCheckResult = checkWellConfigured(versionMessage); <START> <END> if (configurationCheckResult) { wellConfigured = Optional.of(true); log.info("Local Bitcoin node found to be well configured" + " (not pruning and allows bloom filters)"); } else { wellConfigured = Optional.of(false); log.info("Local Bitcoin node badly configured" + " (it is pruning and/or bloom filters are disabled)"); } } }</code><technical_language>Blank line</technical_language>

Target:
private void handleHandshakeAttempt(Optional<VersionMessage> optionalVersionMessage) { if (!optionalVersionMessage.isPresent()) { detected = false; wellConfigured = false; log.info("No local Bitcoin node detected on port {}, or the connection was prematurely closed" + " (before a version messages could be coerced)", port); } else { detected = true; log.info("Local Bitcoin node detected on port {}", port); var versionMessage = optionalVersionMessage.get(); var configurationCheckResult = checkWellConfigured(versionMessage); if (configurationCheckResult) { wellConfigured = true; log.info("Local Bitcoin node found to be well configured (not pruning and allows bloom filters)"); } else { wellConfigured = false; log.info("Local Bitcoin node badly configured (it is pruning and/or bloom filters are disabled)"); } } }
Source:
<code>public static void main(String[] args) throws IOException { if (args.length == 1) { execute(args[0], "javascript-checks-testkit/target/expected.txt", "its/sources/src"); } else if (args.length == 3) { execute(args[0], args[1], args[2]); } else { <START> LOGGER.error("First argument = fully-qualified check class name. Second argument (optional) = ignored issues file. Second argument (optional) = JS files directory"); <END> } }</code><technical_language>@inverno 2 times "Second argument" :)</technical_language>

Target:
public static void main(String[] args) throws IOException { if (args.length == 1) { execute(args[0], "javascript-checks-testkit/target/expected.txt", "its/sources/src"); } else if (args.length == 3) { execute(args[0], args[1], args[2]); } else { LOGGER.error("First argument = fully-qualified check class name. Second argument (optional) = ignored issues file. Third argument (optional) = JS files directory"); } }