auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static Object getStaticField(OgnlContext context, String className, String fieldName) throws OgnlException { Exception reason = null; try { Class c = classForName(context, className); if (c == null) throw new OgnlException("Unable to find class " + className + " when resolving field name of " + fieldName); if (fieldName.equals("class")) { return c; } else if (OgnlRuntime.isJdk15() && c.isEnum()) { try { return Enum.valueOf(c, fieldName); } catch (IllegalArgumentException e) { } } Field f = getField(c, fieldName); if (f == null) { throw new NoSuchFieldException(fieldName); } if (!Modifier.isStatic(f.getModifiers())) throw new OgnlException("Field " + fieldName + " of class " + className + " is not static"); Object result = null; if (!f.isAccessible() && context.getMemberAccess().isAccessible(context, null, f, null)) { context.getMemberAccess().setup(context, null, f, null); try { result = f.get(null); } finally { context.getMemberAccess().restore(context, null, f, null, null); } } else { result = f.get(null); } return result; } catch (ClassNotFoundException e) { reason = e; } catch (NoSuchFieldException e) { reason = e; } catch (SecurityException e) { reason = e; } catch (IllegalAccessException e) { reason = e; } throw new OgnlException("Could not get static field " + fieldName + " from class " + className, reason); }

Target:
public static Object getStaticField(OgnlContext context, String className, String fieldName) throws OgnlException { Exception reason = null; try { Class c = classForName(context, className); if (c == null) throw new OgnlException("Unable to find class " + className + " when resolving field name of " + fieldName); if (fieldName.equals("class")) { return c; } else if (OgnlRuntime.isJdk15() && c.isEnum()) { try { return Enum.valueOf(c, fieldName); } catch (IllegalArgumentException e) { } } Field f = getField(c, fieldName); if (f == null) { throw new NoSuchFieldException(fieldName); } if (!Modifier.isStatic(f.getModifiers())) throw new OgnlException("Field " + fieldName + " of class " + className + " is not static"); Object result = null; if (context.getMemberAccess().isAccessible(context, null, f, null)) { Object state = context.getMemberAccess().setup(context, null, f, null); try { result = f.get(null); } finally { context.getMemberAccess().restore(context, null, f, null, state); } } else { throw new IllegalAccessException("Access to " + fieldName + " of class " + className + " is forbidden"); } return result; } catch (ClassNotFoundException e) { reason = e; } catch (NoSuchFieldException e) { reason = e; } catch (SecurityException e) { reason = e; } catch (IllegalAccessException e) { reason = e; } throw new OgnlException("Could not get static field " + fieldName + " from class " + className, reason); }
Source:
private void directoryRadioSelected() { if (fImportFromDirectoryRadio.getSelection()) { directoryNameField.setEnabled(true); directoryBrowseButton.setEnabled(true); fArchiveNameField.setEnabled(false); fArchiveBrowseButton.setEnabled(false); updateFromSourceField(); directoryNameField.setFocus(); fCreateLinksInWorkspaceButton.setSelection(true); fCreateLinksInWorkspaceButton.setEnabled(true); } }

Target:
private void directoryRadioSelected() { if (fImportFromDirectoryRadio.getSelection()) { directoryNameField.setEnabled(true); directoryBrowseButton.setEnabled(true); fArchiveNameField.setEnabled(false); fArchiveBrowseButton.setEnabled(false); updateFromSourceField(); directoryNameField.setFocus(); fCreateLinksInWorkspaceButton.setSelection(fPreviousCreateLinksValue); fCreateLinksInWorkspaceButton.setEnabled(true); } }
Source:
private Object convertValue(Object value, Type type) { if (value == null) { return null; } if (BOOLEAN.equals(type) || DATE.equals(type) || Varchars.isVarcharType(type)) { return value; } if (BIGINT.equals(type)) { return ((Number) value).longValue(); } if (INTEGER.equals(type)) { return ((Number) value).intValue(); } if (DOUBLE.equals(type)) { return ((Number) value).doubleValue(); } throw new IllegalArgumentException("Unhandled type: " + type); }

Target:
private Object convertValue(Object value, Type type) { if (value == null) { return null; } if (type == BOOLEAN || type == DATE || isVarcharType(type)) { return value; } if (type == BIGINT) { return ((Number) value).longValue(); } if (type == INTEGER) { return ((Number) value).intValue(); } if (type == DOUBLE) { return ((Number) value).doubleValue(); } throw new IllegalArgumentException("Unhandled type: " + type); }
Source:
public HttpRequest filter(HttpRequest request) throws HttpException { this.sasAuthentication = authSAS(this.credential); if (this.sasAuthentication){ request = filterSAS(request, this.credential); } else { request = filterKey(request); } utils.logRequest(signatureLog, request, "<<"); return request; }

Target:
public HttpRequest filter(HttpRequest request) throws HttpException { request = this.isSAS ? filterSAS(request, this.credential) : filterKey(request); utils.logRequest(signatureLog, request, "<<"); return request; }
Source:
public void validateTextSearchIsAvailable() { assertThat(im.isTextSearchEnabled(), is(true)); }

Target:
public void validateTextSearchIsAvailable() throws Exception { Set<String> compileOptions = SQLDatabaseTestUtils.getCompileOptions(db); assertThat(compileOptions, hasItems("ENABLE_FTS3", "ENABLE_FTS3_PARENTHESIS")); assertThat(im.isTextSearchEnabled(), is(true)); }
Source:
private static TimeBudget createTimeBudget(Properties properties) { String timeoutString = properties.getProperty(ConnectionPropertyNames.CONNECTION_TIMEOUT, Long.toString(DEFAULT_LEASED_CONNECTION_TIMEOUT.toMillis())); long timeout = Long.parseLong(timeoutString); return new TimeBudget(timeout, TimeUnit.MILLISECONDS); }

Target:
private static TimeBudget createTimeBudget(Properties properties) { String timeoutString = properties.getProperty(ConnectionPropertyNames.CONNECTION_TIMEOUT, DEFAULT_LEASED_CONNECTION_TIMEOUT); long timeout = Long.parseLong(timeoutString); return new TimeBudget(timeout, TimeUnit.MILLISECONDS); }
Source:
public ObjectStat statObject(String bucketName, String objectName, ServerSideEncryption sse) throws InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException, InternalException, InvalidArgumentException, InvalidResponseException { checkReadRequestSse(sse); Map<String, String> headers = null; if (sse != null) { headers = sse.headers(); } checkBucketName(bucketName); String errorMessage = ""; if ( objectName == null ) { errorMessage += " Object name cannot be null."; } else if ( objectName.equals("") ) { errorMessage += " Object name cannot be empty."; } if ( !errorMessage.equals("") ) { throw new InvalidArgumentException("Invalid Stat Object Argument(s)." + errorMessage); } HttpResponse response = executeHead(bucketName, objectName, headers); ResponseHeader header = response.header(); if ( header.contentLength() == 0 && header.contentType() == null && header.statusCode() == null ) { throw new InvalidArgumentException("Invalid Stat Object Arguments."); } Map<String,List<String>> httpHeaders = response.httpHeaders(); ObjectStat objectStat = new ObjectStat(bucketName, objectName, header, httpHeaders); return objectStat; }

Target:
public ObjectStat statObject(String bucketName, String objectName, ServerSideEncryption sse) throws InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException, InternalException, InvalidArgumentException, InvalidResponseException { checkReadRequestSse(sse); checkBucketName(bucketName); if ( objectName == null || objectName.equals("") ) { throw new InvalidArgumentException("Invalid Stat Object Argument(s). Object name cannot be empty."); } Map<String, String> headers = null; if (sse != null) { headers = sse.headers(); } HttpResponse response = executeHead(bucketName, objectName, headers); ResponseHeader header = response.header(); Map<String,List<String>> httpHeaders = response.httpHeaders(); ObjectStat objectStat = new ObjectStat(bucketName, objectName, header, httpHeaders); return objectStat; }
Source:
public String submitXMLFile(String sessionId, File file) throws RestServerException, ServiceException { HttpPost method = new HttpPost(SchedulerConfig.get().getRestUrl() + "/scheduler/submit"); method.addHeader("sessionId", sessionId); boolean isJar = isJarFile(file); try { String name = isJar ? "jar" : "file"; String mime = isJar ? "application/java-archive" : "application/xml"; String charset = "ISO-8859-1"; MultipartEntity entity = new MultipartEntity(); entity.addPart("file", new FileBody(file, name, mime, charset)); method.setEntity(entity); HttpResponse execute = httpClient.execute(method); InputStream is = execute.getEntity().getContent(); String ret = convertToString(is); if (execute.getStatusLine().getStatusCode() == 200) { return ret; } else { throw new RestServerException(execute.getStatusLine().getStatusCode(), ret); } } catch (IOException e) { throw new ServiceException("Failed to read response: " + e.getMessage()); } finally { method.releaseConnection(); if (file != null) { file.delete(); } } }

Target:
public String submitXMLFile(String sessionId, File file) throws RestServerException, ServiceException { HttpPost method = new HttpPost(SchedulerConfig.get().getRestUrl() + "/scheduler/submit"); method.addHeader("sessionId", sessionId); boolean isJar = isJarFile(file); try { String name = isJar ? "jar" : "file"; String mime = isJar ? "application/java-archive" : "application/xml"; String charset = "ISO-8859-1"; MultipartEntity entity = new MultipartEntity(); entity.addPart("file", new FileBody(file, name, mime, charset)); method.setEntity(entity); HttpResponse execute = httpClient.execute(method); InputStream is = execute.getEntity().getContent(); String ret = convertToString(is); if (execute.getStatusLine().getStatusCode() == Response.Status.OK.getStatusCode()) { return ret; } else { throw new RestServerException(execute.getStatusLine().getStatusCode(), ret); } } catch (IOException e) { throw new ServiceException("Failed to read response: " + e.getMessage()); } finally { method.releaseConnection(); if (file != null) { file.delete(); } } }
Source:
protected void prepareTestData() { removeAndRestoreTypicalDataBundle(); FeedbackSessionAttributes gracePeriodSession; FeedbackSessionAttributes session1InCourse1; FeedbackSessionAttributes closedSession; session1InCourse1 = typicalBundle.feedbackSessions.get("session1InCourse1"); gracePeriodSession = typicalBundle.feedbackSessions.get("gracePeriodSession"); closedSession = typicalBundle.feedbackSessions.get("closedSession"); instructor1OfCourse1 = typicalBundle.instructors.get("instructor1OfCourse1"); student1InCourse1 = typicalBundle.students.get("student1InCourse1"); qn1InSession1InCourse1 = logic.getFeedbackQuestion( session1InCourse1.getFeedbackSessionName(), session1InCourse1.getCourseId(), 1); qn2InGracePeriodInCourse1 = logic.getFeedbackQuestion( gracePeriodSession.getFeedbackSessionName(), gracePeriodSession.getCourseId(), 2); qn1InClosedSessionInCourse1 = logic.getFeedbackQuestion( closedSession.getFeedbackSessionName(), closedSession.getCourseId(), 1); instructor1OfCourse2 = typicalBundle.instructors.get("instructor1OfCourse2"); student2InCourse1 = typicalBundle.students.get("student2InCourse1"); student5InCourse1 = typicalBundle.students.get("student5InCourse1"); instructor2OfCourse1 = typicalBundle.instructors.get("instructor2OfCourse1"); qn2InSession1InCourse1 = logic.getFeedbackQuestion( session1InCourse1.getFeedbackSessionName(), session1InCourse1.getCourseId(), 2); }

Target:
protected void prepareTestData() { removeAndRestoreTypicalDataBundle(); FeedbackSessionAttributes gracePeriodSession = typicalBundle.feedbackSessions.get("gracePeriodSession"); FeedbackSessionAttributes session1InCourse1 = typicalBundle.feedbackSessions.get("session1InCourse1"); FeedbackSessionAttributes closedSession = typicalBundle.feedbackSessions.get("closedSession"); instructor1OfCourse1 = typicalBundle.instructors.get("instructor1OfCourse1"); student1InCourse1 = typicalBundle.students.get("student1InCourse1"); qn1InSession1InCourse1 = logic.getFeedbackQuestion( session1InCourse1.getFeedbackSessionName(), session1InCourse1.getCourseId(), 1); qn2InGracePeriodInCourse1 = logic.getFeedbackQuestion( gracePeriodSession.getFeedbackSessionName(), gracePeriodSession.getCourseId(), 2); qn1InClosedSessionInCourse1 = logic.getFeedbackQuestion( closedSession.getFeedbackSessionName(), closedSession.getCourseId(), 1); instructor1OfCourse2 = typicalBundle.instructors.get("instructor1OfCourse2"); student2InCourse1 = typicalBundle.students.get("student2InCourse1"); student5InCourse1 = typicalBundle.students.get("student5InCourse1"); instructor2OfCourse1 = typicalBundle.instructors.get("instructor2OfCourse1"); qn2InSession1InCourse1 = logic.getFeedbackQuestion( session1InCourse1.getFeedbackSessionName(), session1InCourse1.getCourseId(), 2); }
Source:
@Test public void dragNDropByElementTest() throws Exception { Activity activity = new Activity("io.appium.android.apis", ".view.DragAndDropDemo"); driver.startActivity(activity); WebElement dragDot1 = driver.findElement(By.id("io.appium.android.apis:id/drag_dot_1")); WebElement dragDot3 = driver.findElement(By.id("io.appium.android.apis:id/drag_dot_3")); WebElement dragText = driver.findElement(By.id("io.appium.android.apis:id/drag_text")); assertEquals("Drag text not empty", "", dragText.getText()); TouchAction dragNDrop = new TouchAction(driver) .longPress(elementOption(dragDot1)) .moveTo(elementOption(dragDot3)) .release(); dragNDrop.perform(); assertNotEquals("Drag text empty", "", dragText.getText()); }

Target:
@Test public void dragNDropByElementTest() throws Exception { Activity activity = new Activity("io.appium.android.apis", ".view.DragAndDropDemo"); driver.startActivity(activity); WebElement dragDot1 = driver.findElement(By.id("io.appium.android.apis:id/drag_dot_1")); WebElement dragDot3 = driver.findElement(By.id("io.appium.android.apis:id/drag_dot_3")); WebElement dragText = driver.findElement(By.id("io.appium.android.apis:id/drag_text")); assertEquals("Drag text not empty", "", dragText.getText()); TouchAction dragNDrop = new TouchAction(driver) .longPress(element(dragDot1)) .moveTo(element(dragDot3)) .release(); dragNDrop.perform(); assertNotEquals("Drag text empty", "", dragText.getText()); }
Source:
public void loadKeyRSAPassword() throws IOException, GeneralSecurityException { File file = new File(this.getClass().getResource("rsa-password").getFile()); String password = "password"; assertkeyPair(file, password); }

Target:
public void loadKeyRSAPassword() throws IOException, GeneralSecurityException { File file = new File(this.getClass().getResource("rsa-password").getFile()); String password = "password"; assertKeyPairNotNull(file, password); }
Source:
public @ResponseBody Team getTeamById( HttpSession session, @PathVariable int id) { if(session.getAttribute("session") == null) { return null; } TeamDao teamDao = new TeamDao(); return teamDao.getTeamById(id, false, true, false); }

Target:
public @ResponseBody Team getTeamById( HttpSession session, @PathVariable int id) { if(session.getAttribute("member") == null) { return null; } TeamDao teamDao = new TeamDao(); return teamDao.getTeamById(id, false, true, false); }
Source:
private void printUsage(ArgumentsParser parser) { StringBuilder sb = new StringBuilder(); for(String action : actions.keySet()) { sb.append(String.format(" %-32s - %s\n", action, parser.getActionHeader(action))); } System.out.format( "usage: %s", parser.getUsage() .replace("@PROGRAM_NAME@", (String) context.get(PROGRAM_NAME)) .replace("@ACTION_LIST@", sb.toString()) ); }

Target:
private void printUsage(ArgumentsParser parser) { StringBuilder sb = new StringBuilder(); for(String action : actions.keySet()) { sb.append(String.format(" %-32s - %s\n", action, parser.getActionHeader(action))); } System.out.format( "Usage: %s", parser.getUsage() .replace("@PROGRAM_NAME@", (String) context.get(PROGRAM_NAME)) .replace("@ACTION_LIST@", sb.toString()) ); }
Source:
public void save(){ checkIfCustomDataNeedsUpdate(); super.save(); }

Target:
public void save(){ applyCustomDataUpdatesIfNecessary(); super.save(); }
Source:
protected Address getReplyToAddress(Message request) throws Exception { Address replyTo; replyTo = AddressUtils.decodeReplyToAddress(request); if (replyTo == null) { if (this.responseExchange == null) { throw new AmqpException( "Cannot determine ReplyTo message property value: " + "Request message does not contain reply-to property, " + "and no default response Exchange was set."); } replyTo = new Address(this.responseExchange, this.responseRoutingKey); } return replyTo; }

Target:
protected Address getReplyToAddress(Message request) throws Exception { Address replyTo = AddressUtils.decodeReplyToAddress(request); if (replyTo == null) { if (this.responseExchange == null) { throw new AmqpException( "Cannot determine ReplyTo message property value: " + "Request message does not contain reply-to property, " + "and no default response Exchange was set."); } replyTo = new Address(this.responseExchange, this.responseRoutingKey); } return replyTo; }
Source:
public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((key == null) ? 0 : key.hashCode()); result = prime * result + ((state == null) ? 0 : state.hashCode()); result = prime * result + ((value == null) ? 0 : value.hashCode()); return result; }

Target:
public int hashCode() { final int prime = 31; int result = 1; result = prime * result + key.hashCode(); result = prime * result + state.hashCode(); result = prime * result + ((value == null) ? 0 : value.hashCode()); return result; }
Source:
public String toString() { Class<Map<String, String>> clazz = (Class) Map.class; Map<String, String> params = MAPPER.convertValue(this.getParams(), clazz); if (params.containsKey("password")) { params.put("password", "XXX"); } return "<JsonRpcRequest id: " + this.getId() + ", method: " + this.getMethod() + ", params: " + params + ">"; }

Target:
public String toString() { Class<Map<String, String>> clazz = (Class) Map.class; Map<String, String> params = MAPPER.convertValue(this.getParams(), clazz); if (params.containsKey("password")) { params.put("password", "*****"); } return "<JsonRpcRequest id: " + this.getId() + ", method: " + this.getMethod() + ", params: " + params + ">"; }
Source:
public Mono<HttpResponse> process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { if ("http".equals(context.getHttpRequest().getUrl().getProtocol())) { return Mono.error(new RuntimeException("token credentials require a URL using the HTTPS protocol scheme")); } return credential.getToken(tokenRequestContext) .flatMap(token -> { context.getHttpRequest().getHeaders().put(AUTHORIZATION_HEADER, BEARER + " " + token.getToken()); return next.process(); }); }

Target:
public Mono<HttpResponse> process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { if ("http".equals(context.getHttpRequest().getUrl().getProtocol())) { return Mono.error(new RuntimeException("token credentials require a URL using the HTTPS protocol scheme")); } return cache.getToken() .flatMap(token -> { context.getHttpRequest().getHeaders().put(AUTHORIZATION_HEADER, BEARER + " " + token.getToken()); return next.process(); }); }
Source:
public void add(final int number, final int megaBytes, final int cores, final EventHandler<AllocatedEvaluator> evaluatorAllocatedHandler, final List<EventHandler <ActiveContext>> contextActiveHandlerList) { addQueue.add(new Tuple2<>(evaluatorAllocatedHandler, contextActiveHandlerList)); }

Target:
public void add(final int number, final int megaBytes, final int cores, final EventHandler<AllocatedEvaluator> evaluatorAllocatedHandler, final List<EventHandler <ActiveContext>> contextActiveHandlerList) { try { addHandlerQueue.put(new Tuple2<>(evaluatorAllocatedHandler, contextActiveHandlerList)); } catch (final InterruptedException e) { LOG.log(Level.WARNING, "Interrupted while putting Add to queue", e); } }
Source:
public boolean initQueue() { if (isInitialized.compareAndSet(false, true)) { log.info("InMemoryPersistentBus initialized"); return true; } else { return false; } }

Target:
public boolean initQueue() { if (config.isProcessingOff()) { log.warn("InMemoryPersistentBus processing is off, cannot be initialized"); return false; } if (isInitialized.compareAndSet(false, true)) { log.info("InMemoryPersistentBus initialized"); return true; } else { return false; } }
Source:
public String toString() { StringBuilder sb = new StringBuilder().append(this.getClass().getSimpleName()) .append("{keyBytes=").append(keyBytes) .append(", valueBytes=").append(valueBytes) .append(", metadataBytes=").append(metadataBytes) .append(", key=").append(key); if (key == null && keyBytes != null && marshaller != null) { sb.append('/').append(this.<Object>unmarshall(keyBytes)); } sb.append(", value=").append(value); if (value == null && valueBytes != null && marshaller != null) { sb.append('/').append(this.<Object>unmarshall(valueBytes)); } sb.append(", metadata=").append(metadata); if (metadata == null && metadataBytes != null && marshaller != null) { sb.append('/').append(this.<Object>unmarshall(metadataBytes)); } sb.append(", marshaller=").append(marshaller).append('}'); return sb.toString(); }

Target:
public String toString() { StringBuilder sb = new StringBuilder().append(this.getClass().getSimpleName()) .append("{keyBytes=").append(keyBytes) .append(", valueBytes=").append(valueBytes) .append(", metadataBytes=").append(metadataBytes) .append(", key=").append(key); if (key == null && keyBytes != null && marshaller != null) { sb.append('/').append(this.<Object>unmarshall(keyBytes)); } sb.append(", value=").append(value); if (value == null && valueBytes != null && marshaller != null) { sb.append('/').append(this.<Object>unmarshall(valueBytes)); } sb.append(", metadata=").append(metadata); if (metadata == null && metadataBytes != null && marshaller != null) { sb.append('/').append(this.<Object>unmarshall(metadataBytes)); } sb.append(", created=").append(created); sb.append(", lastUsed=").append(lastUsed); sb.append(", marshaller=").append(marshaller).append('}'); return sb.toString(); }
Source:
void verifyConstructLength(String constructType, int maxLength, ParserRuleContext ctx) { if (SourceFileUtil.constructTooLong(ctx, maxLength)) { int constructLength = ctx.getStop().getLine() - ctx.getStart().getLine(); String lengthVersusLimit = " (" + constructLength + "/" + maxLength + ")"; Location location = ListenerUtil.getContextStartLocation(ctx); this.printer.error(constructType + Messages.EXCEEDS_LINE_LIMIT + lengthVersusLimit, location); } }

Target:
void verifyConstructLength(String constructType, int maxLength, ParserRuleContext ctx) { if (SourceFileUtil.constructTooLong(ctx, maxLength)) { int constructLength = ctx.getStop().getLine() - ctx.getStart().getLine(); createErrorMessage(constructLength, ctx, constructType, maxLength, Messages.EXCEEDS_LINE_LIMIT); } }
Source:
public void startWithBadInputTest() throws InstantiationException, IOException { for (int i = 0; i < 2; i++) { Properties properties = new Properties(); properties.setProperty(i == 0 ? "netty.server.port" : "netty.server.ssl.port", "-1"); NioServer nioServer = getNettyServer(properties); try { nioServer.start(); fail("NettyServer start() should have failed because of bad port number value"); } catch (IllegalArgumentException e) { } finally { if (nioServer != null) { nioServer.shutdown(); } } } }

Target:
public void startWithBadInputTest() throws InstantiationException, IOException { Properties properties = new Properties(); properties.setProperty("netty.server.port", "-1"); doStartFailureTest(properties); properties = new Properties(); properties.setProperty("netty.server.ssl.port", "-1"); doStartFailureTest(properties); }
Source:
private void interruptAndWaitCleanupTime() { threadToKill.interrupt(); Sleeper cleanupTimeSleeper = getCleanupTimeSleeper(); cleanupTimeSleeper.sleep(); }

Target:
private void interruptAndWaitCleanupTime() { threadToKill.interrupt(); long iterationsToHitWaitingTimeLimit = getCleanupTimeSeconds() * MULTIPLIER_FROM_SECONDS_TO_ITERATION_WITH_CLEANUP_TIME_SLEEPER; for (long i = 0; threadToKill.isAlive() && i < iterationsToHitWaitingTimeLimit; i++) { cleanupTimeSleeper.sleep(); } }
Source:
public void remove(PrioritizedSplitRunner split) { lock.lock(); for (int level = 0; level < LEVELS.length; level++) { levelWaitingSplits.get(level).remove(split); } lock.unlock(); }

Target:
public void remove(PrioritizedSplitRunner split) { checkArgument(split != null, "split is null"); lock.lock(); try { for (PriorityQueue<PrioritizedSplitRunner> level : levelWaitingSplits) { level.remove(split); } } finally { lock.unlock(); } }
Source:
public ValidationResult runPoolValidationForActivationKey(ActivationKey key, Pool pool, Long quantity) { ValidationResult result = new ValidationResult(); if (quantity != null && quantity < 1) { result.addError("rulefailed.invalid.quantity"); } if (!"yes".equalsIgnoreCase(pool.getMergedProductAttribute(Pool.Attributes.MULTI_ENTITLEMENT))) { if (quantity != null && quantity > 1) { result.addError("rulefailed.invalid.nonmultient.quantity"); } for (ActivationKeyPool akPool : key.getPools()) { if (pool.getId().equals(akPool.getPool().getId())) { result.addError("rulefailed.already.exists"); break; } } } if (ConsumerType.ConsumerTypeEnum.PERSON.getLabel().equalsIgnoreCase( pool.getMergedAttribute(Pool.Attributes.REQUIRES_CONSUMER_TYPE))) { result.addError("rulefailed.actkey.cannot.use.person.pools"); } return result; }

Target:
public ValidationResult runPoolValidationForActivationKey(ActivationKey key, Pool pool, Long quantity) { ValidationResult result = new ValidationResult(); if (quantity != null && quantity < 1) { result.addError(ErrorKeys.INVALID_QUANTITY); } if (!PropertyConverter.toBoolean(pool.getMergedProductAttribute(Pool.Attributes.MULTI_ENTITLEMENT))) { if (quantity != null && quantity > 1) { result.addError(ErrorKeys.INVALID_NON_MULTIENT_QUANTITY); } for (ActivationKeyPool akPool : key.getPools()) { if (pool.getId().equals(akPool.getPool().getId())) { result.addError(ErrorKeys.ALREADY_EXISTS); break; } } } if (ConsumerType.ConsumerTypeEnum.PERSON.getLabel().equalsIgnoreCase( pool.getMergedAttribute(Pool.Attributes.REQUIRES_CONSUMER_TYPE))) { result.addError(ErrorKeys.CANNOT_USE_PERSON_POOLS); } return result; }
Source:
public void close() throws IOException { flush(); started.set(false); exec.shutdown(); }

Target:
public void close() throws IOException { synchronized (started) { flush(); exec.shutdown(); started.set(false); } }
Source:
public AbstractResponse getErrorResponse(int throttleTimeMs, Errors error) { OffsetDeleteResponseTopicCollection topics = new OffsetDeleteResponseTopicCollection(); for (OffsetDeleteRequestTopic topic : data.topics()) { OffsetDeleteResponsePartitionCollection partitions = new OffsetDeleteResponsePartitionCollection(); for (OffsetDeleteRequestPartition partition : topic.partitions()) { partitions.add(new OffsetDeleteResponsePartition() .setPartitionIndex(partition.partitionIndex()) .setErrorCode(error.code()) ); } topics.add(new OffsetDeleteResponseTopic() .setName(topic.name()) .setPartitions(partitions) ); } return new OffsetDeleteResponse( new OffsetDeleteResponseData() .setTopics(topics) .setThrottleTimeMs(throttleTimeMs) .setErrorCode(error.code()) ); }

Target:
public AbstractResponse getErrorResponse(int throttleTimeMs, Errors error) { return new OffsetDeleteResponse( new OffsetDeleteResponseData() .setThrottleTimeMs(throttleTimeMs) .setErrorCode(error.code()) ); }
Source:
public void testSelectByWeightLeastActive() { int loop = 10000; Map<Invoker, InvokeResult> resultMap = getWeightedInvokeResult(loop, LeastActiveLoadBalance.NAME); int test3Weight = 0; for (Entry<Invoker, InvokeResult> entry : resultMap.entrySet()) { String protocol = entry.getKey().getUrl().getProtocol(); if (protocol.equals("test3")) { Assert.assertEquals(0, entry.getValue().getCount().get()); test3Weight = entry.getValue().getWeight(); } } for (Entry<Invoker, InvokeResult> entry : resultMap.entrySet()) { String protocol = entry.getKey().getUrl().getProtocol(); if (!protocol.equals("test3")) { InvokeResult invokeResult = entry.getValue(); invokeResult.setTotalWeight(invokeResult.getTotalWeight() - test3Weight); Assert.assertTrue(invokeResult.getDeltaPercentage(loop) < 12); } } }

Target:
public void testSelectByWeightLeastActive() { int sumInvoker1 = 0; int sumInvoker2 = 0; int loop = 10000; LeastActiveLoadBalance lb = new LeastActiveLoadBalance(); for (int i = 0; i < loop; i++) { Invoker selected = lb.select(weightInvokers, null, weightTestInvocation); if (selected.getUrl().getProtocol().equals("test1")) { sumInvoker1++; } if (selected.getUrl().getProtocol().equals("test2")) { sumInvoker2++; } Assert.assertTrue("select is not the least active one", !selected.getUrl().getProtocol().equals("test3")); } System.out.println(sumInvoker1); System.out.println(sumInvoker2); Assert.assertEquals("select failed!", sumInvoker1 + sumInvoker2, loop); }
Source:
public PlanNode visitTableScan(TableScanNode node, RewriteContext<Void> context) { if (subfieldPaths.isEmpty()) { return node; } ImmutableMap.Builder<Symbol, ColumnHandle> newAssignmentsBuilder = ImmutableMap.builder(); ImmutableMap.Builder<Symbol, List<SubfieldPath>> leafSubfieldsBuilder = ImmutableMap.builder(); for (Map.Entry<Symbol, ColumnHandle> entry : node.getAssignments().entrySet()) { if (fullColumnUses.contains(entry.getKey())) { newAssignmentsBuilder.put(entry); continue; } List<SubfieldPath> subfields = new ArrayList(); for (SubfieldPath path : subfieldPaths) { if (path.getColumnName().equals(entry.getKey().getName())) { subfields.add(path); } } if (subfields.isEmpty()) { newAssignmentsBuilder.put(entry); continue; } List<SubfieldPath> leafPaths = new ArrayList(); for (SubfieldPath path : subfields) { if (!prefixExists(path, subfields)) { leafPaths.add(path); } } newAssignmentsBuilder.put(entry); leafSubfieldsBuilder.put(entry.getKey(), leafPaths); } Map<Symbol, List<SubfieldPath>> leafSubfields = leafSubfieldsBuilder.build(); if (leafSubfields.isEmpty()) { return node; } return new TableScanNode( node.getId(), node.getTable(), node.getOutputSymbols(), newAssignmentsBuilder.build(), node.getLayout(), node.getCurrentConstraint(), node.getEnforcedConstraint(), leafSubfields); }

Target:
public PlanNode visitTableScan(TableScanNode node, RewriteContext<Void> context) { if (subfieldPaths.isEmpty()) { return node; } ImmutableMap.Builder<Symbol, List<Subfield>> leafSubfieldsBuilder = ImmutableMap.builder(); for (Map.Entry<Symbol, ColumnHandle> entry : node.getAssignments().entrySet()) { if (fullColumnUses.contains(entry.getKey())) { continue; } List<Subfield> subfields = new ArrayList(); for (Subfield path : subfieldPaths) { if (path.getRootName().equals(entry.getKey().getName())) { subfields.add(path); } } if (subfields.isEmpty()) { continue; } List<Subfield> leafPaths = new ArrayList(); for (Subfield path : subfields) { if (!prefixExists(path, subfields)) { leafPaths.add(path); } } leafSubfieldsBuilder.put(entry.getKey(), leafPaths); } Map<Symbol, List<Subfield>> leafSubfields = leafSubfieldsBuilder.build(); if (leafSubfields.isEmpty()) { return node; } return new TableScanNode( node.getId(), node.getTable(), node.getOutputSymbols(), node.getAssignments(), node.getCurrentConstraint(), node.getEnforcedConstraint(), node.isTemporaryTable(), leafSubfields); }
Source:
public void createAnomalyAlertConfiguration(HttpClient httpClient, MetricsAdvisorServiceVersion serviceVersion) { final AtomicReference<String> alertConfigurationId = new AtomicReference<>(); try { client = getMetricsAdvisorAdministrationBuilder(httpClient, serviceVersion).buildAsyncClient(); creatAnomalyAlertRunner(inputAnomalyAlert -> StepVerifier.create(client.createAnomalyAlertConfiguration(inputAnomalyAlert)) .assertNext(createdAnomalyAlert -> { alertConfigurationId.set(createdAnomalyAlert.getId()); validateAnomalyAlertResult(inputAnomalyAlert, createdAnomalyAlert); }) .verifyComplete()); } finally { Mono<Void> deleteAnomalyAlertConfiguration = client.deleteAnomalyAlertConfiguration(alertConfigurationId.get()); StepVerifier.create(deleteAnomalyAlertConfiguration).verifyComplete(); } }

Target:
public void createAnomalyAlertConfiguration(HttpClient httpClient, MetricsAdvisorServiceVersion serviceVersion) { final AtomicReference<String> alertConfigurationId = new AtomicReference<>(); try { client = getMetricsAdvisorAdministrationBuilder(httpClient, serviceVersion).buildAsyncClient(); creatAnomalyAlertRunner(inputAnomalyAlert -> StepVerifier.create(client.createAnomalyAlertConfiguration(inputAnomalyAlert)) .assertNext(createdAnomalyAlert -> { alertConfigurationId.set(createdAnomalyAlert.getId()); validateAnomalyAlertResult(inputAnomalyAlert, createdAnomalyAlert); }) .verifyComplete()); } finally { if (!CoreUtils.isNullOrEmpty(alertConfigurationId.get())) { Mono<Void> deleteAnomalyAlertConfiguration = client.deleteAnomalyAlertConfiguration(alertConfigurationId.get()); StepVerifier.create(deleteAnomalyAlertConfiguration).verifyComplete(); } } }
Source:
protected UserSimpleFilterChain createFilterChain(FilterExpression<UserEntity> filter) { return new UserSimpleFilterChain(entityManager.getCriteriaBuilder(), extensionDao, (UserFilterExpression) filter); }

Target:
protected UserSimpleFilterChain createFilterChain(FilterExpression<UserEntity> filter) { return new UserSimpleFilterChain(entityManager.getCriteriaBuilder(), extensionDao, filter); }
Source:
public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof ProductDTO && super.equals(obj)) { ProductDTO that = (ProductDTO) obj; EqualsBuilder builder = new EqualsBuilder() .append(this.getUuid(), that.getUuid()) .append(this.getId(), that.getId()) .append(this.getName(), that.getName()) .append(this.getMultiplier(), that.getMultiplier()) .append(this.getAttributes(), that.getAttributes()) .append(this.getDependentProductIds(), that.getDependentProductIds()) .append(this.getHref(), that.getHref()) .append(this.isLocked(), that.isLocked()) .append(this.getBranding(), that.getBranding()); boolean equals = builder.isEquals(); equals = equals && Util.collectionsAreEqual(this.getProductContent(), that.getProductContent()); equals = equals && Util.collectionsAreEqual(this.getProvidedProducts(), that.getProvidedProducts()); return equals; } return false; }

Target:
public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof ProductDTO && super.equals(obj)) { ProductDTO that = (ProductDTO) obj; EqualsBuilder builder = new EqualsBuilder() .append(this.getUuid(), that.getUuid()) .append(this.getId(), that.getId()) .append(this.getName(), that.getName()) .append(this.getMultiplier(), that.getMultiplier()) .append(this.getAttributes(), that.getAttributes()) .append(this.getDependentProductIds(), that.getDependentProductIds()) .append(this.getHref(), that.getHref()) .append(this.isLocked(), that.isLocked()) .append(this.getBranding(), that.getBranding()) .append(this.getProvidedProducts(), that.getProvidedProducts()); boolean equals = builder.isEquals(); equals = equals && Util.collectionsAreEqual(this.getProductContent(), that.getProductContent()); return equals; } return false; }
Source:
public void SignUp_008_signupJapaneseUser() { String wikiURLJapanese = "<LINK_0>"; WikiBasePageObject base = new WikiBasePageObject(driver); SignUpPageObject signUp = base.navigateToSpecialSignUpPage(wikiURLJapanese); signUp.disableCaptcha(); String userName = "品質管理" + signUp.getTimeStamp(); String password = "品質管理管理" + signUp.getTimeStamp(); String email = credentials.emailQaart2; String emailPassword = credentials.emailPasswordQaart2; signUp.typeEmail(email); signUp.typeUserName(userName); signUp.typePassword(password); signUp.enterBirthDate(PageContent.WIKI_SIGN_UP_BIRTHMONTH, PageContent.WIKI_SIGN_UP_BIRTHDAY, PageContent.WIKI_SIGN_UP_BIRTHYEAR); AlmostTherePageObject almostTherePage = signUp.submit(email, emailPassword); ConfirmationPageObject confirmPageAlmostThere = almostTherePage.enterActivationLink(email, emailPassword, wikiURLJapanese, "ja"); confirmPageAlmostThere.typeInUserName(userName); confirmPageAlmostThere.typeInPassword(password); UserProfilePageObject userProfile = confirmPageAlmostThere.clickSubmitButton(email, emailPassword); userProfile.verifyUserLoggedIn(userName); CustomizedToolbarComponentObject toolbar = new CustomizedToolbarComponentObject(driver); toolbar.verifyUserToolBar(); PreferencesPageObject preferences = userProfile.openSpecialPreferencesPage(wikiURL); preferences.selectTab(tabNames.EMAIL); preferences.verifyEmailMeSection(); }

Target:
public void SignUp_008_signupJapaneseUser() { SignUpPageObject signUp = new WikiBasePageObject(driver).navigateToSpecialSignUpPage(wikiURL); signUp.disableCaptcha(); String userName = "品質管理" + signUp.getTimeStamp(); String password = "品質管理管理" + signUp.getTimeStamp(); String email = credentials.emailQaart2; String emailPassword = credentials.emailPasswordQaart2; signUp.typeEmail(email); signUp.typeUserName(userName); signUp.typePassword(password); signUp.enterBirthDate(PageContent.WIKI_SIGN_UP_BIRTHMONTH, PageContent.WIKI_SIGN_UP_BIRTHDAY, PageContent.WIKI_SIGN_UP_BIRTHYEAR); AlmostTherePageObject almostTherePage = signUp.submit(email, emailPassword); ConfirmationPageObject confirmPageAlmostThere = almostTherePage.enterActivationLink(email, emailPassword, wikiURL, "ja"); confirmPageAlmostThere.typeInUserName(userName); confirmPageAlmostThere.typeInPassword(password); UserProfilePageObject userProfile = confirmPageAlmostThere.clickSubmitButton(email, emailPassword); userProfile.verifyUserLoggedIn(userName); CustomizedToolbarComponentObject toolbar = new CustomizedToolbarComponentObject(driver); toolbar.verifyUserToolBar(); PreferencesPageObject preferences = userProfile.openSpecialPreferencesPage(wikiURL); preferences.selectTab(tabNames.EMAIL); preferences.verifyEmailMeSection(); }
Source:
public static AbstractCharSequenceAssert<?, ? extends CharSequence> assertThat(StringBuilder actual) { return new CharSequenceAssert(actual); }

Target:
public static AbstractCharSequenceAssert<?, ? extends CharSequence> assertThat(StringBuilder actual) { return AssertionsForClassTypes.assertThat(actual); }
Source:
private Session getSession(URI sessionModelURI, boolean restore) { Session sessionFromURI; try { sessionFromURI = null; if (restore) { sessionFromURI = SessionManager.INSTANCE.getSession(sessionModelURI, new NullProgressMonitor()); } else { sessionFromURI = SessionManager.INSTANCE.getExistingSession(sessionModelURI); } if (sessionFromURI != null) { if (!sessionFromURI.isOpen()) { sessionFromURI.open(new NullProgressMonitor()); } IEditingSession uiSession = null; if (restore) { uiSession = SessionUIManager.INSTANCE.getOrCreateUISession(sessionFromURI); } else { uiSession = SessionUIManager.INSTANCE.getUISession(sessionFromURI); } uiSession.open(); } } catch (IllegalStateException e) { sessionFromURI = null; } catch (OperationCanceledException e) { sessionFromURI = null; } return sessionFromURI; }

Target:
private Session getSession(URI sessionModelURI, boolean restore) { Session sessionFromURI; try { sessionFromURI = null; if (restore) { sessionFromURI = SessionManager.INSTANCE.getSession(sessionModelURI, new NullProgressMonitor()); } else { sessionFromURI = SessionManager.INSTANCE.getExistingSession(sessionModelURI); } if (sessionFromURI != null) { if (!sessionFromURI.isOpen()) { sessionFromURI.open(new NullProgressMonitor()); } IEditingSession uiSession = null; if (restore) { uiSession = SessionUIManager.INSTANCE.getOrCreateUISession(sessionFromURI); } else { uiSession = SessionUIManager.INSTANCE.getUISession(sessionFromURI); } if (uiSession != null && uiSession.isOpen()) { uiSession.open(); } } } catch (IllegalStateException e) { sessionFromURI = null; } catch (OperationCanceledException e) { sessionFromURI = null; } return sessionFromURI; }
Source:
protected boolean AddVmImages() { int numberOfStartedCopyTasks = 0; try { if (!getDiskImagesFromConfiguration().isEmpty()) { lockEntities(); for (DiskImage diskImage : getDiskImagesFromConfiguration()) { if (diskImage.getimageStatus() == ImageStatus.ILLEGAL) { DiskImage snapshotImageInDb = getDiskImageDao().getSnapshotById(diskImage.getId()); if (snapshotImageInDb == null) { saveNewDiskAndImage(diskImage); } } else { copyDiskImage(diskImage, diskImage.getstorage_ids().get(0), imageToDestinationDomainMap.get(diskImage.getId()), VdcActionType.AddVmFromSnapshot); numberOfStartedCopyTasks++; } } } } finally { if (numberOfStartedCopyTasks == 0) { unlockEntities(); } } return true; }

Target:
protected boolean AddVmImages() { int numberOfStartedCopyTasks = 0; try { if (!getDiskImagesFromConfiguration().isEmpty()) { lockEntities(); for (DiskImage diskImage : getDiskImagesFromConfiguration()) { if (diskImage.getimageStatus() == ImageStatus.ILLEGAL) { DiskImage snapshotImageInDb = getDiskImageDao().getSnapshotById(diskImage.getId()); if (snapshotImageInDb == null) { saveIllegalDisk(diskImage); } } else { copyDiskImage(diskImage, diskImage.getstorage_ids().get(0), imageToDestinationDomainMap.get(diskImage.getId()), VdcActionType.AddVmFromSnapshot); numberOfStartedCopyTasks++; } } } } finally { if (numberOfStartedCopyTasks == 0) { unlockEntities(); } } return true; }
Source:
private void remove(@NonNull final Compilation compilation) { new AlertDialog.Builder(getContext()) .setMessage(R.string.compilation_remove_confirm) .setPositiveButton(R.string.compilation_remove_confirm_yes, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { new File(compilation.path()).delete(); beginUpdate(); } }) .setNegativeButton(R.string.compilation_remove_confirm_no, null) .show(); }

Target:
private void remove(@NonNull final Compilation compilation) { getDownloadObserver().removeWithConfirmation(getActivity(), compilation, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { beginUpdate(); } }); }
Source:
private static ResultSegment<ListBlobItem> listBlobsInSegments(CloudBlobDirectory directory, ResultContinuation token) throws IOException { ResultSegment<ListBlobItem> result = null; IOException lastException = null; for (int sleep = 10; sleep <= 10000; sleep *= 10) { try { result = directory.listBlobsSegmented( null, false, EnumSet.of(BlobListingDetails.METADATA), 5000, token, null, null); break; } catch (StorageException | URISyntaxException e) { lastException = new IOException(e); try { Thread.sleep(sleep); } catch (InterruptedException ex) { log.warn("Interrupted", e); } continue; } } if (result == null) { throw lastException; } else { return result; } }

Target:
private static ResultSegment<ListBlobItem> listBlobsInSegments(CloudBlobDirectory directory, ResultContinuation token) throws IOException { ResultSegment<ListBlobItem> result = null; IOException lastException = null; for (int sleep = 10; sleep <= 10000; sleep *= 10) { try { result = directory.listBlobsSegmented( null, false, EnumSet.of(BlobListingDetails.METADATA), 5000, token, null, null); break; } catch (StorageException | URISyntaxException e) { lastException = new IOException(e); try { Thread.sleep(sleep); } catch (InterruptedException ex) { log.warn("Interrupted", e); } } } if (result == null) { throw lastException; } else { return result; } }
Source:
static private void addTableToProject(VoltProjectBuilder project, int tableId, boolean partitioned) { try { project.addLiteralSchema(String.format(tableDDL, tableId)); project.addStmtProcedure("Insert" + tableId, "INSERT INTO T" + tableId + " VALUES (?)"); if (partitioned) { project.addLiteralSchema(String.format(partitionDDL, tableId)); } } catch (IOException e) { assertFalse(true); } }

Target:
static private void addTableToProject(VoltProjectBuilder project, int tableId, boolean partitioned) { try { project.addLiteralSchema(String.format(tableDDL, tableId)); if (partitioned) { project.addLiteralSchema(String.format(partitionDDL, tableId)); } } catch (IOException e) { assertFalse(true); } }
Source:
public void testShowStatsWithGroupByFails() { assertQueryFails("SHOW STATS FOR (SELECT * FROM orders GROUP BY orderkey, totalprice, categoryid)", ".*GROUP BY is not supported in SHOW STATS SELECT clause"); }

Target:
public void testShowStatsWithGroupByFails() { assertQueryFails("SHOW STATS FOR (SELECT avg(totalprice) FROM orders GROUP BY orderkey)", ".*GROUP BY is not supported in SHOW STATS SELECT clause"); }
Source:
public static void main(String[] args) throws Exception { ApplicationRunnerCommandLine cmdLine = new ApplicationRunnerCommandLine(); OptionSet options = cmdLine.parser().parse(args); Config orgConfig = cmdLine.loadConfig(options); ApplicationRunnerOperation op = cmdLine.getOperation(options); ApplicationRunnerUtil.invokeApplicationRunner(orgConfig, op); }

Target:
public static void main(String[] args) throws Exception { ApplicationRunnerCommandLine cmdLine = new ApplicationRunnerCommandLine(); OptionSet options = cmdLine.parser().parse(args); Config orgConfig = cmdLine.loadConfig(options); ApplicationRunnerOperation op = cmdLine.getOperation(options); ApplicationRunnerUtil.invoke(orgConfig, op); }
Source:
public static int[] getPKIndices(final Metadata metadata) throws DriverException { final int fc = metadata.getFieldCount(); final List<Integer> tmpPKIndices = new ArrayList<Integer>(); for (int i = 0; i < fc; i++) { final Type type = metadata.getFieldType(i); final Constraint[] constraints = type.getConstraints(); for (Constraint c : constraints) { if (Constraint.PK == c.getConstraintCode()) { tmpPKIndices.add(i); break; } } } final int[] pkIndices = new int[tmpPKIndices.size()]; int i = 0; for (Integer idx : tmpPKIndices) { pkIndices[i++] = idx.intValue(); } return pkIndices; }

Target:
public static int[] getPKIndices(final Metadata metadata) throws DriverException { final int fc = metadata.getFieldCount(); final List<Integer> tmpPKIndices = new ArrayList<Integer>(); for (int i = 0; i < fc; i++) { final Type type = metadata.getFieldType(i); final Constraint[] constraints = type.getConstraints(); for (Constraint c : constraints) { if (Constraint.PK == c.getConstraintCode()) { tmpPKIndices.add(i); break; } } } final int[] pkIndices = new int[tmpPKIndices.size()]; for (int i = 0; i < pkIndices.length; i++) { pkIndices[i] = tmpPKIndices.get(i); } return pkIndices; }
Source:
private Xpp3Dom getConfigXml( final Node node ) throws ManipulationException { final String config = galleyWrapper.toXML( node.getOwnerDocument(), false ) .trim(); try { return Xpp3DomBuilder.build( new StringReader( config ) ); } catch ( final XmlPullParserException | IOException e ) { throw new ManipulationException( "Failed to re-parse plugin configuration into Xpp3Dom: %s%nConfig was:%n%s", e, e.getMessage(), config ); } }

Target:
private Xpp3Dom getConfigXml( final Node node ) throws ManipulationException { final String config = galleyWrapper.toXML( node.getOwnerDocument(), false ) .trim(); try { return Xpp3DomBuilder.build( new StringReader( config ) ); } catch ( final XmlPullParserException | IOException e ) { throw new ManipulationException( "Failed to re-parse plugin configuration into Xpp3Dom: " + e.getMessage() + System.lineSeparator() + "Config was:" + System.lineSeparator() + config, e ); } }
Source:
public List<String> getStrongDependencies() { List<String> strongDependencies = new ArrayList<>(); strongDependencies.add(A_U_D_preferredMail); strongDependencies.add(A_U_D_ISMail); strongDependencies.add(A_U_D_publicAliasMails); strongDependencies.add(A_U_D_privateAliasMails); strongDependencies.add(A_U_D_o365EmailAddressesMU); return strongDependencies; }

Target:
public List<String> getStrongDependencies() { return Arrays.asList( A_U_D_preferredMail, A_U_D_ISMail, A_U_D_publicAliasMails, A_U_D_privateAliasMails, A_U_D_o365EmailAddressesMU); }