auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public String bulkDrop(@Sender EntityRef sender, @CommandParam("blockName") String blockName, @CommandParam("value") int value) { ClientComponent clientComponent = sender.getComponent(ClientComponent.class); LocationComponent characterLocation = clientComponent.character.getComponent(LocationComponent.class); Vector3f spawnPos = characterLocation.getWorldPosition(); Vector3f offset = characterLocation.getWorldDirection(); offset.scale(3); spawnPos.add(5,10,0); BlockFamily block = blockManager.getBlockFamily(blockName); if (block == null) { return "Sorry, your block is not found"; } BlockItemFactory blockItemFactory = new BlockItemFactory(entityManager); if(value > 5000) { return "sorry the value you have entered exceeds the limit of 5000"; } for (int i = 0; i <= value; i++) { EntityRef blockItem = blockItemFactory.newInstance(block); blockItem.send(new DropItemEvent(spawnPos)); } return "Dropped " + value + " " + blockName + " Blocks :)"; }

Target:
public String bulkDrop(@Sender EntityRef sender, @CommandParam("blockName") String blockName, @CommandParam("value") int value) { ClientComponent clientComponent = sender.getComponent(ClientComponent.class); LocationComponent characterLocation = clientComponent.character.getComponent(LocationComponent.class); Vector3f spawnPos = characterLocation.getWorldPosition(); Vector3f offset = characterLocation.getWorldDirection(); offset.scale(3); spawnPos.add(5, 10, 0); BlockFamily block = blockManager.getBlockFamily(blockName); if (block == null) { return "Sorry, your block is not found"; } BlockItemFactory blockItemFactory = new BlockItemFactory(entityManager); if (value > 5000) { return "Value exceeds the maximum limit of 5000 blocks. your value: " + value + " blocks"; } for (int i = 0; i < value; i++) { EntityRef blockItem = blockItemFactory.newInstance(block); blockItem.send(new DropItemEvent(spawnPos)); } return "Dropped " + value + " " + blockName + " Blocks :)"; }
Source:
protected void executeQueryCommand() { String suggestedDiskName = null; if (getParameters().getVmId() == null) { getQueryReturnValue().setReturnValue(suggestedDiskName); } else { VM vm = getDbFacade().getVmDAO().get(getParameters().getVmId()); if (vm != null) { VmHandler.updateDisksFromDb(vm); suggestedDiskName = ImagesHandler.getDefaultDiskAlias(vm.getvm_name(), Integer.toString(vm.getDiskMapCount())); } getQueryReturnValue().setReturnValue(suggestedDiskName); } }

Target:
protected void executeQueryCommand() { String suggestedDiskName = null; if (getParameters().getVmId() == null) { getQueryReturnValue().setReturnValue(suggestedDiskName); } else { VM vm = getDbFacade().getVmDAO().get(getParameters().getVmId()); if (vm != null) { VmHandler.updateDisksFromDb(vm); suggestedDiskName = ImagesHandler.getDefaultDiskAlias(vm.getvm_name(), Integer.toString(vm.getDiskMapCount() + 1)); } getQueryReturnValue().setReturnValue(suggestedDiskName); } }
Source:
public String toString() { if (this.cluster == null || this.path == null) { return ""; } return this.cluster + HdfsConstants.SEP + this.path; }

Target:
public String toString() { if (StringUtils.isBlank(this.cluster) || StringUtils.isBlank(this.path)) { return ""; } return this.cluster + HdfsConstants.SEP + this.path; }
Source:
public Response exit(final Response res, final Identity idt) throws IOException { final String text; if (idt.equals(Identity.ANONYMOUS)) { text = ""; } else { text = new String(this.codec.encode(idt)); } final long millis = System.currentTimeMillis(); return new RsWithCookie( res, this.cookie, text, "Path=/", "HttpOnly", String.format( Locale.ENGLISH, "Expires=%1$ta, %1$td %1$tb %1$tY %1$tT GMT", new Date( millis + TimeUnit.DAYS.toMillis(this.age) - TimeZone.getDefault().getOffset(millis) ) ) ); }

Target:
public Response exit(final Response res, final Identity idt) throws IOException { final String text; if (idt.equals(Identity.ANONYMOUS)) { text = ""; } else { text = new String(this.codec.encode(idt)); } return new RsWithCookie( res, this.cookie, text, new Opt.Single<Date>( new Date( System.currentTimeMillis() + TimeUnit.DAYS.toMillis(this.age) ) ), "Path=/", "HttpOnly" ); }
Source:
public void run() throws IOException { InputStream in = VersionGenerator.class.getResourceAsStream("/parquet-version.properties"); if (in == null) { throw new IOException("/parquet-version.properties not found"); } Properties props = new Properties(); props.load(in); add("package org.apache.parquet;\n" + "\n" + " \n"); add("public class Version {\n"); add(" public static final String VERSION_NUMBER = \""); add(props.getProperty("versionNumber")); add("\";\n"); add(" public static final String FULL_VERSION = \""); add(props.getProperty("fullVersion")); add("\";\n"); add("}\n"); writer.close(); }

Target:
public void run() throws IOException { InputStream in = VersionGenerator.class.getResourceAsStream("/parquet-version.properties"); if (in == null) { throw new IOException("/parquet-version.properties not found"); } Properties props = new Properties(); props.load(in); add("package org.apache.parquet;\n" + "\n" + " \n"); add("public class Version {\n"); add(" public static final String VERSION_NUMBER = \""); add(props.getProperty("versionNumber")); add("\";\n"); add(" public static final String FULL_VERSION = \""); add(props.getProperty("fullVersion")); add("\";\n\n"); add(" public static void main(String[] args) {\n"); add(" System.out.println(FULL_VERSION);\n"); add(" }\n"); add("}\n"); writer.close(); }
Source:
public boolean supports(Event<?> event) { boolean supports = super.supports(event); try { if (listenerMethod.isAnnotationPresent(EventBusListenerMethod.class)) { EventBusListenerMethod annotation = listenerMethod.getAnnotation(EventBusListenerMethod.class); EventBusListenerMethodFilter filter = annotation.filter().newInstance(); String target = annotation.target(); EventScope scope = annotation.scope(); if (scope.equals(EventScope.UNDEFINED)) { scope = event.getScope(); } supports = supports && filter.filter(event.getPayload()) && event.getScope().equals(scope) && event.getTarget().startsWith(target); } } catch (Exception e) { throw new RuntimeException("A checked exception occurred while invoking listener method " + listenerMethod.getName(), e); } return supports; }

Target:
public boolean supports(Event<?> event) { boolean supports = super.supports(event); try { if (listenerMethod.isAnnotationPresent(EventBusListenerMethod.class)) { supports = supports && isInterestedListenerMethod(event); } if (listenerMethod.isAnnotationPresent(EventBusListenerTopic.class) && supports) { supports = isInTopic(event); } } catch (Exception e) { throw new RuntimeException("A checked exception occurred while invoking listener method " + listenerMethod.getName(), e); } return supports; }
Source:
private boolean hasPerceivedContribution(String email, FeedbackQuestionAttributes question, FeedbackSessionResultsBundle bundle) { Map<String, StudentResultSummary> stats = FeedbackContributionResponseDetails.getContribQnStudentResultSummary(question, bundle); if (stats.containsKey(email)) { return true; } else { return false; } }

Target:
private boolean hasPerceivedContribution(String email, FeedbackQuestionAttributes question, FeedbackSessionResultsBundle bundle) { Map<String, StudentResultSummary> stats = FeedbackContributionResponseDetails.getContribQnStudentResultSummary(question, bundle); return stats.containsKey(email); }
Source:
protected void addInfos(BlobHolder blobHolder) { if (blobHolder instanceof DocumentBlobHolder) { DocumentBlobHolder documentBlobHolder = (DocumentBlobHolder) blobHolder; addInfo(String.format("Document Id = %s", documentBlobHolder.getDocument().getId())); } Collection<Blob> blobs = new HashSet<>(); if (blobHolder.getBlob() != null) { blobs.add(blobHolder.getBlob()); } if (CollectionUtils.isNotEmpty(blobHolder.getBlobs())) { blobs.addAll(blobHolder.getBlobs()); } addInfos(blobs); }

Target:
protected void addInfos(BlobHolder blobHolder) { if (blobHolder instanceof DocumentBlobHolder) { DocumentBlobHolder documentBlobHolder = (DocumentBlobHolder) blobHolder; addInfo(String.format("Document: %s", documentBlobHolder.getDocument())); } List<Blob> blobs = blobHolder.getBlobs(); if (blobs != null) { blobs.forEach(this::addInfo); } }
Source:
public void setNextDocId(int docId) throws IOException { this.docId = docId; }

Target:
public void setNextDocId(int docId) { this.docId = docId; }
Source:
public SessionFactory<F> resolve(Message<?> message) { if(beanFactory != null) { return beanFactory.getBean(this.sessionFactoryExpression.getValue(message).toString(), SessionFactory.class); } return null; }

Target:
public SessionFactory<F> resolve(Message<?> message) { if(this.beanFactory != null) { if(evaluationContext != null) { return this.beanFactory.getBean(this.sessionFactoryExpression.getValue(evaluationContext, message, String.class), SessionFactory.class); } return this.beanFactory.getBean(this.sessionFactoryExpression.getValue(message, String.class), SessionFactory.class); } return null; }
Source:
private NewVersionAvailableEvent(@Nullable final Version newVersion, @Nullable final Date lastSupportedDate, final boolean isUnsupported) throws IllegalArgumentException { if (!isUnsupported && lastSupportedDate == null) { if (newVersion == null) { throw new IllegalArgumentException( "At least one parameter needs to be non-null or true."); } else { final Version currentVersion; try { currentVersion = new Version(BuildConfig.VERSION_NAME); } catch (ParseException e) { logger.error(e); throw new IllegalStateException("The version number of the current" + "build doesn't correspond to the schema.", e); } if (newVersion.compareTo(currentVersion) <= 0) { throw new IllegalArgumentException( "The new update version is lesser than the current version."); } } } this.newVersion = newVersion; this.lastSupportedDate = lastSupportedDate == null ? null : (Date) lastSupportedDate.clone(); this.isUnsupported = isUnsupported; }

Target:
public NewVersionAvailableEvent(@Nullable final Version newVersion, @Nullable final Date lastSupportedDate, final boolean isUnsupported) throws IllegalArgumentException { if (!isUnsupported && lastSupportedDate == null) { if (newVersion == null) { throw new IllegalArgumentException( "At least one parameter needs to be non-null or true."); } else { final Version currentVersion; try { currentVersion = new Version(BuildConfig.VERSION_NAME); } catch (ParseException e) { logger.error(e, true); throw new IllegalStateException("The version number of the current" + "build doesn't correspond to the schema.", e); } if (newVersion.compareTo(currentVersion) <= 0) { throw new IllegalArgumentException( "The new update version is lesser than the current version."); } } } this.newVersion = newVersion; this.lastSupportedDate = lastSupportedDate == null ? null : (Date) lastSupportedDate.clone(); this.isUnsupported = isUnsupported; }
Source:
public void testLiveGetDisputeList() throws IOException, OmiseException { Request<ScopedList<Dispute>> request = new Dispute.ListRequestBuilder() .status(DisputeStatus.Lost) .options(new ScopedList.Options().order(Ordering.ReverseChronological)).build(); ScopedList<Dispute> disputes = client.sendRequest(request, new TypeReference<ScopedList<Dispute>>() {}); System.out.println("retrieved dispute list total no.: " + disputes.getTotal()); assertNotNull(disputes.getData().get(0)); }

Target:
public void testLiveGetDisputeList() throws IOException, OmiseException { Request<ScopedList<Dispute>> request = new Dispute.ListRequestBuilder().build(); ScopedList<Dispute> disputes = client.sendRequest(request, new TypeReference<ScopedList<Dispute>>() {}); System.out.println("retrieved dispute list total no.: " + disputes.getTotal()); assertNotNull(disputes.getData().get(0)); }
Source:
private void timerOff(final String version, final Stat currentStatOfBarrierDone) { try { zkUtils.getZkClient().writeData(barrierDonePath, BARRIER_TIMED_OUT, currentStatOfBarrierDone.getVersion()); } catch (Exception e) { LOG.info("Barrier timeout write failed"); String done = zkUtils.getZkClient().<String>readData(barrierDonePath); if (!done.equals(BARRIER_DONE)) { throw new SamzaException("Failed to write to the barrier_done, version=" + version, e); } } }

Target:
private void timerOff(final String version, final Stat currentStatOfBarrierDone) { try { zkUtils.getZkClient().writeData(barrierDonePath, BARRIER_TIMED_OUT, currentStatOfBarrierDone.getVersion()); } catch (ZkBadVersionException e) { LOG.warn("Barrier timeout write failed"); String done = zkUtils.getZkClient().<String>readData(barrierDonePath); if (!done.equals(BARRIER_DONE)) { throw new SamzaException("Failed to write to the barrier_done, version=" + version, e); } } }
Source:
private void showPostsPerPageDialog() { Bundle args = new Bundle(); args.putBoolean(NumberPickerDialog.SHOW_SWITCH_KEY, false); args.putString(NumberPickerDialog.TITLE_KEY, getString(R.string.site_settings_posts_per_page_title)); args.putInt(NumberPickerDialog.MIN_VALUE_KEY, 0); args.putInt(NumberPickerDialog.MAX_VALUE_KEY, getResources().getInteger(R.integer.posts_per_page_limit)); args.putInt(NumberPickerDialog.CUR_VALUE_KEY, mSiteSettings.getPostsPerPage()); showNumberPickerDialog(args, POSTS_PER_PAGE_REQUEST_CODE, "posts-per-page-dialog"); }

Target:
private void showPostsPerPageDialog() { Bundle args = new Bundle(); args.putBoolean(NumberPickerDialog.SHOW_SWITCH_KEY, false); args.putString(NumberPickerDialog.TITLE_KEY, getString(R.string.site_settings_posts_per_page_title)); args.putInt(NumberPickerDialog.MIN_VALUE_KEY, 1); args.putInt(NumberPickerDialog.MAX_VALUE_KEY, getResources().getInteger(R.integer.posts_per_page_limit)); args.putInt(NumberPickerDialog.CUR_VALUE_KEY, mSiteSettings.getPostsPerPage()); showNumberPickerDialog(args, POSTS_PER_PAGE_REQUEST_CODE, "posts-per-page-dialog"); }
Source:
public boolean equals(Object that) { logger.entering(this.getClass().getName(),"equals",that); if(!(that instanceof AbstractTreeNode)) { return false; } AbstractTreeNode a = (AbstractTreeNode)that; return this.getData().equals(a.getData()); }

Target:
public boolean equals(Object that) { logger.entering("AbstractTreeNode","equals",that); if(!(that instanceof AbstractTreeNode)) { return false; } AbstractTreeNode a = (AbstractTreeNode)that; return this.getData().equals(a.getData()); }
Source:
private boolean isPublicApi(DetailAST token) { final DetailAST modifiersAST = token.findFirstToken(TokenTypes.MODIFIERS); final boolean isStatic = modifiersAST.findFirstToken(TokenTypes.LITERAL_STATIC) != null; final boolean isPublic = modifiersAST .findFirstToken(TokenTypes.LITERAL_PUBLIC) != null; final boolean isProtected = modifiersAST.findFirstToken(TokenTypes.LITERAL_PROTECTED) != null; return (isPublic || isProtected) && !isStatic; }

Target:
private boolean isPublicApi(DetailAST token) { final DetailAST modifiersAST = token.findFirstToken(TokenTypes.MODIFIERS); final AccessModifier accessModifier = CheckUtil.getAccessModifierFromModifiersToken(modifiersAST); final boolean isStatic = modifiersAST.findFirstToken(TokenTypes.LITERAL_STATIC) != null; return (accessModifier.equals(AccessModifier.PUBLIC) || accessModifier.equals(AccessModifier.PROTECTED)) && !isStatic; }
Source:
private static SnapshotStatus toSnapshotStatus( Map<?, ?> json) { if (json == null) { return null; } int snapshotID = getInt(json, "snapshotID", 0); boolean isDeleted = ((String)json.get("deletionStatus")). contentEquals("DELETED"); String fullPath = ((String) json.get("fullPath")); HdfsFileStatus dirStatus = toFileStatus((Map<?, ?>) json.get("dirStatus"), false); SnapshotStatus snapshotStatus = new SnapshotStatus(dirStatus, snapshotID, isDeleted, DFSUtilClient.string2Bytes( SnapshotStatus.getParentPath(fullPath))); return snapshotStatus; }

Target:
private static SnapshotStatus toSnapshotStatus( Map<?, ?> json) { if (json == null) { return null; } int snapshotID = getInt(json, "snapshotID", 0); boolean isDeleted = "DELETED".equalsIgnoreCase( (String)json.get("deletionStatus")); String fullPath = ((String) json.get("fullPath")); HdfsFileStatus dirStatus = toFileStatus((Map<?, ?>) json.get("dirStatus"), false); SnapshotStatus snapshotStatus = new SnapshotStatus(dirStatus, snapshotID, isDeleted, DFSUtilClient.string2Bytes( SnapshotStatus.getParentPath(fullPath))); return snapshotStatus; }
Source:
public void testReadingInvalidJsonFile() throws Exception { final String fileDirectoryPath = JSON_INVALID_SAMPLE_DATA_FILE.getParent(); final TableConfig tableConfig = new TableConfigBuilder(TableType.OFFLINE).setTableName("testTable").build(); final Schema fakeSchema = new Schema.SchemaBuilder().build(); Files.write(Paths.get(fileDirectoryPath + "/tmpTableConfig.json"), tableConfig.toJsonString().getBytes()); Files.write(Paths.get(fileDirectoryPath + "/tmpSchema.json"), fakeSchema.toSingleLineJsonString().getBytes()); _createSegmentCommand.setDataDir(fileDirectoryPath); _createSegmentCommand.setFormat(FileFormat.JSON); _createSegmentCommand.setOutDir(fileDirectoryPath); _createSegmentCommand.setTableConfigFile(fileDirectoryPath + "/tmpTableConfig.json"); _createSegmentCommand.setSchemaFile(fileDirectoryPath + "/tmpSchema.json"); _createSegmentCommand.execute(); }

Target:
public void testReadingInvalidJsonFile() throws Exception { String fileDirectoryPath = JSON_INVALID_SAMPLE_DATA_FILE.getParent(); TableConfig tableConfig = new TableConfigBuilder(TableType.OFFLINE).setTableName("testTable").build(); Schema fakeSchema = new Schema.SchemaBuilder().build(); Files.write(Paths.get(fileDirectoryPath + "/tmpTableConfig.json"), tableConfig.toJsonString().getBytes()); Files.write(Paths.get(fileDirectoryPath + "/tmpSchema.json"), fakeSchema.toSingleLineJsonString().getBytes()); _createSegmentCommand.setDataDir(fileDirectoryPath); _createSegmentCommand.setFormat(FileFormat.JSON); _createSegmentCommand.setOutDir(fileDirectoryPath); _createSegmentCommand.setTableConfigFile(fileDirectoryPath + "/tmpTableConfig.json"); _createSegmentCommand.setSchemaFile(fileDirectoryPath + "/tmpSchema.json"); _createSegmentCommand.execute(); }
Source:
private void update(boolean checked) { ITextEditor editor= getTextEditor(); if (editor instanceof ITextEditorExtension6) { setEnabled(true); setChecked(checked); return; } setEnabled(false); setChecked(false); }

Target:
private void update(boolean checked) { setEnabled(isWordWrapPossible()); setChecked(checked); }
Source:
public static Boolean hasAny(JsonObject object, Collection<String> coll){ for(String key : coll){ if(object.has(key)) return true; } return false; }

Target:
public static boolean hasAny(JsonObject object, Collection<String> coll){ for(String key : coll){ if(object.has(key)) return true; } return false; }
Source:
protected void createDocumentWithFiles() throws Exception { startTransaction(); DocumentModel doc = session.createDocumentModel("/", "myFile", "File"); List<Map<String, Serializable>> blobs = new ArrayList<>(); for (int i = 1; i <= 5; i++) { String name = "testfile" + i + ".txt"; Blob nblob = Blobs.createBlob(new String(new char[i]).replace('\0', 'a')); nblob.setFilename(name); Map<String, Serializable> filesEntry = new HashMap<>(); filesEntry.put("file", (Serializable) nblob); blobs.add(filesEntry); } doc.setPropertyValue("files:files", (Serializable) blobs); doc = session.createDocument(doc); TransactionHelper.commitOrRollbackTransaction(); waitForCompletion(); startTransaction(); }

Target:
protected void createDocumentWithFiles() throws Exception { startTransaction(); DocumentModel doc = session.createDocumentModel("/", "myFile", "File"); var blobs = new ArrayList<>(); for (int i = 1; i <= 5; i++) { Blob blob = Blobs.createBlob(new String(new char[i]).replace('\0', 'a')); blob.setFilename(String.format("testfile%d.txt", i)); blobs.add(Map.of("file", (Serializable) blob)); } doc.setPropertyValue("files:files", blobs); session.createDocument(doc); TransactionHelper.commitOrRollbackTransaction(); waitForCompletion(); startTransaction(); }
Source:
private IStatus copy(String src, IFileStore destinationParent, IFileSystem fileSystem, IProgressMonitor monitor) throws CoreException { Path srcPath = new Path(src); IFileStore source = fileSystem.getStore(srcPath); String elementName = srcPath.segment(srcPath.segmentCount() - 1); IFileStore destination = destinationParent.getChild(elementName); SubMonitor subMonitor = SubMonitor.convert(monitor, 2); if (destination.fetchInfo().exists()) { subMonitor.worked(1); return Status.OK_STATUS; } if (source.fetchInfo().isDirectory()) { destination.mkdir(EFS.NONE, new NullProgressMonitor()); } source.copy(destination, EFS.OVERWRITE, subMonitor.newChild(1)); return Status.OK_STATUS; }

Target:
private IStatus copy(String src, IFileStore destinationParent, IFileSystem fileSystem, IProgressMonitor monitor) throws CoreException { Path srcPath = new Path(src); IFileStore source = fileSystem.getStore(srcPath); String elementName = srcPath.segment(srcPath.segmentCount() - 1); IFileStore destination = destinationParent.getChild(elementName); SubMonitor subMonitor = SubMonitor.convert(monitor, 1); if (destination.fetchInfo().exists()) { return Status.OK_STATUS; } if (source.fetchInfo().isDirectory()) { destination.mkdir(EFS.NONE, new NullProgressMonitor()); } source.copy(destination, EFS.OVERWRITE, subMonitor.newChild(1)); return Status.OK_STATUS; }
Source:
public void handle(OutgoingSms sms, String response, Header[] headers) { if (!getTemplateOutgoingResponse().hasSuccessResponse() || getTemplateOutgoingResponse().checkSuccessResponse(response)) { String providerMessageId = extractProviderMessageId(headers, response); getLogger().info(String.format("Sent messageId %s '%s' to %s", providerMessageId, messageForLog(sms), sms.getRecipients().toString())); for (String recipient : sms.getRecipients()) { getAuditRecords().add(new SmsRecord(getConfig().getName(), OUTBOUND, recipient, sms.getMessage(), now(), DISPATCHED, null, sms.getMotechId(), providerMessageId, null)); } getEvents().add(outboundEvent(DISPATCHED, getConfig().getName(), sms.getRecipients(), sms.getMessage(), sms.getMotechId(), providerMessageId, null, null, null, sms.getCustomParams())); } else { Integer failureCount = sms.getFailureCount() + 1; String failureMessage = getTemplateOutgoingResponse().extractSingleFailureMessage(response); if (failureMessage == null) { failureMessage = response; } getEvents().add(outboundEvent(getConfig().retryOrAbortSubject(failureCount), getConfig().getName(), sms.getRecipients(), sms.getMessage(), sms.getMotechId(), null, failureCount, null, null, sms.getCustomParams())); getLogger().debug("Failed to send SMS: {}", failureMessage); for (String recipient : sms.getRecipients()) { getAuditRecords().add(new SmsRecord(getConfig().getName(), OUTBOUND, recipient, sms.getMessage(), now(), getConfig().retryOrAbortStatus(failureCount), null, sms.getMotechId(), null, failureMessage)); } } }

Target:
public void handle(OutgoingSms sms, String response, Header[] headers) { if (!getTemplateOutgoingResponse().hasSuccessResponse() || getTemplateOutgoingResponse().checkSuccessResponse(response)) { String providerMessageId = extractProviderMessageId(headers, response); getLogger().info(String.format("Sent messageId %s '%s' to %s", providerMessageId, messageForLog(sms), sms.getRecipients().toString())); for (String recipient : sms.getRecipients()) { getAuditRecords().add(new SmsRecord(getConfig().getName(), OUTBOUND, recipient, sms.getMessage(), now(), DeliveryStatuses.DISPATCHED, null, sms.getMotechId(), providerMessageId, null)); } getEvents().add(outboundEvent(SmsEventSubjects.DISPATCHED, getConfig().getName(), sms.getRecipients(), sms.getMessage(), sms.getMotechId(), providerMessageId, null, null, null, sms.getCustomParams())); } else { Integer failureCount = sms.getFailureCount() + 1; String failureMessage = getTemplateOutgoingResponse().extractSingleFailureMessage(response); if (failureMessage == null) { failureMessage = response; } getEvents().add(outboundEvent(getConfig().retryOrAbortSubject(failureCount), getConfig().getName(), sms.getRecipients(), sms.getMessage(), sms.getMotechId(), null, failureCount, null, null, sms.getCustomParams())); getLogger().debug("Failed to send SMS: {}", failureMessage); for (String recipient : sms.getRecipients()) { getAuditRecords().add(new SmsRecord(getConfig().getName(), OUTBOUND, recipient, sms.getMessage(), now(), getConfig().retryOrAbortStatus(failureCount), null, sms.getMotechId(), null, failureMessage)); } } }
Source:
public Object getParent(Object element) { if (element instanceof IBuild) { return ((IBuild) element).getParent(); } return NO_ELEMENTS; }

Target:
public Object getParent(Object element) { if (element instanceof IBuild) { return ((IBuild) element).getParent(); } return null; }
Source:
public boolean generate() { Element enclosingElement = classType.getEnclosingElement(); if (!enclosingElement.getKind().equals(ElementKind.PACKAGE)) { Utils.error("The RealmClass annotation does not support nested classes", classType); return false; } TypeElement parentElement = (TypeElement) Utils.getSuperClass(classType); if (!Utils.isJavaLangObject(parentElement) && !Utils.isRealmObject(parentElement)) { Utils.error("A RealmClass annotated object must be derived from RealmObject", classType); return false; } PackageElement packageElement = (PackageElement) enclosingElement; packageName = packageElement.getQualifiedName().toString(); if (!categorizeClassElements()) return false; if (!checkListTypes()) return false; if (!checkDefaultConstructor()) return false; if (!checkForFinalFields()) return false; if (!checkForTransientFields()) return false; if (!checkForVolatileFields()) return false; return true; }

Target:
public boolean generate() { Element enclosingElement = classType.getEnclosingElement(); if (!enclosingElement.getKind().equals(ElementKind.PACKAGE)) { Utils.error("The RealmClass annotation does not support nested classes", classType); return false; } TypeElement parentElement = (TypeElement) Utils.getSuperClass(classType); if (!parentElement.toString().equals("java.lang.Object") && !parentElement.toString().equals("io.realm.RealmObject")) { Utils.error("Realm model classes must either extend RealmObject or implement RealmModel to be considered a valid model class", classType); return false; } PackageElement packageElement = (PackageElement) enclosingElement; packageName = packageElement.getQualifiedName().toString(); if (!categorizeClassElements()) return false; if (!checkListTypes()) return false; if (!checkDefaultConstructor()) return false; if (!checkForFinalFields()) return false; if (!checkForTransientFields()) return false; if (!checkForVolatileFields()) return false; return true; }
Source:
public static boolean isValid(InputStream stream) { try { ZipInputStream zip = new ZipInputStream(stream); ZipEntry entry = zip.getNextEntry(); return entry != null; } catch (IOException e) { return false; } }

Target:
public static boolean isValid(InputStream stream) { try (ZipInputStream zip = new ZipInputStream(stream)) { return zip.getNextEntry() != null; } catch (IOException e) { return false; } }
Source:
public BlobIndexValue(long size, long offset) { this(size, offset, (byte)0, -1); }

Target:
public BlobIndexValue(long size, long offset) { this(size, offset, (byte)0, TTL_Infinite); }
Source:
@Override public void close(Duration duration) { delegate.close(duration); }

Target:
public void close(Duration duration) { delegate.close(duration); }
Source:
private void scanDeltaAndRefresh( GitResourceVariantTreeSubscriber subscriber, RepositoryMapping mapping, IResourceDelta delta) { Repository repo = mapping.getRepository(); GitResourceDeltaVisitor visitor = new GitResourceDeltaVisitor(repo); try { delta.accept(visitor); Collection<IFile> files = visitor.getFileResourcesToUpdate(); if (files != null && !files.isEmpty()) return; for (GitSynchronizeData gsd : gsds) { if (repo.equals(gsd.getRepository())) refreshResources(subscriber, files); } } catch (CoreException e) { Activator.logError(e.getMessage(), e); } }

Target:
private void scanDeltaAndRefresh( GitResourceVariantTreeSubscriber subscriber, RepositoryMapping mapping, IResourceDelta delta) { Repository repo = mapping.getRepository(); GitResourceDeltaVisitor visitor = new GitResourceDeltaVisitor(repo); try { delta.accept(visitor); Collection<IFile> files = visitor.getFileResourcesToUpdate(); if (files != null && files.isEmpty()) return; for (GitSynchronizeData gsd : gsds) { if (repo.equals(gsd.getRepository())) refreshResources(subscriber, files); } } catch (CoreException e) { Activator.logError(e.getMessage(), e); } }
Source:
private Map<String, Object> buildStringKeyMap(ByteBuffer input) throws ParseException { int payloadSize = input.remaining(); if (chars == null || chars.remaining() < payloadSize) { chars = CharBuffer.allocate(payloadSize); } final CoderResult coderResult = Charsets.UTF_8.newDecoder() .onMalformedInput(CodingErrorAction.REPLACE) .onUnmappableCharacter(CodingErrorAction.REPLACE) .decode(input, chars, true); Map<String, Object> theMap; if (coderResult.isUnderflow()) { chars.flip(); try { theMap = parseString(chars.toString()); } finally { chars.clear(); } } else { throw new IAE("Failed with CoderResult[%s]", coderResult); } return theMap; }

Target:
private Map<String, Object> buildStringKeyMap(ByteBuffer input) throws ParseException { int payloadSize = input.remaining(); if (chars == null || chars.remaining() < payloadSize) { chars = CharBuffer.allocate(payloadSize); } final CoderResult coderResult = Charsets.UTF_8.newDecoder() .onMalformedInput(CodingErrorAction.REPLACE) .onUnmappableCharacter(CodingErrorAction.REPLACE) .decode(input, chars, true); Map<String, Object> theMap; if (coderResult.isUnderflow()) { chars.flip(); try { theMap = parseString(chars.toString()); } finally { chars.clear(); } } else { throw new ParseException("Failed with CoderResult[%s]", coderResult); } return theMap; }
Source:
public void testEndpointProfileUpdate() { TargetingClient targetingClient = pinpointManager.getTargetingClient(); assertNotNull(targetingClient); targetingClient.updateEndpointProfile(); EndpointProfile endpointProfile = targetingClient.currentEndpoint(); assertNotNull(endpointProfile); assertNull(endpointProfile.getUser().getUserId()); assertNull(endpointProfile.getUser().getUserAttributes()); EndpointProfileUser user = new EndpointProfileUser(); user.setUserId(credentialsProvider.getIdentityId()); user.setUserAttributes(Collections.singletonMap("user-key", Arrays.asList("user-value"))); endpointProfile.setUser(user); targetingClient.updateEndpointProfile(); endpointProfile = targetingClient.currentEndpoint(); assertNotNull(endpointProfile); assertEquals(credentialsProvider.getIdentityId(), endpointProfile.getUser().getUserId()); assertNotNull(endpointProfile.getUser().getUserAttributes()); assertEquals(Collections.singletonMap("user-key", Arrays.asList("user-value")), endpointProfile.getUser().getUserAttributes()); endpointProfile.addAttribute("key", Arrays.asList("value")); targetingClient.updateEndpointProfile(); endpointProfile = targetingClient.currentEndpoint(); assertNotNull(endpointProfile); assertEquals(credentialsProvider.getIdentityId(), endpointProfile.getUser().getUserId()); assertEquals("value", endpointProfile.getAllAttributes().get("key").get(0)); }

Target:
public void testEndpointProfileUpdate() { TargetingClient targetingClient = pinpointManager.getTargetingClient(); assertNotNull(targetingClient); targetingClient.updateEndpointProfile(); EndpointProfile endpointProfile = targetingClient.currentEndpoint(); assertNotNull(endpointProfile); assertNull(endpointProfile.getUser().getUserId()); assertNull(endpointProfile.getUser().getUserAttributes()); EndpointProfileUser user = new EndpointProfileUser(); user.setUserId(credentialsProvider.getIdentityId()); user.addUserAttribute("user-key", Collections.singletonList("user-value")); endpointProfile.setUser(user); targetingClient.updateEndpointProfile(); endpointProfile = targetingClient.currentEndpoint(); assertNotNull(endpointProfile); assertEquals(credentialsProvider.getIdentityId(), endpointProfile.getUser().getUserId()); assertNotNull(endpointProfile.getUser().getUserAttributes()); assertEquals(Collections.singletonMap("user-key", Collections.singletonList("user-value")), endpointProfile.getUser().getUserAttributes()); endpointProfile.addAttribute("key", Arrays.asList("value")); targetingClient.updateEndpointProfile(); endpointProfile = targetingClient.currentEndpoint(); assertNotNull(endpointProfile); assertEquals(credentialsProvider.getIdentityId(), endpointProfile.getUser().getUserId()); assertEquals("value", endpointProfile.getAllAttributes().get("key").get(0)); }
Source:
public static Gff3Directive toDirective(final String line) { for (final Gff3Directive directive : Gff3Directive.values()) { if(Pattern.matches(directive.regexPattern, line)) { return directive; } } return null; }

Target:
public static Gff3Directive toDirective(final String line) { for (final Gff3Directive directive : Gff3Directive.values()) { if(directive.regexPattern.matcher(line).matches()) { return directive; } } return null; }
Source:
private void testProvider(final Class<? extends WindupRuleProvider> provider, final String expectedCatsStr) throws IOException { String name = TestCategoryUnsetRuleProvider.class.getSimpleName(); final Set<String> expectedCats = new HashSet(Arrays.asList(StringUtils.split(expectedCatsStr, ", "))); try (GraphContext context = factory.create()) { Predicate<WindupRuleProvider> rulesToRun = new EnumeratedRuleProviderFilter(provider); Configuration conf = loader.loadConfiguration(context, rulesToRun).getConfiguration(); Assert.assertTrue("Rule loaded", !conf.getRules().isEmpty()); Assert.assertTrue("Rule instanceof Context", conf.getRules().get(0) instanceof Context); Context subRule = (Context) conf.getRules().get(0); Object category = subRule.get(RuleMetadata.CATEGORY); Assert.assertTrue("CATEGORY is set in the Context: " + category, category != null); Assert.assertTrue("Category is a Set: " + category.getClass(), category instanceof Set); Set<String> cats = (Set<String>)category; Assert.assertEquals("" + expectedCats.size() + " categories in " + name, expectedCats.size(), cats.size()); for (String expCat : expectedCats) Assert.assertTrue(name + " has category " + expCat, cats.contains(expCat)); } catch(Exception ex) { if(ex instanceof InvocationTargetException) throw new WindupException("" + ((InvocationTargetException)ex).getTargetException(), ex); throw ex; } }

Target:
private void testProvider(final Class<? extends WindupRuleProvider> provider, final String expectedCatsStr) throws IOException { String name = TestTagsUnsetRuleProvider.class.getSimpleName(); final Set<String> expectedCats = new HashSet(Arrays.asList(StringUtils.split(expectedCatsStr, ", "))); try (GraphContext context = factory.create()) { Predicate<WindupRuleProvider> rulesToRun = new EnumeratedRuleProviderFilter(provider); Configuration conf = loader.loadConfiguration(context, rulesToRun).getConfiguration(); Assert.assertTrue("Rule loaded", !conf.getRules().isEmpty()); Assert.assertTrue("Rule instanceof Context", conf.getRules().get(0) instanceof Context); Context subRule = (Context) conf.getRules().get(0); Object tag = subRule.get(RuleMetadata.TAGS); Assert.assertTrue("TAGS is set in the Context: " + tag, tag != null); Assert.assertTrue("Tags is a Set: " + tag.getClass(), tag instanceof Set); Set<String> cats = (Set<String>)tag; Assert.assertEquals("" + expectedCats.size() + " tags in " + name, expectedCats.size(), cats.size()); for (String expCat : expectedCats) Assert.assertTrue(name + " has tag " + expCat, cats.contains(expCat)); } catch(Exception ex) { if(ex instanceof InvocationTargetException) throw new WindupException("" + ((InvocationTargetException)ex).getTargetException(), ex); throw ex; } }
Source:
public List<Task<? extends Serializable>> handle(Context context) throws SemanticException { DropTableMessage msg = deserializer.getDropTableMessage(context.dmd.getPayload()); String actualDbName = context.isDbNameEmpty() ? msg.getDB() : context.dbName; String actualTblName = context.isTableNameEmpty() ? msg.getTable() : context.tableName; DropTableDesc dropTableDesc = new DropTableDesc( actualDbName + "." + actualTblName, null, true, true, context.eventOnlyReplicationSpec(), false ); Task<DDLWork> dropTableTask = TaskFactory.get( new DDLWork(readEntitySet, writeEntitySet, dropTableDesc), context.hiveConf ); context.log.debug( "Added drop tbl task : {}:{}", dropTableTask.getId(), dropTableDesc.getTableName() ); updatedMetadata.set(context.dmd.getEventTo().toString(), actualDbName, null, null); try { return Collections.singletonList(ReplUtils.appendOpenTxnTaskForMigration(actualDbName, actualTblName, context.hiveConf, updatedMetadata, dropTableTask, msg.getTableObj())); } catch (Exception e) { throw new SemanticException(e.getMessage()); } }

Target:
public List<Task<? extends Serializable>> handle(Context context) throws SemanticException { DropTableMessage msg = deserializer.getDropTableMessage(context.dmd.getPayload()); String actualDbName = context.isDbNameEmpty() ? msg.getDB() : context.dbName; String actualTblName = context.isTableNameEmpty() ? msg.getTable() : context.tableName; DropTableDesc dropTableDesc = new DropTableDesc( actualDbName + "." + actualTblName, null, true, true, context.eventOnlyReplicationSpec(), false ); Task<DDLWork> dropTableTask = TaskFactory.get( new DDLWork(readEntitySet, writeEntitySet, dropTableDesc), context.hiveConf ); context.log.debug( "Added drop tbl task : {}:{}", dropTableTask.getId(), dropTableDesc.getTableName() ); updatedMetadata.set(context.dmd.getEventTo().toString(), actualDbName, null, null); return Collections.singletonList(dropTableTask); }
Source:
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { api = new OpenFoodAPIClient(requireActivity()); binding = FragmentEnvironmentProductBinding.inflate(inflater); return binding.getRoot(); }

Target:
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { binding = FragmentEnvironmentProductBinding.inflate(inflater); return binding.getRoot(); }
Source:
public FeedRangePartitionKeyRangeImpl(final String partitionKeyRangeId) { if (partitionKeyRangeId == null) { throw new NullPointerException("partitionKeyRangeId"); } this.partitionKeyRangeId = partitionKeyRangeId; this.partitionKeyRangeIdentity = new PartitionKeyRangeIdentity(partitionKeyRangeId); }

Target:
public FeedRangePartitionKeyRangeImpl(final String partitionKeyRangeId) { checkNotNull(partitionKeyRangeId, "Argument 'partitionKeyRangeId' must not be null"); this.partitionKeyRangeId = partitionKeyRangeId; this.partitionKeyRangeIdentity = new PartitionKeyRangeIdentity(partitionKeyRangeId); }
Source:
public IDecorator[] getDecorators(PictogramElement pe) { int xOrigin = -20, yOrigin = 0; int xGap = 0, yGap = -10; EObject bo = Graphiti.getLinkService() .getBusinessObjectForLinkedPictogramElement(pe); ArrayList<Diagnostic> diagnostics = ((BehaviorEditor) getDiagramTypeProvider() .getDiagramEditor()).getDiagnosingModelObserver() .getElementDiagonsticMap().get(bo); ArrayList<IDecorator> decorators = DecoratorUtil .getMarkersFromDiagnostics(diagnostics); if (decorators.isEmpty()) return super.getDecorators(pe); else { int i = 0; for (IDecorator decorator : decorators) { ((ImageDecorator) decorator).setX(xOrigin + i * xGap); ((ImageDecorator) decorator).setY(yOrigin + i * yGap); i++; } return (IDecorator[]) decorators .toArray(new IDecorator[decorators.size()]); } }

Target:
public IDecorator[] getDecorators(PictogramElement pe) { if (pe.isVisible()) { int xOrigin = -20, yOrigin = 0; int xGap = 0, yGap = -10; EObject bo = Graphiti.getLinkService() .getBusinessObjectForLinkedPictogramElement( (PictogramElement) pe.eContainer()); ArrayList<Diagnostic> diagnostics = ((BehaviorEditor) getDiagramTypeProvider() .getDiagramBehavior().getDiagramContainer()) .getDiagnosingModelObserver().getElementDiagonsticMap() .get(bo); ArrayList<IDecorator> decorators = DecoratorUtil .getMarkersFromDiagnostics(diagnostics); if (!decorators.isEmpty()) { int i = 0; for (IDecorator decorator : decorators) { ((ImageDecorator) decorator).setX(xOrigin + i * xGap); ((ImageDecorator) decorator).setY(yOrigin + i * yGap); i++; } return (IDecorator[]) decorators .toArray(new IDecorator[decorators.size()]); } } return super.getDecorators(pe); }
Source:
public PreparedQuery prepareQuery(Session session, Statement wrappedStatement) throws ParsingException, PrestoException, SemanticException { Statement statement = wrappedStatement; String prepareSql = null; if (wrappedStatement instanceof Execute) { prepareSql = session.getPreparedStatementFromExecute((Execute) statement); statement = sqlParser.createStatement(prepareSql, createParsingOptions(session)); } if (statement instanceof Explain && ((Explain) statement).isAnalyze()) { Statement innerStatement = ((Explain) statement).getStatement(); Optional<QueryType> innerQueryType = StatementUtils.getQueryType(innerStatement.getClass()); if (!innerQueryType.isPresent() || innerQueryType.get() == QueryType.DATA_DEFINITION) { throw new PrestoException(NOT_SUPPORTED, "EXPLAIN ANALYZE doesn't support statement type: " + innerStatement.getClass().getSimpleName()); } } List<Expression> parameters = ImmutableList.of(); if (wrappedStatement instanceof Execute) { parameters = ((Execute) wrappedStatement).getParameters(); } validateParameters(statement, parameters); return new PreparedQuery(statement, parameters, Optional.ofNullable(prepareSql)); }

Target:
public PreparedQuery prepareQuery(Session session, Statement wrappedStatement) throws ParsingException, PrestoException, SemanticException { Statement statement = wrappedStatement; Optional<String> prepareSql = Optional.empty(); if (statement instanceof Execute) { prepareSql = Optional.of(session.getPreparedStatementFromExecute((Execute) statement)); statement = sqlParser.createStatement(prepareSql.get(), createParsingOptions(session)); } if (statement instanceof Explain && ((Explain) statement).isAnalyze()) { Statement innerStatement = ((Explain) statement).getStatement(); Optional<QueryType> innerQueryType = StatementUtils.getQueryType(innerStatement.getClass()); if (!innerQueryType.isPresent() || innerQueryType.get() == QueryType.DATA_DEFINITION) { throw new PrestoException(NOT_SUPPORTED, "EXPLAIN ANALYZE doesn't support statement type: " + innerStatement.getClass().getSimpleName()); } } List<Expression> parameters = ImmutableList.of(); if (wrappedStatement instanceof Execute) { parameters = ((Execute) wrappedStatement).getParameters(); } validateParameters(statement, parameters); return new PreparedQuery(statement, parameters, prepareSql); }
Source:
public void onInVisible(IObservableValue detailsViewModel, DataBindingContext dbc) { dispose(); setCheckboxVisible(false); ((GridData)rememberTokenCheckbox.getLayoutData()).heightHint = 1; }

Target:
public void onInVisible(IObservableValue detailsViewModel, DataBindingContext dbc) { dispose(); DataBindingUtils.dispose(rememberTokenBinding); }
Source:
protected void checkVariantInformation(Variant variant, String fileId, String studyId) throws NonVariantException, IncompleteInformationException { VariantSourceEntry variantSourceEntry = variant.getSourceEntry(fileId, studyId); if (isNonVariant(variantSourceEntry)) { throw new NonVariantException("The variant " + variant + " has allele frequency or counts '0'"); } else if (!canAlleleFrequenciesBeCalculated(variantSourceEntry)) { throw new IncompleteInformationException(variant); } }

Target:
protected void checkVariantInformation(Variant variant, String fileId, String studyId) throws NonVariantException, IncompleteInformationException { super.checkVariantInformation(variant, fileId, studyId); VariantSourceEntry variantSourceEntry = variant.getSourceEntry(fileId, studyId); if (!canAlleleFrequenciesBeCalculated(variantSourceEntry)) { throw new IncompleteInformationException(variant); } else if (variantFrequencyIsZero(variantSourceEntry)) { throw new NonVariantException("The variant " + variant + " has allele frequency or counts '0'"); } }
Source:
public void generate(Model model) { model.types() .filter(StructType.class::isInstance) .map(StructType.class::cast) .forEach(this::generateClasses); model.types() .filter(EnumType.class::isInstance) .map(EnumType.class::cast) .forEach(this::generateClasses); }

Target:
public void generate(Model model) { model.types() .filter(StructType.class::isInstance) .map(StructType.class::cast) .forEach(this::generateStructSupportClasses); model.types() .filter(EnumType.class::isInstance) .map(EnumType.class::cast) .forEach(this::generateEnumSupportClasses); }
Source:
public static String parseHostFromOldLog(Path p) { try { String n = p.getName(); int idx = n.lastIndexOf(LOGNAME_SEPARATOR); String s = URLDecoder.decode(n.substring(0, idx), "UTF8"); return ServerName.valueOf(s).getHostname() + ":" + ServerName.valueOf(s).getPort(); } catch (Exception e) { LOG.warn("Skip log file (can't parse): " + p); return null; } }

Target:
public static String parseHostFromOldLog(Path p) { try { String n = p.getName(); int idx = n.lastIndexOf(LOGNAME_SEPARATOR); String s = URLDecoder.decode(n.substring(0, idx), "UTF8"); return ServerName.valueOf(s).getAddress().toString(); } catch (Exception e) { LOG.warn("Skip log file (can't parse): {}", p); return null; } }
Source:
private void assertMultipleIssue(Set<AnalyzerMessage> issues) throws AssertionError { Preconditions.checkState(!issues.isEmpty(), "At least one issue expected"); List<Integer> unexpectedLines = Lists.newLinkedList(); Multimap<Integer, Expectations.Issue> expected = expectations.issues; flowAssertions = new SoftAssertions(); for (AnalyzerMessage issue : issues) { validateIssue(expected, unexpectedLines, issue); } flowAssertions.assertAll(); if (!expected.isEmpty() || !unexpectedLines.isEmpty()) { Collections.sort(unexpectedLines); String expectedMsg = !expected.isEmpty() ? ("Expected " + expected) : ""; String unexpectedMsg = !unexpectedLines.isEmpty() ? ((expectedMsg.isEmpty() ? "" : ", ") + "Unexpected at " + unexpectedLines) : ""; fail(expectedMsg + unexpectedMsg); } assertSuperfluousFlows(); }

Target:
private void assertMultipleIssue(Set<AnalyzerMessage> issues) throws AssertionError { Preconditions.checkState(!issues.isEmpty(), "At least one issue expected"); List<Integer> unexpectedLines = Lists.newLinkedList(); Multimap<Integer, Expectations.Issue> expected = expectations.issues; for (AnalyzerMessage issue : issues) { validateIssue(expected, unexpectedLines, issue); } if (!expected.isEmpty() || !unexpectedLines.isEmpty()) { Collections.sort(unexpectedLines); String expectedMsg = !expected.isEmpty() ? ("Expected " + expected) : ""; String unexpectedMsg = !unexpectedLines.isEmpty() ? ((expectedMsg.isEmpty() ? "" : ", ") + "Unexpected at " + unexpectedLines) : ""; fail(expectedMsg + unexpectedMsg); } assertSuperfluousFlows(); }
Source:
public String toString() { String info = ""; info += "ModuleName= " + this.moduleName + " RespTime= " + this.respTime + " Availability= " + this.availability + " Host= " + this.host.getHostName() + " DeploymentType= " + this.host.getDeploymentType() + " isJavaApp= " + this.isJavaApp; return info; }

Target:
public String toString() { StringBuilder sb = new StringBuilder(300); return sb.append("ModuleName= ").append(this.moduleName) .append(" RespTime= ").append(this.respTime) .append(" Availability= ").append(this.availability) .append(" Host= ").append(this.host.getHostName()) .append(" DeploymentType= ").append(this.host.getDeploymentType()) .append(" isJavaApp= ").append(this.isJavaApp) .toString(); }
Source:
public DmxTransmitter(DmxService service) { this.service = service; lastTransmit = 0; }

Target:
public DmxTransmitter(DmxService service) { this.service = service; }