auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void renderRadio(int row, List<Short> columns, LabelAndValues lv) { String id = lv.info.name(); labelHelpColumn = 1 + columns.size(); labelsTable.setText(row, 0, id); CellFormatter fmt = labelsTable.getCellFormatter(); fmt.setStyleName(row, 0, style.label_name()); fmt.setStyleName(row, labelHelpColumn, style.label_help()); ApprovalInfo self = Gerrit.isSignedIn() ? lv.info.for_user(Gerrit.getUserAccount().getId().get()) : null; final LabelRadioGroup group = new LabelRadioGroup(row, id, lv.permitted.size()); for (int i = 0; i < columns.size(); i++) { Short v = columns.get(i); if (lv.permitted.contains(v)) { String text = lv.info.value_text(LabelValue.formatValue(v)); LabelRadioButton b = new LabelRadioButton(group, text, v); <START> short dv = lv.info.defaultValue(); <END> info("default value is: "+String.valueOf(dv)); if ((self != null && v == self.value()) || (self == null && v == dv)) { b.setValue(true); group.select(b); labelsTable.setText(row, labelHelpColumn, b.text); } group.buttons.add(b); labelsTable.setWidget(row, 1 + i, b); } } if (CODE_REVIEW.equalsIgnoreCase(id) && !group.buttons.isEmpty()) { lgtm = new Runnable() { @Override public void run() { group.selectMax(); } }; } }</code><technical_language>This is a result of Gson FieldNamingPolicy use</technical_language>

Target:
private void renderRadio(int row, List<Short> columns, LabelAndValues lv) { String id = lv.info.name(); Short dv = lv.info.defaultValue(); labelHelpColumn = 1 + columns.size(); labelsTable.setText(row, 0, id); CellFormatter fmt = labelsTable.getCellFormatter(); fmt.setStyleName(row, 0, style.label_name()); fmt.setStyleName(row, labelHelpColumn, style.label_help()); ApprovalInfo self = Gerrit.isSignedIn() ? lv.info.for_user(Gerrit.getUserAccount().getId().get()) : null; final LabelRadioGroup group = new LabelRadioGroup(row, id, lv.permitted.size()); for (int i = 0; i < columns.size(); i++) { Short v = columns.get(i); if (lv.permitted.contains(v)) { String text = lv.info.value_text(LabelValue.formatValue(v)); LabelRadioButton b = new LabelRadioButton(group, text, v); if ((self != null && v == self.value()) || (self == null && v == dv)) { b.setValue(true); group.select(b); in.label(group.label, v); labelsTable.setText(row, labelHelpColumn, b.text); } group.buttons.add(b); labelsTable.setWidget(row, 1 + i, b); } } if (CODE_REVIEW.equalsIgnoreCase(id) && !group.buttons.isEmpty()) { lgtm = new Runnable() { @Override public void run() { group.selectMax(); } }; } }
Source:
<code>public void init() { if (INSECURE_METHODS == null) { <START> INSECURE_METHODS = new ArrayList<String>(); <END> INSECURE_METHODS.addAll(Arrays.asList(INSECURE_DEFAULT_METHODS)); INSECURE_METHODS.addAll(Arrays.asList(WEBDAV_METHODS)); } }</code><technical_language>This (and statements) done in a static block</technical_language>

Target:
public void init() { }
Source:
<code>public Builder withProjectId(String projectId) { <START> return (Builder) super.withProjectId(projectId); <END> }</code><technical_language>@Override public Builder withProjectId(String projectId) { super.withProjectId(projectId); return this; }</technical_language>

Target:
public Builder withProjectId(String projectId) { super.withProjectId(projectId); return this; }
Source:
<code>public PrepScore mapRow(ResultSet rs, int rowNum) throws SQLException { PrepScore prepScore = new PrepScore(); prepScore.setScore(rs.getLong(HibernateConsts.BEHAVIOR_POINT_VALUE)); <START> prepScore.setStudentId(rs.getLong(HibernateConsts.STUDENT_FK)); <END> prepScore.setStartDate(rs.getDate("start_date")); prepScore.setEndDate(rs.getDate("end_date")); return prepScore; }</code><technical_language>Consts defined in HibernateConsts for values</technical_language>

Target:
public PrepScore mapRow(ResultSet rs, int rowNum) throws SQLException { PrepScore prepScore = new PrepScore(); prepScore.setScore(rs.getLong(HibernateConsts.BEHAVIOR_POINT_VALUE)); prepScore.setStudentId(rs.getLong(HibernateConsts.STUDENT_FK)); prepScore.setStartDate(rs.getDate(HibernateConsts.START_DATE)); prepScore.setEndDate(rs.getDate(HibernateConsts.END_DATE)); return prepScore; }
Source:
<code>public JobKickoffTask( final boolean runAsUserEnabled, final boolean userCreationEnabled, @NotNull final Executor executor, @NotNull final String hostname, @NotNull final Registry registry ) { this.isRunAsUserEnabled = runAsUserEnabled; this.isUserCreationEnabled = userCreationEnabled; this.executor = executor; this.hostname = hostname; this.timer = registry.timer("genie.jobs.tasks.jobKickoffTask.timer"); retryTemplate = new RetryTemplate(); <START> retryTemplate.setBackOffPolicy(new ExponentialBackOffPolicy()); <END> }</code><technical_language>a retry template a bean somewhere? this passed constructor</technical_language>

Target:
public JobKickoffTask( final boolean runAsUserEnabled, final boolean userCreationEnabled, @NotNull final Executor executor, @NotNull final String hostname, @NotNull final Registry registry ) { this.isRunAsUserEnabled = runAsUserEnabled; this.isUserCreationEnabled = userCreationEnabled; this.executor = executor; this.hostname = hostname; this.registry = registry; this.timer = registry.timer("genie.jobs.tasks.jobKickoffTask.timer"); retryTemplate = new RetryTemplate(); retryTemplate.setBackOffPolicy(new ExponentialBackOffPolicy()); }
Source:
<code>public boolean reconfigureStorageProcessor(EnumMap<VmwareStorageProcessorConfigurableFields,Object> params) { VmwareStorageProcessor processor = (VmwareStorageProcessor) this.processor; try { for (VmwareStorageProcessorConfigurableFields key : params.keySet()){ switch (key){ case NFS_VERSION: Integer nfsVersion = (Integer) params.get(key); processor.setNfsVersion(nfsVersion); this._nfsVersion = nfsVersion; break; case FULL_CLONE_FLAG: boolean fullClone = (boolean) params.get(key); processor.setFullCloneFlag(fullClone); break; default: String msg = "Unknown reconfigurable field " + key.getName() + " for VmwareStorageProcessor"; <START> throw new Exception(msg); <END> } } return true; } catch (Exception e){ s_logger.error("Couldn't reconfigure VmwareStorageProcessor due to " + e.getMessage()); return false; } }</code><technical_language>General Java practice throw Exception provide specific information. Consider IllegalStateException instead. Also, due catch line #91, this throw effect. Therefore, scope of catch clause needs reduced catch runtime exceptions</technical_language>

Target:
public boolean reconfigureStorageProcessor(EnumMap<VmwareStorageProcessorConfigurableFields,Object> params) { VmwareStorageProcessor processor = (VmwareStorageProcessor) this.processor; for (VmwareStorageProcessorConfigurableFields key : params.keySet()){ switch (key){ case NFS_VERSION: Integer nfsVersion = (Integer) params.get(key); processor.setNfsVersion(nfsVersion); this._nfsVersion = nfsVersion; break; case FULL_CLONE_FLAG: boolean fullClone = (boolean) params.get(key); processor.setFullCloneFlag(fullClone); break; default: s_logger.error("Unknown reconfigurable field " + key.getName() + " for VmwareStorageProcessor"); return false; } } return true; }
Source:
<code>private void setupTrustManager() throws Exception{ ServerConfigurationService config = ServerConfiguration.getInstance(); TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); InputStream trustStoreInputStream = null; KeyStore clientTrustStore = null; <START> String trustStoreFile = config.getFirstProperty("Security.TrustStore.Location"); <END> String TRUSTSTORE_TYPE = config.getFirstProperty("Security.TrustStore.Type"); try { clientTrustStore = KeyStore.getInstance(TRUSTSTORE_TYPE); } catch (KeyStoreException e) { throw e; } try { trustStoreInputStream = new FileInputStream(trustStoreFile); } catch (FileNotFoundException e) { throw e; } try { clientTrustStore.load(trustStoreInputStream, null); } catch (IOException e) { throw e; } catch (CertificateException e) { throw e; } catch (NoSuchAlgorithmException e) { throw e; } trustManagerFactory.init(clientTrustStore); TrustManager[] trustManagers = trustManagerFactory.getTrustManagers(); for(TrustManager t : trustManagers) { if(t instanceof X509TrustManager) { trustManager = (X509TrustManager)t; System.setProperty(PROP_TRUST_STORE_UPDATE_REQUIRED, "false"); return; } } throw new NoSuchAlgorithmException("No X509TrustManager in TrustManagerFactory"); }</code><technical_language>String constants</technical_language>

Target:
private void setupTrustManager() throws Exception{ TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); InputStream trustStoreInputStream = null; KeyStore clientTrustStore = null; try { clientTrustStore = KeyStore.getInstance(TRUSTSTORE_TYPE); } catch (KeyStoreException e) { throw e; } try { trustStoreInputStream = new FileInputStream(TRUSTSTORE_LOCATION); } catch (FileNotFoundException e) { throw e; } try { clientTrustStore.load(trustStoreInputStream, null); } catch (IOException e) { throw e; } catch (CertificateException e) { throw e; } catch (NoSuchAlgorithmException e) { throw e; } trustManagerFactory.init(clientTrustStore); TrustManager[] trustManagers = trustManagerFactory.getTrustManagers(); for(TrustManager t : trustManagers) { if(t instanceof X509TrustManager) { trustManager = (X509TrustManager)t; System.setProperty(PROP_TRUST_STORE_UPDATE_REQUIRED, "false"); return; } } throw new NoSuchAlgorithmException("No X509TrustManager in TrustManagerFactory"); }
Source:
<code>public void testIsEmailValid() { assertEquals(true, EMailValidator.isEmailValid("pete@mailinator.com", null)); assertEquals(true, EMailValidator.isEmailValid(" leadingWhitespace@mailinator.com", null)); assertEquals(true, EMailValidator.isEmailValid("trailingWhitespace@mailinator.com ", null)); assertEquals(false, EMailValidator.isEmailValid("elisah.da mota@example.com", null)); assertEquals(false, EMailValidator.isEmailValid("pete1@mailinator.com;pete2@mailinator.com", null)); assertEquals(true, EMailValidator.isEmailValid("michélle.pereboom@example.com", null)); assertEquals(true, EMailValidator.isEmailValid("begüm.vriezen@example.com", null)); assertEquals(true, EMailValidator.isEmailValid("lótus.gonçalves@example.com", null)); assertEquals(true, EMailValidator.isEmailValid("lótus.gonçalves@éxample.com", null)); assertEquals(true, EMailValidator.isEmailValid("begüm.vriezen@example.cologne", null)); assertEquals(true, EMailValidator.isEmailValid("رونیکا.محمدخان@example.com", null)); assertEquals(false, EMailValidator.isEmailValid("lótus.gonçalves@example.cóm", null)); assertEquals(false, EMailValidator.isEmailValid("dora@.com", null)); assertEquals(false, EMailValidator.isEmailValid("", null)); assertEquals(false, EMailValidator.isEmailValid(null, null)); assertEquals(true, EMailValidator.isEmailValid("ziller@wiso.uni-koeln.de", null)); assertEquals(true, EMailValidator.isEmailValid("jayned@essex.ac.uk", null)); }</code><technical_language>reformat this emails in test a "real"</technical_language>

Target:
public void testIsEmailValid() { assertEquals(true, EMailValidator.isEmailValid("pete@mailinator.com", null)); assertEquals(true, EMailValidator.isEmailValid(" leadingWhitespace@mailinator.com", null)); assertEquals(true, EMailValidator.isEmailValid("trailingWhitespace@mailinator.com ", null)); assertEquals(false, EMailValidator.isEmailValid("elisah.da mota@example.com", null)); assertEquals(false, EMailValidator.isEmailValid("pete1@mailinator.com;pete2@mailinator.com", null)); assertEquals(true, EMailValidator.isEmailValid("michélle.pereboom@example.com", null)); assertEquals(true, EMailValidator.isEmailValid("begüm.vriezen@example.com", null)); assertEquals(true, EMailValidator.isEmailValid("lótus.gonçalves@example.com", null)); assertEquals(true, EMailValidator.isEmailValid("lótus.gonçalves@éxample.com", null)); assertEquals(true, EMailValidator.isEmailValid("begüm.vriezen@example.cologne", null)); assertEquals(true, EMailValidator.isEmailValid("رونیکا.محمدخان@example.com", null)); assertEquals(false, EMailValidator.isEmailValid("lótus.gonçalves@example.cóm", null)); assertEquals(false, EMailValidator.isEmailValid("dora@.com", null)); assertEquals(false, EMailValidator.isEmailValid("", null)); assertEquals(false, EMailValidator.isEmailValid(null, null)); assertEquals(true, EMailValidator.isEmailValid("blah@wiso.uni-unc.de", null)); assertEquals(true, EMailValidator.isEmailValid("foo@essex.co.uk", null)); assertEquals(true, EMailValidator.isEmailValid("jack@bu.cloud", null)); }
Source:
<code>public void stdlib_symbols() { Map<String, Symbol> mathSymbols = TypeShed.standardLibrarySymbols("math").stream().collect(Collectors.toMap(Symbol::name, Function.identity())); <START> assertThat(mathSymbols).hasSize(54); <END> Symbol acosSymbol = mathSymbols.get("acos"); assertThat(acosSymbol.kind()).isEqualTo(Symbol.Kind.FUNCTION); assertThat(((FunctionSymbolImpl) acosSymbol).declaredReturnType().canOnlyBe("float")).isTrue(); assertThat(TypeShed.standardLibrarySymbol("math", "math.acos")).isSameAs(acosSymbol); Map<String, Symbol> threadingSymbols = TypeShed.standardLibrarySymbols("threading").stream().collect(Collectors.toMap(Symbol::name, Function.identity())); assertThat(threadingSymbols.get("Thread").kind()).isEqualTo(Symbol.Kind.CLASS); Map<String, Symbol> imaplibSymbols = TypeShed.standardLibrarySymbols("imaplib").stream().collect(Collectors.toMap(Symbol::name, Function.identity())); assertThat(imaplibSymbols).hasSize(27); }</code><technical_language>this is valuable test</technical_language>

Target:
public void stdlib_symbols() { Map<String, Symbol> mathSymbols = TypeShed.standardLibrarySymbols("math").stream().collect(Collectors.toMap(Symbol::name, Function.identity())); Symbol acosSymbol = mathSymbols.get("acos"); assertThat(acosSymbol.kind()).isEqualTo(Symbol.Kind.FUNCTION); assertThat(((FunctionSymbolImpl) acosSymbol).declaredReturnType().canOnlyBe("float")).isTrue(); assertThat(TypeShed.standardLibrarySymbol("math", "math.acos")).isSameAs(acosSymbol); Map<String, Symbol> threadingSymbols = TypeShed.standardLibrarySymbols("threading").stream().collect(Collectors.toMap(Symbol::name, Function.identity())); assertThat(threadingSymbols.get("Thread").kind()).isEqualTo(Symbol.Kind.CLASS); Map<String, Symbol> imaplibSymbols = TypeShed.standardLibrarySymbols("imaplib").stream().collect(Collectors.toMap(Symbol::name, Function.identity())); assertThat(imaplibSymbols).isNotEmpty(); }
Source:
<code><START> public int hashCode() { <END> int result = methodName.hashCode(); result = 31 * result + Arrays.hashCode(parameterTypes); result = 31 * result + declaringClass.hashCode(); return result; }</code><technical_language>verbose Guava's Objects.equal Objects.hashCode utility methods</technical_language>

Target:
public int hashCode() { return Objects.hashCode(declaringClass, methodName, parameterTypes); }
Source:
<code>public void execute(Tuple tuple) { if (timeBasedRetention) { expireAndAckTimedOutEntries(lookupBuffer); } String streamId = getStreamSelector(tuple); if ( isLookupStream(streamId) ) { String key = makeLookupTupleKey(tuple); if(dropOlderDuplicates) lookupBuffer.removeAll(key); lookupBuffer.put(key, new TupleInfo(tuple) ); if(timeBasedRetention) { timeTracker.add(System.currentTimeMillis()); } else { if (lookupBuffer.size() > retentionCount) { TupleInfo expired = removeHead(lookupBuffer); if( (joinType==JoinType.RIGHT) || (joinType==JoinType.OUTER) ) { emitUnMatchedTuples(expired); } collector.ack(expired.tuple); } } } else if (isDataStream(streamId) ) { List<TupleInfo> matches = matchWithLookupStream(tuple); if (matches==null || matches.isEmpty() ) { if (joinType==JoinType.LEFT || joinType==JoinType.OUTER ) { ArrayList<Object> outputTuple = doProjection(tuple, null); emit(outputTuple, tuple); return; } collector.ack(tuple); } for (TupleInfo lookupTuple : matches) { lookupTuple.unmatched = false; ArrayList<Object> outputTuple = doProjection(lookupTuple.tuple, tuple); emit(outputTuple, tuple, lookupTuple.tuple); } collector.ack(tuple); } else { <START> LOG.warn("Received tuple from unexpected stream/source : {}. Tuple will be dropped.", streamId); <END> } }</code><technical_language>Do need ack tuple unexpected sources streams? If do ack this tuple replayed again</technical_language>

Target:
public void execute(Tuple tuple) { long currTime = System.currentTimeMillis(); for (JoinInfo joinInfo : joinInfos) { joinInfo.expireAndAckTimedOutEntries(collector, currTime); } if (TupleUtils.isTick(tuple)) return; try { String stream = streamKind.getStreamId(tuple); if (stream.equalsIgnoreCase(fromStream)) processFromStreamTuple(tuple, currTime); else if(stream.equalsIgnoreCase(joinStream)) processJoinStreamTuple(tuple, currTime); else throw new InvalidTuple("Source component/streamId for Tuple not part of streams being joined : " + stream, tuple); } catch (InvalidTuple e) { collector.ack(tuple); LOG.warn("{}. Tuple will be dropped.", e.toString()); } }
Source:
<code>public CreditCurveZeroRateSensitivity mapSensitivity(DoubleUnaryOperator operator) { <START> return new CreditCurveZeroRateSensitivity(curveCurrency, legalEntityId, yearFraction, currency, <END> operator.applyAsDouble(sensitivity)); }</code><technical_language>new line (, ,</technical_language>

Target:
public CreditCurveZeroRateSensitivity mapSensitivity(DoubleUnaryOperator operator) { return new CreditCurveZeroRateSensitivity(legalEntityId, zeroRateSensitivity.mapSensitivity(operator)); }
Source:
<code>synchronized public void testCrud() throws Exception { int counter = 0; verifyNumberOfHealthMonitors(counter); DtoHealthMonitor healthMonitor = createStockHealthMonitor(); verifyNumberOfHealthMonitors(++counter); DtoHealthMonitor healthMonitor2 = createStockHealthMonitor(); verifyNumberOfHealthMonitors(++counter); dtoResource.postAndVerifyStatus(topLevelHealthMonitorsUri, APPLICATION_HEALTH_MONITOR_JSON(), healthMonitor2, CONFLICT.getStatusCode()); verifyNumberOfHealthMonitors(counter); DtoHealthMonitor newHealthMonitor = getHealthMonitor(healthMonitor.getUri()); Assert.assertEquals(newHealthMonitor, healthMonitor); DtoHealthMonitor newHealthMonitor2 = getHealthMonitor(healthMonitor2.getUri()); Assert.assertEquals(newHealthMonitor2, healthMonitor2); newHealthMonitor.setAdminStateUp(false); DtoHealthMonitor updatedHealthMonitor = updateHealthMonitor(newHealthMonitor); Assert.assertEquals(updatedHealthMonitor, newHealthMonitor); Assert.assertNotSame(updatedHealthMonitor, healthMonitor); deleteHealthMonitor(healthMonitor.getUri()); verifyNumberOfHealthMonitors(--counter); deleteHealthMonitor(healthMonitor2.getUri()); verifyNumberOfHealthMonitors(--counter); ClientResponse response = resource().uri(healthMonitor.getUri()) .delete(ClientResponse.class); <START> assertHealthMonitorNotFound(healthMonitor.getId(), <END> response); response = resource().uri(healthMonitor.getUri()) .type(APPLICATION_HEALTH_MONITOR_JSON()) .put(ClientResponse.class, healthMonitor); assertHealthMonitorNotFound(healthMonitor.getId(), response); }</code><technical_language>OK</technical_language>

Target:
synchronized public void testCrud() throws Exception { int counter = 0; verifyNumberOfHealthMonitors(counter); DtoHealthMonitor healthMonitor = createStockHealthMonitor(); verifyNumberOfHealthMonitors(++counter); DtoHealthMonitor healthMonitor2 = createStockHealthMonitor(); verifyNumberOfHealthMonitors(++counter); dtoResource.postAndVerifyStatus(topLevelHealthMonitorsUri, APPLICATION_HEALTH_MONITOR_JSON(), healthMonitor2, CONFLICT.getStatusCode()); verifyNumberOfHealthMonitors(counter); DtoHealthMonitor newHealthMonitor = getHealthMonitor(healthMonitor.getUri()); Assert.assertEquals(newHealthMonitor, healthMonitor); DtoHealthMonitor newHealthMonitor2 = getHealthMonitor(healthMonitor2.getUri()); Assert.assertEquals(newHealthMonitor2, healthMonitor2); newHealthMonitor.setAdminStateUp(false); DtoHealthMonitor updatedHealthMonitor = updateHealthMonitor(newHealthMonitor); Assert.assertEquals(updatedHealthMonitor, newHealthMonitor); Assert.assertNotSame(updatedHealthMonitor, healthMonitor); deleteHealthMonitor(healthMonitor.getUri()); verifyNumberOfHealthMonitors(--counter); deleteHealthMonitor(healthMonitor2.getUri()); verifyNumberOfHealthMonitors(--counter); ClientResponse response = resource().uri(healthMonitor.getUri()) .delete(ClientResponse.class); assertEquals(204, response.getStatus()); response = resource().uri(healthMonitor.getUri()) .type(APPLICATION_HEALTH_MONITOR_JSON()) .put(ClientResponse.class, healthMonitor); assertHealthMonitorNotFound(healthMonitor.getId(), response); }
Source:
<code>public Map<String, Object> toMap(){ final ImmutableList<String> propertiesName = properties.stream() <START> .map(property -> property.getName()) <END> .collect(toImmutableList()); return map("id", id, "label", label, "properties", propertiesName, "clazz", clazz, "helpText", helpText); }</code><technical_language>I do reference method property::getName</technical_language>

Target:
public Map<String, Object> toMap(){ final ImmutableList<String> propertiesName = properties.stream() .map(ContentTypeFieldProperties::getName) .collect(toImmutableList()); return imap("id", id, "label", label, "properties", propertiesName, "clazz", clazz, "helpText", helpText); }
Source:
<code>public SSLServerSocket createSSLServerSocket(int port) throws IOException { <START> try { <END> SSLServerSocket srvSock = null; SSLServerSocketFactory ssf = sslContext.getServerSocketFactory(); srvSock = (SSLServerSocket)ssf.createServerSocket(port); srvSock.setEnabledProtocols(SSLUtils.getSupportedProtocols(srvSock.getEnabledProtocols())); s_logger.info("create SSL server socket on port: " + port); return srvSock; } catch (Exception ioe) { s_logger.error(ioe.toString(), ioe); } return null; }</code><technical_language>configured list of cipher suites. Check fix this</technical_language>

Target:
public SSLServerSocket createSSLServerSocket(int port) throws IOException { try { SSLServerSocket srvSock = null; SSLServerSocketFactory ssf = sslContext.getServerSocketFactory(); srvSock = (SSLServerSocket)ssf.createServerSocket(port); srvSock.setEnabledProtocols(SSLUtils.getSupportedProtocols(srvSock.getEnabledProtocols())); srvSock.setEnabledCipherSuites(SSLUtils.getSupportedProtocols(srvSock.getEnabledCipherSuites())); s_logger.info("create SSL server socket on port: " + port); return srvSock; } catch (Exception ioe) { s_logger.error(ioe.toString(), ioe); } return null; }
Source:
<code>public Optional<StatisticGroup> getById(String id) { <START> return Optional.ofNullable(this.groupMappings.get(checkNotNull(id).toLowerCase())); <END> }</code><technical_language>Add locale toLowerCase (in this case Locale.ENGLISH)</technical_language>

Target:
public Optional<StatisticGroup> getById(String id) { return Optional.ofNullable(this.groupMappings.get(checkNotNull(id).toLowerCase(Locale.ENGLISH))); }
Source:
<code>public int execute() throws Exception { <START> terminal.println("Downloading..."); <END> validateParms(); if (verifyConnection) { verifyRepoConnection(); } val listed = objectId.size() > 0; if (listed) { return downloadObjects(objectId); } else { if (manifestResource.isGnosManifest()) { terminal .printError( "Manifest '%s' looks like a GNOS-format manifest file. Please ensure you are using a tab-delimited text file" + " manifest from <LINK_0>", manifestResource.getValue()); return FAILURE_STATUS; } val manifest = manifestService.getDownloadManifest(manifestResource); validateManifest(manifest); val entries = manifest.getEntries(); if (entries.isEmpty()) { terminal.printError("Manifest '%s' is empty", manifestResource); return FAILURE_STATUS; } return downloadObjects(manifest.getEntries().stream().map(entry -> entry.getFileUuid()).collect(toList())); } }</code><technical_language>put this verify step? Do print out there</technical_language>

Target:
public int execute() throws Exception { validateParms(); if (verifyConnection) { verifyRepoConnection(); } terminal.println("Downloading..."); val listed = objectId.size() > 0; if (listed) { return downloadObjects(objectId); } else { if (manifestResource.isGnosManifest()) { terminal .printError( "Manifest '%s' looks like a GNOS-format manifest file. Please ensure you are using a tab-delimited text file" + " manifest from <LINK_0>", manifestResource.getValue()); return FAILURE_STATUS; } val manifest = manifestService.getDownloadManifest(manifestResource); validateManifest(manifest); val entries = manifest.getEntries(); if (entries.isEmpty()) { terminal.printError("Manifest '%s' is empty", manifestResource); return FAILURE_STATUS; } return downloadObjects(manifest.getEntries().stream().map(entry -> entry.getFileUuid()).collect(toList())); } }
Source:
<code>public void testInvalidAddress() throws Throwable { Configuration conf = new Configuration(); Socket socket = NetUtils.getDefaultSocketFactory(conf) .createSocket(); socket.bind(new InetSocketAddress("127.0.0.1", 0)); try { NetUtils.connect(socket, new InetSocketAddress("invalid-test-host", 0), 20000); socket.close(); fail("Should not have connected"); } catch (UnknownHostException ce) { <START> System.err.println("Got exception: " + ce); <END> } }</code><technical_language>nit: I this is existing test case, a logger, this: LOG.info("Got expected exception", uhe); Sytem.err in test code is friendly test output/log interpretation</technical_language>

Target:
public void testInvalidAddress() throws Throwable { Configuration conf = new Configuration(); Socket socket = NetUtils.getDefaultSocketFactory(conf) .createSocket(); socket.bind(new InetSocketAddress("127.0.0.1", 0)); try { NetUtils.connect(socket, new InetSocketAddress("invalid-test-host", 0), 20000); socket.close(); fail("Should not have connected"); } catch (UnknownHostException uhe) { LOG.info("Got exception: ", uhe); } }
Source:
<code>private KalturaLiveEntry onClientConnect(WMSProperties properties, HashMap<String, String> requestParams) throws KalturaApiException, ClientConnectException, Exception { if (!requestParams.containsKey(Constants.REQUEST_PROPERTY_ENTRY_ID)){ throw new ClientConnectException("Missing argument: entryId"); } if (!requestParams.containsKey(Constants.REQUEST_PROPERTY_TOKEN)){ throw new ClientConnectException("Missing argument: token"); } if (!requestParams.containsKey(Constants.REQUEST_PROPERTY_PARTNER_ID)){ throw new ClientConnectException("Missing argument: partnerId"); } if (!requestParams.containsKey(Constants.REQUEST_PROPERTY_SERVER_INDEX)){ throw new ClientConnectException("Missing argument: server index"); } int partnerId = Integer.parseInt(requestParams.get(Constants.REQUEST_PROPERTY_PARTNER_ID)); String entryId = requestParams.get(Constants.REQUEST_PROPERTY_ENTRY_ID); String token = requestParams.get(Constants.REQUEST_PROPERTY_TOKEN); KalturaEntryServerNodeType serverIndex = KalturaEntryServerNodeType.get(requestParams.get(Constants.REQUEST_PROPERTY_SERVER_INDEX)); KalturaLiveEntry liveEntry = KalturaAPI.getKalturaAPI().authenticate(entryId, partnerId, token, serverIndex); <START> KalturaEntryDataPersistence.setProperty(entryId, Constants.CLIENT_PROPERTY_KALTURA_LIVE_ENTRY, liveEntry); <END> logger.info("Entry added [" + entryId + "]"); return liveEntry; }</code><technical_language>Need check is REQUEST_PROPERTY_SERVER_INDEX in use. is removed here</technical_language>

Target:
private KalturaLiveEntry onClientConnect(WMSProperties properties, HashMap<String, String> requestParams) throws KalturaApiException, ClientConnectException, Exception { if (!requestParams.containsKey(Constants.REQUEST_PROPERTY_ENTRY_ID)){ throw new ClientConnectException("Missing argument: entryId"); } if (!requestParams.containsKey(Constants.REQUEST_PROPERTY_TOKEN)){ throw new ClientConnectException("Missing argument: token"); } if (!requestParams.containsKey(Constants.REQUEST_PROPERTY_PARTNER_ID)){ throw new ClientConnectException("Missing argument: partnerId"); } if (!requestParams.containsKey(Constants.REQUEST_PROPERTY_SERVER_INDEX)){ throw new ClientConnectException("Missing argument: server index"); } int partnerId = Integer.parseInt(requestParams.get(Constants.REQUEST_PROPERTY_PARTNER_ID)); String entryId = requestParams.get(Constants.REQUEST_PROPERTY_ENTRY_ID); String token = requestParams.get(Constants.REQUEST_PROPERTY_TOKEN); KalturaEntryServerNodeType serverIndex = KalturaEntryServerNodeType.get(requestParams.get(Constants.REQUEST_PROPERTY_SERVER_INDEX)); KalturaLiveEntry liveEntry = KalturaAPI.getKalturaAPI().authenticate(entryId, partnerId, token, serverIndex); KalturaEntryDataPersistence.setProperty(entryId, Constants.CLIENT_PROPERTY_KALTURA_LIVE_ENTRY, liveEntry); synchronized(properties) { properties.setProperty(Constants.CLIENT_PROPERTY_SERVER_INDEX, requestParams.get(Constants.REQUEST_PROPERTY_SERVER_INDEX)); properties.setProperty(Constants.KALTURA_LIVE_ENTRY_ID, liveEntry.id); } logger.info("Entry added [" + entryId + "]"); return liveEntry; }
Source:
<code>public void onTopologyChange(TopologyChangedEvent event) { ConsistentHash ch = event.getWriteConsistentHashAtEnd(); Set<Integer> localSegments = ch.getMembers().contains(rpcManager.getAddress()) ? ch.getSegmentsForOwner(rpcManager.getAddress()) : Collections.emptySet(); <START> Iterator<Object> it = remoteBias.keySet().iterator(); <END> while (it.hasNext()) { if (!localSegments.contains(keyPartitioner.getSegment(it.next()))) { it.remove(); } } ConsistentHash previousHash = event.getReadConsistentHashAtStart(); if (previousHash != null && !previousHash.getMembers().contains(rpcManager.getAddress())) { localBias.clear(); } }</code><technical_language>suggestion: remoteBias.keySet().removeIf(o -> !localSegments.contains(keyPartitioner.getSegment(o)));</technical_language>

Target:
public void onTopologyChange(TopologyChangedEvent event) { ConsistentHash ch = event.getWriteConsistentHashAtEnd(); Set<Integer> localSegments = ch.getMembers().contains(rpcManager.getAddress()) ? ch.getSegmentsForOwner(rpcManager.getAddress()) : Collections.emptySet(); remoteBias.keySet().removeIf(key -> !localSegments.contains(keyPartitioner.getSegment(key))); ConsistentHash previousHash = event.getReadConsistentHashAtStart(); if (previousHash != null && !previousHash.getMembers().contains(rpcManager.getAddress())) { localBias.clear(); } }
Source:
<code>public boolean equals(Object other) { if (other == null || !(other instanceof VdcParameter)) { return false; } VdcParameter otherParam = (VdcParameter) other; return getName().equals(otherParam.getName()) && getJavaType().equals(otherParam.getJavaType()) <START> && getGuid().equals(otherParam.getGuid()); <END> }</code><technical_language>compare guid, no</technical_language>

Target:
public boolean equals(Object other) { if (other == null || !(other instanceof VdcParameter)) { return false; } return getGuid().equals(((VdcParameter) other).getGuid()); }
Source:
<code><START> public Header isHeroImageVisible() { <END> wait.forElementVisible(headerWithHeroImage); PageObjectLogging.log("Hero image", MercuryMessages.VISIBLE_MSG, true); return this; }</code><technical_language>waitForHero... ? - return boolean a proper assertion in test body</technical_language>

Target:
public boolean isHeroImageVisible() { try { return header.getAttribute("class").contains("has-hero-image"); } catch (TimeoutException | ElementNotFoundException e) { return false; } }
Source:
<code>public void testIsAllNotSatisfied() { <START> Bundle bundle = mock(Bundle.class); <END> Dictionary<String, String> headers = new Hashtable<>(); headers.put("Bundle-SymbolicName", "bundle3"); when(bundle.getHeaders()).thenReturn(headers); BundleNameCondition bundleNameCondition2 = new BundleNameCondition( bundle, new ConditionInfo( BundleNameCondition.class.getName(), new String[] {"bundle1/bundle2"})); bundle = mock(Bundle.class); headers = new Hashtable<>(); headers.put("Bundle-SymbolicName", "bundle4"); when(bundle.getHeaders()).thenReturn(headers); BundleNameCondition bundleNameCondition1 = new BundleNameCondition( bundle, new ConditionInfo( BundleNameCondition.class.getName(), new String[] {"bundle1/bundle2"})); boolean satisfied = bundleNameCondition1.isSatisfied( new Condition[] {bundleNameCondition1, bundleNameCondition2}, null); assertThat(satisfied, is(false)); }</code><technical_language>I so. Right testing match match, a partial match. missing something..</technical_language>

Target:
public void testIsAllNotSatisfied() { Bundle bundle = mock(Bundle.class); Dictionary<String, String> headers = new Hashtable<>(); headers.put("Bundle-SymbolicName", "bundle3"); when(bundle.getHeaders()).thenReturn(headers); BundleNameCondition bundleNameCondition2 = new BundleNameCondition( bundle, new ConditionInfo( BundleNameCondition.class.getName(), new String[] {"bundle1", "bundle2"})); bundle = mock(Bundle.class); headers = new Hashtable<>(); headers.put("Bundle-SymbolicName", "bundle4"); when(bundle.getHeaders()).thenReturn(headers); BundleNameCondition bundleNameCondition1 = new BundleNameCondition( bundle, new ConditionInfo( BundleNameCondition.class.getName(), new String[] {"bundle1", "bundle2"})); boolean satisfied = bundleNameCondition1.isSatisfied( new Condition[] {bundleNameCondition1, bundleNameCondition2}, null); assertThat(satisfied, is(false)); }
Source:
<code>public void updatingTimestampForOneConsistencyDoesNotAffectOther() { assertThat(progress.lastSweptTimestamp(10, true)).isEqualTo(0L); assertThat(progress.lastSweptTimestamp(10, false)).isEqualTo(0L); progress.updateLastSweptTimestamp(10, true, 128L); assertThat(progress.lastSweptTimestamp(10, false)).isEqualTo(0L); <START> progress.updateLastSweptTimestamp(10, false, 32L); <END> assertThat(progress.lastSweptTimestamp(10, true)).isEqualTo(128L); assertThat(progress.lastSweptTimestamp(10, false)).isEqualTo(32L); }</code><technical_language>sense conservative timestamps shard</technical_language>

Target:
public void updatingTimestampForOneConsistencyDoesNotAffectOther() { assertThat(progress.lastSweptTimestamp(CONSERVATIVE_TEN)).isEqualTo(INITIAL_TIMESTAMP); assertThat(progress.lastSweptTimestamp(THOROUGH_TEN)).isEqualTo(INITIAL_TIMESTAMP); progress.updateLastSweptTimestamp(CONSERVATIVE_TEN, 128L); assertThat(progress.lastSweptTimestamp(THOROUGH_TEN)).isEqualTo(INITIAL_TIMESTAMP); progress.updateLastSweptTimestamp(THOROUGH_TEN, 32L); assertThat(progress.lastSweptTimestamp(CONSERVATIVE_TEN)).isEqualTo(128L); assertThat(progress.lastSweptTimestamp(THOROUGH_TEN)).isEqualTo(32L); }
Source:
<code>public void reportDifferentMetaData(Class<?> eventType, Map<String, Object> missingEntries, Map<String, Object> additionalEntries) { StringBuilder sb = new StringBuilder("One of the events contained different metadata than expected"); sb.append(NEWLINE) .append(NEWLINE) .append("In an event of type [") .append(eventType.getSimpleName()) .append("], "); if (!additionalEntries.isEmpty()) { sb.append("metadata entries" + NEWLINE) .append("["); for (Map.Entry<String, Object> entry : additionalEntries.entrySet()) { <START> sb.append(entryAsString(entry) + ","); <END> } sb.deleteCharAt(sb.lastIndexOf(",")); sb.append("] " + NEWLINE); sb.append("were not expected."); } if (!missingEntries.isEmpty()) { sb.append("metadata entries " + NEWLINE) .append("["); for (Map.Entry<String, Object> entry : missingEntries.entrySet()) { sb.append(entryAsString(entry) + ","); } sb.deleteCharAt(sb.lastIndexOf(",")); sb.append("] " + NEWLINE); sb.append("were expected but not seen."); } throw new AxonAssertionError(sb.toString()); }</code><technical_language>Nit: changing separator ", " give a clearer String of unexpected additional metadata entries</technical_language>

Target:
public void reportDifferentMetaData(Class<?> eventType, Map<String, Object> missingEntries, Map<String, Object> additionalEntries) { StringBuilder sb = new StringBuilder("One of the events contained different metadata than expected"); sb.append(NEWLINE) .append(NEWLINE) .append("In an event of type [") .append(eventType.getSimpleName()) .append("], "); if (!additionalEntries.isEmpty()) { sb.append("metadata entries" + NEWLINE).append("["); for (Map.Entry<String, Object> entry : additionalEntries.entrySet()) { sb.append(entryAsString(entry) + ", "); } sb.delete(sb.lastIndexOf(", "), sb.lastIndexOf(",") + 2); sb.append("] " + NEWLINE); sb.append("were not expected. "); } if (!missingEntries.isEmpty()) { sb.append("metadata entries " + NEWLINE).append("["); for (Map.Entry<String, Object> entry : missingEntries.entrySet()) { sb.append(entryAsString(entry) + ", "); } sb.delete(sb.lastIndexOf(","), sb.lastIndexOf(",") + 2); sb.append("] " + NEWLINE); sb.append("were expected but not seen."); } throw new AxonAssertionError(sb.toString()); }
Source:
<code>public static void teardown() throws Exception { String methodName = "removeBucket(RemoveBucketArgs args)"; if (!mintEnv) { <START> System.out.println("Test: " + methodName); <END> } long startTime = System.currentTimeMillis(); try { client.removeBucket(RemoveBucketArgs.builder().bucket(bucketName).build()); } catch (Exception e) { handleException(methodName, null, startTime, e); } }</code><technical_language>This is a test. is a clean function of setup(). If mint is goal for this PR, remove this</technical_language>

Target:
public static void teardown() throws Exception { long startTime = System.currentTimeMillis(); try { client.removeBucket(RemoveBucketArgs.builder().bucket(bucketName).build()); } catch (Exception e) { handleException("removeBucket(RemoveBucketArgs args)", null, startTime, e); } }
Source:
<code>public void testOnErrorExceptionIsThrownFromSingleUnsafeSubscribe() { Single.create(new Single.OnSubscribe<Integer>() { @Override <START> public void call(SingleSubscriber<? super Integer> s1) { <END> Single.create(new Single.OnSubscribe<Integer>() { @Override public void call(SingleSubscriber<? super Integer> s2) { throw new IllegalArgumentException("original exception"); } }).unsafeSubscribe(new Subscriber<Integer>() { @Override public void onCompleted() { } @Override public void onError(Throwable e) { s1.onError(e); } @Override public void onNext(Integer v) { s1.onSuccess(v); } }); } } ).subscribe(new OnErrorFailedSubscriber()); }</code><technical_language>Please define s1 final, build failure</technical_language>

Target:
public void testOnErrorExceptionIsThrownFromSingleUnsafeSubscribe() { Single.create(new Single.OnSubscribe<Integer>() { @Override public void call(final SingleSubscriber<? super Integer> s1) { Single.create(new Single.OnSubscribe<Integer>() { @Override public void call(SingleSubscriber<? super Integer> s2) { throw new IllegalArgumentException("original exception"); } }).unsafeSubscribe(new Subscriber<Integer>() { @Override public void onCompleted() { } @Override public void onError(Throwable e) { s1.onError(e); } @Override public void onNext(Integer v) { s1.onSuccess(v); } }); } } ).subscribe(new OnErrorFailedSubscriber()); }
Source:
<code>public void onFatalError(Throwable throwable) { synchronized (lock) { if (running) { if (throwable instanceof LeaderElectionException) { <START> leaderContender.handleError((LeaderElectionException) throwable); <END> } else { leaderContender.handleError(new LeaderElectionException(throwable)); } } else { if (LOG.isDebugEnabled()) { LOG.debug("Ignoring error notification since the service has been stopped."); } } } }</code><technical_language>I call leaderContender lock of risk of introducing potential deadlocks</technical_language>

Target:
public void onFatalError(Throwable throwable) { synchronized (lock) { if (!running) { if (LOG.isDebugEnabled()) { LOG.debug("Ignoring error notification since the service has been stopped."); } return; } } if (throwable instanceof LeaderElectionException) { leaderContender.handleError((LeaderElectionException) throwable); } else { leaderContender.handleError(new LeaderElectionException(throwable)); } }
Source:
<code>public static boolean syncHotlist() { if (relay == null || !relay.isConnection(RelayServiceBackbone.CONNECTED)) return false; <START> connection.sendMsg("last_read_lines", "hdata", "buffer:gui_buffers(*)/own_lines/lastReadLine/data buffer"); <END> connection.sendMsg("hotlist", "hdata", "hotlist:gui_hotlist(*) buffer,count"); return true; }</code><technical_language>No! Bad! change in protocol</technical_language>

Target:
public static boolean syncHotlist() { if (relay == null || !relay.isConnection(RelayServiceBackbone.CONNECTED)) return false; connection.sendMsg("last_read_lines", "hdata", "buffer:gui_buffers(*)/own_lines/last_read_line/data buffer"); connection.sendMsg("hotlist", "hdata", "hotlist:gui_hotlist(*) buffer,count"); return true; }
Source:
<code>public CandlepinQuery<Consumer> getHypervisors( @PathParam("owner_key") @Verify(Owner.class) String ownerKey, @QueryParam("hypervisor_id") List<String> hypervisorIds) { CandlepinQuery<Consumer> out = (hypervisorIds == null || hypervisorIds.isEmpty()) ? this.consumerCurator.getHypervisorsForOwner(ownerKey) : <START> this.consumerCurator.getHypervisorsBulk(hypervisorIds, ownerKey); <END> return out; }</code><technical_language>this is ownerKey getHypervisorsBulk changed owner ID</technical_language>

Target:
public CandlepinQuery<Consumer> getHypervisors( @PathParam("owner_key") @Verify(Owner.class) String ownerKey, @QueryParam("hypervisor_id") List<String> hypervisorIds) { Owner owner = ownerCurator.lookupByKey(ownerKey); CandlepinQuery<Consumer> out = (hypervisorIds == null || hypervisorIds.isEmpty()) ? this.consumerCurator.getHypervisorsForOwner(owner.getId()) : this.consumerCurator.getHypervisorsBulk(hypervisorIds, owner.getId()); return out; }
Source:
<code>private void syncRequestSuccess(JSONObject pData) { updateCrashedInFlightFromNewData(pData); updateDelayedFromNewData(pData); updateMetaFromNewData(pData); boolean hasRecords = false; <START> if (pData.has("records")) { <END> hasRecords = true; resetDataRecords(pData); } if (pData.has("updates")) { JSONArray ack = new JSONArray(); JSONObject updates = pData.getJSONObject("updates"); JSONObject applied = updates.optJSONObject("applied"); checkUidChanges(applied); processUpdates(applied, NotificationMessage.REMOTE_UPDATE_APPLIED_CODE, ack); processUpdates(updates.optJSONObject("failed"), NotificationMessage.REMOTE_UPDATE_FAILED_CODE, ack); processUpdates(updates.optJSONObject("collisions"), NotificationMessage.COLLISION_DETECTED_CODE, ack); mAcknowledgements = ack; } if (!hasRecords && pData.has("hash") && !pData.getString("hash").equals(mHashvalue)) { String remoteHash = pData.getString("hash"); FHLog.d( LOG_TAG, "Local dataset stale - syncing records :: local hash= " + mHashvalue + " - remoteHash =" + remoteHash); syncRecords(); } else { FHLog.i(LOG_TAG, "Local dataset up to date"); } syncCompleteWithCode("online"); }</code><technical_language>this removed. resetDataset. removed ios wp sdk too</technical_language>

Target:
private void syncRequestSuccess(JSONObject pData) { updateCrashedInFlightFromNewData(pData); updateDelayedFromNewData(pData); updateMetaFromNewData(pData); boolean hasRecords = false; if (pData.has("records")) { hasRecords = true; } if (pData.has("updates")) { JSONArray ack = new JSONArray(); JSONObject updates = pData.getJSONObject("updates"); JSONObject applied = updates.optJSONObject("applied"); checkUidChanges(applied); processUpdates(applied, NotificationMessage.REMOTE_UPDATE_APPLIED_CODE, ack); processUpdates(updates.optJSONObject("failed"), NotificationMessage.REMOTE_UPDATE_FAILED_CODE, ack); processUpdates(updates.optJSONObject("collisions"), NotificationMessage.COLLISION_DETECTED_CODE, ack); mAcknowledgements = ack; } if (!hasRecords && pData.has("hash") && !pData.getString("hash").equals(mHashvalue)) { String remoteHash = pData.getString("hash"); FHLog.d( LOG_TAG, "Local dataset stale - syncing records :: local hash= " + mHashvalue + " - remoteHash =" + remoteHash); syncRecords(); } else { FHLog.i(LOG_TAG, "Local dataset up to date"); } syncCompleteWithCode("online"); }
Source:
<code>public void runSync(final SyncState sync, final SyncUpdateCallback callback) { updateSync(sync, SyncState.Status.RUNNING, 0, callback); threadPool.execute(new Runnable() { @Override public void run() { try { switch (sync.getType()) { case syncDown: syncDown(sync, callback); break; case syncUp: syncUp(sync, callback); break; } updateSync(sync, SyncState.Status.DONE, 100, callback); } catch (RestClient.RefreshTokenRevokedException re) { SmartSyncLogger.e(TAG, "Exception thrown in runSync", re); } catch (Exception e) { SmartSyncLogger.e(TAG, "Exception thrown in runSync", e); String errorMessage = e.getMessage(); if(errorMessage != null){ try { JSONArray errorInJSON = new JSONArray(errorMessage); sync.setError(errorInJSON.getJSONObject(0)); } catch (JSONException jsonException) { <START> jsonException.printStackTrace(); <END> } } updateSync(sync, SyncState.Status.FAILED, UNCHANGED, callback); } } }); }</code><technical_language>Replace this line with: SmartSyncLogger.e(TAG, "Exception thrown while parsing JSON", jsonException);</technical_language>

Target:
public void runSync(final SyncState sync, final SyncUpdateCallback callback) { updateSync(sync, SyncState.Status.RUNNING, 0, callback); threadPool.execute(new Runnable() { @Override public void run() { try { switch (sync.getType()) { case syncDown: syncDown(sync, callback); break; case syncUp: syncUp(sync, callback); break; } updateSync(sync, SyncState.Status.DONE, 100, callback); } catch (RestClient.RefreshTokenRevokedException re) { SmartSyncLogger.e(TAG, "Exception thrown in runSync", re); } catch (Exception e) { SmartSyncLogger.e(TAG, "Exception thrown in runSync", e); String errorMessage = e.getMessage(); if(errorMessage != null){ try { JSONArray errorInJSON = new JSONArray(errorMessage); sync.setError(errorInJSON.getJSONObject(0)); } catch (JSONException jsonException) { SmartSyncLogger.e(TAG, "Exception thrown while parsing JSON", jsonException); } } updateSync(sync, SyncState.Status.FAILED, UNCHANGED, callback); } } }); }