auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void example48(Vertx vertx) throws CertificateException { SelfSignedCertificate certificate = SelfSignedCertificate.create(); NetServerOptions serverOptions = new NetServerOptions() .setSsl(true) .setKeyCertOptions(certificate.keyCertOption()) .setTrustOptions(certificate.trustOptions()); NetServer server = vertx.createNetServer(serverOptions) .connectHandler(socket -> socket.write("Hello!").end()) .listen(1234, "localhost"); NetClientOptions clientOptions = new NetClientOptions() .setSsl(true) .setKeyCertOptions(certificate.keyCertOption()) .setTrustOptions(certificate.trustOptions()); NetClient client = vertx.createNetClient(clientOptions); client.connect(1234, "localhost", ar -> { if (ar.succeeded()) { <START> ar.result().handler(System.out::println); <END> } else { System.err.println("Woops: " + ar.cause().getMessage()); } }); }</code><technical_language>a method reference instead a lambda of code generation in other languages for doc</technical_language>

Target:
public void example48(Vertx vertx) throws CertificateException { SelfSignedCertificate certificate = SelfSignedCertificate.create(); NetServerOptions serverOptions = new NetServerOptions() .setSsl(true) .setKeyCertOptions(certificate.keyCertOptions()) .setTrustOptions(certificate.trustOptions()); NetServer server = vertx.createNetServer(serverOptions) .connectHandler(socket -> socket.write("Hello!").end()) .listen(1234, "localhost"); NetClientOptions clientOptions = new NetClientOptions() .setSsl(true) .setKeyCertOptions(certificate.keyCertOptions()) .setTrustOptions(certificate.trustOptions()); NetClient client = vertx.createNetClient(clientOptions); client.connect(1234, "localhost", ar -> { if (ar.succeeded()) { ar.result().handler(buffer -> System.out.println(buffer)); } else { System.err.println("Woops: " + ar.cause().getMessage()); } }); }
Source:
<code>public void update(String body) throws IOException { owner.root.retrieve() <START> .method("POST") <END> .with("body", body) .method("PATCH") .withUrlPath(getApiTail()) .to(GHCommitComment.class); this.body = body; }</code><technical_language>remove this line overriding method a lines</technical_language>

Target:
public void update(String body) throws IOException { owner.root.createRequest() .method("PATCH") .with("body", body) .withUrlPath(getApiTail()) .fetch(GHCommitComment.class); this.body = body; }
Source:
<code><START> public static void setDefaultRetention_test() throws Exception { <END> if (!mintEnv) { System.out.println("Test: setDefaultRetention(String bucketName)"); } long startTime = System.currentTimeMillis(); String bucketName = getRandomName(); try { client.makeBucket(bucketName, null, true); ObjectLockConfiguration config = new ObjectLockConfiguration(RetentionMode.COMPLIANCE, new RetentionDurationDays(10)); client.setDefaultRetention(bucketName, config); mintSuccessLog("setDefaultRetention (String bucketName)", null, startTime); } catch (Exception e) { ErrorResponse errorResponse = null; if (e instanceof ErrorResponseException) { ErrorResponseException exp = (ErrorResponseException) e; errorResponse = exp.errorResponse(); } if (errorResponse != null && errorResponse.errorCode() == ErrorCode.NOT_IMPLEMENTED) { mintIgnoredLog("setDefaultRetention (String bucketName)", null, startTime); } else { mintFailedLog( "setDefaultRetention (String bucketName)", null, startTime, null, e.toString() + " >>> " + Arrays.toString(e.getStackTrace())); throw e; } } finally { client.removeBucket(bucketName); } }</code><technical_language>logic applies here</technical_language>

Target:
public static void setDefaultRetention_test() throws Exception { if (!mintEnv) { System.out.println("Test: setDefaultRetention(String bucketName)"); } long startTime = System.currentTimeMillis(); String bucketName = getRandomName(); try { client.makeBucket(bucketName, null, true); try { ObjectLockConfiguration config = new ObjectLockConfiguration(RetentionMode.COMPLIANCE, new RetentionDurationDays(10)); client.setDefaultRetention(bucketName, config); } finally { client.removeBucket(bucketName); } mintSuccessLog("setDefaultRetention (String bucketName)", null, startTime); } catch (Exception e) { ErrorResponse errorResponse = null; if (e instanceof ErrorResponseException) { ErrorResponseException exp = (ErrorResponseException) e; errorResponse = exp.errorResponse(); } if (errorResponse != null && errorResponse.errorCode() == ErrorCode.NOT_IMPLEMENTED) { mintIgnoredLog("setDefaultRetention (String bucketName)", null, startTime); } else { mintFailedLog( "setDefaultRetention (String bucketName)", null, startTime, null, e.toString() + " >>> " + Arrays.toString(e.getStackTrace())); throw e; } } }
Source:
<code>private void maybeAddGoogExport(Node exportsName) { String fullname = providesObjectChildren.keySet().iterator().next(); if ("exports".equals(exportsName.getQualifiedName())) { addExport(exportsName.getQualifiedName(), fullname, nameUtil.lastStepOfName(fullname)); } else if (exportsName.isGetProp() && "exports".equals(exportsName.getFirstChild().getQualifiedName())) { String identifier = exportsName.getLastChild().getString(); String importName = fullname + "." + identifier; addExport(exportsName.getQualifiedName(), importName, identifier); if (importName != null && !namespaceToModule.containsKey(importName)) { <START> namespaceToModule.put(importName, this); <END> providesObjectChildren.put(importName, ImmutableSet.<String>of()); } } }</code><technical_language>add a note need record this info</technical_language>

Target:
private void maybeAddGoogExport(Node exportsName) { String fullname = providesObjectChildren.keySet().iterator().next(); if ("exports".equals(exportsName.getQualifiedName())) { String identifier = firstNonNull( exportsName.getNext().getQualifiedName(), nameUtil.lastStepOfName(fullname)); addExport(exportsName.getQualifiedName(), fullname, identifier); } else if (exportsName.isGetProp() && "exports".equals(exportsName.getFirstChild().getQualifiedName())) { String identifier = exportsName.getLastChild().getString(); String importName = fullname + "." + identifier; addExport(exportsName.getQualifiedName(), importName, identifier); if (!namespaceToModule.containsKey(importName)) { namespaceToModule.put(importName, this); providesObjectChildren.put(importName, ImmutableSet.<String>of()); } } }
Source:
<code>public Object handleResult(int status, Header[] headers, InputStream stream, HttpContext ctx) throws RemoteException, IOException { <START> String ctype = getHeaderValue(headers, "Content-Type"); <END> if (status >= Response.Status.BAD_REQUEST.getStatusCode()) { handleException(status, ctype, stream); } else if (status == Response.Status.NO_CONTENT.getStatusCode() || stream == null) { if (ctype != null && ctype.toLowerCase().startsWith(CTYPE_MULTIPART_EMPTY)) { return new Blobs(); } return null; } if (ctype == null) { if (status != Response.Status.OK.getStatusCode()) { throw new RemoteException(status, "ServerError", "Server Error", ""); } return null; } String disp = getHeaderValue(headers, "Content-Disposition"); String lctype = ctype.toLowerCase(); if (lctype.startsWith(CTYPE_AUTOMATION)) { return JsonMarshalling.readRegistry(IOUtils.read(stream)); } else if (lctype.startsWith(CTYPE_ENTITY)) { String body = IOUtils.read(stream); try { return JsonMarshalling.readEntity(body); } catch (IOException | RuntimeException e) { return readStringBlob(ctype, getFileName(disp), body); } } else if (lctype.startsWith(CTYPE_MULTIPART_MIXED)) { return readBlobs(ctype, stream); } else { return readBlob(ctype, getFileName(disp), stream); } }</code><technical_language>constants for header names</technical_language>

Target:
public Object handleResult(int status, Header[] headers, InputStream stream, HttpContext ctx) throws RemoteException, IOException { String ctype = getHeaderValue(headers, HttpHeaders.CONTENT_TYPE); if (status >= Response.Status.BAD_REQUEST.getStatusCode()) { handleException(status, ctype, stream); } else if (status == Response.Status.NO_CONTENT.getStatusCode() || stream == null) { if (ctype != null && ctype.toLowerCase().startsWith(CTYPE_MULTIPART_EMPTY)) { return new Blobs(); } return null; } if (ctype == null) { if (status != Response.Status.OK.getStatusCode()) { throw new RemoteException(status, "ServerError", "Server Error", ""); } return null; } String disp = getHeaderValue(headers, HEADER_CONTENT_DISPOSITION); String lctype = ctype.toLowerCase(); if (lctype.startsWith(CTYPE_AUTOMATION)) { return JsonMarshalling.readRegistry(IOUtils.read(stream)); } else if (lctype.startsWith(CTYPE_ENTITY)) { String body = IOUtils.read(stream); try { return JsonMarshalling.readEntity(body); } catch (IOException | RuntimeException e) { return readStringBlob(ctype, getFileName(disp), body); } } else if (lctype.startsWith(CTYPE_MULTIPART_MIXED)) { return readBlobs(ctype, stream); } else { return readBlob(ctype, getFileName(disp), stream); } }
Source:
<code>protected IResource getResource(IPath path) { if (path != null) { IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); IFile file = root.getFileForLocation(path); if (file != null) { return file; } if (getType() != ARCHIVE) { IContainer container = root.getContainerForLocation(path); if (container != null) { return container; } } if (path.getDevice() == null) { <START> return root.findMember(path); <END> } } return null; }</code><technical_language>Question: return here? If path is found, findFiles/findContainers? Please note this "find" *below* if block, "if" work for Windows relative paths only</technical_language>

Target:
protected IResource getResource(IPath path) { if (path != null) { IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); if (path.getDevice() == null) { IResource member = root.findMember(path); if (member != null) { return member; } } IFile file = root.getFileForLocation(path); if (file != null) { return file; } if (getType() != ARCHIVE) { IContainer container = root.getContainerForLocation(path); if (container != null) { return container; } } @SuppressWarnings("deprecation") IFile[] files = root.findFilesForLocation(path); if (files.length > 0) { return files[0]; } if (getType() != ARCHIVE) { @SuppressWarnings("deprecation") IContainer[] containers = root.findContainersForLocation(path); if (containers.length > 0) { return containers[0]; } } } return null; }
Source:
<code>private Resource getMarkdownAsHtmlResource(String md, int lastModified, ResourceKey cacheKey) throws IOException { Map<String, String> macros = Maps.newHashMap(); macros.put("SSH_HOST", sshHost); macros.put("SSH_PORT", "" + sshPort); String url = webUrl.get(); if (Strings.isNullOrEmpty(url)) { url = "<LINK_0>"; } macros.put("URL", url); Matcher m = Pattern.compile("(\\\\)?@([A-Z_]+)@").matcher(md); StringBuffer sb = new StringBuffer(); while (m.find()) { String key = m.group(2); String val = macros.get(key); if (m.group(1) != null) { m.appendReplacement(sb, "@" + key + "@"); } else if (val != null) { m.appendReplacement(sb, val); } else { <START> m.appendReplacement(sb, "@" + key + "@"); <END> } } m.appendTail(sb); byte[] html = new MarkdownFormatter() .markdownToDocHtml(sb.toString(), "UTF-8", true); return new SmallResource(html) .setContentType("text/html") .setCharacterEncoding("UTF-8") .setLastModified(lastModified); }</code><technical_language>Lines 127 131 identical. Reshuffle if-statement repeating it</technical_language>

Target:
private Resource getMarkdownAsHtmlResource(String md, int lastModified, ResourceKey cacheKey) throws IOException { Map<String, String> macros = Maps.newHashMap(); macros.put("SSH_HOST", sshHost); macros.put("SSH_PORT", "" + sshPort); String url = webUrl.get(); if (Strings.isNullOrEmpty(url)) { url = "<LINK_0>"; } macros.put("URL", url); Matcher m = Pattern.compile("(\\\\)?@([A-Z_]+)@").matcher(md); StringBuffer sb = new StringBuffer(); while (m.find()) { String key = m.group(2); String val = macros.get(key); if (m.group(1) != null || val == null) { m.appendReplacement(sb, "@" + key + "@"); } else { m.appendReplacement(sb, val); } } m.appendTail(sb); byte[] html = new MarkdownFormatter() .markdownToDocHtml(sb.toString(), "UTF-8", true); return new SmallResource(html) .setContentType("text/html") .setCharacterEncoding("UTF-8") .setLastModified(lastModified); }
Source:
<code>public void onResume() { super.onResume(); if (player != null) { player.resume(); } <START> if (null != playerController) { <END> playerController.onResume(getActivity(), this); } }</code><technical_language>2 codestyles in 4 lines :)</technical_language>

Target:
public void onResume() { super.onResume(); if (player != null) { player.resume(); } if (playerController != null) { playerController.onResume(getActivity(), this); } }
Source:
<code>public void beforeEach() { goGoDuckConfig = mock(GoGoDuckConfig.class); <START> ggdm = new GoGoDuckModule("", new HttpIndexReader(null, ""), "TIME,1,2;LONGITUDE,2,3", null, goGoDuckConfig); <END> }</code><technical_language>HttpIndexreader required for command line I - remove</technical_language>

Target:
public void beforeEach() { goGoDuckConfig = mock(GoGoDuckConfig.class); ggdm = new GoGoDuckModule("", null, "TIME,1,2;LONGITUDE,2,3", goGoDuckConfig); }
Source:
<code>public void run() { try { IHandlerService handlerService = (IHandlerService) page.getActivePart().getSite().getService(IHandlerService.class); <START> boolean executeCommand = (element instanceof TmfTraceElement); <END> if (!executeCommand && element instanceof TmfExperimentElement) { TmfExperimentElement experiment = (TmfExperimentElement) element; executeCommand = (experiment.getTraces().size() > 0); } if (executeCommand) { handlerService.executeCommand(OPEN_COMMAND_ID, null); } } catch (ExecutionException e) { Activator.getDefault().logError("Error opening resource " + element.getName(), e); } catch (NotDefinedException e) { Activator.getDefault().logError("Error opening resource " + element.getName(), e); } catch (NotEnabledException e) { Activator.getDefault().logError("Error opening resource " + element.getName(), e); } catch (NotHandledException e) { Activator.getDefault().logError("Error opening resource " + element.getName(), e); } }</code><technical_language>Double-click accelerator for TmfAnalysisOutputElement working. Change to: boolean executeCommand = ((element instanceof TmfTraceElement) || (element instanceof TmfAnalysisOutputElement));</technical_language>

Target:
public void run() { try { IHandlerService handlerService = (IHandlerService) page.getActivePart().getSite().getService(IHandlerService.class); boolean executeCommand = ((element instanceof TmfTraceElement) || (element instanceof TmfAnalysisOutputElement)); if (!executeCommand && element instanceof TmfExperimentElement) { TmfExperimentElement experiment = (TmfExperimentElement) element; executeCommand = (experiment.getTraces().size() > 0); } if (executeCommand) { handlerService.executeCommand(OPEN_COMMAND_ID, null); } } catch (ExecutionException e) { Activator.getDefault().logError("Error opening resource " + element.getName(), e); } catch (NotDefinedException e) { Activator.getDefault().logError("Error opening resource " + element.getName(), e); } catch (NotEnabledException e) { Activator.getDefault().logError("Error opening resource " + element.getName(), e); } catch (NotHandledException e) { Activator.getDefault().logError("Error opening resource " + element.getName(), e); } }
Source:
<code>public static @Nullable Map<String, String> mapFromNmTextFile(File mappingFile) { Map<String, String> map = new HashMap<String, String>(); FileInputStream fis; try { fis = new FileInputStream(mappingFile); } catch (FileNotFoundException e) { return null; } <START> BufferedReader reader = new BufferedReader(new InputStreamReader(fis)); <END> try { for (String line = reader.readLine(); line != null; line = reader.readLine()) { String[] elems = line.split(" "); if (elems.length == 3) { String address = elems[0].replaceFirst("^0+(?!$)", ""); String name = elems[elems.length - 1]; map.put(address, name); } } reader.close(); } catch (IOException e) { try { reader.close(); } catch (IOException e1) } if (map.size() == 0) { return null; } return Collections.unmodifiableMap(map); }</code><technical_language>I a FileReader instead of a FileInputStream InputStreamReader</technical_language>

Target:
public static @Nullable Map<String, String> mapFromNmTextFile(File mappingFile) { Map<String, String> map = new HashMap<String, String>(); FileReader fr; try { fr = new FileReader(mappingFile); } catch (FileNotFoundException e) { return null; } BufferedReader reader = new BufferedReader(fr); try { for (String line = reader.readLine(); line != null; line = reader.readLine()) { String[] elems = line.split(" "); if (elems.length == 3) { String address = elems[0].replaceFirst("^0+(?!$)", ""); String name = elems[elems.length - 1]; map.put(address, name); } } } catch (IOException e) { } finally { try { reader.close(); } catch (IOException e) } if (map.isEmpty()) { return null; } return Collections.unmodifiableMap(map); }
Source:
<code>private boolean filterInvalid(Position position) { <START> return filterInvalid && !position.getValid() || position.getLatitude() > 90 || position.getLongitude() > 180; <END> }</code><technical_language>sense check minimum values well</technical_language>

Target:
private boolean filterInvalid(Position position) { if (filterInvalid == true) { return !position.getValid() || position.getLatitude() > 90 || position.getLongitude() > 180 || position.getLatitude() < -90 || position.getLongitude() < -180; } return false; }
Source:
<code>private GcsStorageService googleCloudStorageService(String dataFilename) { GcsStorageService service; <START> if (dataFilename == null) { <END> service = new GcsStorageService(bucket, rootFolder, project, jsonPath, applicationVersion); } else { service = new GcsStorageService(bucket, rootFolder, project, jsonPath, applicationVersion, dataFilename); } service.ensureBucketExists(); log.info("Using Google Cloud Storage bucket={} in project={}", bucket, project); log.info("Bucket versioning is {}.", service.supportsVersioning() ? "enabled" : "DISABLED"); return service; }</code><technical_language>!dataFilename here? want case if empty string well</technical_language>

Target:
private GcsStorageService googleCloudStorageService(String dataFilename) { GcsStorageService service; if (dataFilename == null || dataFilename.isEmpty()) { service = new GcsStorageService(bucket, rootFolder, project, jsonPath, applicationVersion); } else { service = new GcsStorageService(bucket, rootFolder, project, jsonPath, applicationVersion, dataFilename); } service.ensureBucketExists(); log.info("Using Google Cloud Storage bucket={} in project={}", bucket, project); log.info("Bucket versioning is {}.", service.supportsVersioning() ? "enabled" : "DISABLED"); return service; }
Source:
<code>public byte code(final byte refBase, final byte readBase) { if (Character.isLowerCase((char) refBase)) { <START> log.warn(String.format("CRAM: Attempt to generate a substitution code for a lower case reference base '%c'", (char) refBase)); <END> } return codeByBase[refBase][readBase]; }</code><technical_language>Is this log potentially penalize performance some real-life datasets consider pathological? is additional if evaluation penalty for for a case base a string format a log</technical_language>

Target:
public byte code(final byte refBase, final byte readBase) { if (refBase <= 0 || Character.isLowerCase((char) refBase)) { throw new IllegalArgumentException( String.format("CRAM: Attempt to generate a substitution code for invalid or lower case reference base '%c'", (char) refBase)); } if (readBase <= 0) { throw new IllegalArgumentException( String.format("CRAM: Attempt to generate a substitution code for an invalid read base value '%c'", (char) readBase)); } return codeByBase[refBase][readBase]; }
Source:
<code>protected void onDestroy() { unitsFab.setOnClickListener(null); if (menu != null) { menu.clear(); } if (states != null) { states.clear(); } if (mapboxMap != null && mapboxMap.getStyle() != null) { mapboxMap.getStyle().removeImage(RED_PIN_IMAGE_ID); mapboxMap.getStyle().removeImage(BLUE_PIN_IMAGE_ID); mapboxMap.getStyle().removeLayer(MAX_TEMP_LAYER_ID); mapboxMap.getStyle().removeLayer(MIN_TEMP_LAYER_ID); <START> mapboxMap.getStyle().removeSource(GEOJSON_SRC_ID); <END> } mapView.onDestroy(); mapView = null; mapboxMap = null; unitsFab = null; menu = null; super.onDestroy(); }</code><technical_language>put style a local variable</technical_language>

Target:
protected void onDestroy() { unitsFab.setOnClickListener(null); if (menu != null) { menu.clear(); } states.clear(); mapView.onDestroy(); mapView = null; mapboxMap = null; unitsFab = null; menu = null; super.onDestroy(); }
Source:
<code>List<ASTNode> getGroupByForClause(QBParseInfo parseInfo, String dest) throws SemanticException { ASTNode selectExpr = parseInfo.getSelForClause(dest); Collection<ASTNode> aggregateFunction = parseInfo.getDestToAggregationExprs().get(dest).values(); if (isSelectDistinct(selectExpr) && !isGroupBy(selectExpr) && !isAggregateInSelect(selectExpr, aggregateFunction)) { List<ASTNode> result = new ArrayList<ASTNode>(selectExpr == null ? 0 : selectExpr.getChildCount()); <START> if (selectExpr != null) { <END> for (int i = 0; i < selectExpr.getChildCount(); ++i) { if (((ASTNode) selectExpr.getChild(i)).getToken().getType() == HiveParser.QUERY_HINT) { continue; } ASTNode grpbyExpr = (ASTNode) selectExpr.getChild(i).getChild(0); result.add(grpbyExpr); } } return result; } else { ASTNode grpByExprs = parseInfo.getGroupByForClause(dest); List<ASTNode> result = new ArrayList<ASTNode>(grpByExprs == null ? 0 : grpByExprs.getChildCount()); if (grpByExprs != null) { for (int i = 0; i < grpByExprs.getChildCount(); ++i) { ASTNode grpbyExpr = (ASTNode) grpByExprs.getChild(i); if (grpbyExpr.getType() != HiveParser.TOK_GROUPING_SETS_EXPRESSION) { result.add(grpbyExpr); } } } return result; } }</code><technical_language>please kill null checks if null run NPE in earlier in new code</technical_language>

Target:
List<ASTNode> getGroupByForClause(QBParseInfo parseInfo, String dest) throws SemanticException { ASTNode selectExpr = parseInfo.getSelForClause(dest); Collection<ASTNode> aggregateFunction = parseInfo.getDestToAggregationExprs().get(dest).values(); if (!(this instanceof CalcitePlanner) && isSelectDistinct(selectExpr) && hasGroupBySibling(selectExpr)) { throw new SemanticException("SELECT DISTINCT with GROUP BY is only supported with CBO"); } if (isSelectDistinct(selectExpr) && !hasGroupBySibling(selectExpr) && !isAggregateInSelect(selectExpr, aggregateFunction)) { List<ASTNode> result = new ArrayList<ASTNode>(selectExpr.getChildCount()); for (int i = 0; i < selectExpr.getChildCount(); ++i) { if (((ASTNode) selectExpr.getChild(i)).getToken().getType() == HiveParser.QUERY_HINT) { continue; } ASTNode grpbyExpr = (ASTNode) selectExpr.getChild(i).getChild(0); result.add(grpbyExpr); } return result; } else { ASTNode grpByExprs = parseInfo.getGroupByForClause(dest); List<ASTNode> result = new ArrayList<ASTNode>(grpByExprs == null ? 0 : grpByExprs.getChildCount()); if (grpByExprs != null) { for (int i = 0; i < grpByExprs.getChildCount(); ++i) { ASTNode grpbyExpr = (ASTNode) grpByExprs.getChild(i); if (grpbyExpr.getType() != HiveParser.TOK_GROUPING_SETS_EXPRESSION) { result.add(grpbyExpr); } } } return result; } }
Source:
<code><START> @OnClick(R.id.email) void emailSupport() { <END> String body = "Version: " + BuildConfig.VERSION_NAME + "\n" + "\n" + "-- Device --" + "\n" + "Make: " + Build.MANUFACTURER + "\n" + "Model: " + Build.MODEL + "\n" + "Release: " + Build.VERSION.RELEASE + "\n" + "API: " + Build.VERSION.SDK_INT + "\n" + "\n" + "-- Description --" + "\n"; Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:")) .putExtra(Intent.EXTRA_EMAIL, new String[]{supportEmail}) .putExtra(Intent.EXTRA_TEXT, body); Context context = getView().getContext(); if (intent.resolveActivity(context.getPackageManager()) != null) { context.startActivity(intent); } else { Timber.w("No app available to handle email intent"); } }</code><technical_language>Annotations top</technical_language>

Target:
void emailSupport() { String body = "Version: " + BuildConfig.VERSION_NAME + "\n" + "\n" + "-- Device --" + "\n" + "Make: " + Build.MANUFACTURER + "\n" + "Model: " + Build.MODEL + "\n" + "Release: " + Build.VERSION.RELEASE + "\n" + "API: " + Build.VERSION.SDK_INT + "\n" + "\n" + "-- Description --" + "\n"; Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:")) .putExtra(Intent.EXTRA_EMAIL, new String[]{supportEmail}) .putExtra(Intent.EXTRA_TEXT, body); Context context = getView().getContext(); if (intent.resolveActivity(context.getPackageManager()) != null) { context.startActivity(intent); } else { Timber.w("No app available to handle email intent"); } }
Source:
<code>private boolean addImageTicketToProxy(Guid imagedTicketId, String hostUri) { ImageTicket imageTicket = new ImageTicket(); imageTicket.setId(imagedTicketId); imageTicket.setTimeout(getClientTicketLifetime()); imageTicket.setSize(getParameters().getTransferSize()); <START> imageTicket.setUrl(String.format("%s/images/%s", hostUri, imagedTicketId)); <END> imageTicket.setTransferId(getParameters().getCommandId().toString()); imageTicket.setFilename(getParameters().getDownloadFilename()); imageTicket.setSparse(isSparseImage()); imageTicket.setOps(new String[] {getParameters().getTransferType().getAllowedOperation()}); try { log.info("Adding image ticket to ovirt-imageio-proxy, id {}", imagedTicketId); getImageioClient().putTicket(imageTicket); } catch (RuntimeException e) { log.error("Failed to add image ticket to ovirt-imageio-proxy: {}", e.getMessage(), e); return false; } return true; }</code><technical_language>Add TODO change image transfer need duplicate this here</technical_language>

Target:
private boolean addImageTicketToProxy(Guid imagedTicketId, String hostUri) { ImageTicket imageTicket = new ImageTicket(); imageTicket.setId(imagedTicketId); imageTicket.setTimeout(getClientTicketLifetime()); imageTicket.setSize(getParameters().getTransferSize()); imageTicket.setUrl(String.format( "%s/%s/%s", hostUri, IMAGES_PATH, imagedTicketId)); imageTicket.setTransferId(getParameters().getCommandId().toString()); imageTicket.setFilename(getParameters().getDownloadFilename()); imageTicket.setSparse(isSparseImage()); imageTicket.setOps(new String[] {getParameters().getTransferType().getAllowedOperation()}); try { log.info("Adding image ticket to ovirt-imageio-proxy, id {}", imagedTicketId); getImageioClient().putTicket(imageTicket); } catch (RuntimeException e) { log.error("Failed to add image ticket to ovirt-imageio-proxy: {}", e.getMessage(), e); return false; } return true; }
Source:
<code>public void run() { HTInterval currentInterval; try { currentInterval = intervalQueue.peekLast(); while (currentInterval.getStartTime() != -1) { getSHT().insertInterval(currentInterval); <START> intervalQueue.take(); <END> currentInterval = intervalQueue.peekLast(); } if (currentInterval.getAttribute() != -1) { throw new IllegalStateException(); } getSHT().closeTree(currentInterval.getEndTime()); return; } catch (TimeRangeException e) { Activator.getDefault().logError("Error starting the state system", e); } }</code><technical_language>interval is removed queue is completely discarded?</technical_language>

Target:
public void run() { try { synchronized (intervalQueue) { fCurrentInterval = intervalQueue.take(); } while (fCurrentInterval.getStartTime() != -1) { getSHT().insertInterval(fCurrentInterval); synchronized (intervalQueue) { fCurrentInterval = intervalQueue.take(); } } if (fCurrentInterval.getAttribute() != -1) { throw new IllegalStateException(); } getSHT().closeTree(fCurrentInterval.getEndTime()); return; } catch (TimeRangeException e) { Activator.getDefault().logError("Error starting the state system", e); } }
Source:
<code>public void mercury_search_navigateUsingSearchSuggestionsOnDesktop() { Search search = new ArticlePage() .open("/d/") .getTopBar() .openSearch() .typeInSearch(this.SEARCH_PHRASE); String suggestionText = search.getSearchSuggestionText(0).replaceAll(" ", "_"); search.selectSearchSuggestion(0); <START> Assertion.assertTrue(driver.getCurrentUrl().contains(suggestionText)); <END> Assertion.assertTrue(new SkinHelper(driver).isSkin(Skin.OASIS)); }</code><technical_language>compare title, text replace</technical_language>

Target:
public void mercury_search_navigateUsingSearchSuggestionsOnDesktop() { String clickedSuggestion = new ArticlePage() .open("/d/") .getTopBar() .openSearch() .typeInSearch(SEARCH_PHRASE) .clickSearchSuggestion(0); Assertion.assertTrue(new SkinHelper(driver).isSkin(Skin.OASIS)); Assertion.assertEquals(clickedSuggestion.toLowerCase(), new ArticlePageObject().getArticleName().toLowerCase()); }
Source:
<code>public void verifySuggestAVideoOrArticleModalTopic() { waitForElementByElement(suggestVideoOrArticleModalTopic); <START> PageObjectLogging.log("VerifySuggestAVideoOrArticleModalTopic", "Verify that suggest a video or an article", true); <END> }</code><technical_language>1. line shorter 2. change parameter Verify verify (as new method name)</technical_language>

Target:
public void verifySuggestAVideoOrArticleModalTopic() { waitForElementByElement(suggestVideoOrArticleModalTopic); PageObjectLogging.log( "verifySuggestAVideoOrArticleModalTopic", "Verify that suggest a video or an article", true ); }
Source:
<code>public int category(Object element) { if (element instanceof RepositoryTreeNode) { RepositoryTreeNode<?> node = (RepositoryTreeNode<?>) element; RepositoryTreeNodeType type = node.getType(); switch (type) { case REPOGROUP: <START> return -1; END> case BRANCHHIERARCHY: return RepositoryTreeNodeType.REF.ordinal(); default: return type.ordinal(); } } return super.category(element); }</code><technical_language>Technically, sense change position of REPOGROUP in enum definition? I intentionally put groups repositories a group (without claiming reasoning is correct, a decision made, I live versions). primary concept of Repositories View is repository is I show first. I of ways groups used. I in mind is leaving current focus repositories a group put rest in attic group (which I end). if repositories in groups, is problem. If a new repository is added, appears top moved a group. a workflow perspective simply more natural groups last. a file/folder interpretation groups folders expected first..</technical_language>

Target:
public int category(Object element) { if (element instanceof RepositoryTreeNode) { RepositoryTreeNode<?> node = (RepositoryTreeNode<?>) element; RepositoryTreeNodeType type = node.getType(); switch (type) { case REPOGROUP: return RepositoryTreeNodeType.values().length; case BRANCHHIERARCHY: return RepositoryTreeNodeType.REF.ordinal(); default: return type.ordinal(); } } return super.category(element); }
Source:
<code>public ParallelTransferOptions(Integer blockSize, Integer numBuffers, ProgressReceiver progressReceiver) { if (blockSize != null) { <START> StorageImplUtils.assertInBounds("blockSize", blockSize, 0, BlockBlobAsyncClient.MAX_STAGE_BLOCK_BYTES); <END> } this.blockSize = blockSize; if (numBuffers != null) { StorageImplUtils.assertInBounds("numBuffers", numBuffers, 2, Integer.MAX_VALUE); } this.numBuffers = numBuffers; this.progressReceiver = progressReceiver; }</code><technical_language>assertInBounds is inclusive boundaries this continue 1 instead of 0 0 buffers sense</technical_language>

Target:
public ParallelTransferOptions(Integer blockSize, Integer numBuffers, ProgressReceiver progressReceiver) { if (blockSize != null) { StorageImplUtils.assertInBounds("blockSize", blockSize, 1, BlockBlobAsyncClient.MAX_STAGE_BLOCK_BYTES); } this.blockSize = blockSize; if (numBuffers != null) { StorageImplUtils.assertInBounds("numBuffers", numBuffers, 2, Integer.MAX_VALUE); } this.numBuffers = numBuffers; this.progressReceiver = progressReceiver; }
Source:
<code>public CoordinatorAdminClient(RESTClientConfig config) { this.config = config; this.httpClientFactory = new HttpClientFactory(); <START> Map<String, String> properties = new HashMap<String, String>(); <END> properties.put(HttpClientFactory.HTTP_POOL_SIZE, Integer.toString(this.config.getMaxR2ConnectionPoolSize())); this.client = new TransportClientAdapter(httpClientFactory.getClient(properties)); }</code><technical_language>Maps.newHashMap(); instead of new etc. matter. shorter</technical_language>

Target:
public CoordinatorAdminClient(RESTClientConfig config) { this.config = config; this.httpClientFactory = new HttpClientFactory(); Map<String, String> properties = Maps.newHashMap(); properties.put(HttpClientFactory.HTTP_POOL_SIZE, Integer.toString(this.config.getMaxR2ConnectionPoolSize())); this.client = new TransportClientAdapter(httpClientFactory.getClient(properties)); }
Source:
<code>public void setActionConfirmationMessage(String message) { boolean isNonEmptyMessage = message != null; if <START> (isNonEmptyMessage) { <END> actionConfirmationMessage.setText(message); } actionConfirmationMessage.setVisible(isNonEmptyMessage); }</code><technical_language>this false</technical_language>

Target:
public void setActionConfirmationMessage(String message) { boolean isNonEmptyMessage = message != null; if (isNonEmptyMessage) { actionConfirmationMessage.setText(message); } }
Source:
<code>protected static boolean checkProtocolPresent(String hostNames, String protocolName) { final String[] uris = hostNames.toString().split("\\r?\\n"); return Arrays.stream(uris) .map(uri -> uri.substring(0, uri.indexOf(PROTOCOL_SEPARATOR))) <START> .anyMatch(uri -> uri.equals(protocolName)); <END> }</code><technical_language>please replace uri.equals(protocolName) Objects.equals(uri, protocolName)? throw exception in case uri protocolName is null</technical_language>

Target:
protected static boolean checkProtocolPresent(String hostNames, String protocolName) { final String[] uris = hostNames.toString().split("\\r?\\n"); return Arrays.stream(uris) .map(uri -> uri.substring(0, uri.indexOf(PROTOCOL_SEPARATOR))) .anyMatch(uri -> Objects.equals(uri, protocolName)); }
Source:
<code>public ILaunchDescriptor getDescriptor(Object element) { if (element instanceof ILaunchConfiguration) { ILaunchConfiguration config = (ILaunchConfiguration) element; try { if( config.getType().isPublic() && !(config.getAttribute(ILaunchManager.ATTR_PRIVATE, false))) { DefaultLaunchDescriptor descriptor = descriptors.get(config); if (descriptor == null) { descriptor = new DefaultLaunchDescriptor(this, config); descriptors.put(config, descriptor); } return descriptor; } } catch(CoreException ce) { Activator.log(ce.getStatus()); } catch(NullPointerException npe) { <START> npe.printStackTrace(); <END> } } return null; }</code><technical_language>this is coming from? logged</technical_language>

Target:
public ILaunchDescriptor getDescriptor(Object element) { if (element instanceof ILaunchConfiguration) { ILaunchConfiguration config = (ILaunchConfiguration) element; try { if( config.getType() != null && config.getType().isPublic() && !(config.getAttribute(ILaunchManager.ATTR_PRIVATE, false))) { DefaultLaunchDescriptor descriptor = descriptors.get(config); if (descriptor == null) { descriptor = new DefaultLaunchDescriptor(this, config); descriptors.put(config, descriptor); } return descriptor; } } catch(CoreException ce) { Activator.log(ce.getStatus()); } } return null; }
Source:
<code>private ServerListReader getServerListReader() { if (serverListReaderRef.get() == null) { EurekaInterestClient interestClient; if (Eureka2Clients.getInterestClient() != null) { logger.info("Initializing Eureka2EnabledNIWSServerList with EurekaInterestClient provided by EurekaClients singleton"); interestClient = Eureka2Clients.getInterestClient(); } else { String writeClusterHost = clientConfig.getPropertyAsString(EUREKA2_WRITE_CLUSTER_HOST_KEY, null); int interestPort = clientConfig.getPropertyAsInteger(EUREKA2_WRITE_CLUSTER_INTEREST_PORT_KEY, EurekaTransports.DEFAULT_DISCOVERY_PORT); String readClusterVip = clientConfig.getPropertyAsString(EUREKA2_READ_CLUSTER_VIP_KEY, null); logger.info("Initializing Eureka2EnabledNIWSServerList from IClientConfig (writeClusterHost={}, interestPort={}, readClusterVip={})", new Object[]{writeClusterHost, interestPort, readClusterVip}); ServerResolver writeClusterResolver; if (writeClusterHost.indexOf('.') == -1) { writeClusterResolver = ServerResolvers.from(new Server(writeClusterHost, interestPort)); } else { writeClusterResolver = ServerResolvers.fromDnsName(writeClusterHost).withPort(interestPort); } ServerResolver readClusterResolver = ServerResolvers .fromEureka(writeClusterResolver) .forInterest(Interests.forVips(readClusterVip)); interestClient = Eurekas.newInterestClientBuilder().withServerResolver(readClusterResolver).build(); } String[] vipAddresses = this.vipAddresses.split(","); <START> serverListReaderRef.compareAndSet(null, new ServerListReader(interestClient, vipAddresses, isSecure)); <END> } return serverListReaderRef.get(); }</code><technical_language>Shutdown new reader if CAS failed</technical_language>

Target:
private ServerListReader getServerListReader() { ServerListReader current = serverListReaderRef.get(); if (current != null && current.isClosed()) { serverListReaderRef.compareAndSet(current, null); return getServerListReader(); } if (current == null) { ServerListReader serverListReader = new ServerListReader(clientConfig, isSecure, vipAddresses); if (!serverListReaderRef.compareAndSet(null, serverListReader)) { serverListReader.shutdown(); } } return serverListReaderRef.get(); }
Source:
<code>public <START> int getIndex() <END> { return findex; }</code><technical_language>long</technical_language>

Target:
public long getIndex() { return findex; }
Source:
<code>private void setCommandExecutionAllowed(boolean isAllowed){ isExecutionAllowed = isAllowed; <START> newCommand.setIsExecutionAllowed(isAllowed); <END> updateRemoveActionAvailability(); }</code><technical_language>I move this code 'updateActionAvailability'. 'updateActionAvailability' line - newCommand.setIsExecutionAllowed(isExecutionAllowed); I is enough update 'new' command once, 'updateActionAvailability' is standard place 'ExecutionAllowed' of commands</technical_language>

Target:
private void setCommandExecutionAllowed(boolean isAllowed){ isExecutionAllowed = isAllowed; updateActionAvailability(); }
Source:
<code>public void onSuccessfulResponse(ReplicaId replicaId) { super.onSuccessfulResponse(replicaId); <START> if(isLocalDone) { <END> coordinatorMetrics.crossColoProxyCallCount.inc(); logger.trace("Operation succeeded after going cross colo"); } logger.trace("Successful response from " + replicaId); onReplicaResponse(replicaId); }</code><technical_language>this check "if (proxied)" instead</technical_language>

Target:
public void onSuccessfulResponse(ReplicaId replicaId) { super.onSuccessfulResponse(replicaId); if(proxied) { coordinatorMetrics.crossColoProxyCallCount.inc(); logger.trace("Operation succeeded after going cross colo"); } logger.trace("Successful response from " + replicaId); onReplicaResponse(replicaId); }
Source:
<code>public String modifyLanguage( final ModifyLanguageParamsJson params ) { <START> return Optional.ofNullable( doApplyLanguage( params.getName(), params.getLanguage() ) ). <END> map( Locale::toLanguageTag ). orElse( null ); }</code><technical_language>improve readability return optional doApplyLanguage</technical_language>

Target:
public String modifyLanguage( final ModifyLanguageParamsJson params ) { return doApplyLanguage( params.getName(), params.getLanguage() ). map( Locale::toLanguageTag ). orElse( null ); }
Source:
<code>public void testConfigHardwareMitigations() throws Exception { String mitigations[] = <START> null; <END> if (PropertyUtil.getFirstApiLevel(mDevice) < 28) { return; } if (CpuFeatures.isArm64(mDevice) && !CpuFeatures.kernelVersionLessThan(mDevice, 4, 4)) { mitigations = lookupMitigations(); if (mitigations != null) { for (String mitigation : mitigations) { assertTrue("Linux kernel must have " + mitigation + " enabled.", configSet.contains(mitigation)); } } } else if (CpuFeatures.isX86(mDevice)) { assertTrue("Linux kernel must have KPTI enabled: CONFIG_PAGE_TABLE_ISOLATION=y", configSet.contains("CONFIG_PAGE_TABLE_ISOLATION=y")); } }</code><technical_language>initializing null is unnecessary. set use</technical_language>

Target:
public void testConfigHardwareMitigations() throws Exception { String mitigations[]; if (PropertyUtil.getFirstApiLevel(mDevice) < 28) { return; } if (CpuFeatures.isArm64(mDevice) && !CpuFeatures.kernelVersionLessThan(mDevice, 4, 4)) { mitigations = lookupMitigations(); if (mitigations != null) { for (String mitigation : mitigations) { assertTrue("Linux kernel must have " + mitigation + " enabled.", configSet.contains(mitigation)); } } } else if (CpuFeatures.isX86(mDevice)) { assertTrue("Linux kernel must have KPTI enabled: CONFIG_PAGE_TABLE_ISOLATION=y", configSet.contains("CONFIG_PAGE_TABLE_ISOLATION=y")); } }
Source:
<code>public void addCommand(String rawLine) throws PackProtocolException { checkCommandLine(rawLine); String line = rawLine.substring(0, rawLine.length() - 1); ReceiveCommand cmd; try { <START> cmd = parseCommand(line); } catch (IllegalArgumentException | StringIndexOutOfBoundsException e) { <END> throw new PackProtocolException(MessageFormat.format( JGitText.get().pushCertificateInvalidFieldValue, "command", rawLine), e); } commands.add(cmd); rawCommands.append(rawLine); }</code><technical_language>this check performed catching unchecked exceptions? E.g. private static final Pattern COMMAND = Pattern.compile("^[0-9a-f]{40} [0-9a-f]{40} "); if (!COMMAND.match(line)) { throw ... } making parseCommand throw a checked exception</technical_language>

Target:
public void addCommand(String rawLine) throws PackProtocolException { checkCommandLine(rawLine); String line = rawLine.substring(0, rawLine.length() - 1); commands.add(parseCommand(line)); rawCommands.append(rawLine); }
Source:
<code>private synchronized void resetGeneration() { this.generation = Generation.NO_GENERATION; rejoinNeeded = true; <START> if (state != MemberState.REBALANCING) <END> state = MemberState.UNJOINED; }</code><technical_language>equivalent state == MemberState.STABLE</technical_language>

Target:
private synchronized void resetGeneration() { this.rejoinNeeded = true; this.generation = Generation.NO_GENERATION; }
Source:
<code>public void before() { installTestMom(JmsTestMom.class); <START> m_messageHandler = mock(IJmsMessageHandler.class); <END> m_messageHandlerBean = BeanTestingHelper.get().registerBean(new BeanMetaData(IJmsMessageHandler.class, m_messageHandler).withAnnotation(AnnotationFactory.createApplicationScoped())); assertSame(m_messageHandler, BEANS.get(IJmsMessageHandler.class)); LOG.info("---------------------------------------------------"); LOG.info("<{}>", m_testName.getMethodName()); m_t0 = System.nanoTime(); m_testJobExecutionHint = UUID.randomUUID().toString(); m_disposables = new ArrayList<>(); }</code><technical_language>extract "installTestMessageHandler()" method, analog installTestMom()</technical_language>

Target:
public void before() { installTestMom(JmsTestMom.class); installTestMessageHandler(); LOG.info("---------------------------------------------------"); LOG.info("<{}>", m_testName.getMethodName()); m_t0 = System.nanoTime(); m_testJobExecutionHint = UUID.randomUUID().toString(); m_disposables = new ArrayList<>(); }
Source:
<code>public static void publishNotification(PublishedCollection publishedCollection, boolean publishComplete) { if (publishedCollection == null) { logWarn("failed to send publish slack notification as published collection was null").log(); return; } String slackMessage = "Collection " + publishedCollection.getName() + " did not publish"; if (publishComplete) { Result result = publishedCollection.publishResults.get(0); StringBuilder msg = new StringBuilder("Published collection: " + publishedCollection.getName()); if (publishedCollection.publishStartDate != null && publishedCollection.publishEndDate != null) { msg.append(" publish time : " + format.format(publishedCollection.publishStartDate)); String timeTaken = String.format("%.2f", (publishedCollection.publishEndDate.getTime() - publishedCollection.publishStartDate.getTime()) / 1000.0); msg.append(" time taken: " + timeTaken + " "); } result.transaction.uriInfos .stream() .filter(info -> info.uri.endsWith("data.json")) .findFirst() .ifPresent(urlInfo -> { msg.append("Example Uri: <LINK_0>") <START> .append(urlInfo.uri.substring(0, urlInfo.uri.length() - ("data" + ".json").length())); <END> }); slackMessage = msg.toString(); } try { sendPublishNotification(slackMessage); } catch (Exception e) { logError(e, "Slack publish notification error") .collectionName(publishedCollection.getName()) .log(); } }</code><technical_language>"data" + ".json" adding here</technical_language>

Target:
public static void publishNotification(PublishedCollection publishedCollection, boolean publishComplete) { if (publishedCollection == null) { logWarn("failed to send publish slack notification as published collection was null").log(); return; } String slackMessage = "Collection " + publishedCollection.getName() + " did not publish"; if (publishComplete) { Result result = publishedCollection.publishResults.get(0); StringBuilder msg = new StringBuilder("Published collection: " + publishedCollection.getName()); if (publishedCollection.publishStartDate != null && publishedCollection.publishEndDate != null) { msg.append(" publish time : " + format.format(publishedCollection.publishStartDate)); String timeTaken = String.format("%.2f", (publishedCollection.publishEndDate.getTime() - publishedCollection.publishStartDate.getTime()) / 1000.0); msg.append(" time taken: " + timeTaken + " "); } result.transaction.uriInfos .stream() .filter(info -> info.uri.endsWith(DATA_JSON)) .findFirst() .ifPresent(urlInfo -> { msg.append("Example Uri: <LINK_0>") .append(urlInfo.uri.substring(0, urlInfo.uri.length() - (DATA_JSON).length())); }); slackMessage = msg.toString(); } try { sendPublishNotification(slackMessage); } catch (Exception e) { logError(e, "Slack publish notification error") .collectionName(publishedCollection.getName()) .log(); } }
Source:
<code>private void processShallow() throws IOException { <START> DepthWalk.RevWalk depthWalk = new DepthWalk.RevWalk(db, depth - 1, DepthWalk.CompareMode.EQUAL); <END> for (RevCommit c : wantCommits) { RevCommit commit = depthWalk.parseCommit(c); depthWalk.markStart(commit); } RevObject o; while ((o = depthWalk.next()) != null) { localShallowCommits.add((RevCommit)o); boolean found = false; for (RevCommit c : remoteShallowCommits) { if (c.name() == o.name()) { found = true; break; } } if (!found) { pckOut.writeString("shallow " + o.name()); } } for (RevCommit remote : remoteShallowCommits) { boolean found = false; for(RevCommit local : localShallowCommits) { if(remote.name() == local.name()) { found = true; break; } } if (!found) { pckOut.writeString("unshallow " + remote.name()); } } pckOut.end(); }</code><technical_language>Style-nit: Line is long, prefer lines <80 characters a tab stop setting of 4. for performance reasons please try ObjectReader walk member is using. caching involved improve shallow computation here. Yes, sorry, need other constructor in DepthWalk.RevWalk class</technical_language>

Target:
private void processShallow() throws IOException { DepthWalk.RevWalk depthWalk = new DepthWalk.RevWalk(walk.getObjectReader(), depth); for (RevObject o : wantAll) { if (o instanceof RevCommit) depthWalk.markStart(depthWalk.parseCommit(o)); } RevObject o; while ((o = depthWalk.next()) != null) { DepthWalk.Commit c = (DepthWalk.Commit)o; if (c.depth == depth && !clientShallowCommits.contains(c)) { pckOut.writeString("shallow " + o.name()); } if (c.depth < depth && clientShallowCommits.contains(c)) { unshallowCommits.add(c); pckOut.writeString("unshallow " + c.name()); } } pckOut.end(); }
Source:
<code>public WeldBeanDeploymentArchive build() { <START> if (id == null) { <END> throw CommonLogger.LOG.idMustBeSet(); } return new WeldBeanDeploymentArchive(id, classes, getBeansXml()); }</code><technical_language>Here, Preconditions.checkNotNull(id, "id") remove idMustBeSet()</technical_language>

Target:
public WeldBeanDeploymentArchive build() { Preconditions.checkArgumentNotNull(id, "id"); return new WeldBeanDeploymentArchive(id, classes, getBeansXml()); }