auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (getActivity().getActionBar() != null) getActivity().getActionBar().setDisplayHomeAsUpEnabled(true); rootView = inflater.inflate(R.layout.dialog_fragment_disburse_loan, null); ButterKnife.bind(this, rootView); mLoanAccountDisbursementPresenter.attachView(this); safeUIBlockingUtility = new SafeUIBlockingUtility(getActivity()); inflateDisbursementDate(); inflatePaymentTypeSpinner(); disbursement_dates = loanDisbursementDates.getText().toString(); disbursement_dates = DateHelper.getDateAsStringUsedForCollectionSheetPayload (disbursement_dates).replace("-", " "); <START> btDisburseLoan.setOnClickListener(new View.OnClickListener() { <END> @Override public void onClick(View view) { LoanDisbursement loanDisbursement = new LoanDisbursement(); loanDisbursement.setNote(etDisbursedAmount.getEditableText().toString()); loanDisbursement.setActualDisbursementDate(disbursement_dates); loanDisbursement.setTransactionAmount(etDisbursedAmount.getEditableText() .toString()); loanDisbursement.setPaymentId(paymentTypeId); initiateLoanDisbursement(loanDisbursement); } }); return rootView; }</code><technical_language>ButterKnife onClick annotation instead of implementing OnClickListener</technical_language>

Target:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (getActivity().getActionBar() != null) getActivity().getActionBar().setDisplayHomeAsUpEnabled(true); rootView = inflater.inflate(R.layout.dialog_fragment_disburse_loan, null); ButterKnife.bind(this, rootView); mLoanAccountDisbursementPresenter.attachView(this); safeUIBlockingUtility = new SafeUIBlockingUtility(getActivity()); inflateDisbursementDate(); inflatePaymentTypeSpinner(); disbursement_dates = tvLoanDisbursementDates.getText().toString(); disbursement_dates = DateHelper.getDateAsStringUsedForCollectionSheetPayload (disbursement_dates).replace("-", " "); return rootView; }
Source:
<code>public Double visitLiteral(Literal literal, Stats stats) { Object value = literal.value(); if (value instanceof Boolean) { <START> Boolean val = (Boolean) literal.value(); <END> return (val == null || !val) ? 0.0 : 1.0; } return super.visitLiteral(literal, stats); }</code><technical_language>minor: (Boolean) instead avoid call</technical_language>

Target:
public Double visitLiteral(Literal literal, Stats stats) { Object value = literal.value(); if (value instanceof Boolean) { Boolean val = (Boolean) value; return (val == null || !val) ? 0.0 : 1.0; } return super.visitLiteral(literal, stats); }
Source:
<code>private boolean validateStoragePropertiesUpdate() { StorageDomainValidator storageDomainValidator = getStorageDomainValidator(); if (!checkStorageDomainStatusNotEqual(StorageDomainStatus.Locked) || !validateStorageNameUpdate() || !validateDiscardAfterDeleteLegal(storageDomainValidator) || <START> !validateDiskOnBackupDomain()) { <END> return false; } List<String> props = ObjectIdentityChecker.getChangedFields(oldDomain, getStorageDomain() .getStorageStaticData()); props.remove("storageName"); props.remove("description"); props.remove("comment"); props.remove("wipeAfterDelete"); props.remove("discardAfterDelete"); props.remove("warningLowSpaceIndicator"); props.remove("criticalSpaceActionBlocker"); props.remove("backup"); if (!props.isEmpty()) { log.warn("There was an attempt to update the following fields although they are not allowed to be updated: {}", StringUtils.join(props, ",")); return failValidation(EngineMessage.ERROR_CANNOT_CHANGE_STORAGE_DOMAIN_FIELDS); } return true; }</code><technical_language>no, add a method in storageDomainValidator validates running VMs leases of running VMs storage domain, storageDomainValidator new method validate it, in backend patch</technical_language>

Target:
private boolean validateStoragePropertiesUpdate() { StorageDomainValidator storageDomainValidator = getStorageDomainValidator(); if (!checkStorageDomainStatusNotEqual(StorageDomainStatus.Locked) || !validateStorageNameUpdate() || !validateDiscardAfterDeleteLegal(storageDomainValidator) || !validateDiskOnBackupDomain(storageDomainValidator)) { return false; } List<String> props = ObjectIdentityChecker.getChangedFields(oldDomain, getStorageDomain() .getStorageStaticData()); props.remove("storageName"); props.remove("description"); props.remove("comment"); props.remove("wipeAfterDelete"); props.remove("discardAfterDelete"); props.remove("warningLowSpaceIndicator"); props.remove("criticalSpaceActionBlocker"); props.remove("backup"); if (!props.isEmpty()) { log.warn("There was an attempt to update the following fields although they are not allowed to be updated: {}", StringUtils.join(props, ",")); return failValidation(EngineMessage.ERROR_CANNOT_CHANGE_STORAGE_DOMAIN_FIELDS); } return true; }
Source:
<code>public void connect(Action1<? super Subscription> connection) { boolean shouldSubscribe = false; synchronized (guard) { if (subscription != null) { return; } else { shouldSubscribe = true; final Subject<? super T, ? extends R> subject = subjectFactory.call(); subscription = new Subscriber<T>() { @Override public void onCompleted() { subject.onCompleted(); } @Override public void onError(Throwable e) { subject.onError(e); } @Override public void onNext(T args) { subject.onNext(args); } }; for(Subscriber<? super R> s : waitingForConnect) { subject.unsafeSubscribe(s); } waitingForConnect.clear(); connectedSubject.set(subject); } } if (shouldSubscribe) { connection.call(Subscriptions.create(new Action0() { @Override public void call() { Subscription s; synchronized (guard) { s = subscription; subscription = null; connectedSubject.set(null); } if (s != null) { s.unsubscribe(); } } })); <START> if (subscription!=null) <END> source.unsafeSubscribe(subscription); } }</code><technical_language>subscription read while synchronizing guard object</technical_language>

Target:
public void connect(Action1<? super Subscription> connection) { boolean shouldSubscribe = false; synchronized (guard) { if (subscription != null) { return; } else { shouldSubscribe = true; final Subject<? super T, ? extends R> subject = subjectFactory.call(); subscription = new Subscriber<T>() { @Override public void onCompleted() { subject.onCompleted(); } @Override public void onError(Throwable e) { subject.onError(e); } @Override public void onNext(T args) { subject.onNext(args); } }; for(Subscriber<? super R> s : waitingForConnect) { subject.unsafeSubscribe(s); } waitingForConnect.clear(); connectedSubject.set(subject); } } if (shouldSubscribe) { connection.call(Subscriptions.create(new Action0() { @Override public void call() { Subscription s; synchronized (guard) { s = subscription; subscription = null; connectedSubject.set(null); } if (s != null) { s.unsubscribe(); } } })); boolean subscriptionIsNull; synchronized(guard) { subscriptionIsNull = subscription == null; } if (!subscriptionIsNull) source.unsafeSubscribe(subscription); } }
Source:
<code>Set<ObjectId> getShallowCommits() throws IOException { final File shallow = shallowFile; if (!shallow.isFile()) return Collections.emptySet(); final BufferedReader reader = new BufferedReader( new FileReader(shallow)); try { final Set<ObjectId> ids = new HashSet<ObjectId>(); String line; <START> while ((line = reader.readLine()) != null) { <END> final ObjectId id = ObjectId.fromString(line); ids.add(id); } return ids; } finally { reader.close(); } }</code><technical_language>This is a bit shorter: while ((line = reader.readLine()) != null) ids.add(ObjectId.fromString(line)); return ids;</technical_language>

Target:
Set<ObjectId> getShallowCommits() throws IOException { final File shallow = shallowFile; if (!shallow.isFile()) return Collections.emptySet(); final BufferedReader reader = new BufferedReader( new FileReader(shallow)); try { final Set<ObjectId> ids = new HashSet<ObjectId>(); String line; while ((line = reader.readLine()) != null) ids.add(ObjectId.fromString(line)); return ids; } finally { reader.close(); } }
Source:
<code>public synchronized EmailInfo clone() { EmailInfo info = new EmailInfo(); <START> info.setAttachments(new ArrayList<Attachment>()); <END> info.setEmailTemplate(emailTemplate); info.setEmailType(emailType); info.setFromAddress(fromAddress); info.setMessageBody(messageBody); info.setSendAsyncPriority(sendAsyncPriority); info.setSendEmailReliableAsync(sendEmailReliableAsync); info.setSubject(subject); info.setEncoding(encoding); return info; }</code><technical_language>create a new ArrayList copy attachments. If "client" needs alter is in attachments, logic need implement. A clone a full copy</technical_language>

Target:
public synchronized EmailInfo clone() { EmailInfo info = new EmailInfo(); info.setAttachments(new ArrayList<Attachment>(attachments)); info.setEmailTemplate(emailTemplate); info.setEmailType(emailType); info.setFromAddress(fromAddress); info.setMessageBody(messageBody); info.setSendAsyncPriority(sendAsyncPriority); info.setSendEmailReliableAsync(sendEmailReliableAsync); info.setSubject(subject); info.setEncoding(encoding); return info; }
Source:
<code>public GuestIdDTO setAttributes(Map<String, String> attributes) { <START> this.attributes = attributes; <END> return this; }</code><technical_language>Encapsulation</technical_language>

Target:
public GuestIdDTO setAttributes(Map<String, String> attributes) { if (attributes != null) { if (this.attributes == null) { this.attributes = new HashMap<String, String>(); } else { this.attributes.clear(); } this.attributes.putAll(attributes); } else { this.attributes = null; } return this; }
Source:
<code>private void writeMergedDitaval() throws DITAOTException { XMLStreamWriter export = null; try (OutputStream exportStream = new FileOutputStream(new File(job.tempDir, mergedDitavalFilename))) { export = XMLOutputFactory.newInstance().createXMLStreamWriter(exportStream, "UTF-8"); export.writeStartDocument(); export.writeStartElement("val"); export.writeNamespace(DITA_OT_NS_PREFIX, DITA_OT_NS); if (!ditavalFiles.isEmpty()) { <START> final Iterator<File> dvi = ditavalFiles.iterator(); <END> while (dvi.hasNext()) { final File curDitaVal = dvi.next(); final DocumentBuilder ditavalbuilder = XMLUtils.getDocumentBuilder(); final Document doc = ditavalbuilder.parse(curDitaVal); final Element ditavalRoot = doc.getDocumentElement(); final NodeList rootChildren = ditavalRoot.getChildNodes(); logger.debug("Writing conditions from ditaval: " + curDitaVal); writeConditions(export, rootChildren, curDitaVal.toURI().resolve(".")); } } export.writeEndElement(); export.writeEndDocument(); } catch (final IOException e) { throw new DITAOTException("Failed to merge ditaval files: " + e.getMessage(), e); } catch (final XMLStreamException e) { throw new DITAOTException("Failed to serialize merged ditaval file: " + e.getMessage(), e); } catch (final SAXException e) { throw new DITAOTException("Failed to parse ditaval file: " + e.getMessage(), e); } finally { if (export != null) { try { export.close(); } catch (final XMLStreamException e) { logger.error("Failed to close merged ditaval file: " + e.getMessage(), e); } } } }</code><technical_language>for-loop instead of while-loop iterator</technical_language>

Target:
private void writeMergedDitaval() throws DITAOTException { final DocumentBuilder ditavalbuilder = XMLUtils.getDocumentBuilder(); XMLStreamWriter export = null; try (OutputStream exportStream = new FileOutputStream(new File(job.tempDir, FILE_NAME_MERGED_DITAVAL))) { export = XMLOutputFactory.newInstance().createXMLStreamWriter(exportStream, "UTF-8"); export.writeStartDocument(); export.writeStartElement("val"); export.writeNamespace(DITA_OT_NS_PREFIX, DITA_OT_NS); for (File curDitaVal : ditavalFiles) { final Document doc = ditavalbuilder.parse(curDitaVal); final Element ditavalRoot = doc.getDocumentElement(); final NodeList rootChildren = ditavalRoot.getChildNodes(); logger.debug("Writing conditions from ditaval: " + curDitaVal); writeConditions(export, rootChildren, curDitaVal.toURI().resolve(".")); } export.writeEndElement(); export.writeEndDocument(); } catch (final IOException e) { throw new DITAOTException("Failed to merge ditaval files: " + e.getMessage(), e); } catch (final XMLStreamException e) { throw new DITAOTException("Failed to serialize merged ditaval file: " + e.getMessage(), e); } catch (final SAXException e) { throw new DITAOTException("Failed to parse ditaval file: " + e.getMessage(), e); } finally { if (export != null) { try { export.close(); } catch (final XMLStreamException e) { logger.error("Failed to close merged ditaval file: " + e.getMessage(), e); } } } }
Source:
<code>private void initPool(HostAndPort master) { synchronized(initPoolLock){ if (!master.equals(currentHostMaster)) { currentHostMaster = master; if (factory == null) { <START> factory = new JedisFactory(master.getHost(), master.getPort(), connectionTimeout, <END> soTimeout, password, database, clientName); factory = new JedisFactory(master.getHost(), master.getPort(), connectionTimeout, soTimeout, password, database, clientName, isRedisSslEnabled); initPool(poolConfig, factory); } else { factory.setHostAndPort(currentHostMaster); internalPool.clear(); } log.info("Created JedisPool to master at " + master); } } }</code><technical_language>forgot delete this row</technical_language>

Target:
private void initPool(HostAndPort master) { synchronized(initPoolLock){ if (!master.equals(currentHostMaster)) { currentHostMaster = master; if (factory == null) { factory = new JedisFactory(master.getHost(), master.getPort(), connectionTimeout, soTimeout, password, database, clientName, isRedisSslEnabled, sslSocketFactory, sslParameters, hostnameVerifier); initPool(poolConfig, factory); } else { factory.setHostAndPort(currentHostMaster); internalPool.clear(); } log.info("Created JedisPool to master at " + master); } } }
Source:
<code>private S getService(String url) { S service = services.get(url); if (service == null) { service = initService(url); services.putIfAbsent(url, service); } <START> return service; <END> }</code><technical_language>I write return services.get(url)</technical_language>

Target:
private S getService(String url) { S service = services.get(url); if (service == null) { service = initService(url); services.putIfAbsent(url, service); service = services.get(url); } return service; }
Source:
<code>public void receiveSignature(PacketLineIn pckIn) throws IOException { try { StringBuilder sig = new StringBuilder(); <START> String line = pckIn.readStringRaw(); <END> while (!line.equals("-----END PGP SIGNATURE-----")) sig.append(line); signature = sig.toString(); commandList = commandlistBuilder.toString(); } catch (EOFException eof) { throw new IOException(MessageFormat.format( JGitText.get().errorInvalidPushCert, "broken push certificate signature")); } writePushCertificate(); verifySignedPushCommands(signature); }</code><technical_language>line a trailing LF. need test for in loop condition</technical_language>

Target:
public void receiveSignature(PacketLineIn pckIn) throws IOException { try { StringBuilder sig = new StringBuilder(); String line = pckIn.readStringRaw(); while (!line.equals("-----END PGP SIGNATURE-----\n")) sig.append(line); signature = sig.toString(); commandList = commandlistBuilder.toString(); } catch (EOFException eof) { throw new IOException(MessageFormat.format( JGitText.get().errorInvalidPushCert, "broken push certificate signature")); } writePushCertificate(); verifySignedPushCommands(signature); }
Source:
<code>private void updateTree(List<ControlFlowEntry> entryList, ITmfTrace parentTrace) { List<TimeGraphEntry> rootListToAdd = new ArrayList<>(); List<TimeGraphEntry> rootListToRemove = new ArrayList<>(); List<TimeGraphEntry> rootList = getEntryList(parentTrace); for (ControlFlowEntry entry : entryList) { boolean root = (entry.getParent() == null); if (root && entry.getParentThreadId() > 0) { for (ControlFlowEntry parent : entryList) { if (parent.getThreadId() == entry.getParentThreadId() && !((entry.getStartTime() >= parent.getEndTime()) && <START> entry.getEndTime() <= parent.getStartTime())) { <END> parent.addChild(entry); root = false; if (rootList != null && rootList.contains(entry)) { rootListToRemove.add(entry); } break; } } } if (root && (rootList == null || !rootList.contains(entry))) { rootListToAdd.add(entry); } } addToEntryList(parentTrace, rootListToAdd); removeFromEntryList(parentTrace, rootListToRemove); }</code><technical_language>I brackets wrong. if (p.tid == e.ptid && !(e.start >= p.end) && !(e.end <= p.start)) ? if (p.tid == e.ptid && !(e.start >= p.end || e.end <= p.start) ? I suggest if (p.tid == e.ptid && e.start < p.end && e.end > p.start) . <= >=</technical_language>

Target:
private void updateTree(List<ControlFlowEntry> entryList, ITmfTrace parentTrace) { List<TimeGraphEntry> rootListToAdd = new ArrayList<>(); List<TimeGraphEntry> rootListToRemove = new ArrayList<>(); List<TimeGraphEntry> rootList = getEntryList(parentTrace); for (ControlFlowEntry entry : entryList) { boolean root = (entry.getParent() == null); if (root && entry.getParentThreadId() > 0) { for (ControlFlowEntry parent : entryList) { if (parent.getThreadId() == entry.getParentThreadId() && !(entry.getStartTime() > parent.getEndTime() || entry.getEndTime() < parent.getStartTime())) { parent.addChild(entry); root = false; if (rootList != null && rootList.contains(entry)) { rootListToRemove.add(entry); } break; } } } if (root && (rootList == null || !rootList.contains(entry))) { rootListToAdd.add(entry); } } addToEntryList(parentTrace, rootListToAdd); removeFromEntryList(parentTrace, rootListToRemove); }
Source:
<code>public void emitTuples() { if (flag) { super.emitTuples(); } else { try { <START> Thread.sleep(spinMillis); <END> } catch (InterruptedException e) { throw Throwables.propagate(e); } } }</code><technical_language>this? engine handle is emitted</technical_language>

Target:
public void emitTuples() { if (flag) { super.emitTuples(); } }
Source:
<code>private Limiter<Void> newLimiter() { Limiter<Void> limiter = new InstrumentedLimiter(SimpleLimiter.newBuilder() .limit(new RemotingWindowedLimit(VegasLimit.newDefault())) .build(), slowAcquire); <START> return RemotingBlockingLimiter.wrap(limiter, timeout); <END> }</code><technical_language>call this ConjureBlockingLimiter</technical_language>

Target:
private Limiter<Void> newLimiter() { Limiter<Void> limiter = new InstrumentedLimiter(SimpleLimiter.newBuilder() .limit(new ConjureWindowedLimit(VegasLimit.newDefault())) .build(), slowAcquire); return ConjureBlockingLimiter.wrap(limiter, timeout); }
Source:
<code>public List<Block> execute(ContentMacroParameters parameters, String content, MacroTransformationContext context) throws MacroExecutionException { try { List<Block> blocks = getSyntaxParser(parameters.getSyntax()).parse(new StringReader(content)).getChildren(); if (blocks.size() == 1) { <START> blocks.get(0).setParameter(MetaData.SYNTAX, parameters.getSyntax().toIdString()); <END> return blocks; } else { MetaDataBlock metaDataBlock = new MetaDataBlock(blocks, MetaData.SYNTAX, parameters.getSyntax().toIdString()); return Collections.singletonList(metaDataBlock); } } catch (ParseException e) { throw new MacroExecutionException( String.format("Failed to parse macro content in syntax [%s]", parameters.getSyntax()), e); } }</code><technical_language>mixing things. Block parameters do MetaData, check if Block is a MetaDataBlock</technical_language>

Target:
public List<Block> execute(ContentMacroParameters parameters, String content, MacroTransformationContext context) throws MacroExecutionException { try { List<Block> blocks = getSyntaxParser(parameters.getSyntax()).parse(new StringReader(content)).getChildren(); MetaDataBlock metaDataBlock = new MetaDataBlock(blocks, MetaData.SYNTAX, parameters.getSyntax().toIdString()); return Collections.singletonList(metaDataBlock); } catch (ParseException e) { throw new MacroExecutionException( String.format("Failed to parse macro content in syntax [%s]", parameters.getSyntax()), e); } }
Source:
<code>public void changePassword(User u, String pw) throws APIException { <START> changePassword(u, "test", pw); <END> }</code><technical_language>Is this stray? do set test</technical_language>

Target:
public void changePassword(User u, String pw) throws APIException { OpenmrsUtil.validatePassword(u.getUsername(), pw, u.getSystemId()); dao.changePassword(u, pw); }
Source:
<code>private void validateTree() { try { String[] uniqueNames = preferences.node("/os").childrenNames(); for (String uniqueName : Arrays.asList(uniqueNames)) { Preferences node = getKeyNode(uniqueName, "derivedFrom", null); String id = getKeyNode(uniqueName, "id", null).get("value", "0"); if (node != null) { String derivedFrom = node.get("value", null); if (derivedFrom != null && !idToUnameLookup.containsValue(derivedFrom)) { idToUnameLookup.remove(Integer.valueOf(id)); preferences.node("/os/" + uniqueName).removeNode(); log.warn("Illegal parent for os '{}'", uniqueName); } } } } catch (BackingStoreException e) { log.warn("Failed to validate Os Repository due to {}", e); <START> log.debug("Exception", e); <END> throw new RuntimeException("Failed to validate Os Repository due to " + e); } }</code><technical_language>need print exception in translated, change e.getMessage() drop debug</technical_language>

Target:
private void validateTree() { try { String[] uniqueNames = preferences.node("/os").childrenNames(); for (String uniqueName : Arrays.asList(uniqueNames)) { Preferences node = getKeyNode(uniqueName, "derivedFrom", null); String id = getKeyNode(uniqueName, "id", null).get("value", "0"); if (node != null) { String derivedFrom = node.get("value", null); if (derivedFrom != null && !idToUnameLookup.containsValue(derivedFrom)) { idToUnameLookup.remove(Integer.valueOf(id)); preferences.node("/os/" + uniqueName).removeNode(); log.warn("Illegal parent for os '{}'", uniqueName); } } } } catch (BackingStoreException e) { log.warn("Failed to validate Os Repository due to {}", e.getMessage()); log.debug("Exception", e); throw new RuntimeException("Failed to validate Os Repository due to " + e); } }
Source:
<code>private BasicDBObject getUserInfo(final DBObject cursor, final boolean loginAsDefault, final boolean loginAsInstructor) throws LoginException { final BasicDBObject result = new BasicDBObject(); final boolean defaultAccountIsInstructor = (Boolean) cursor.get(IS_DEFAULT_INSTRUCTOR); result.append(DatabaseClient.IS_INSTRUCTOR, <START> (loginAsDefault && defaultAccountIsInstructor) || (!loginAsDefault && loginAsInstructor)); <END> if ((loginAsDefault && defaultAccountIsInstructor) || (!loginAsDefault && loginAsInstructor)) { result.append(DatabaseClient.CLIENT_ID, cursor.get(INSTRUCTOR_CLIENT_ID)); result.append(DatabaseClient.SERVER_ID, cursor.get(INSTRUCTOR_ID)); } else if ((loginAsDefault && !defaultAccountIsInstructor) || (!loginAsDefault && !loginAsInstructor)) { result.append(DatabaseClient.CLIENT_ID, cursor.get(STUDENT_CLIENT_ID)); result.append(DatabaseClient.SERVER_ID, cursor.get(STUDENT_ID)); } else { throw new LoginException(LoginServerWebSocketHandler.PERMISSION_ERROR_MESSAGE); } return result; }</code><technical_language>This a bit more readable if is put variable. this (which is line below) for else if statement. named isInstructor, isStudent</technical_language>

Target:
private BasicDBObject getUserInfo(final DBObject cursor, final boolean loginAsDefault, final boolean loginAsInstructor) throws LoginException { final BasicDBObject result = new BasicDBObject(); final boolean defaultAccountIsInstructor = (Boolean) cursor.get(IS_DEFAULT_INSTRUCTOR); final boolean isDefaultInstructor = loginAsDefault && defaultAccountIsInstructor; final boolean isNonDefaultInstructor = !loginAsDefault && loginAsInstructor; final boolean isDefaultStudent = loginAsDefault && !defaultAccountIsInstructor; final boolean isNonDefaultStudent = !loginAsDefault && !loginAsInstructor; result.append(DatabaseClient.IS_INSTRUCTOR, isDefaultInstructor || isNonDefaultInstructor); if (isDefaultInstructor || isNonDefaultInstructor) { result.append(DatabaseClient.CLIENT_ID, cursor.get(INSTRUCTOR_CLIENT_ID)); result.append(DatabaseClient.SERVER_ID, cursor.get(INSTRUCTOR_ID)); } else if (isDefaultStudent || isNonDefaultStudent) { result.append(DatabaseClient.CLIENT_ID, cursor.get(STUDENT_CLIENT_ID)); result.append(DatabaseClient.SERVER_ID, cursor.get(STUDENT_ID)); } else { throw new LoginException(LoginServerWebSocketHandler.PERMISSION_ERROR_MESSAGE); } return result; }
Source:
<code>public Map<String, String> getErrors() { <START> return response.getErrors(); <END> }</code><technical_language>this need iterate rows build Map</technical_language>

Target:
public Map<String, String> getErrors() { Map<String, String> errors = new HashMap<String, String>(); for (ViewResponse.Row<String, Revision> row : response.getRows()) { if(row.getError() != null) { errors.put(row.getKey(), row.getError()); } } return errors; }
Source:
<code><START> public void testNestedCast() <END> { assertQuery("select cast(varchar_value as varchar(3)) || ' sfd' from (values ('9898.122')) t(varchar_value)"); assertQuery("select cast(cast(varchar_value as varchar(3)) as varchar(5)) from (values ('9898.122')) t(varchar_value)"); }</code><technical_language>easier read if expected values provided</technical_language>

Target:
public void testNestedCast() { assertQuery("select cast(varchar_value as varchar(3)) || ' sfd' from (values ('9898.122')) t(varchar_value)", "VALUES '989 sfd'"); assertQuery("select cast(cast(varchar_value as varchar(3)) as varchar(5)) from (values ('9898.122')) t(varchar_value)", "VALUES '989'"); }
Source:
<code>private List<Rule> getRules(Term term) { List<Rule> rules = new ArrayList<>(); if (K.get_indexing_stats){ IndexingStatistics.getRulesForTermStopWatch.reset(); IndexingStatistics.getRulesForTermStopWatch.start(); } <START> if (K.do_indexing) { <END> rules.addAll(pathIndex.getRulesForTerm(term)); } else { rules.addAll(basicIndex.getRules(term)); } if (K.get_indexing_stats){ IndexingStatistics.rulesSelectedAtEachStep.add(rules.size()); long elapsed = IndexingStatistics.getRulesForTermStopWatch.stop().elapsed(TimeUnit.MICROSECONDS); IndexingStatistics.timesForRuleSelection.add(elapsed); } return rules; }</code><technical_language>Yeah, this this. need interface defining common core of means index, indexes implement this interface. command line flag set class instantiates interface run time, that, code depends command line flag</technical_language>

Target:
private List<Rule> getRules(Term term) { List<Rule> rules = new ArrayList<>(); if (K.get_indexing_stats){ IndexingStatistics.getRulesForTermStopWatch.reset(); IndexingStatistics.getRulesForTermStopWatch.start(); } rules.addAll(ruleIndex.getRules(term)); if (K.get_indexing_stats){ IndexingStatistics.rulesSelectedAtEachStep.add(rules.size()); long elapsed = IndexingStatistics.getRulesForTermStopWatch.stop().elapsed(TimeUnit.MICROSECONDS); IndexingStatistics.timesForRuleSelection.add(elapsed); } return rules; }
Source:
<code>public void applicationStarted(ComponentContext context) { boolean started = TransactionHelper.isTransactionActive(); if (started || TransactionHelper.startTransaction()) { boolean completedAbruptly = true; try { doApplicationStarted(); completedAbruptly = false; } finally { if (completedAbruptly) { TransactionHelper.setTransactionRollbackOnly(); } if (started) { TransactionHelper.commitOrRollbackTransaction(); <START> } <END> } } else { doApplicationStarted(); } }</code><technical_language>if TransactionHelper.isTransactionActive() == false? started false called TransactionHelper.startTransaction(). miss a final TransactionHelper.commitOrRollbackTransaction() in case</technical_language>

Target:
public void applicationStarted(ComponentContext context) { boolean txWasStartedOutsideComponent = TransactionHelper.isTransactionActiveOrMarkedRollback(); if (txWasStartedOutsideComponent || TransactionHelper.startTransaction()) { boolean completedAbruptly = true; try { doApplicationStarted(); completedAbruptly = false; } finally { if (completedAbruptly) { TransactionHelper.setTransactionRollbackOnly(); } if (!txWasStartedOutsideComponent) { TransactionHelper.commitOrRollbackTransaction(); } } } else { doApplicationStarted(); } }
Source:
<code>public void cleanupLiveInstanceOwners() { String name = this.getShortClassName(); for (String cluster : _liveInstanceOwners.keySet()) { Map<String, HelixZkClient> clientMap = _liveInstanceOwners.get(cluster); for (HelixZkClient client : clientMap.values()) { client.close(); } clientMap.clear(); } _liveInstanceOwners.clear(); boolean status = TestHelper.afterClassCheck(name); if (!status) { <START> System.out.println("---------- Test Class " + name + " thread leakage detected! ---------------"); <END> } }</code><technical_language>fail test? is applied ZkTestBase? other test classes based this one</technical_language>

Target:
public void cleanupLiveInstanceOwners() throws InterruptedException { String testClassName = this.getShortClassName(); System.out.println("AfterClass: " + testClassName + " called."); for (String cluster : _liveInstanceOwners.keySet()) { Map<String, HelixZkClient> clientMap = _liveInstanceOwners.get(cluster); for (HelixZkClient client : clientMap.values()) { client.close(); } clientMap.clear(); } _liveInstanceOwners.clear(); boolean status = false; try { status = ThreadLeakageChecker.afterClassCheck(testClassName); } catch (Exception e) { LOG.error("ThreadLeakageChecker exception:", e); } if (!status) { System.out.println("---------- Test Class " + testClassName + " thread leakage detected! ---------------"); } }
Source:
<code>private void refreshAlias(String alias) { try { updateAlias(alias, this.spawnDataStore.getChild(ALIAS_PATH, alias)); } catch (ExecutionException e) { <START> log.warn("Failed to refresh alias: {}", alias, e); <END> } catch (Exception e) { log.error("",e); } }</code><technical_language>this error</technical_language>

Target:
private void refreshAlias(String alias) { try { updateAlias(alias, this.spawnDataStore.getChild(ALIAS_PATH, alias)); } catch (ExecutionException e) { log.error("Failed to refresh alias: {}", alias, e); } catch (Exception e) { log.error("Unexpected error while refreshing alias {}", alias, e); } }
Source:
<code>public void testVcfSorted(final boolean disableSort) { final File liftOutputFile = new File(OUTPUT_DATA_PATH, "lift-delete-me.vcf"); final File rejectOutputFile = new File(OUTPUT_DATA_PATH, "reject-delete-me.vcf"); final File input = new File(TEST_DATA_PATH, "testLiftoverBiallelicIndels.vcf"); liftOutputFile.deleteOnExit(); rejectOutputFile.deleteOnExit(); final String[] args = new String[]{ "INPUT=" + input.getAbsolutePath(), "OUTPUT=" + liftOutputFile.getAbsolutePath(), "REJECT=" + rejectOutputFile.getAbsolutePath(), "CHAIN=" + CHAIN_FILE, "REFERENCE_SEQUENCE=" + REFERENCE_FILE, <START> "CREATE_INDEX=" + (!disableSort), <END> "DISABLE_SORT=" + disableSort }; Assert.assertEquals(runPicardCommandLine(args), 0); try (final VCFFileReader liftReader = new VCFFileReader(liftOutputFile, !disableSort)) { } }</code><technical_language>CREATE_INDEX implicit? do need state it? if so, expand provider state indexing sorting status</technical_language>

Target:
public void testVcfSorted(final boolean disableSort) { final File liftOutputFile = new File(OUTPUT_DATA_PATH, "lift-delete-me.vcf"); final File rejectOutputFile = new File(OUTPUT_DATA_PATH, "reject-delete-me.vcf"); final File input = new File(TEST_DATA_PATH, "testLiftoverBiallelicIndels.vcf"); liftOutputFile.deleteOnExit(); rejectOutputFile.deleteOnExit(); final String[] args = new String[]{ "INPUT=" + input.getAbsolutePath(), "OUTPUT=" + liftOutputFile.getAbsolutePath(), "REJECT=" + rejectOutputFile.getAbsolutePath(), "CHAIN=" + CHAIN_FILE, "REFERENCE_SEQUENCE=" + REFERENCE_FILE, "CREATE_INDEX=" + (!disableSort), "DISABLE_SORT=" + disableSort }; Assert.assertEquals(runPicardCommandLine(args), 0); try (final VCFFileReader liftReader = new VCFFileReader(liftOutputFile, !disableSort)) { try (final CloseableIterator<VariantContext> iter = liftReader.iterator()) { Assert.assertEquals(iter.stream().count(), 5L); } } }
Source:
<code>private void processLevels(Properties properties) { for (Map.Entry<Object, Object> entry : properties.entrySet()) { String loggerName = entry.getKey().toString(); Level level = Level.parse(entry.getValue().toString()); <START> java.util.logging.Logger.getLogger(loggerName).setLevel(level.toJulLevel()); <END> } }</code><technical_language>Call setLevel()</technical_language>

Target:
private void processLevels(Properties properties) { for (Map.Entry<Object, Object> entry : properties.entrySet()) { String loggerName = entry.getKey().toString(); Level level = Level.valueOf(entry.getValue().toString().toUpperCase(Locale.US)); setLevel(loggerName, level); } }
Source:
<code>public Builder trustStore(File file) { if (file == null) { <START> return this; <END> } if (!file.exists()) { throw new IllegalArgumentException("Truststore file does not exist: " + file); } this.trustStoreSource = Files.asByteSource(file); return this; }</code><technical_language>above, this error</technical_language>

Target:
public Builder trustStore(File file) { if (file == null || !file.exists()) { throw new IllegalArgumentException("A file with the truststore must be provided."); } this.trustStoreSource = Files.asByteSource(file); return this; }
Source:
<code>protected EntityRecordWithColumns toRecord(E entity) { <START> final EntityRecord entityRecord = entityConverter().convert(entity); <END> final Map<String, Column.MemoizedValue<?>> storageFields = Columns.from(entity); final EntityRecordWithColumns envelope = EntityRecordWithColumns.of(entityRecord, storageFields); return envelope; }</code><technical_language>entityRecord null. Detected IDEA, please pay attention</technical_language>

Target:
protected EntityRecordWithColumns toRecord(E entity) { final EntityRecord entityRecord = entityConverter().convert(entity); checkNotNull(entityRecord); final EntityRecordWithColumns recordWithColumns = EntityRecordWithColumns.create(entityRecord, entity); return recordWithColumns; }
Source:
<code>public static void main(final String[] args) { <START> System.exit(new MarkDuplicatesWithMateCigar().instanceMain(args)); <END> }</code><technical_language>I instanceMainWithExit Oops, in picard-public - in htsjdk</technical_language>

Target:
public static void main(final String[] args) { new MarkDuplicatesWithMateCigar().instanceMainWithExit(args); }
Source:
<code>public Set<String> getTags(WebrequestData webrequest){ Set<String> tags = new HashSet<>(); assert webrequest.getUriHost()!=null: webrequest; assert webrequest.getHttpStatus() != null: webrequest; assert webrequest.getUserAgent() != null: webrequest; if(Webrequest.SUCCESS_HTTP_STATUSES.contains(webrequest.getHttpStatus()) ) { for (Tagger t : this.chain) { Set<String> newTags = t.getTags(webrequest, <START> tags); <END> tags.addAll(newTags); } } return tags; }</code><technical_language>great computed tags in next tagger, for optimization, totally for it. do ensure order of execution of taggers, assume confidently a prior tag computed? I googled a bit this: <LINK_0> classes, assume if reflection fields methods returned in order, classes order well. sort tagger list iterating it? If so, order do choose? Alphabetical (I ugly)? If not, sense pass this parameter? sense reflection? taggers "hardcodedly" referenced in this class</technical_language>

Target:
public Set<String> getTags(WebrequestData webrequest){ Set<String> tags = new HashSet<>(); assert webrequest.getUriHost()!=null: webrequest; assert webrequest.getHttpStatus() != null: webrequest; assert webrequest.getUserAgent() != null: webrequest; if(Webrequest.SUCCESS_HTTP_STATUSES.contains(webrequest.getHttpStatus()) ) { List<Integer> stages = new ArrayList(this.chain.keySet()); Collections.sort(stages); for (Integer stage : stages) { List<Tagger> stageChain = this.chain.get(stage); for (Tagger t : stageChain) { Set<String> newTags = t.getTags(webrequest, tags); tags.addAll(newTags); } } } return tags; }
Source:
<code>public void retireIdentifierSource_shouldRetireAnIdentifierSourceFromTheSystem() throws Exception { <START> IdentifierSource s = iss.getIdentifierSource(1); <END> Assert.assertFalse(iss.getIdentifierSource(1).isRetired()); iss.retireIdentifierSource(s, "testing"); Assert.assertTrue(iss.getIdentifierSource(1).isRetired()); }</code><technical_language>variable name is good. rename identifierSource</technical_language>

Target:
public void retireIdentifierSource_shouldRetireAnIdentifierSourceFromTheSystem() throws Exception { IdentifierSource identifierSource = identifierSourceService.getIdentifierSource(2); Assert.assertFalse(identifierSourceService.getIdentifierSource(2).isRetired()); identifierSourceService.retireIdentifierSource(identifierSource, "testing"); Assert.assertTrue(identifierSourceService.getIdentifierSource(2).isRetired()); }
Source:
<code>public final void literal(final String name, final String value) { final String value_new = Normalizer.normalize(value, Form.NFD); if (idnControlSubField == true){ <START> if (compareIdFromRecord(value)) idnControlSubField = false; <END> } builder.append(SUB_DELIMITER); builder.append(name); builder.append(value_new); }</code><technical_language>idnControlSubField is set false in compareIdFromRecord. need do again. Also, I think, compareIdFromRecord-method is simple is necessary. simple place check directly</technical_language>

Target:
public void literal(final String name, final String value) { if (name.length()!=1){ throw new FormatException(name); } if (!entityOpen){ throw new FormatException(name); } final String valueNew = Normalizer.normalize(value, Form.NFD); if (idnControlSubField){ if (!this.id.equals(value)) { throw new MissingIdException(value); } idnControlSubField = false; } builder.append(SUB_DELIMITER); builder.append(name); builder.append(valueNew); }
Source:
<code>public static String formatSince(String value, TimeZone timezone) { try { Date date = parse(value); DateFormat formatter = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.FULL); if(timezone != null) { formatter.setTimeZone(timezone); } return formatter.format(date); } catch (ParseException e) { <START> System.out.println(e); <END> } return value; }</code><technical_language>yuck</technical_language>

Target:
public static String formatSince(String value, TimeZone timezone) { try { Date date = parse(value); DateFormat formatter = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.FULL); if(timezone != null) { formatter.setTimeZone(timezone); } return formatter.format(date); } catch (ParseException e) { OpenShiftCommonUIActivator.getDefault().getLogger().logWarning("Unable to parse format duration value: " + value, e); } return value; }
Source:
<code>public void shouldGenerateCorrectUpdateSQL(){ Student s = new Student(); s.set("first_name", "Jim"); s.set("last_name", "Cary"); s.set("dob", new java.sql.Date(getDate(1965, 12, 1).getTime())); s.set("id", 1); String updateSQL = s.toUpdate(); System.out.println(updateSQL); <START> the(updateSQL).shouldBeEqual("UPDATE students SET dob = DATE '1965-12-01', first_name = 'Jim', id = 1, last_name = 'Cary' WHERE id = 1"); <END> }</code><technical_language>test for String content (that change for other DBMSs), instead call Base.exec(updateSQL) check if updated correctly, this: 1. Do deleteAndPopulateTable("students"); 2. Do Student s = Student.findById(1); change some of s attributes' values (including "dob" "enrollment_date"). 3. Do Base.exec(updateSQL); 4. Do s = Student.findById(1); check if changed values. Check ModelTest::shouldGenerateValidInsertSQL() test do for update above</technical_language>

Target:
public void shouldGenerateCorrectUpdateSQL() { deleteAndPopulateTable("students"); Student s = new Student(); s.set("first_name", "Jim"); s.set("last_name", "Cary"); s.set("dob", new java.sql.Date(getDate(1965, 12, 1).getTime())); s.set("id", 1); s.saveIt(); s = Student.findById(1); s.set("first_name", "Drew"); s.saveIt(); String updateSQL = s.toUpdate(); Base.exec(updateSQL); s = Student.findById(1); the(s.get("first_name")).shouldBeEqual("Drew"); System.out.println(updateSQL); }
Source:
<code>public void configure() throws Exception { server.addEventListener(mbeans()); server.addConnector(plainConnector()); server.addConnector(sslConnector()); HandlerCollection handlers = new HandlerCollection(); handlers.addHandler(welcomeFileHandler()); createWebAppContext(); addResourceHandler(handlers, webAppContext); handlers.addHandler(webAppContext); JettyCustomErrorPageHandler errorHandler = new JettyCustomErrorPageHandler(); webAppContext.setErrorHandler(errorHandler); server.addBean(errorHandler); server.setHandler(handlers); performCustomConfiguration(); server.setStopAtShutdown(true); <START> SessionManager sessionManager = webAppContext.getSessionHandler().getSessionManager(); <END> sessionManager.setMaxInactiveInterval(systemEnvironment.sessionTimeoutInSeconds()); }</code><technical_language>This is inconsistent setCookieExpirePeriod is setup, consistent, good merge</technical_language>

Target:
public void configure() throws Exception { server.addEventListener(mbeans()); server.addConnector(plainConnector()); server.addConnector(sslConnector()); HandlerCollection handlers = new HandlerCollection(); handlers.addHandler(welcomeFileHandler()); createWebAppContext(); addResourceHandler(handlers, webAppContext); handlers.addHandler(webAppContext); JettyCustomErrorPageHandler errorHandler = new JettyCustomErrorPageHandler(); webAppContext.setErrorHandler(errorHandler); server.addBean(errorHandler); server.setHandler(handlers); performCustomConfiguration(); server.setStopAtShutdown(true); }
Source:
<code>public static Module module() { return new CacheModule() { @Override protected void configure() { cache(ID_CACHE, Project.NameKey.class, new TypeLiteral<List<Change>>() {}) .maximumWeight(1024) <START> .expireAfterWrite(120, TimeUnit.MINUTES) <END> .loader(Loader.class); } }; }</code><technical_language>2, TimeUnit.HOURS more readable. if this tied a listener, sense expire default? of other caches expire days rely invalidation messages</technical_language>

Target:
public static Module module() { return new CacheModule() { @Override protected void configure() { cache(ID_CACHE, Project.NameKey.class, new TypeLiteral<List<Change>>() {}) .maximumWeight(1024) .loader(Loader.class); } }; }
Source:
<code>public void shouldReturn400IfNoApiKeyParam() { <START> Response response = envTarget("verify") <END> .request() .get(); assertEquals(HttpStatusCode.BAD_REQUEST_400, response.getStatus()); }</code><technical_language>_verify</technical_language>

Target:
public void shouldReturn400IfNoApiKeyParam() { Response response = envTarget("_verify") .request() .post(null); assertEquals(HttpStatusCode.BAD_REQUEST_400, response.getStatus()); }
Source:
<code>public String serializeSlots(Iterable<Slot> slots, String delimiter) { List<String> slotStrings = new ArrayList<>(); for (Slot slot : slots) { <START> String constraintString = delimiter + slot.serialize(this); <END> slotStrings.add(constraintString); } Collections.sort(slotStrings); StringBuilder sb = new StringBuilder(); for (String string : slotStrings) { sb.append(string); } return sb.toString(); }</code><technical_language>problem is slots sorted newlines prepended some of slots. correct fix is add newlines slots sorted. (In next for loop.) slot prepended a new line. Also, serializeConstraints method problem. correct well</technical_language>

Target:
public String serializeSlots(Iterable<Slot> slots, String delimiter) { List<String> slotStrings = new ArrayList<>(); for (Slot slot : slots) { slotStrings.add(slot.serialize(this).toString()); } Collections.sort(slotStrings); StringBuilder sb = new StringBuilder(); boolean first = true; for (String string : slotStrings) { String slotString = first ? "" : delimiter; slotString += string; sb.append(slotString); first = false; } return sb.toString(); }
Source:
<code>private void parseLevelDBCacheStore(XMLExtendedStreamReader reader, LevelDBCacheStoreConfigurationBuilder builder) throws XMLStreamException { for (int i = 0; i < reader.getAttributeCount(); i++) { ParseUtils.requireNoNamespaceAttribute(reader, i); String value = StringPropertyReplacer.replaceProperties(reader .getAttributeValue(i)); Attribute attribute = Attribute.forName(reader .getAttributeLocalName(i)); switch (attribute) { case LOCATION: { builder.location(value); break; } case EXPIRED_LOCATION: { builder.expiredLocation(value); break; } case CLEAR_THRESHOLD: { builder.clearThreshold(Integer.valueOf(value)); break; } case EXPIRY_QUEUE_SIZE: { builder.expiryQueueSize(Integer.valueOf(value)); } case BLOCK_SIZE: { builder.blockSize(Integer.valueOf(value)); break; } case CACHE_SIZE: { builder.cacheSize(Long.valueOf(value)); break; } case COMPRESSION_TYPE: { builder.compressionType(CompressionType.valueOf(value)); break; } default: { Parser52.parseCommonStoreAttributes(reader, i, builder); } <START> } <END> } }</code><technical_language>I miss check for next element END_ELEMENT. Then, reader is advanced properly results in skipping named caches configuration</technical_language>

Target:
private void parseLevelDBCacheStore(XMLExtendedStreamReader reader, LevelDBCacheStoreConfigurationBuilder builder) throws XMLStreamException { for (int i = 0; i < reader.getAttributeCount(); i++) { ParseUtils.requireNoNamespaceAttribute(reader, i); String value = StringPropertyReplacer.replaceProperties(reader .getAttributeValue(i)); Attribute attribute = Attribute.forName(reader .getAttributeLocalName(i)); switch (attribute) { case LOCATION: { builder.location(value); break; } case EXPIRED_LOCATION: { builder.expiredLocation(value); break; } case CLEAR_THRESHOLD: { builder.clearThreshold(Integer.valueOf(value)); break; } case EXPIRY_QUEUE_SIZE: { builder.expiryQueueSize(Integer.valueOf(value)); } case BLOCK_SIZE: { builder.blockSize(Integer.valueOf(value)); break; } case CACHE_SIZE: { builder.cacheSize(Long.valueOf(value)); break; } case COMPRESSION_TYPE: { builder.compressionType(CompressionType.valueOf(value)); break; } default: { Parser53.parseCommonStoreAttributes(reader, i, builder); } } } if (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT)) { ParseUtils.unexpectedElement(reader); } }
Source:
<code>public Map<String, InstanceState> getInstanceState(GoogleComputeInstanceTemplate template, Collection<String> instanceIds) { Map<String, InstanceState> result = new HashMap<String, InstanceState>(); for (String currentId : instanceIds) { Compute compute = credentials.getCompute(); String projectId = credentials.getProjectId(); String zone = getConfigurationValue(GoogleComputeProviderConfigurationProperty.ZONE); String decoratedInstanceName = decorateInstanceName(template, currentId); try { Instance instance = compute.instances().get(projectId, zone, decoratedInstanceName).execute(); InstanceStatus instanceStatus = convertGCEInstanceStatusToDirectorInstanceStatus(instance.getStatus()); result.put(currentId, new SimpleInstanceState(instanceStatus)); <START> } catch (GoogleJsonResponseException e) { <END> if (e.getStatusCode() == 404) { LOG.info("Instance '" + decoratedInstanceName + "' not found."); result.put(currentId, new SimpleInstanceState(InstanceStatus.UNKNOWN)); } else { e.printStackTrace(); } } catch (IOException e) { e.printStackTrace(); } } return result; }</code><technical_language>propagate is reasonable handle exception</technical_language>

Target:
public Map<String, InstanceState> getInstanceState(GoogleComputeInstanceTemplate template, Collection<String> instanceIds) { Map<String, InstanceState> result = new HashMap<String, InstanceState>(); for (String currentId : instanceIds) { Compute compute = credentials.getCompute(); String projectId = credentials.getProjectId(); String zone = getConfigurationValue(GoogleComputeInstanceTemplateConfigurationProperty.ZONE); String decoratedInstanceName = decorateInstanceName(template, currentId); try { Instance instance = compute.instances().get(projectId, zone, decoratedInstanceName).execute(); InstanceStatus instanceStatus = convertGCEInstanceStatusToDirectorInstanceStatus(instance.getStatus()); result.put(currentId, new SimpleInstanceState(instanceStatus)); } catch (GoogleJsonResponseException e) { if (e.getStatusCode() == 404) { LOG.info("Instance '" + decoratedInstanceName + "' not found."); result.put(currentId, new SimpleInstanceState(InstanceStatus.UNKNOWN)); } else { throw new RuntimeException(e); } } catch (IOException e) { throw new RuntimeException(e); } } return result; }