code
stringlengths
130
281k
code_dependency
stringlengths
182
306k
public class class_name { private Duration getDuration(String value) { Duration result = null; if (value != null && value.length() != 0) { double seconds = getLong(value); double hours = seconds / (60 * 60); double days = hours / 8; if (days < 1) { result = Duration.getInstance(hours, TimeUnit.HOURS); } else { double durationDays = hours / 8; result = Duration.getInstance(durationDays, TimeUnit.DAYS); } } return (result); } }
public class class_name { private Duration getDuration(String value) { Duration result = null; if (value != null && value.length() != 0) { double seconds = getLong(value); double hours = seconds / (60 * 60); double days = hours / 8; if (days < 1) { result = Duration.getInstance(hours, TimeUnit.HOURS); // depends on control dependency: [if], data = [none] } else { double durationDays = hours / 8; result = Duration.getInstance(durationDays, TimeUnit.DAYS); // depends on control dependency: [if], data = [none] } } return (result); } }
public class class_name { @Override protected CheckSchemaOperation createCheckSchemaOperation() { if (DEFAULT_TABLESPACE_CLAUSE.equals(indexTablespace) && !DEFAULT_TABLESPACE_CLAUSE.equals(tablespace)) { // tablespace was set but not indexTablespace : use the same for both indexTablespace = tablespace; } return super.createCheckSchemaOperation() .addVariableReplacement(TABLESPACE_VARIABLE, tablespace) .addVariableReplacement(INDEX_TABLESPACE_VARIABLE, indexTablespace); } }
public class class_name { @Override protected CheckSchemaOperation createCheckSchemaOperation() { if (DEFAULT_TABLESPACE_CLAUSE.equals(indexTablespace) && !DEFAULT_TABLESPACE_CLAUSE.equals(tablespace)) { // tablespace was set but not indexTablespace : use the same for both indexTablespace = tablespace; // depends on control dependency: [if], data = [none] } return super.createCheckSchemaOperation() .addVariableReplacement(TABLESPACE_VARIABLE, tablespace) .addVariableReplacement(INDEX_TABLESPACE_VARIABLE, indexTablespace); } }
public class class_name { @Override public void printStackTrace(final PrintStream s) { super.printStackTrace(s); if (mRootCause != null) { s.println("--- ROOT CAUSE ---"); mRootCause.printStackTrace(s); } } }
public class class_name { @Override public void printStackTrace(final PrintStream s) { super.printStackTrace(s); if (mRootCause != null) { s.println("--- ROOT CAUSE ---"); // depends on control dependency: [if], data = [none] mRootCause.printStackTrace(s); // depends on control dependency: [if], data = [none] } } }
public class class_name { @SuppressWarnings("unchecked") public <A extends Annotation> A getAnnotation(Class<A> type) { for (Annotation annotation : this.annotations) { if (type.isInstance(annotation)) { return (A) annotation; } } return null; } }
public class class_name { @SuppressWarnings("unchecked") public <A extends Annotation> A getAnnotation(Class<A> type) { for (Annotation annotation : this.annotations) { if (type.isInstance(annotation)) { return (A) annotation; // depends on control dependency: [if], data = [none] } } return null; } }
public class class_name { @Override public void showErrors(final List<EditorError> errors) { final Set<String> messages = errors.stream().filter(error -> editorErrorMatches(error)) .map(error -> error.getMessage()).distinct().collect(Collectors.toSet()); if (messages.isEmpty()) { errorLabel.setText(StringUtils.EMPTY); errorLabel.getElement().getStyle().setDisplay(Display.NONE); if (contents.getWidget() != null) { contents.getWidget().removeStyleName(decoratorStyle.errorInputStyle()); contents.getWidget().addStyleName(decoratorStyle.validInputStyle()); } } else { if (contents.getWidget() != null) { contents.getWidget().removeStyleName(decoratorStyle.validInputStyle()); contents.getWidget().addStyleName(decoratorStyle.errorInputStyle()); if (focusOnError) { setFocus(true); } } final SafeHtmlBuilder sb = new SafeHtmlBuilder(); messages.forEach(message -> { sb.appendEscaped(message); sb.appendHtmlConstant("<br />"); }); errorLabel.setHTML(sb.toSafeHtml()); errorLabel.getElement().getStyle().setDisplay(Display.TABLE); } } }
public class class_name { @Override public void showErrors(final List<EditorError> errors) { final Set<String> messages = errors.stream().filter(error -> editorErrorMatches(error)) .map(error -> error.getMessage()).distinct().collect(Collectors.toSet()); if (messages.isEmpty()) { errorLabel.setText(StringUtils.EMPTY); // depends on control dependency: [if], data = [none] errorLabel.getElement().getStyle().setDisplay(Display.NONE); // depends on control dependency: [if], data = [none] if (contents.getWidget() != null) { contents.getWidget().removeStyleName(decoratorStyle.errorInputStyle()); // depends on control dependency: [if], data = [none] contents.getWidget().addStyleName(decoratorStyle.validInputStyle()); // depends on control dependency: [if], data = [none] } } else { if (contents.getWidget() != null) { contents.getWidget().removeStyleName(decoratorStyle.validInputStyle()); // depends on control dependency: [if], data = [none] contents.getWidget().addStyleName(decoratorStyle.errorInputStyle()); // depends on control dependency: [if], data = [none] if (focusOnError) { setFocus(true); // depends on control dependency: [if], data = [none] } } final SafeHtmlBuilder sb = new SafeHtmlBuilder(); messages.forEach(message -> { sb.appendEscaped(message); // depends on control dependency: [if], data = [none] sb.appendHtmlConstant("<br />"); // depends on control dependency: [if], data = [none] }); errorLabel.setHTML(sb.toSafeHtml()); errorLabel.getElement().getStyle().setDisplay(Display.TABLE); } } }
public class class_name { private JDialog createPropertyDialog() { Frame frame = (Frame) SwingUtilities.getAncestorOfClass(Frame.class, this); JDialog dialog = new JDialog(frame, "Plot Properties", true); Action okAction = new PropertyDialogOKAction(dialog); Action cancelAction = new PropertyDialogCancelAction(dialog); JButton okButton = new JButton(okAction); JButton cancelButton = new JButton(cancelAction); JPanel buttonsPanel = new JPanel(); buttonsPanel.setLayout(new FlowLayout(FlowLayout.TRAILING)); buttonsPanel.add(okButton); buttonsPanel.add(cancelButton); buttonsPanel.setBorder(BorderFactory.createEmptyBorder(25, 0, 10, 10)); ActionMap actionMap = buttonsPanel.getActionMap(); actionMap.put(cancelAction.getValue(Action.DEFAULT), cancelAction); actionMap.put(okAction.getValue(Action.DEFAULT), okAction); InputMap inputMap = buttonsPanel.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW); inputMap.put(KeyStroke.getKeyStroke("ESCAPE"), cancelAction.getValue(Action.DEFAULT)); inputMap.put(KeyStroke.getKeyStroke("ENTER"), okAction.getValue(Action.DEFAULT)); String[] columnNames = {"Property", "Value"}; if (base.dimension == 2) { Object[][] data = { {"Title", title}, {"Title Font", titleFont}, {"Title Color", titleColor}, {"X Axis Title", getAxis(0).getAxisLabel()}, {"X Axis Range", new double[]{base.getLowerBounds()[0], base.getUpperBounds()[0]}}, {"Y Axis Title", getAxis(1).getAxisLabel()}, {"Y Axis Range", new double[]{base.getLowerBounds()[1], base.getUpperBounds()[1]}} }; propertyTable = new Table(data, columnNames); } else { Object[][] data = { {"Title", title}, {"Title Font", titleFont}, {"Title Color", titleColor}, {"X Axis Title", getAxis(0).getAxisLabel()}, {"X Axis Range", new double[]{base.getLowerBounds()[0], base.getUpperBounds()[0]}}, {"Y Axis Title", getAxis(1).getAxisLabel()}, {"Y Axis Range", new double[]{base.getLowerBounds()[1], base.getUpperBounds()[1]}}, {"Z Axis Title", getAxis(2).getAxisLabel()}, {"Z Axis Range", new double[]{base.getLowerBounds()[2], base.getUpperBounds()[2]}} }; propertyTable = new Table(data, columnNames); } // There is a known issue with JTables whereby the changes made in a // cell editor are not committed when focus is lost. // This can result in the table staying in 'edit mode' with the stale // value in the cell being edited still showing, although the change // has not actually been committed to the model. // // In fact what should happen is for the method stopCellEditing() // on CellEditor to be called when focus is lost. // So the editor can choose whether to accept the new value and stop // editing, or have the editing cancelled without committing. // There is a magic property which you have to set on the JTable // instance to turn this feature on. propertyTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE); propertyTable.setFillsViewportHeight(true); JScrollPane tablePanel = new JScrollPane(propertyTable); dialog.getContentPane().add(tablePanel, BorderLayout.CENTER); dialog.getContentPane().add(buttonsPanel, BorderLayout.SOUTH); dialog.pack(); dialog.setLocationRelativeTo(frame); return dialog; } }
public class class_name { private JDialog createPropertyDialog() { Frame frame = (Frame) SwingUtilities.getAncestorOfClass(Frame.class, this); JDialog dialog = new JDialog(frame, "Plot Properties", true); Action okAction = new PropertyDialogOKAction(dialog); Action cancelAction = new PropertyDialogCancelAction(dialog); JButton okButton = new JButton(okAction); JButton cancelButton = new JButton(cancelAction); JPanel buttonsPanel = new JPanel(); buttonsPanel.setLayout(new FlowLayout(FlowLayout.TRAILING)); buttonsPanel.add(okButton); buttonsPanel.add(cancelButton); buttonsPanel.setBorder(BorderFactory.createEmptyBorder(25, 0, 10, 10)); ActionMap actionMap = buttonsPanel.getActionMap(); actionMap.put(cancelAction.getValue(Action.DEFAULT), cancelAction); actionMap.put(okAction.getValue(Action.DEFAULT), okAction); InputMap inputMap = buttonsPanel.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW); inputMap.put(KeyStroke.getKeyStroke("ESCAPE"), cancelAction.getValue(Action.DEFAULT)); inputMap.put(KeyStroke.getKeyStroke("ENTER"), okAction.getValue(Action.DEFAULT)); String[] columnNames = {"Property", "Value"}; if (base.dimension == 2) { Object[][] data = { {"Title", title}, {"Title Font", titleFont}, {"Title Color", titleColor}, {"X Axis Title", getAxis(0).getAxisLabel()}, {"X Axis Range", new double[]{base.getLowerBounds()[0], base.getUpperBounds()[0]}}, {"Y Axis Title", getAxis(1).getAxisLabel()}, {"Y Axis Range", new double[]{base.getLowerBounds()[1], base.getUpperBounds()[1]}} }; propertyTable = new Table(data, columnNames); // depends on control dependency: [if], data = [none] } else { Object[][] data = { {"Title", title}, {"Title Font", titleFont}, {"Title Color", titleColor}, {"X Axis Title", getAxis(0).getAxisLabel()}, {"X Axis Range", new double[]{base.getLowerBounds()[0], base.getUpperBounds()[0]}}, {"Y Axis Title", getAxis(1).getAxisLabel()}, {"Y Axis Range", new double[]{base.getLowerBounds()[1], base.getUpperBounds()[1]}}, {"Z Axis Title", getAxis(2).getAxisLabel()}, {"Z Axis Range", new double[]{base.getLowerBounds()[2], base.getUpperBounds()[2]}} }; propertyTable = new Table(data, columnNames); // depends on control dependency: [if], data = [none] } // There is a known issue with JTables whereby the changes made in a // cell editor are not committed when focus is lost. // This can result in the table staying in 'edit mode' with the stale // value in the cell being edited still showing, although the change // has not actually been committed to the model. // // In fact what should happen is for the method stopCellEditing() // on CellEditor to be called when focus is lost. // So the editor can choose whether to accept the new value and stop // editing, or have the editing cancelled without committing. // There is a magic property which you have to set on the JTable // instance to turn this feature on. propertyTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE); propertyTable.setFillsViewportHeight(true); JScrollPane tablePanel = new JScrollPane(propertyTable); dialog.getContentPane().add(tablePanel, BorderLayout.CENTER); dialog.getContentPane().add(buttonsPanel, BorderLayout.SOUTH); dialog.pack(); dialog.setLocationRelativeTo(frame); return dialog; } }
public class class_name { public static Number min(int start , int endExclusive , Class type, IntProducerNumber producer ) { try { return pool.submit(new IntOperatorTask.Min(start,endExclusive,type,producer)).get(); } catch (InterruptedException | ExecutionException e) { throw new RuntimeException(e); } } }
public class class_name { public static Number min(int start , int endExclusive , Class type, IntProducerNumber producer ) { try { return pool.submit(new IntOperatorTask.Min(start,endExclusive,type,producer)).get(); // depends on control dependency: [try], data = [none] } catch (InterruptedException | ExecutionException e) { throw new RuntimeException(e); } // depends on control dependency: [catch], data = [none] } }
public class class_name { public URI resolveUri(String uriString) throws URISyntaxException { URI want = new URI(uriString); if ((baseURI == null) || want.isAbsolute()) return want; // gotta deal with file ourself String scheme = baseURI.getScheme(); if ((scheme != null) && scheme.equals("file")) { // LOOK at ucar.nc2.util.NetworkUtils.resolve String baseString = baseURI.toString(); if ((uriString.length() > 0) && (uriString.charAt(0) == '#')) return new URI(baseString + uriString); int pos = baseString.lastIndexOf('/'); if (pos > 0) { String r = baseString.substring(0, pos + 1) + uriString; return new URI(r); } } //otherwise let the URI class resolve it return baseURI.resolve(want); } }
public class class_name { public URI resolveUri(String uriString) throws URISyntaxException { URI want = new URI(uriString); if ((baseURI == null) || want.isAbsolute()) return want; // gotta deal with file ourself String scheme = baseURI.getScheme(); if ((scheme != null) && scheme.equals("file")) { // LOOK at ucar.nc2.util.NetworkUtils.resolve String baseString = baseURI.toString(); if ((uriString.length() > 0) && (uriString.charAt(0) == '#')) return new URI(baseString + uriString); int pos = baseString.lastIndexOf('/'); if (pos > 0) { String r = baseString.substring(0, pos + 1) + uriString; return new URI(r); // depends on control dependency: [if], data = [none] } } //otherwise let the URI class resolve it return baseURI.resolve(want); } }
public class class_name { protected <T extends Serializable> Map<String, Object> preSerializer(T serializableObject) { Map<String, Object> objReferences = new HashMap<>(); for(Field field : ReflectionMethods.getAllFields(new LinkedList<>(), serializableObject.getClass())) { if (field.isAnnotationPresent(BigMap.class)) { field.setAccessible(true); try { Object value = field.get(serializableObject); if(!isSerializableBigMap(value)) { //if the field is annotated with BigMap AND the value is not serializable //extract the reference to the object and put it in the map. objReferences.put(field.getName(), value); //then replace the reference with null to avoid serialization. field.set(serializableObject, null); } } catch (IllegalArgumentException | IllegalAccessException ex) { throw new RuntimeException(ex); } } } return objReferences; } }
public class class_name { protected <T extends Serializable> Map<String, Object> preSerializer(T serializableObject) { Map<String, Object> objReferences = new HashMap<>(); for(Field field : ReflectionMethods.getAllFields(new LinkedList<>(), serializableObject.getClass())) { if (field.isAnnotationPresent(BigMap.class)) { field.setAccessible(true); // depends on control dependency: [if], data = [none] try { Object value = field.get(serializableObject); if(!isSerializableBigMap(value)) { //if the field is annotated with BigMap AND the value is not serializable //extract the reference to the object and put it in the map. objReferences.put(field.getName(), value); // depends on control dependency: [if], data = [none] //then replace the reference with null to avoid serialization. field.set(serializableObject, null); // depends on control dependency: [if], data = [none] } } catch (IllegalArgumentException | IllegalAccessException ex) { throw new RuntimeException(ex); } // depends on control dependency: [catch], data = [none] } } return objReferences; } }
public class class_name { @Override protected void onBeforeRender() { if (!hasBeenRendered()) { final AbstractLink link = tagRenderData.getLink(TAG_LINK_COMPONENT_ID); link.add(new Label(TAG_NAME_LABEL_COMPONENT_ID, tagRenderData.getTagName())); link.add(AttributeModifier.replace("style", "font-size: " + tagRenderData.getFontSizeInPixels() + "px;")); // link.add(new SimpleAttributeModifier("style", "font-size: " + tagRenderData.getFontSizeInPixels() + "px;")); add(link); } super.onBeforeRender(); } }
public class class_name { @Override protected void onBeforeRender() { if (!hasBeenRendered()) { final AbstractLink link = tagRenderData.getLink(TAG_LINK_COMPONENT_ID); link.add(new Label(TAG_NAME_LABEL_COMPONENT_ID, tagRenderData.getTagName())); // depends on control dependency: [if], data = [none] link.add(AttributeModifier.replace("style", "font-size: " + tagRenderData.getFontSizeInPixels() + "px;")); // depends on control dependency: [if], data = [none] // link.add(new SimpleAttributeModifier("style", "font-size: " + tagRenderData.getFontSizeInPixels() + "px;")); add(link); // depends on control dependency: [if], data = [none] } super.onBeforeRender(); } }
public class class_name { private void buildExplicitlyNamedList() { // each plugin must either be in included set or must be a dependent of // included set for (GrailsPlugin plugin : originalPlugins) { // find explicitly included plugins String name = plugin.getName(); if (suppliedNames.contains(name)) { explicitlyNamedPlugins.add(plugin); addedNames.add(name); } } } }
public class class_name { private void buildExplicitlyNamedList() { // each plugin must either be in included set or must be a dependent of // included set for (GrailsPlugin plugin : originalPlugins) { // find explicitly included plugins String name = plugin.getName(); if (suppliedNames.contains(name)) { explicitlyNamedPlugins.add(plugin); // depends on control dependency: [if], data = [none] addedNames.add(name); // depends on control dependency: [if], data = [none] } } } }
public class class_name { public void marshall(RegisterTaskWithMaintenanceWindowRequest registerTaskWithMaintenanceWindowRequest, ProtocolMarshaller protocolMarshaller) { if (registerTaskWithMaintenanceWindowRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getWindowId(), WINDOWID_BINDING); protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getTargets(), TARGETS_BINDING); protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getTaskArn(), TASKARN_BINDING); protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getServiceRoleArn(), SERVICEROLEARN_BINDING); protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getTaskType(), TASKTYPE_BINDING); protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getTaskParameters(), TASKPARAMETERS_BINDING); protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getTaskInvocationParameters(), TASKINVOCATIONPARAMETERS_BINDING); protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getPriority(), PRIORITY_BINDING); protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getMaxConcurrency(), MAXCONCURRENCY_BINDING); protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getMaxErrors(), MAXERRORS_BINDING); protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getLoggingInfo(), LOGGINGINFO_BINDING); protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getName(), NAME_BINDING); protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getDescription(), DESCRIPTION_BINDING); protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getClientToken(), CLIENTTOKEN_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } } }
public class class_name { public void marshall(RegisterTaskWithMaintenanceWindowRequest registerTaskWithMaintenanceWindowRequest, ProtocolMarshaller protocolMarshaller) { if (registerTaskWithMaintenanceWindowRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getWindowId(), WINDOWID_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getTargets(), TARGETS_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getTaskArn(), TASKARN_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getServiceRoleArn(), SERVICEROLEARN_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getTaskType(), TASKTYPE_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getTaskParameters(), TASKPARAMETERS_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getTaskInvocationParameters(), TASKINVOCATIONPARAMETERS_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getPriority(), PRIORITY_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getMaxConcurrency(), MAXCONCURRENCY_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getMaxErrors(), MAXERRORS_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getLoggingInfo(), LOGGINGINFO_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getName(), NAME_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getDescription(), DESCRIPTION_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(registerTaskWithMaintenanceWindowRequest.getClientToken(), CLIENTTOKEN_BINDING); // depends on control dependency: [try], data = [none] } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } // depends on control dependency: [catch], data = [none] } }
public class class_name { protected DataSource wrapAsDataSource(JdbcConnectionDescriptor jcd, ObjectPool connectionPool) { final boolean allowConnectionUnwrap; if (jcd == null) { allowConnectionUnwrap = false; } else { final Properties properties = jcd.getConnectionPoolDescriptor().getDbcpProperties(); final String allowConnectionUnwrapParam; allowConnectionUnwrapParam = properties.getProperty(PARAM_NAME_UNWRAP_ALLOWED); allowConnectionUnwrap = allowConnectionUnwrapParam != null && Boolean.valueOf(allowConnectionUnwrapParam).booleanValue(); } final PoolingDataSource dataSource; dataSource = new PoolingDataSource(connectionPool); dataSource.setAccessToUnderlyingConnectionAllowed(allowConnectionUnwrap); if(jcd != null) { final AbandonedConfig ac = jcd.getConnectionPoolDescriptor().getAbandonedConfig(); if (ac.getRemoveAbandoned() && ac.getLogAbandoned()) { final LoggerWrapperPrintWriter loggerPiggyBack; loggerPiggyBack = new LoggerWrapperPrintWriter(log, Logger.ERROR); dataSource.setLogWriter(loggerPiggyBack); } } return dataSource; } }
public class class_name { protected DataSource wrapAsDataSource(JdbcConnectionDescriptor jcd, ObjectPool connectionPool) { final boolean allowConnectionUnwrap; if (jcd == null) { allowConnectionUnwrap = false; // depends on control dependency: [if], data = [none] } else { final Properties properties = jcd.getConnectionPoolDescriptor().getDbcpProperties(); final String allowConnectionUnwrapParam; allowConnectionUnwrapParam = properties.getProperty(PARAM_NAME_UNWRAP_ALLOWED); // depends on control dependency: [if], data = [none] allowConnectionUnwrap = allowConnectionUnwrapParam != null && Boolean.valueOf(allowConnectionUnwrapParam).booleanValue(); // depends on control dependency: [if], data = [none] } final PoolingDataSource dataSource; dataSource = new PoolingDataSource(connectionPool); dataSource.setAccessToUnderlyingConnectionAllowed(allowConnectionUnwrap); if(jcd != null) { final AbandonedConfig ac = jcd.getConnectionPoolDescriptor().getAbandonedConfig(); if (ac.getRemoveAbandoned() && ac.getLogAbandoned()) { final LoggerWrapperPrintWriter loggerPiggyBack; loggerPiggyBack = new LoggerWrapperPrintWriter(log, Logger.ERROR); // depends on control dependency: [if], data = [none] dataSource.setLogWriter(loggerPiggyBack); // depends on control dependency: [if], data = [none] } } return dataSource; } }
public class class_name { @Override public void validate(ValidationHelper helper, Context context, String key, Link t) { if (t != null) { String reference = t.getRef(); if (reference != null && !reference.isEmpty()) { ValidatorUtils.referenceValidatorHelper(reference, t, helper, context, key); return; } boolean operationRefDefined = t.getOperationRef() != null && !t.getOperationRef().isEmpty(); boolean operationIdDefined = t.getOperationId() != null && !t.getOperationId().isEmpty(); if (operationRefDefined && operationIdDefined) { final String message = Tr.formatMessage(tc, "linkOperationRefAndId", key); helper.addValidationEvent(new ValidationEvent(ValidationEvent.Severity.WARNING, context.getLocation(), message)); } if (!operationRefDefined && !operationIdDefined) { final String message = Tr.formatMessage(tc, "linkMustSpecifyOperationRefOrId", key); helper.addValidationEvent(new ValidationEvent(ValidationEvent.Severity.ERROR, context.getLocation(), message)); } else { if (operationIdDefined) { helper.addLinkOperationId(t.getOperationId(), context.getLocation()); } if (operationRefDefined) { if (t.getOperationRef().startsWith("#")) { boolean isValid = true; String[] operationRef; if (!t.getOperationRef().startsWith("#/paths/") || (operationRef = t.getOperationRef().split("/")).length != 4) { isValid = false; } else { String pathKey = operationRef[2].replace("~1", "/").replace("~0", "~"); Paths paths = context.getModel().getPaths(); if (paths != null && paths.get(pathKey) != null) { String op = operationRef[3]; switch (op) { case "get": if (paths.get(pathKey).getGET() == null) { isValid = false; } break; case "put": if (paths.get(pathKey).getPUT() == null) { isValid = false; } break; case "post": if (paths.get(pathKey).getPOST() == null) { isValid = false; } break; case "delete": if (paths.get(pathKey).getDELETE() == null) { isValid = false; } break; case "trace": if (paths.get(pathKey).getTRACE() == null) { isValid = false; } break; case "head": if (paths.get(pathKey).getHEAD() == null) { isValid = false; } break; case "patch": if (paths.get(pathKey).getPATCH() == null) { isValid = false; } break; case "options": if (paths.get(pathKey).getOPTIONS() == null) { isValid = false; } break; default: isValid = false; break; } } else { isValid = false; } } if (!isValid) { final String message = Tr.formatMessage(tc, "linkOperationRefInvalidOrMissing", key, t.getOperationRef()); helper.addValidationEvent(new ValidationEvent(ValidationEvent.Severity.ERROR, context.getLocation(), message)); } } } } } } }
public class class_name { @Override public void validate(ValidationHelper helper, Context context, String key, Link t) { if (t != null) { String reference = t.getRef(); if (reference != null && !reference.isEmpty()) { ValidatorUtils.referenceValidatorHelper(reference, t, helper, context, key); // depends on control dependency: [if], data = [(reference] return; // depends on control dependency: [if], data = [none] } boolean operationRefDefined = t.getOperationRef() != null && !t.getOperationRef().isEmpty(); boolean operationIdDefined = t.getOperationId() != null && !t.getOperationId().isEmpty(); if (operationRefDefined && operationIdDefined) { final String message = Tr.formatMessage(tc, "linkOperationRefAndId", key); helper.addValidationEvent(new ValidationEvent(ValidationEvent.Severity.WARNING, context.getLocation(), message)); // depends on control dependency: [if], data = [none] } if (!operationRefDefined && !operationIdDefined) { final String message = Tr.formatMessage(tc, "linkMustSpecifyOperationRefOrId", key); helper.addValidationEvent(new ValidationEvent(ValidationEvent.Severity.ERROR, context.getLocation(), message)); // depends on control dependency: [if], data = [none] } else { if (operationIdDefined) { helper.addLinkOperationId(t.getOperationId(), context.getLocation()); // depends on control dependency: [if], data = [none] } if (operationRefDefined) { if (t.getOperationRef().startsWith("#")) { boolean isValid = true; String[] operationRef; if (!t.getOperationRef().startsWith("#/paths/") || (operationRef = t.getOperationRef().split("/")).length != 4) { isValid = false; // depends on control dependency: [if], data = [none] } else { String pathKey = operationRef[2].replace("~1", "/").replace("~0", "~"); Paths paths = context.getModel().getPaths(); if (paths != null && paths.get(pathKey) != null) { String op = operationRef[3]; switch (op) { case "get": if (paths.get(pathKey).getGET() == null) { isValid = false; // depends on control dependency: [if], data = [none] } break; case "put": if (paths.get(pathKey).getPUT() == null) { isValid = false; // depends on control dependency: [if], data = [none] } break; case "post": if (paths.get(pathKey).getPOST() == null) { isValid = false; // depends on control dependency: [if], data = [none] } break; case "delete": if (paths.get(pathKey).getDELETE() == null) { isValid = false; // depends on control dependency: [if], data = [none] } break; case "trace": if (paths.get(pathKey).getTRACE() == null) { isValid = false; // depends on control dependency: [if], data = [none] } break; case "head": if (paths.get(pathKey).getHEAD() == null) { isValid = false; // depends on control dependency: [if], data = [none] } break; case "patch": if (paths.get(pathKey).getPATCH() == null) { isValid = false; // depends on control dependency: [if], data = [none] } break; case "options": if (paths.get(pathKey).getOPTIONS() == null) { isValid = false; // depends on control dependency: [if], data = [none] } break; default: isValid = false; break; } } else { isValid = false; // depends on control dependency: [if], data = [none] } } if (!isValid) { final String message = Tr.formatMessage(tc, "linkOperationRefInvalidOrMissing", key, t.getOperationRef()); helper.addValidationEvent(new ValidationEvent(ValidationEvent.Severity.ERROR, context.getLocation(), message)); // depends on control dependency: [if], data = [none] } } } } } } }
public class class_name { public static IDrawerItem getDrawerItem(List<IDrawerItem> drawerItems, Object tag) { if (tag != null) { for (IDrawerItem drawerItem : drawerItems) { if (tag.equals(drawerItem.getTag())) { return drawerItem; } } } return null; } }
public class class_name { public static IDrawerItem getDrawerItem(List<IDrawerItem> drawerItems, Object tag) { if (tag != null) { for (IDrawerItem drawerItem : drawerItems) { if (tag.equals(drawerItem.getTag())) { return drawerItem; // depends on control dependency: [if], data = [none] } } } return null; } }
public class class_name { public void marshall(IncreaseStreamRetentionPeriodRequest increaseStreamRetentionPeriodRequest, ProtocolMarshaller protocolMarshaller) { if (increaseStreamRetentionPeriodRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(increaseStreamRetentionPeriodRequest.getStreamName(), STREAMNAME_BINDING); protocolMarshaller.marshall(increaseStreamRetentionPeriodRequest.getRetentionPeriodHours(), RETENTIONPERIODHOURS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } } }
public class class_name { public void marshall(IncreaseStreamRetentionPeriodRequest increaseStreamRetentionPeriodRequest, ProtocolMarshaller protocolMarshaller) { if (increaseStreamRetentionPeriodRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(increaseStreamRetentionPeriodRequest.getStreamName(), STREAMNAME_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(increaseStreamRetentionPeriodRequest.getRetentionPeriodHours(), RETENTIONPERIODHOURS_BINDING); // depends on control dependency: [try], data = [none] } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } // depends on control dependency: [catch], data = [none] } }
public class class_name { public ChangeTagsForResourceRequest withRemoveTagKeys(String... removeTagKeys) { if (this.removeTagKeys == null) { setRemoveTagKeys(new com.amazonaws.internal.SdkInternalList<String>(removeTagKeys.length)); } for (String ele : removeTagKeys) { this.removeTagKeys.add(ele); } return this; } }
public class class_name { public ChangeTagsForResourceRequest withRemoveTagKeys(String... removeTagKeys) { if (this.removeTagKeys == null) { setRemoveTagKeys(new com.amazonaws.internal.SdkInternalList<String>(removeTagKeys.length)); // depends on control dependency: [if], data = [none] } for (String ele : removeTagKeys) { this.removeTagKeys.add(ele); // depends on control dependency: [for], data = [ele] } return this; } }
public class class_name { public Object getSessionAffinityContext() { if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE){ checkRequestObjectInUse(); } // 321485 Object sac = _srtRequestHelper._sessionAffinityContext; if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) { //306998.15 logger.logp(Level.FINE, CLASS_NAME,"getSessionAffinityContext", " sac --> " + sac); } return sac; } }
public class class_name { public Object getSessionAffinityContext() { if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE){ checkRequestObjectInUse(); // depends on control dependency: [if], data = [none] } // 321485 Object sac = _srtRequestHelper._sessionAffinityContext; if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) { //306998.15 logger.logp(Level.FINE, CLASS_NAME,"getSessionAffinityContext", " sac --> " + sac); // depends on control dependency: [if], data = [none] } return sac; } }
public class class_name { private void fireChangeFromNative() { // skip firing the change event, if the external flag is set String message = "fireChangeFromNative\n"; message += "init: " + m_initialized + "\n"; message += "external: " + m_externalValueChange + "\n"; CmsDebugLog.consoleLog(message); if (m_initialized && !m_externalValueChange) { Scheduler.get().scheduleDeferred(new ScheduledCommand() { public void execute() { try { CmsTinyMCEWidget.this.fireValueChange(false); } catch (Throwable t) { // this may happen when returning from full screen mode, nothing to be done } } }); } // reset the external flag m_externalValueChange = false; } }
public class class_name { private void fireChangeFromNative() { // skip firing the change event, if the external flag is set String message = "fireChangeFromNative\n"; message += "init: " + m_initialized + "\n"; message += "external: " + m_externalValueChange + "\n"; CmsDebugLog.consoleLog(message); if (m_initialized && !m_externalValueChange) { Scheduler.get().scheduleDeferred(new ScheduledCommand() { public void execute() { try { CmsTinyMCEWidget.this.fireValueChange(false); // depends on control dependency: [try], data = [none] } catch (Throwable t) { // this may happen when returning from full screen mode, nothing to be done } // depends on control dependency: [catch], data = [none] } }); // depends on control dependency: [if], data = [none] } // reset the external flag m_externalValueChange = false; } }
public class class_name { @Override public final MutableObjectIterator<T> getIterator() { return new MutableObjectIterator<T>() { private final int size = size(); private int current = 0; private int currentSegment = 0; private int currentOffset = 0; private MemorySegment currentIndexSegment = sortIndex.get(0); @Override public T next(T target) { if (this.current < this.size) { this.current++; if (this.currentOffset > lastIndexEntryOffset) { this.currentOffset = 0; this.currentIndexSegment = sortIndex.get(++this.currentSegment); } long pointer = this.currentIndexSegment.getLong(this.currentOffset) & POINTER_MASK; this.currentOffset += indexEntrySize; try { return getRecordFromBuffer(target, pointer); } catch (IOException ioe) { throw new RuntimeException(ioe); } } else { return null; } } @Override public T next() { if (this.current < this.size) { this.current++; if (this.currentOffset > lastIndexEntryOffset) { this.currentOffset = 0; this.currentIndexSegment = sortIndex.get(++this.currentSegment); } long pointer = this.currentIndexSegment.getLong(this.currentOffset); this.currentOffset += indexEntrySize; try { return getRecordFromBuffer(pointer); } catch (IOException ioe) { throw new RuntimeException(ioe); } } else { return null; } } }; } }
public class class_name { @Override public final MutableObjectIterator<T> getIterator() { return new MutableObjectIterator<T>() { private final int size = size(); private int current = 0; private int currentSegment = 0; private int currentOffset = 0; private MemorySegment currentIndexSegment = sortIndex.get(0); @Override public T next(T target) { if (this.current < this.size) { this.current++; // depends on control dependency: [if], data = [none] if (this.currentOffset > lastIndexEntryOffset) { this.currentOffset = 0; // depends on control dependency: [if], data = [none] this.currentIndexSegment = sortIndex.get(++this.currentSegment); // depends on control dependency: [if], data = [none] } long pointer = this.currentIndexSegment.getLong(this.currentOffset) & POINTER_MASK; this.currentOffset += indexEntrySize; // depends on control dependency: [if], data = [none] try { return getRecordFromBuffer(target, pointer); // depends on control dependency: [try], data = [none] } catch (IOException ioe) { throw new RuntimeException(ioe); } // depends on control dependency: [catch], data = [none] } else { return null; // depends on control dependency: [if], data = [none] } } @Override public T next() { if (this.current < this.size) { this.current++; // depends on control dependency: [if], data = [none] if (this.currentOffset > lastIndexEntryOffset) { this.currentOffset = 0; // depends on control dependency: [if], data = [none] this.currentIndexSegment = sortIndex.get(++this.currentSegment); // depends on control dependency: [if], data = [none] } long pointer = this.currentIndexSegment.getLong(this.currentOffset); this.currentOffset += indexEntrySize; // depends on control dependency: [if], data = [none] try { return getRecordFromBuffer(pointer); // depends on control dependency: [try], data = [none] } catch (IOException ioe) { throw new RuntimeException(ioe); } // depends on control dependency: [catch], data = [none] } else { return null; // depends on control dependency: [if], data = [none] } } }; } }
public class class_name { private Set<JavaClass> getAnnotatedRollbackExceptions(Method method) throws ClassNotFoundException { for (AnnotationEntry annotation : method.getAnnotationEntries()) { if ("Lorg/springframework/transaction/annotation/Transactional;".equals(annotation.getAnnotationType())) { if (annotation.getNumElementValuePairs() == 0) { return Collections.<JavaClass> emptySet(); } Set<JavaClass> rollbackExceptions = new HashSet<>(); for (ElementValuePair pair : annotation.getElementValuePairs()) { if ("rollbackFor".equals(pair.getNameString()) || "noRollbackFor".equals(pair.getNameString())) { String exNames = pair.getValue().stringifyValue(); Matcher m = annotationClassPattern.matcher(exNames); while (m.find()) { String exName = m.group(1); JavaClass exCls = Repository.lookupClass(SignatureUtils.trimSignature(exName)); if (!exCls.instanceOf(runtimeExceptionClass)) { rollbackExceptions.add(exCls); } } } } return rollbackExceptions; } } return Collections.<JavaClass> emptySet(); } }
public class class_name { private Set<JavaClass> getAnnotatedRollbackExceptions(Method method) throws ClassNotFoundException { for (AnnotationEntry annotation : method.getAnnotationEntries()) { if ("Lorg/springframework/transaction/annotation/Transactional;".equals(annotation.getAnnotationType())) { if (annotation.getNumElementValuePairs() == 0) { return Collections.<JavaClass> emptySet(); // depends on control dependency: [if], data = [none] } Set<JavaClass> rollbackExceptions = new HashSet<>(); for (ElementValuePair pair : annotation.getElementValuePairs()) { if ("rollbackFor".equals(pair.getNameString()) || "noRollbackFor".equals(pair.getNameString())) { String exNames = pair.getValue().stringifyValue(); Matcher m = annotationClassPattern.matcher(exNames); while (m.find()) { String exName = m.group(1); JavaClass exCls = Repository.lookupClass(SignatureUtils.trimSignature(exName)); if (!exCls.instanceOf(runtimeExceptionClass)) { rollbackExceptions.add(exCls); // depends on control dependency: [if], data = [none] } } } } return rollbackExceptions; } } return Collections.<JavaClass> emptySet(); } }
public class class_name { public static int[] get3DOutputSize(INDArray inputData, int[] kernel, int[] strides, int[] padding, ConvolutionMode convolutionMode, int[] dilation, boolean isNCDHW) { // NCDHW vs. NDHWC int inD = (int) (isNCDHW ? inputData.size(2) : inputData.size(1)); int inH = (int) (isNCDHW ? inputData.size(3) : inputData.size(2)); int inW = (int) (isNCDHW ? inputData.size(4) : inputData.size(3)); int[] eKernel = effectiveKernelSize(kernel, dilation); boolean atrous = (eKernel == kernel); // FIXME: int cast val inShape = new int[]{inD, inH, inW}; validateShapes(ArrayUtil.toInts(inputData.shape()), eKernel, strides, padding, convolutionMode, dilation, inShape, atrous); if (convolutionMode == ConvolutionMode.Same) { int outD = (int) Math.ceil(inD / ((double) strides[0])); int outH = (int) Math.ceil(inH / ((double) strides[1])); int outW = (int) Math.ceil(inW / ((double) strides[2])); return new int[]{outD, outH, outW}; } int outD = (inD - eKernel[0] + 2 * padding[0]) / strides[0] + 1; int outH = (inH - eKernel[1] + 2 * padding[1]) / strides[1] + 1; int outW = (inW - eKernel[2] + 2 * padding[2]) / strides[2] + 1; return new int[]{outD, outH, outW}; } }
public class class_name { public static int[] get3DOutputSize(INDArray inputData, int[] kernel, int[] strides, int[] padding, ConvolutionMode convolutionMode, int[] dilation, boolean isNCDHW) { // NCDHW vs. NDHWC int inD = (int) (isNCDHW ? inputData.size(2) : inputData.size(1)); int inH = (int) (isNCDHW ? inputData.size(3) : inputData.size(2)); int inW = (int) (isNCDHW ? inputData.size(4) : inputData.size(3)); int[] eKernel = effectiveKernelSize(kernel, dilation); boolean atrous = (eKernel == kernel); // FIXME: int cast val inShape = new int[]{inD, inH, inW}; validateShapes(ArrayUtil.toInts(inputData.shape()), eKernel, strides, padding, convolutionMode, dilation, inShape, atrous); if (convolutionMode == ConvolutionMode.Same) { int outD = (int) Math.ceil(inD / ((double) strides[0])); int outH = (int) Math.ceil(inH / ((double) strides[1])); int outW = (int) Math.ceil(inW / ((double) strides[2])); return new int[]{outD, outH, outW}; // depends on control dependency: [if], data = [none] } int outD = (inD - eKernel[0] + 2 * padding[0]) / strides[0] + 1; int outH = (inH - eKernel[1] + 2 * padding[1]) / strides[1] + 1; int outW = (inW - eKernel[2] + 2 * padding[2]) / strides[2] + 1; return new int[]{outD, outH, outW}; } }
public class class_name { private void setLog(int logLevel) { checkState(); if ((logLevel & LOG_RETROFIT) != 0) { mHttpLoggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY); } else { mHttpLoggingInterceptor.setLevel(HttpLoggingInterceptor.Level.NONE); } mOffliner.debug((logLevel & LOG_OFFLINER) != 0); } }
public class class_name { private void setLog(int logLevel) { checkState(); if ((logLevel & LOG_RETROFIT) != 0) { mHttpLoggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY); // depends on control dependency: [if], data = [none] } else { mHttpLoggingInterceptor.setLevel(HttpLoggingInterceptor.Level.NONE); // depends on control dependency: [if], data = [none] } mOffliner.debug((logLevel & LOG_OFFLINER) != 0); } }
public class class_name { public void visit(Clause clause) { if (traverser.isEnteringContext()) { enterClause(clause); } else if (traverser.isLeavingContext()) { leaveClause(clause); clause.setTermTraverser(null); } } }
public class class_name { public void visit(Clause clause) { if (traverser.isEnteringContext()) { enterClause(clause); // depends on control dependency: [if], data = [none] } else if (traverser.isLeavingContext()) { leaveClause(clause); // depends on control dependency: [if], data = [none] clause.setTermTraverser(null); // depends on control dependency: [if], data = [none] } } }
public class class_name { @VisibleForTesting static List<String> tokenizeArguments(@Nullable final String args) { if (args == null) { return Collections.emptyList(); } final Matcher matcher = ARGUMENTS_TOKENIZE_PATTERN.matcher(args); final List<String> tokens = new ArrayList<>(); while (matcher.find()) { tokens.add(matcher.group() .trim() .replace("\"", "") .replace("\'", "")); } return tokens; } }
public class class_name { @VisibleForTesting static List<String> tokenizeArguments(@Nullable final String args) { if (args == null) { return Collections.emptyList(); // depends on control dependency: [if], data = [none] } final Matcher matcher = ARGUMENTS_TOKENIZE_PATTERN.matcher(args); final List<String> tokens = new ArrayList<>(); while (matcher.find()) { tokens.add(matcher.group() .trim() .replace("\"", "") .replace("\'", "")); // depends on control dependency: [while], data = [none] } return tokens; } }
public class class_name { protected byte[] getBoundary(String contentType) { ParameterParser parser = new ParameterParser(); parser.setLowerCaseNames(true); // Parameter parser can handle null input Map<String,String> params = parser.parse(contentType, new char[] {';', ','}); String boundaryStr = (String) params.get("boundary"); if (boundaryStr == null) { return null; } byte[] boundary; try { boundary = boundaryStr.getBytes("ISO-8859-1"); } catch (UnsupportedEncodingException e) { boundary = boundaryStr.getBytes(); } return boundary; } }
public class class_name { protected byte[] getBoundary(String contentType) { ParameterParser parser = new ParameterParser(); parser.setLowerCaseNames(true); // Parameter parser can handle null input Map<String,String> params = parser.parse(contentType, new char[] {';', ','}); String boundaryStr = (String) params.get("boundary"); if (boundaryStr == null) { return null; // depends on control dependency: [if], data = [none] } byte[] boundary; try { boundary = boundaryStr.getBytes("ISO-8859-1"); // depends on control dependency: [try], data = [none] } catch (UnsupportedEncodingException e) { boundary = boundaryStr.getBytes(); } // depends on control dependency: [catch], data = [none] return boundary; } }
public class class_name { @Override public void flushCache() { final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); if (isTraceOn && tc.isEntryEnabled()) Tr.entry(tc, "flushCache : " + this); IllegalStateException ise = null; ContainerTx tx = container.getCurrentContainerTx(); try { if (tx == null) { ise = new IllegalStateException("flushCache can not be called " + "without a Transaction Context"); if (isTraceOn && tc.isEntryEnabled()) Tr.exit(tc, "flushCache : " + ise); throw ise; } else if (tx.getGlobalRollbackOnly()) { ise = new IllegalStateException("flushCache can not be called with " + "transaction marked rollback only"); if (isTraceOn && tc.isEntryEnabled()) Tr.exit(tc, "flushCache : " + ise); throw ise; } // Perform the actual flush function... tx.flush(); if (isTraceOn && tc.isEntryEnabled()) Tr.exit(tc, "flushCache : successful"); } catch (Throwable ex) // d259882 { FFDCFilter.processException(ex, CLASS_NAME + ".flushCache", "1708", this); if (isTraceOn && tc.isDebugEnabled()) Tr.debug(tc, "flushCache : " + ex); // If something went wrong flushing the beans out to storage, then // a bean will have been discarded, and the transaction must be // rolled back. d259882 if (tx != null) tx.setRollbackOnly(); // Convert (possibly nesting) any exception in an EJBException, // removing any Container specific exceptions. d259882 EJBException ejbex = ExceptionUtil.EJBException(ex); if (isTraceOn && tc.isEntryEnabled()) Tr.exit(tc, "flushCache : " + ejbex); throw ejbex; } } }
public class class_name { @Override public void flushCache() { final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); if (isTraceOn && tc.isEntryEnabled()) Tr.entry(tc, "flushCache : " + this); IllegalStateException ise = null; ContainerTx tx = container.getCurrentContainerTx(); try { if (tx == null) { ise = new IllegalStateException("flushCache can not be called " + "without a Transaction Context"); // depends on control dependency: [if], data = [none] if (isTraceOn && tc.isEntryEnabled()) Tr.exit(tc, "flushCache : " + ise); throw ise; } else if (tx.getGlobalRollbackOnly()) { ise = new IllegalStateException("flushCache can not be called with " + "transaction marked rollback only"); // depends on control dependency: [if], data = [none] if (isTraceOn && tc.isEntryEnabled()) Tr.exit(tc, "flushCache : " + ise); throw ise; } // Perform the actual flush function... tx.flush(); // depends on control dependency: [try], data = [none] if (isTraceOn && tc.isEntryEnabled()) Tr.exit(tc, "flushCache : successful"); } catch (Throwable ex) // d259882 { FFDCFilter.processException(ex, CLASS_NAME + ".flushCache", "1708", this); if (isTraceOn && tc.isDebugEnabled()) Tr.debug(tc, "flushCache : " + ex); // If something went wrong flushing the beans out to storage, then // a bean will have been discarded, and the transaction must be // rolled back. d259882 if (tx != null) tx.setRollbackOnly(); // Convert (possibly nesting) any exception in an EJBException, // removing any Container specific exceptions. d259882 EJBException ejbex = ExceptionUtil.EJBException(ex); if (isTraceOn && tc.isEntryEnabled()) Tr.exit(tc, "flushCache : " + ejbex); throw ejbex; } // depends on control dependency: [catch], data = [none] } }
public class class_name { public static int getIdentifier(Class<?> type, String name) { // See if the cache already contains this identifier Map<String, Integer> typeCache; if (!sIdentifierCache.containsKey(type)) { typeCache = new ConcurrentHashMap<String, Integer>(); sIdentifierCache.put(type, typeCache); } else { typeCache = sIdentifierCache.get(type); } if (typeCache.containsKey(name)) { return typeCache.get(name); } // Retrieve the identifier try { Field field = type.getField(name); int resId = field.getInt(null); if (resId != 0) { typeCache.put(name, resId); } return resId; } catch (Exception e) { Log.e("JodaTimeAndroid", "Failed to retrieve identifier: type=" + type + " name=" + name, e); return 0; } } }
public class class_name { public static int getIdentifier(Class<?> type, String name) { // See if the cache already contains this identifier Map<String, Integer> typeCache; if (!sIdentifierCache.containsKey(type)) { typeCache = new ConcurrentHashMap<String, Integer>(); // depends on control dependency: [if], data = [none] sIdentifierCache.put(type, typeCache); // depends on control dependency: [if], data = [none] } else { typeCache = sIdentifierCache.get(type); // depends on control dependency: [if], data = [none] } if (typeCache.containsKey(name)) { return typeCache.get(name); // depends on control dependency: [if], data = [none] } // Retrieve the identifier try { Field field = type.getField(name); int resId = field.getInt(null); if (resId != 0) { typeCache.put(name, resId); // depends on control dependency: [if], data = [none] } return resId; // depends on control dependency: [try], data = [none] } catch (Exception e) { Log.e("JodaTimeAndroid", "Failed to retrieve identifier: type=" + type + " name=" + name, e); return 0; } // depends on control dependency: [catch], data = [none] } }
public class class_name { private static boolean validateCallbackInformation(Hashtable<String, Object> credData, String securityName, Invocation isInvoked) { boolean status = true; if (isInvoked == Invocation.CALLERPRINCIPALCALLBACK) { String existingName = (String) credData.get(AttributeNameConstants.WSCREDENTIAL_SECURITYNAME); if (existingName != null && !(existingName.equals(securityName))) { status = false; Tr.error(tc, "CALLBACK_SECURITY_NAME_MISMATCH_J2CA0675", new Object[] { securityName, existingName }); } } return status; } }
public class class_name { private static boolean validateCallbackInformation(Hashtable<String, Object> credData, String securityName, Invocation isInvoked) { boolean status = true; if (isInvoked == Invocation.CALLERPRINCIPALCALLBACK) { String existingName = (String) credData.get(AttributeNameConstants.WSCREDENTIAL_SECURITYNAME); if (existingName != null && !(existingName.equals(securityName))) { status = false; // depends on control dependency: [if], data = [none] Tr.error(tc, "CALLBACK_SECURITY_NAME_MISMATCH_J2CA0675", new Object[] { securityName, existingName }); // depends on control dependency: [if], data = [none] } } return status; } }
public class class_name { private int writeNewArray(Object array, Class<?> arrayClass, ObjectStreamClass arrayClDesc, Class<?> componentType, boolean unshared) throws IOException { output.writeByte(TC_ARRAY); writeClassDesc(arrayClDesc, false); int handle = nextHandle(); if (!unshared) { objectsWritten.put(array, handle); } // Now we have code duplication just because Java is typed. We have to // write N elements and assign to array positions, but we must typecast // the array first, and also call different methods depending on the // elements. if (componentType.isPrimitive()) { if (componentType == int.class) { int[] intArray = (int[]) array; output.writeInt(intArray.length); for (int i = 0; i < intArray.length; i++) { output.writeInt(intArray[i]); } } else if (componentType == byte.class) { byte[] byteArray = (byte[]) array; output.writeInt(byteArray.length); output.write(byteArray, 0, byteArray.length); } else if (componentType == char.class) { char[] charArray = (char[]) array; output.writeInt(charArray.length); for (int i = 0; i < charArray.length; i++) { output.writeChar(charArray[i]); } } else if (componentType == short.class) { short[] shortArray = (short[]) array; output.writeInt(shortArray.length); for (int i = 0; i < shortArray.length; i++) { output.writeShort(shortArray[i]); } } else if (componentType == boolean.class) { boolean[] booleanArray = (boolean[]) array; output.writeInt(booleanArray.length); for (int i = 0; i < booleanArray.length; i++) { output.writeBoolean(booleanArray[i]); } } else if (componentType == long.class) { long[] longArray = (long[]) array; output.writeInt(longArray.length); for (int i = 0; i < longArray.length; i++) { output.writeLong(longArray[i]); } } else if (componentType == float.class) { float[] floatArray = (float[]) array; output.writeInt(floatArray.length); for (int i = 0; i < floatArray.length; i++) { output.writeFloat(floatArray[i]); } } else if (componentType == double.class) { double[] doubleArray = (double[]) array; output.writeInt(doubleArray.length); for (int i = 0; i < doubleArray.length; i++) { output.writeDouble(doubleArray[i]); } } else { throw new InvalidClassException("Wrong base type in " + arrayClass.getName()); } } else { // Array of Objects Object[] objectArray = (Object[]) array; output.writeInt(objectArray.length); for (int i = 0; i < objectArray.length; i++) { // TODO: This place is the opportunity for enhancement // We can implement writing elements through fast-path, // without setting up the context (see writeObject()) for // each element with public API writeObject(objectArray[i]); } } return handle; } }
public class class_name { private int writeNewArray(Object array, Class<?> arrayClass, ObjectStreamClass arrayClDesc, Class<?> componentType, boolean unshared) throws IOException { output.writeByte(TC_ARRAY); writeClassDesc(arrayClDesc, false); int handle = nextHandle(); if (!unshared) { objectsWritten.put(array, handle); } // Now we have code duplication just because Java is typed. We have to // write N elements and assign to array positions, but we must typecast // the array first, and also call different methods depending on the // elements. if (componentType.isPrimitive()) { if (componentType == int.class) { int[] intArray = (int[]) array; output.writeInt(intArray.length); for (int i = 0; i < intArray.length; i++) { output.writeInt(intArray[i]); // depends on control dependency: [for], data = [i] } } else if (componentType == byte.class) { byte[] byteArray = (byte[]) array; output.writeInt(byteArray.length); output.write(byteArray, 0, byteArray.length); } else if (componentType == char.class) { char[] charArray = (char[]) array; output.writeInt(charArray.length); for (int i = 0; i < charArray.length; i++) { output.writeChar(charArray[i]); } } else if (componentType == short.class) { short[] shortArray = (short[]) array; output.writeInt(shortArray.length); for (int i = 0; i < shortArray.length; i++) { output.writeShort(shortArray[i]); } } else if (componentType == boolean.class) { boolean[] booleanArray = (boolean[]) array; output.writeInt(booleanArray.length); for (int i = 0; i < booleanArray.length; i++) { output.writeBoolean(booleanArray[i]); } } else if (componentType == long.class) { long[] longArray = (long[]) array; output.writeInt(longArray.length); for (int i = 0; i < longArray.length; i++) { output.writeLong(longArray[i]); } } else if (componentType == float.class) { float[] floatArray = (float[]) array; output.writeInt(floatArray.length); for (int i = 0; i < floatArray.length; i++) { output.writeFloat(floatArray[i]); } } else if (componentType == double.class) { double[] doubleArray = (double[]) array; output.writeInt(doubleArray.length); for (int i = 0; i < doubleArray.length; i++) { output.writeDouble(doubleArray[i]); } } else { throw new InvalidClassException("Wrong base type in " + arrayClass.getName()); } } else { // Array of Objects Object[] objectArray = (Object[]) array; output.writeInt(objectArray.length); for (int i = 0; i < objectArray.length; i++) { // TODO: This place is the opportunity for enhancement // We can implement writing elements through fast-path, // without setting up the context (see writeObject()) for // each element with public API writeObject(objectArray[i]); } } return handle; } }
public class class_name { public static byte[] removeDebugInfo(byte[] bytes) { if (bytes.length >= 4) { // Check magic number. int magic = ((bytes[0] & 0xff) << 24) | ((bytes[1] & 0xff) << 16) | ((bytes[2] & 0xff) << 8) | (bytes[3] & 0xff); if (magic != 0xCAFEBABE) return bytes; } else { return bytes; } // We set the initial size as it cannot exceed that value (but note that // this may not be the final size). ByteArrayOutputStream baos = new ByteArrayOutputStream(bytes.length); DataOutputStream dos = new DataOutputStream(baos); try { ClassReader classReader = new ClassReader(bytes); CleanClass cleanClass = new CleanClass(dos); classReader.accept(cleanClass, ClassReader.SKIP_DEBUG); if (cleanClass.isFiltered()) { return FILTERED_BYTECODE; } } catch (Exception ex) { return bytes; } return baos.toByteArray(); } }
public class class_name { public static byte[] removeDebugInfo(byte[] bytes) { if (bytes.length >= 4) { // Check magic number. int magic = ((bytes[0] & 0xff) << 24) | ((bytes[1] & 0xff) << 16) | ((bytes[2] & 0xff) << 8) | (bytes[3] & 0xff); if (magic != 0xCAFEBABE) return bytes; } else { return bytes; // depends on control dependency: [if], data = [none] } // We set the initial size as it cannot exceed that value (but note that // this may not be the final size). ByteArrayOutputStream baos = new ByteArrayOutputStream(bytes.length); DataOutputStream dos = new DataOutputStream(baos); try { ClassReader classReader = new ClassReader(bytes); CleanClass cleanClass = new CleanClass(dos); classReader.accept(cleanClass, ClassReader.SKIP_DEBUG); // depends on control dependency: [try], data = [none] if (cleanClass.isFiltered()) { return FILTERED_BYTECODE; // depends on control dependency: [if], data = [none] } } catch (Exception ex) { return bytes; } // depends on control dependency: [catch], data = [none] return baos.toByteArray(); } }
public class class_name { @Override protected Timestamp eval(final Object[] _value) throws EFapsException { final Timestamp ret; if ((_value == null) || (_value.length == 0) || (_value[0] == null)) { ret = null; } else { LocalTime time = new LocalTime(); if (_value[0] instanceof Date) { time = new DateTime(_value[0]).toLocalTime(); } else if (_value[0] instanceof DateTime) { time = ((DateTime) _value[0]).toLocalTime(); } else if (_value[0] instanceof String) { time = ISODateTimeFormat.localTimeParser().parseLocalTime((String) _value[0]); } ret = new Timestamp(time.toDateTimeToday().getMillis()); } return ret; } }
public class class_name { @Override protected Timestamp eval(final Object[] _value) throws EFapsException { final Timestamp ret; if ((_value == null) || (_value.length == 0) || (_value[0] == null)) { ret = null; } else { LocalTime time = new LocalTime(); if (_value[0] instanceof Date) { time = new DateTime(_value[0]).toLocalTime(); // depends on control dependency: [if], data = [none] } else if (_value[0] instanceof DateTime) { time = ((DateTime) _value[0]).toLocalTime(); // depends on control dependency: [if], data = [none] } else if (_value[0] instanceof String) { time = ISODateTimeFormat.localTimeParser().parseLocalTime((String) _value[0]); // depends on control dependency: [if], data = [none] } ret = new Timestamp(time.toDateTimeToday().getMillis()); } return ret; } }
public class class_name { public static double inducedPInf( DMatrixRMaj A ) { double max = 0; int m = A.numRows; int n = A.numCols; for( int i = 0; i < m; i++ ) { double total = 0; for( int j = 0; j < n; j++ ) { total += Math.abs(A.get(i,j)); } if( total > max ) { max = total; } } return max; } }
public class class_name { public static double inducedPInf( DMatrixRMaj A ) { double max = 0; int m = A.numRows; int n = A.numCols; for( int i = 0; i < m; i++ ) { double total = 0; for( int j = 0; j < n; j++ ) { total += Math.abs(A.get(i,j)); // depends on control dependency: [for], data = [j] } if( total > max ) { max = total; // depends on control dependency: [if], data = [none] } } return max; } }
public class class_name { private String getProviderName(String resourceType) { CmsDebugLog.consoleLog("getProviderName for " + resourceType); for (CmsResourceTypeBean typeBean : m_dialogBean.getTypes()) { if (typeBean.getType().equals(resourceType)) { return typeBean.getPreviewProviderName(); } } return null; } }
public class class_name { private String getProviderName(String resourceType) { CmsDebugLog.consoleLog("getProviderName for " + resourceType); for (CmsResourceTypeBean typeBean : m_dialogBean.getTypes()) { if (typeBean.getType().equals(resourceType)) { return typeBean.getPreviewProviderName(); // depends on control dependency: [if], data = [none] } } return null; } }
public class class_name { public static Object calculateGuess(JCExpression expr) { if (expr instanceof JCLiteral) { JCLiteral lit = (JCLiteral) expr; if (lit.getKind() == com.sun.source.tree.Tree.Kind.BOOLEAN_LITERAL) { return ((Number) lit.value).intValue() == 0 ? false : true; } return lit.value; } if (expr instanceof JCIdent || expr instanceof JCFieldAccess) { String x = expr.toString(); if (x.endsWith(".class")) return new ClassLiteral(x.substring(0, x.length() - 6)); int idx = x.lastIndexOf('.'); if (idx > -1) x = x.substring(idx + 1); return new FieldSelect(x); } return null; } }
public class class_name { public static Object calculateGuess(JCExpression expr) { if (expr instanceof JCLiteral) { JCLiteral lit = (JCLiteral) expr; if (lit.getKind() == com.sun.source.tree.Tree.Kind.BOOLEAN_LITERAL) { return ((Number) lit.value).intValue() == 0 ? false : true; // depends on control dependency: [if], data = [none] } return lit.value; // depends on control dependency: [if], data = [none] } if (expr instanceof JCIdent || expr instanceof JCFieldAccess) { String x = expr.toString(); if (x.endsWith(".class")) return new ClassLiteral(x.substring(0, x.length() - 6)); int idx = x.lastIndexOf('.'); if (idx > -1) x = x.substring(idx + 1); return new FieldSelect(x); // depends on control dependency: [if], data = [none] } return null; } }
public class class_name { @Override protected void onRestoreInstanceState(Parcelable state) { if (state.getClass() != Bundle.class) { super.onRestoreInstanceState(state); } else { Bundle instanceState = (Bundle)state; super.onRestoreInstanceState(instanceState.getParcelable(SUPER_STATE_KEY)); profileId = instanceState.getString(PROFILE_ID_KEY); presetSizeType = instanceState.getInt(PRESET_SIZE_KEY); isCropped = instanceState.getBoolean(IS_CROPPED_KEY); queryWidth = instanceState.getInt(BITMAP_WIDTH_KEY); queryHeight = instanceState.getInt(BITMAP_HEIGHT_KEY); setImageBitmap((Bitmap)instanceState.getParcelable(BITMAP_KEY)); if (instanceState.getBoolean(PENDING_REFRESH_KEY)) { refreshImage(true); } } } }
public class class_name { @Override protected void onRestoreInstanceState(Parcelable state) { if (state.getClass() != Bundle.class) { super.onRestoreInstanceState(state); // depends on control dependency: [if], data = [none] } else { Bundle instanceState = (Bundle)state; super.onRestoreInstanceState(instanceState.getParcelable(SUPER_STATE_KEY)); // depends on control dependency: [if], data = [none] profileId = instanceState.getString(PROFILE_ID_KEY); // depends on control dependency: [if], data = [none] presetSizeType = instanceState.getInt(PRESET_SIZE_KEY); // depends on control dependency: [if], data = [none] isCropped = instanceState.getBoolean(IS_CROPPED_KEY); // depends on control dependency: [if], data = [none] queryWidth = instanceState.getInt(BITMAP_WIDTH_KEY); // depends on control dependency: [if], data = [none] queryHeight = instanceState.getInt(BITMAP_HEIGHT_KEY); // depends on control dependency: [if], data = [none] setImageBitmap((Bitmap)instanceState.getParcelable(BITMAP_KEY)); // depends on control dependency: [if], data = [none] if (instanceState.getBoolean(PENDING_REFRESH_KEY)) { refreshImage(true); // depends on control dependency: [if], data = [none] } } } }
public class class_name { protected void addLinkedResources(String path, GeneratorContext context) { List<Locale> locales = new ArrayList<>(); Locale currentLocale = context.getLocale(); if (currentLocale != null) { locales.add(currentLocale); if (StringUtils.isNotEmpty(currentLocale.getVariant())) { locales.add(new Locale(currentLocale.getCountry(), currentLocale.getLanguage())); } if (StringUtils.isNotEmpty(currentLocale.getLanguage())) { locales.add(new Locale(currentLocale.getCountry())); } } // Adds fallback locale locales.add(control.getFallbackLocale()); Locale baseLocale = new Locale("", ""); if (!locales.contains(baseLocale)) { locales.add(baseLocale); } List<FilePathMapping> fMappings = getFileMappings(path, context, locales); addLinkedResources(path, context, fMappings); } }
public class class_name { protected void addLinkedResources(String path, GeneratorContext context) { List<Locale> locales = new ArrayList<>(); Locale currentLocale = context.getLocale(); if (currentLocale != null) { locales.add(currentLocale); // depends on control dependency: [if], data = [(currentLocale] if (StringUtils.isNotEmpty(currentLocale.getVariant())) { locales.add(new Locale(currentLocale.getCountry(), currentLocale.getLanguage())); // depends on control dependency: [if], data = [none] } if (StringUtils.isNotEmpty(currentLocale.getLanguage())) { locales.add(new Locale(currentLocale.getCountry())); // depends on control dependency: [if], data = [none] } } // Adds fallback locale locales.add(control.getFallbackLocale()); Locale baseLocale = new Locale("", ""); if (!locales.contains(baseLocale)) { locales.add(baseLocale); // depends on control dependency: [if], data = [none] } List<FilePathMapping> fMappings = getFileMappings(path, context, locales); addLinkedResources(path, context, fMappings); } }
public class class_name { @Generated("com.github.javaparser.generator.core.node.PropertyGenerator") public NullSafeFieldAccessExpr setScope(final Expression scope) { assertNotNull(scope); if (scope == this.scope) { return (NullSafeFieldAccessExpr) this; } notifyPropertyChange(ObservableProperty.SCOPE, this.scope, scope); if (this.scope != null) { this.scope.setParentNode(null); } this.scope = scope; setAsParentNodeOf(scope); return this; } }
public class class_name { @Generated("com.github.javaparser.generator.core.node.PropertyGenerator") public NullSafeFieldAccessExpr setScope(final Expression scope) { assertNotNull(scope); if (scope == this.scope) { return (NullSafeFieldAccessExpr) this; // depends on control dependency: [if], data = [none] } notifyPropertyChange(ObservableProperty.SCOPE, this.scope, scope); if (this.scope != null) { this.scope.setParentNode(null); // depends on control dependency: [if], data = [null)] } this.scope = scope; setAsParentNodeOf(scope); return this; } }
public class class_name { private boolean isExportLhs(Node lhs) { if (!lhs.isQualifiedName()) { return false; } return lhs.matchesQualifiedName("exports") || (lhs.isGetProp() && lhs.getFirstChild().matchesQualifiedName("exports")); } }
public class class_name { private boolean isExportLhs(Node lhs) { if (!lhs.isQualifiedName()) { return false; // depends on control dependency: [if], data = [none] } return lhs.matchesQualifiedName("exports") || (lhs.isGetProp() && lhs.getFirstChild().matchesQualifiedName("exports")); } }
public class class_name { public static Expression in(String field, String operator, Val<Expression>[] args, EbeanExprInvoker invoker) { if (args.length == 1) { if (args[0].object() instanceof QueryExpression) { return factory(invoker).in(field, ((QueryExpression<?>) args[0].object()).query); } throw new QuerySyntaxException(Messages.get("dsl.arguments.error3", operator)); } return factory(invoker).in(field, args); } }
public class class_name { public static Expression in(String field, String operator, Val<Expression>[] args, EbeanExprInvoker invoker) { if (args.length == 1) { if (args[0].object() instanceof QueryExpression) { return factory(invoker).in(field, ((QueryExpression<?>) args[0].object()).query); // depends on control dependency: [if], data = [none] } throw new QuerySyntaxException(Messages.get("dsl.arguments.error3", operator)); } return factory(invoker).in(field, args); } }
public class class_name { public static void remove(Element elem, boolean recurse) { elem.removeAttributeNS(URI, SRC_ATTR); elem.removeAttributeNS(URI, LINE_ATTR); elem.removeAttributeNS(URI, COL_ATTR); if (recurse) { NodeList children = elem.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { Node child = children.item(i); if (child.getNodeType() == Node.ELEMENT_NODE) { remove((Element) child, recurse); } } } } }
public class class_name { public static void remove(Element elem, boolean recurse) { elem.removeAttributeNS(URI, SRC_ATTR); elem.removeAttributeNS(URI, LINE_ATTR); elem.removeAttributeNS(URI, COL_ATTR); if (recurse) { NodeList children = elem.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { Node child = children.item(i); if (child.getNodeType() == Node.ELEMENT_NODE) { remove((Element) child, recurse); // depends on control dependency: [if], data = [none] } } } } }
public class class_name { public FacesConfigMapEntryType<FacesConfigMapEntriesType<T>> getOrCreateMapEntry() { List<Node> nodeList = childNode.get("map-entry"); if (nodeList != null && nodeList.size() > 0) { return new FacesConfigMapEntryTypeImpl<FacesConfigMapEntriesType<T>>(this, "map-entry", childNode, nodeList.get(0)); } return createMapEntry(); } }
public class class_name { public FacesConfigMapEntryType<FacesConfigMapEntriesType<T>> getOrCreateMapEntry() { List<Node> nodeList = childNode.get("map-entry"); if (nodeList != null && nodeList.size() > 0) { return new FacesConfigMapEntryTypeImpl<FacesConfigMapEntriesType<T>>(this, "map-entry", childNode, nodeList.get(0)); // depends on control dependency: [if], data = [none] } return createMapEntry(); } }
public class class_name { private void createMessageElement(StringBuilder sb, RepositoryLogRecord record){ // 660484 elim string concat sb.append(lineSeparator).append(INDENT[0]).append("<msgDataElement msgLocale=\"").append(record.getMessageLocale()).append("\">"); if (record.getParameters() != null) { // how many params do we have? for (int c = 0; c < record.getParameters().length; c++) { sb.append(lineSeparator).append(INDENT[1]).append("<msgCatalogTokens value=\""). append(MessageFormat.format("{" + c + "}", record.getParameters())).append("\"/>"); } } // IBM SWG MsgID if (record.getMessageID() != null) { // Seems to be a IBM SWG ID. sb.append(lineSeparator).append(INDENT[1]).append("<msgId>").append(record.getMessageID()).append("</msgId>"); // IBM SWG MsgType sb.append(lineSeparator).append(INDENT[1]).append("<msgIdType>"); if (record.getMessageID().length() == 10) sb.append("IBM5.4.1"); else sb.append("IBM4.4.1"); sb.append("</msgIdType>"); } if (record.getRawMessage() != null && record.getResourceBundleName() != null) { sb.append(lineSeparator).append(INDENT[1]).append("<msgCatalogId>").append(record.getRawMessage()).append("</msgCatalogId>"); sb.append(lineSeparator).append(INDENT[1]).append("<msgCatalogType>Java</msgCatalogType>"); sb.append(lineSeparator).append(INDENT[1]).append("<msgCatalog>").append(record.getResourceBundleName()).append("</msgCatalog>"); } sb.append(lineSeparator).append(INDENT[0]).append("</msgDataElement>"); } }
public class class_name { private void createMessageElement(StringBuilder sb, RepositoryLogRecord record){ // 660484 elim string concat sb.append(lineSeparator).append(INDENT[0]).append("<msgDataElement msgLocale=\"").append(record.getMessageLocale()).append("\">"); if (record.getParameters() != null) { // how many params do we have? for (int c = 0; c < record.getParameters().length; c++) { sb.append(lineSeparator).append(INDENT[1]).append("<msgCatalogTokens value=\""). append(MessageFormat.format("{" + c + "}", record.getParameters())).append("\"/>"); // depends on control dependency: [for], data = [none] } } // IBM SWG MsgID if (record.getMessageID() != null) { // Seems to be a IBM SWG ID. sb.append(lineSeparator).append(INDENT[1]).append("<msgId>").append(record.getMessageID()).append("</msgId>"); // depends on control dependency: [if], data = [(record.getMessageID()] // IBM SWG MsgType sb.append(lineSeparator).append(INDENT[1]).append("<msgIdType>"); // depends on control dependency: [if], data = [none] if (record.getMessageID().length() == 10) sb.append("IBM5.4.1"); else sb.append("IBM4.4.1"); sb.append("</msgIdType>"); // depends on control dependency: [if], data = [none] } if (record.getRawMessage() != null && record.getResourceBundleName() != null) { sb.append(lineSeparator).append(INDENT[1]).append("<msgCatalogId>").append(record.getRawMessage()).append("</msgCatalogId>"); // depends on control dependency: [if], data = [(record.getRawMessage()] sb.append(lineSeparator).append(INDENT[1]).append("<msgCatalogType>Java</msgCatalogType>"); // depends on control dependency: [if], data = [none] sb.append(lineSeparator).append(INDENT[1]).append("<msgCatalog>").append(record.getResourceBundleName()).append("</msgCatalog>"); // depends on control dependency: [if], data = [none] } sb.append(lineSeparator).append(INDENT[0]).append("</msgDataElement>"); } }
public class class_name { @Override public MessagingAuthorizationService getMessagingAuthorizationService() { SibTr.entry(tc, CLASS_NAME + "getMessagingAuthorizationService"); if (sibAuthorizationService == null) { sibAuthorizationService = new MessagingAuthorizationServiceImpl(this); } SibTr.exit(tc, CLASS_NAME + "getMessagingAuthorizationService", sibAuthorizationService); return sibAuthorizationService; } }
public class class_name { @Override public MessagingAuthorizationService getMessagingAuthorizationService() { SibTr.entry(tc, CLASS_NAME + "getMessagingAuthorizationService"); if (sibAuthorizationService == null) { sibAuthorizationService = new MessagingAuthorizationServiceImpl(this); // depends on control dependency: [if], data = [none] } SibTr.exit(tc, CLASS_NAME + "getMessagingAuthorizationService", sibAuthorizationService); return sibAuthorizationService; } }
public class class_name { @Pure public static InputStream getResourceAsStream(ClassLoader classLoader, Package packagename, String path) { if (packagename == null || path == null) { return null; } final StringBuilder b = new StringBuilder(); b.append(packagename.getName().replaceAll( Pattern.quote("."), //$NON-NLS-1$ Matcher.quoteReplacement(NAME_SEPARATOR))); if (!path.startsWith(NAME_SEPARATOR)) { b.append(NAME_SEPARATOR); } b.append(path); ClassLoader cl = classLoader; if (cl == null) { cl = packagename.getClass().getClassLoader(); } return getResourceAsStream(cl, b.toString()); } }
public class class_name { @Pure public static InputStream getResourceAsStream(ClassLoader classLoader, Package packagename, String path) { if (packagename == null || path == null) { return null; // depends on control dependency: [if], data = [none] } final StringBuilder b = new StringBuilder(); b.append(packagename.getName().replaceAll( Pattern.quote("."), //$NON-NLS-1$ Matcher.quoteReplacement(NAME_SEPARATOR))); if (!path.startsWith(NAME_SEPARATOR)) { b.append(NAME_SEPARATOR); // depends on control dependency: [if], data = [none] } b.append(path); ClassLoader cl = classLoader; if (cl == null) { cl = packagename.getClass().getClassLoader(); // depends on control dependency: [if], data = [none] } return getResourceAsStream(cl, b.toString()); } }
public class class_name { public Stream<S> findMatches(Q query) { Object[] queryArray = matchFields.stream().map(mf -> mf.extract(query)).toArray(); HollowHashIndexResult matches = hhi.findMatches(queryArray); if (matches == null) { return Stream.empty(); } return matches.stream().mapToObj(i -> selectField.extract(api, i)); } }
public class class_name { public Stream<S> findMatches(Q query) { Object[] queryArray = matchFields.stream().map(mf -> mf.extract(query)).toArray(); HollowHashIndexResult matches = hhi.findMatches(queryArray); if (matches == null) { return Stream.empty(); // depends on control dependency: [if], data = [none] } return matches.stream().mapToObj(i -> selectField.extract(api, i)); } }
public class class_name { public V getValue(long timeout, Callable<V> updater, boolean returnExpiredWhileUpdating, Object cacheRequestObject) { if (!isInitialized() || hasExpired(timeout, cacheRequestObject)) { boolean lockAcquired = false; try { long beforeLockingCreatedMillis = createdMillis; if(returnExpiredWhileUpdating) { if(!writeLock.tryLock()) { if(isInitialized()) { return getValueWhileUpdating(cacheRequestObject); } else { if(LOG.isDebugEnabled()) { LOG.debug("Locking cache for update"); } writeLock.lock(); } } } else { LOG.debug("Locking cache for update"); writeLock.lock(); } lockAcquired = true; V value; if (!isInitialized() || shouldUpdate(beforeLockingCreatedMillis, cacheRequestObject)) { try { value = updateValue(getValue(), updater, cacheRequestObject); if(LOG.isDebugEnabled()) { LOG.debug("Updating cache for value [{}]", value); } setValue(value); } catch (Exception e) { throw new UpdateException(e); } } else { value = getValue(); resetTimestamp(false); } return value; } finally { if(lockAcquired) { if(LOG.isDebugEnabled()) { LOG.debug("Unlocking cache for update"); } writeLock.unlock(); } } } else { return getValue(); } } }
public class class_name { public V getValue(long timeout, Callable<V> updater, boolean returnExpiredWhileUpdating, Object cacheRequestObject) { if (!isInitialized() || hasExpired(timeout, cacheRequestObject)) { boolean lockAcquired = false; try { long beforeLockingCreatedMillis = createdMillis; if(returnExpiredWhileUpdating) { if(!writeLock.tryLock()) { if(isInitialized()) { return getValueWhileUpdating(cacheRequestObject); // depends on control dependency: [if], data = [none] } else { if(LOG.isDebugEnabled()) { LOG.debug("Locking cache for update"); // depends on control dependency: [if], data = [none] } writeLock.lock(); // depends on control dependency: [if], data = [none] } } } else { LOG.debug("Locking cache for update"); // depends on control dependency: [if], data = [none] writeLock.lock(); // depends on control dependency: [if], data = [none] } lockAcquired = true; V value; if (!isInitialized() || shouldUpdate(beforeLockingCreatedMillis, cacheRequestObject)) { try { value = updateValue(getValue(), updater, cacheRequestObject); if(LOG.isDebugEnabled()) { LOG.debug("Updating cache for value [{}]", value); } setValue(value); // depends on control dependency: [if], data = [none] } catch (Exception e) { throw new UpdateException(e); } } else { value = getValue(); // depends on control dependency: [try], data = [none] resetTimestamp(false); // depends on control dependency: [try], data = [none] } return value; } finally { if(lockAcquired) { if(LOG.isDebugEnabled()) { LOG.debug("Unlocking cache for update"); // depends on control dependency: [if], data = [none] } writeLock.unlock(); // depends on control dependency: [if], data = [none] } } } else { return getValue(); // depends on control dependency: [if], data = [none] } } }
public class class_name { public TemplatizedType createTemplatizedType( ObjectType baseType, Map<TemplateType, JSType> templatizedTypes) { ImmutableList.Builder<JSType> builder = ImmutableList.builder(); TemplateTypeMap baseTemplateTypeMap = baseType.getTemplateTypeMap(); for (TemplateType key : baseTemplateTypeMap.getUnfilledTemplateKeys()) { JSType templatizedType = templatizedTypes.containsKey(key) ? templatizedTypes.get(key) : getNativeType(UNKNOWN_TYPE); builder.add(templatizedType); } return createTemplatizedType(baseType, builder.build()); } }
public class class_name { public TemplatizedType createTemplatizedType( ObjectType baseType, Map<TemplateType, JSType> templatizedTypes) { ImmutableList.Builder<JSType> builder = ImmutableList.builder(); TemplateTypeMap baseTemplateTypeMap = baseType.getTemplateTypeMap(); for (TemplateType key : baseTemplateTypeMap.getUnfilledTemplateKeys()) { JSType templatizedType = templatizedTypes.containsKey(key) ? templatizedTypes.get(key) : getNativeType(UNKNOWN_TYPE); builder.add(templatizedType); // depends on control dependency: [for], data = [none] } return createTemplatizedType(baseType, builder.build()); } }
public class class_name { public void setEntries(Map<String, String> entries) { for (String id : entries.keySet()) { specs.put(id, new ObjURISpec(Utils.extractUriSpecFromSitemapMatch(entries.get(id)))); } } }
public class class_name { public void setEntries(Map<String, String> entries) { for (String id : entries.keySet()) { specs.put(id, new ObjURISpec(Utils.extractUriSpecFromSitemapMatch(entries.get(id)))); // depends on control dependency: [for], data = [id] } } }
public class class_name { public static Properties readPropertiesFromCredentials(String credentials) { Properties props = new Properties(); File propFD = new File(credentials); if (!propFD.exists() || !propFD.isFile() || !propFD.canRead()) { throw new IllegalArgumentException("Credentials file " + credentials + " is not a read accessible file"); } else { FileReader fr = null; try { fr = new FileReader(credentials); props.load(fr); } catch (IOException e) { throw new IllegalArgumentException("Credential file not found or permission denied."); } } return props; } }
public class class_name { public static Properties readPropertiesFromCredentials(String credentials) { Properties props = new Properties(); File propFD = new File(credentials); if (!propFD.exists() || !propFD.isFile() || !propFD.canRead()) { throw new IllegalArgumentException("Credentials file " + credentials + " is not a read accessible file"); } else { FileReader fr = null; try { fr = new FileReader(credentials); // depends on control dependency: [try], data = [none] props.load(fr); // depends on control dependency: [try], data = [none] } catch (IOException e) { throw new IllegalArgumentException("Credential file not found or permission denied."); } // depends on control dependency: [catch], data = [none] } return props; } }
public class class_name { public static String getExpressionKey(String result) { if (result == null) return null; try { int from = result.indexOf(startTag); int to = result.indexOf(endTag, from); Integer.parseInt(result.substring(from + 5, to)); return result.substring(from, to + 5); } catch (Exception e) { return null; } } }
public class class_name { public static String getExpressionKey(String result) { if (result == null) return null; try { int from = result.indexOf(startTag); int to = result.indexOf(endTag, from); Integer.parseInt(result.substring(from + 5, to)); // depends on control dependency: [try], data = [none] return result.substring(from, to + 5); // depends on control dependency: [try], data = [none] } catch (Exception e) { return null; } // depends on control dependency: [catch], data = [none] } }
public class class_name { public static void equalizeLocal(GrayU16 input , int radius , GrayU16 output , int histogramLength , IWorkArrays workArrays ) { InputSanityCheck.checkSameShape(input, output); if( workArrays == null ) workArrays = new IWorkArrays(); workArrays.reset(histogramLength); int width = radius*2+1; // use more efficient algorithms if possible if( input.width >= width && input.height >= width ) { if(BoofConcurrency.USE_CONCURRENT ) { ImplEnhanceHistogram_MT.equalizeLocalInner(input, radius, output, workArrays); // top border ImplEnhanceHistogram_MT.equalizeLocalRow(input, radius, 0, output, workArrays); // bottom border ImplEnhanceHistogram_MT.equalizeLocalRow(input, radius, input.height - radius, output, workArrays); // left border ImplEnhanceHistogram_MT.equalizeLocalCol(input, radius, 0, output, workArrays); // right border ImplEnhanceHistogram_MT.equalizeLocalCol(input, radius, input.width - radius, output, workArrays); } else { ImplEnhanceHistogram.equalizeLocalInner(input, radius, output, workArrays); // top border ImplEnhanceHistogram.equalizeLocalRow(input, radius, 0, output, workArrays); // bottom border ImplEnhanceHistogram.equalizeLocalRow(input, radius, input.height - radius, output, workArrays); // left border ImplEnhanceHistogram.equalizeLocalCol(input, radius, 0, output, workArrays); // right border ImplEnhanceHistogram.equalizeLocalCol(input, radius, input.width - radius, output, workArrays); } } else if( input.width < width && input.height < width ) { // the local region is larger than the image. just use the full image algorithm int[] histogram = workArrays.pop(); int[] transform = workArrays.pop(); ImageStatistics.histogram(input,0,histogram); equalize(histogram,transform); applyTransform(input,transform,output); workArrays.recycle(histogram); workArrays.recycle(transform); } else { if(BoofConcurrency.USE_CONCURRENT ) { ImplEnhanceHistogram_MT.equalizeLocalNaive(input, radius, output, workArrays); } else { ImplEnhanceHistogram.equalizeLocalNaive(input, radius, output, workArrays); } } } }
public class class_name { public static void equalizeLocal(GrayU16 input , int radius , GrayU16 output , int histogramLength , IWorkArrays workArrays ) { InputSanityCheck.checkSameShape(input, output); if( workArrays == null ) workArrays = new IWorkArrays(); workArrays.reset(histogramLength); int width = radius*2+1; // use more efficient algorithms if possible if( input.width >= width && input.height >= width ) { if(BoofConcurrency.USE_CONCURRENT ) { ImplEnhanceHistogram_MT.equalizeLocalInner(input, radius, output, workArrays); // depends on control dependency: [if], data = [none] // top border ImplEnhanceHistogram_MT.equalizeLocalRow(input, radius, 0, output, workArrays); // depends on control dependency: [if], data = [none] // bottom border ImplEnhanceHistogram_MT.equalizeLocalRow(input, radius, input.height - radius, output, workArrays); // depends on control dependency: [if], data = [none] // left border ImplEnhanceHistogram_MT.equalizeLocalCol(input, radius, 0, output, workArrays); // depends on control dependency: [if], data = [none] // right border ImplEnhanceHistogram_MT.equalizeLocalCol(input, radius, input.width - radius, output, workArrays); // depends on control dependency: [if], data = [none] } else { ImplEnhanceHistogram.equalizeLocalInner(input, radius, output, workArrays); // depends on control dependency: [if], data = [none] // top border ImplEnhanceHistogram.equalizeLocalRow(input, radius, 0, output, workArrays); // depends on control dependency: [if], data = [none] // bottom border ImplEnhanceHistogram.equalizeLocalRow(input, radius, input.height - radius, output, workArrays); // depends on control dependency: [if], data = [none] // left border ImplEnhanceHistogram.equalizeLocalCol(input, radius, 0, output, workArrays); // depends on control dependency: [if], data = [none] // right border ImplEnhanceHistogram.equalizeLocalCol(input, radius, input.width - radius, output, workArrays); // depends on control dependency: [if], data = [none] } } else if( input.width < width && input.height < width ) { // the local region is larger than the image. just use the full image algorithm int[] histogram = workArrays.pop(); int[] transform = workArrays.pop(); ImageStatistics.histogram(input,0,histogram); // depends on control dependency: [if], data = [none] equalize(histogram,transform); // depends on control dependency: [if], data = [none] applyTransform(input,transform,output); // depends on control dependency: [if], data = [none] workArrays.recycle(histogram); // depends on control dependency: [if], data = [none] workArrays.recycle(transform); // depends on control dependency: [if], data = [none] } else { if(BoofConcurrency.USE_CONCURRENT ) { ImplEnhanceHistogram_MT.equalizeLocalNaive(input, radius, output, workArrays); // depends on control dependency: [if], data = [none] } else { ImplEnhanceHistogram.equalizeLocalNaive(input, radius, output, workArrays); // depends on control dependency: [if], data = [none] } } } }
public class class_name { public void setApiKeys(java.util.Collection<ApiKey> apiKeys) { if (apiKeys == null) { this.apiKeys = null; return; } this.apiKeys = new java.util.ArrayList<ApiKey>(apiKeys); } }
public class class_name { public void setApiKeys(java.util.Collection<ApiKey> apiKeys) { if (apiKeys == null) { this.apiKeys = null; // depends on control dependency: [if], data = [none] return; // depends on control dependency: [if], data = [none] } this.apiKeys = new java.util.ArrayList<ApiKey>(apiKeys); } }
public class class_name { public SIBusMessage receiveWithWait(SITransaction tran, long timeout) throws SISessionUnavailableException, SISessionDroppedException, SIConnectionUnavailableException, SIConnectionDroppedException, SIResourceException, SIConnectionLostException, SILimitExceededException, SIErrorException, SINotAuthorizedException, SIIncorrectCallException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "receiveWithWait", new Object[] {tran, ""+timeout}); SIBusMessage mess = null; if (state == StateEnum.CLOSED || state == StateEnum.CLOSING) { throw new SISessionUnavailableException(nls.getFormattedMessage("SESSION_CLOSED_SICO1013", null, null)); } executingReceiveWithWait = true; // XCT instrumentation for SIBus //lohith liberty change /* if (XctSettings.isAnyEnabled()) { Xct xct = Xct.current(); if(xct.annotationsEnabled()) { Annotation annotation= new Annotation(XctJmsConstants.XCT_SIBUS).add(XctJmsConstants.XCT_PROXY_RECEIVE_WITH_WAIT); annotation.associate(XctJmsConstants.XCT_DEST_NAME,destName); annotation.add(new Annotation(XctJmsConstants.XCT_DEST_TYPE).add(destType.toString())); xct.begin(annotation); } else xct.begin(); }*/ try { // Now we need to synchronise on the transaction object if there is one. if (tran != null) { synchronized (tran) { // Check transaction is in a valid state. // Enlisted for an XA UOW and not rolledback or // completed for a local transaction. if (!((Transaction) tran).isValid()) { throw new SIIncorrectCallException( nls.getFormattedMessage("TRANSACTION_COMPLETE_SICO1022", null, null) ); } mess = _receiveWithWait(tran, timeout ); } } else { mess = _receiveWithWait(null, timeout); } } finally { executingReceiveWithWait = false; // XCT instrumentation for SIBus //lohith liberty change if(mess != null) {/* if (XctSettings.isAnyEnabled()) { Xct xct = Xct.current(); if(xct.annotationsEnabled()) { Annotation annotation= new Annotation(XctJmsConstants.XCT_SIBUS).add(XctJmsConstants.XCT_PROXY_RECEIVE_WITH_WAIT); String xctCorrelationID = mess.getXctCorrelationID(); if(xctCorrelationID != null) { try { String[] xctIds = Xct.getXctIdsFromString(xctCorrelationID); annotation.associate(XctJmsConstants.XCT_ID,xctIds[0]) ; annotation.associate(XctJmsConstants.XCT_ROOT_ID,xctIds[1]); } catch(IllegalArgumentException e) { //No FFDC Code needed if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "Ignoring: Invalid XCT Correlation ID " + e); } } xct.end(annotation); } else xct.end(); } */} else {/* if (XctSettings.isAnyEnabled()) { Xct xct = Xct.current(); if(xct.annotationsEnabled()) { Annotation annotation= new Annotation(XctJmsConstants.XCT_SIBUS).add(XctJmsConstants.XCT_PROXY_RECEIVE_WITH_WAIT); annotation.add(XctJmsConstants.XCT_NO_MESSAGE); xct.end(annotation); } else xct.end(); } */} } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "receiveWithWait"); return mess; } }
public class class_name { public SIBusMessage receiveWithWait(SITransaction tran, long timeout) throws SISessionUnavailableException, SISessionDroppedException, SIConnectionUnavailableException, SIConnectionDroppedException, SIResourceException, SIConnectionLostException, SILimitExceededException, SIErrorException, SINotAuthorizedException, SIIncorrectCallException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "receiveWithWait", new Object[] {tran, ""+timeout}); SIBusMessage mess = null; if (state == StateEnum.CLOSED || state == StateEnum.CLOSING) { throw new SISessionUnavailableException(nls.getFormattedMessage("SESSION_CLOSED_SICO1013", null, null)); } executingReceiveWithWait = true; // XCT instrumentation for SIBus //lohith liberty change /* if (XctSettings.isAnyEnabled()) { Xct xct = Xct.current(); if(xct.annotationsEnabled()) { Annotation annotation= new Annotation(XctJmsConstants.XCT_SIBUS).add(XctJmsConstants.XCT_PROXY_RECEIVE_WITH_WAIT); annotation.associate(XctJmsConstants.XCT_DEST_NAME,destName); annotation.add(new Annotation(XctJmsConstants.XCT_DEST_TYPE).add(destType.toString())); xct.begin(annotation); } else xct.begin(); }*/ try { // Now we need to synchronise on the transaction object if there is one. if (tran != null) { synchronized (tran) // depends on control dependency: [if], data = [(tran] { // Check transaction is in a valid state. // Enlisted for an XA UOW and not rolledback or // completed for a local transaction. if (!((Transaction) tran).isValid()) { throw new SIIncorrectCallException( nls.getFormattedMessage("TRANSACTION_COMPLETE_SICO1022", null, null) ); } mess = _receiveWithWait(tran, timeout ); } } else { mess = _receiveWithWait(null, timeout); // depends on control dependency: [if], data = [none] } } finally { executingReceiveWithWait = false; // XCT instrumentation for SIBus //lohith liberty change if(mess != null) {/* if (XctSettings.isAnyEnabled()) { Xct xct = Xct.current(); if(xct.annotationsEnabled()) { Annotation annotation= new Annotation(XctJmsConstants.XCT_SIBUS).add(XctJmsConstants.XCT_PROXY_RECEIVE_WITH_WAIT); String xctCorrelationID = mess.getXctCorrelationID(); if(xctCorrelationID != null) { try { String[] xctIds = Xct.getXctIdsFromString(xctCorrelationID); annotation.associate(XctJmsConstants.XCT_ID,xctIds[0]) ; annotation.associate(XctJmsConstants.XCT_ROOT_ID,xctIds[1]); } catch(IllegalArgumentException e) { //No FFDC Code needed if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "Ignoring: Invalid XCT Correlation ID " + e); } } xct.end(annotation); } else xct.end(); } */} else {/* if (XctSettings.isAnyEnabled()) { Xct xct = Xct.current(); if(xct.annotationsEnabled()) { Annotation annotation= new Annotation(XctJmsConstants.XCT_SIBUS).add(XctJmsConstants.XCT_PROXY_RECEIVE_WITH_WAIT); annotation.add(XctJmsConstants.XCT_NO_MESSAGE); xct.end(annotation); } else xct.end(); } */} } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "receiveWithWait"); return mess; } }
public class class_name { public void marshall(UntagResourceRequest untagResourceRequest, ProtocolMarshaller protocolMarshaller) { if (untagResourceRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(untagResourceRequest.getResourceArn(), RESOURCEARN_BINDING); protocolMarshaller.marshall(untagResourceRequest.getTagKeyList(), TAGKEYLIST_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } } }
public class class_name { public void marshall(UntagResourceRequest untagResourceRequest, ProtocolMarshaller protocolMarshaller) { if (untagResourceRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(untagResourceRequest.getResourceArn(), RESOURCEARN_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(untagResourceRequest.getTagKeyList(), TAGKEYLIST_BINDING); // depends on control dependency: [try], data = [none] } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } // depends on control dependency: [catch], data = [none] } }
public class class_name { public Set<? extends Element> getIncludedElements() { if (includedElements == null) { Set<Element> result = new LinkedHashSet<>(); result.addAll(includedModuleElements); result.addAll(includedPackageElements); result.addAll(includedTypeElements); includedElements = Collections.unmodifiableSet(result); } return includedElements; } }
public class class_name { public Set<? extends Element> getIncludedElements() { if (includedElements == null) { Set<Element> result = new LinkedHashSet<>(); result.addAll(includedModuleElements); // depends on control dependency: [if], data = [none] result.addAll(includedPackageElements); // depends on control dependency: [if], data = [none] result.addAll(includedTypeElements); // depends on control dependency: [if], data = [none] includedElements = Collections.unmodifiableSet(result); // depends on control dependency: [if], data = [none] } return includedElements; } }
public class class_name { public void marshall(RestApi restApi, ProtocolMarshaller protocolMarshaller) { if (restApi == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(restApi.getId(), ID_BINDING); protocolMarshaller.marshall(restApi.getName(), NAME_BINDING); protocolMarshaller.marshall(restApi.getDescription(), DESCRIPTION_BINDING); protocolMarshaller.marshall(restApi.getCreatedDate(), CREATEDDATE_BINDING); protocolMarshaller.marshall(restApi.getVersion(), VERSION_BINDING); protocolMarshaller.marshall(restApi.getWarnings(), WARNINGS_BINDING); protocolMarshaller.marshall(restApi.getBinaryMediaTypes(), BINARYMEDIATYPES_BINDING); protocolMarshaller.marshall(restApi.getMinimumCompressionSize(), MINIMUMCOMPRESSIONSIZE_BINDING); protocolMarshaller.marshall(restApi.getApiKeySource(), APIKEYSOURCE_BINDING); protocolMarshaller.marshall(restApi.getEndpointConfiguration(), ENDPOINTCONFIGURATION_BINDING); protocolMarshaller.marshall(restApi.getPolicy(), POLICY_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } } }
public class class_name { public void marshall(RestApi restApi, ProtocolMarshaller protocolMarshaller) { if (restApi == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(restApi.getId(), ID_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(restApi.getName(), NAME_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(restApi.getDescription(), DESCRIPTION_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(restApi.getCreatedDate(), CREATEDDATE_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(restApi.getVersion(), VERSION_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(restApi.getWarnings(), WARNINGS_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(restApi.getBinaryMediaTypes(), BINARYMEDIATYPES_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(restApi.getMinimumCompressionSize(), MINIMUMCOMPRESSIONSIZE_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(restApi.getApiKeySource(), APIKEYSOURCE_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(restApi.getEndpointConfiguration(), ENDPOINTCONFIGURATION_BINDING); // depends on control dependency: [try], data = [none] protocolMarshaller.marshall(restApi.getPolicy(), POLICY_BINDING); // depends on control dependency: [try], data = [none] } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } // depends on control dependency: [catch], data = [none] } }
public class class_name { private boolean readHistoricalDataIfNeeded() { if (mCanReadHistoricalData && mHistoricalRecordsChanged && !TextUtils.isEmpty(mHistoryFileName)) { mCanReadHistoricalData = false; mReadShareHistoryCalled = true; readHistoricalDataImpl(); return true; } return false; } }
public class class_name { private boolean readHistoricalDataIfNeeded() { if (mCanReadHistoricalData && mHistoricalRecordsChanged && !TextUtils.isEmpty(mHistoryFileName)) { mCanReadHistoricalData = false; // depends on control dependency: [if], data = [none] mReadShareHistoryCalled = true; // depends on control dependency: [if], data = [none] readHistoricalDataImpl(); // depends on control dependency: [if], data = [none] return true; // depends on control dependency: [if], data = [none] } return false; } }
public class class_name { public CreateUserRequest withSecurityProfileIds(String... securityProfileIds) { if (this.securityProfileIds == null) { setSecurityProfileIds(new java.util.ArrayList<String>(securityProfileIds.length)); } for (String ele : securityProfileIds) { this.securityProfileIds.add(ele); } return this; } }
public class class_name { public CreateUserRequest withSecurityProfileIds(String... securityProfileIds) { if (this.securityProfileIds == null) { setSecurityProfileIds(new java.util.ArrayList<String>(securityProfileIds.length)); // depends on control dependency: [if], data = [none] } for (String ele : securityProfileIds) { this.securityProfileIds.add(ele); // depends on control dependency: [for], data = [ele] } return this; } }
public class class_name { public static PeriodType seconds() { PeriodType type = cSeconds; if (type == null) { type = new PeriodType( "Seconds", new DurationFieldType[] { DurationFieldType.seconds() }, new int[] { -1, -1, -1, -1, -1, -1, 0, -1, } ); cSeconds = type; } return type; } }
public class class_name { public static PeriodType seconds() { PeriodType type = cSeconds; if (type == null) { type = new PeriodType( "Seconds", new DurationFieldType[] { DurationFieldType.seconds() }, new int[] { -1, -1, -1, -1, -1, -1, 0, -1, } ); // depends on control dependency: [if], data = [none] cSeconds = type; // depends on control dependency: [if], data = [none] } return type; } }
public class class_name { private Date adjustForWholeDay(Date date, boolean isEnd) { Calendar result = new GregorianCalendar(); result.setTime(date); result.set(Calendar.HOUR_OF_DAY, 0); result.set(Calendar.MINUTE, 0); result.set(Calendar.SECOND, 0); result.set(Calendar.MILLISECOND, 0); if (isEnd) { result.add(Calendar.DATE, 1); } return result.getTime(); } }
public class class_name { private Date adjustForWholeDay(Date date, boolean isEnd) { Calendar result = new GregorianCalendar(); result.setTime(date); result.set(Calendar.HOUR_OF_DAY, 0); result.set(Calendar.MINUTE, 0); result.set(Calendar.SECOND, 0); result.set(Calendar.MILLISECOND, 0); if (isEnd) { result.add(Calendar.DATE, 1); // depends on control dependency: [if], data = [none] } return result.getTime(); } }
public class class_name { @Deprecated public static <T extends ImageBase<T>> void rotate(T input, T output, BorderType borderType, InterpolationType interpType, float angleInputToOutput) { float offX = 0;//(output.width+1)%2; float offY = 0;//(output.height+1)%2; PixelTransform<Point2D_F32> model = DistortSupport.transformRotate(input.width / 2, input.height / 2, output.width / 2 - offX, output.height / 2 - offY, angleInputToOutput); if( input instanceof ImageGray) { distortSingle((ImageGray) input, (ImageGray) output, model, interpType, borderType); } else if( input instanceof Planar) { distortPL((Planar) input, (Planar) output, model,borderType, interpType); } } }
public class class_name { @Deprecated public static <T extends ImageBase<T>> void rotate(T input, T output, BorderType borderType, InterpolationType interpType, float angleInputToOutput) { float offX = 0;//(output.width+1)%2; float offY = 0;//(output.height+1)%2; PixelTransform<Point2D_F32> model = DistortSupport.transformRotate(input.width / 2, input.height / 2, output.width / 2 - offX, output.height / 2 - offY, angleInputToOutput); if( input instanceof ImageGray) { distortSingle((ImageGray) input, (ImageGray) output, model, interpType, borderType); // depends on control dependency: [if], data = [none] } else if( input instanceof Planar) { distortPL((Planar) input, (Planar) output, model,borderType, interpType); // depends on control dependency: [if], data = [none] } } }
public class class_name { public static double[] plusTimesEquals(final double[] v1, final double[] v2, final double s2) { assert v1.length == v2.length : ERR_VEC_DIMENSIONS; for(int i = 0; i < v1.length; i++) { v1[i] += s2 * v2[i]; } return v1; } }
public class class_name { public static double[] plusTimesEquals(final double[] v1, final double[] v2, final double s2) { assert v1.length == v2.length : ERR_VEC_DIMENSIONS; for(int i = 0; i < v1.length; i++) { v1[i] += s2 * v2[i]; // depends on control dependency: [for], data = [i] } return v1; } }
public class class_name { boolean alignEdges(FastQueue<Node> corners) { open.clear(); open.add( corners.get(0) ); marked.resize(corners.size); marked.fill(false); marked.set(corners.get(0).index,true); while( !open.isEmpty() ) { Node na = open.remove(); // examine each neighbor and see the neighbor is correctly aligned for (int i = 0; i < 4; i++) { if( na.edges[i] == null ) { continue; } // Compute which index should be an edge pointing back at 'na' int j = (i+2)%4; Node nb = na.edges[i]; // Sanity check. If it has been marked it should be correctly aligned if( marked.get(nb.index) ) { if( nb.edges[j] != na ) { if( verbose != null ) verbose.println("BUG! node "+nb.index+" has been processed and edge "+j+" doesn't point to node "+na.index); return false; } continue; } // Rotate edges boolean failed = true; for (int attempt = 0; attempt < 4; attempt++) { if( nb.edges[j] != na ) { nb.rotateEdgesDown(); } else { failed = false; break; } } if( failed ) { if( verbose != null ) verbose.println("BUG! Can't align edges"); return false; } marked.set(nb.index,true); open.add(nb); } } return true; } }
public class class_name { boolean alignEdges(FastQueue<Node> corners) { open.clear(); open.add( corners.get(0) ); marked.resize(corners.size); marked.fill(false); marked.set(corners.get(0).index,true); while( !open.isEmpty() ) { Node na = open.remove(); // examine each neighbor and see the neighbor is correctly aligned for (int i = 0; i < 4; i++) { if( na.edges[i] == null ) { continue; } // Compute which index should be an edge pointing back at 'na' int j = (i+2)%4; Node nb = na.edges[i]; // Sanity check. If it has been marked it should be correctly aligned if( marked.get(nb.index) ) { if( nb.edges[j] != na ) { if( verbose != null ) verbose.println("BUG! node "+nb.index+" has been processed and edge "+j+" doesn't point to node "+na.index); return false; } continue; } // Rotate edges boolean failed = true; for (int attempt = 0; attempt < 4; attempt++) { if( nb.edges[j] != na ) { nb.rotateEdgesDown(); } else { failed = false; break; } } if( failed ) { if( verbose != null ) verbose.println("BUG! Can't align edges"); return false; // depends on control dependency: [if], data = [none] } marked.set(nb.index,true); // depends on control dependency: [if], data = [none] open.add(nb); // depends on control dependency: [if], data = [none] } } return true; // depends on control dependency: [while], data = [none] } }
public class class_name { public void processUserDefinedFields(List<Row> fields, List<Row> values) { // Process fields Map<Integer, String> tableNameMap = new HashMap<Integer, String>(); for (Row row : fields) { Integer fieldId = row.getInteger("udf_type_id"); String tableName = row.getString("table_name"); tableNameMap.put(fieldId, tableName); FieldTypeClass fieldType = FIELD_TYPE_MAP.get(tableName); if (fieldType != null) { String fieldDataType = row.getString("logical_data_type"); String fieldName = row.getString("udf_type_label"); m_udfFields.put(fieldId, fieldName); addUserDefinedField(fieldType, UserFieldDataType.valueOf(fieldDataType), fieldName); } } // Process values for (Row row : values) { Integer typeID = row.getInteger("udf_type_id"); String tableName = tableNameMap.get(typeID); Map<Integer, List<Row>> tableData = m_udfValues.get(tableName); if (tableData == null) { tableData = new HashMap<Integer, List<Row>>(); m_udfValues.put(tableName, tableData); } Integer id = row.getInteger("fk_id"); List<Row> list = tableData.get(id); if (list == null) { list = new ArrayList<Row>(); tableData.put(id, list); } list.add(row); } } }
public class class_name { public void processUserDefinedFields(List<Row> fields, List<Row> values) { // Process fields Map<Integer, String> tableNameMap = new HashMap<Integer, String>(); for (Row row : fields) { Integer fieldId = row.getInteger("udf_type_id"); String tableName = row.getString("table_name"); tableNameMap.put(fieldId, tableName); // depends on control dependency: [for], data = [none] FieldTypeClass fieldType = FIELD_TYPE_MAP.get(tableName); if (fieldType != null) { String fieldDataType = row.getString("logical_data_type"); String fieldName = row.getString("udf_type_label"); m_udfFields.put(fieldId, fieldName); // depends on control dependency: [if], data = [none] addUserDefinedField(fieldType, UserFieldDataType.valueOf(fieldDataType), fieldName); // depends on control dependency: [if], data = [(fieldType] } } // Process values for (Row row : values) { Integer typeID = row.getInteger("udf_type_id"); String tableName = tableNameMap.get(typeID); Map<Integer, List<Row>> tableData = m_udfValues.get(tableName); if (tableData == null) { tableData = new HashMap<Integer, List<Row>>(); // depends on control dependency: [if], data = [none] m_udfValues.put(tableName, tableData); // depends on control dependency: [if], data = [none] } Integer id = row.getInteger("fk_id"); List<Row> list = tableData.get(id); if (list == null) { list = new ArrayList<Row>(); // depends on control dependency: [if], data = [none] tableData.put(id, list); // depends on control dependency: [if], data = [none] } list.add(row); // depends on control dependency: [for], data = [row] } } }
public class class_name { public static String getAppName(ResourceInst[] resources) { if(resources == null || resources.length == 0) return null; ResourceType rt = null; for (ResourceInst resourceInst : resources) { if(resourceInst == null) continue; rt = resourceInst.getType(); if(rt == null) continue; if(!"CacheServerStats".equals(rt.getName())) continue; return resourceInst.getName(); } return null; } }
public class class_name { public static String getAppName(ResourceInst[] resources) { if(resources == null || resources.length == 0) return null; ResourceType rt = null; for (ResourceInst resourceInst : resources) { if(resourceInst == null) continue; rt = resourceInst.getType(); // depends on control dependency: [for], data = [resourceInst] if(rt == null) continue; if(!"CacheServerStats".equals(rt.getName())) continue; return resourceInst.getName(); // depends on control dependency: [for], data = [resourceInst] } return null; } }
public class class_name { public DelaunayTriangle neighborAcross( TriangulationPoint opoint ) { if( opoint == points[0] ) { return neighbors[0]; } else if( opoint == points[1] ) { return neighbors[1]; } return neighbors[2]; } }
public class class_name { public DelaunayTriangle neighborAcross( TriangulationPoint opoint ) { if( opoint == points[0] ) { return neighbors[0]; // depends on control dependency: [if], data = [none] } else if( opoint == points[1] ) { return neighbors[1]; // depends on control dependency: [if], data = [none] } return neighbors[2]; } }
public class class_name { @Override public void success(TransactionAttempt tx) { DrpcRequestInfo requestInfo = (DrpcRequestInfo) this.idsMap.remove(tx); if (requestInfo != null) { ack(tx, requestInfo); } } }
public class class_name { @Override public void success(TransactionAttempt tx) { DrpcRequestInfo requestInfo = (DrpcRequestInfo) this.idsMap.remove(tx); if (requestInfo != null) { ack(tx, requestInfo); // depends on control dependency: [if], data = [none] } } }
public class class_name { private void appendObjectPresentation(final StringBuilder stringBuilder, final Object object) { try { final String beanProperty = BeanUtils.getProperty(object, property); if (beanProperty != null) { stringBuilder.append(beanProperty); } else { addFallbackValue(stringBuilder, object); } } catch (final IllegalAccessException | InvocationTargetException | NoSuchMethodException e) { LOGGER.warn("Problem getting property {}, object {} , exception {}", property, object, e); } stringBuilder.append(CONTENT_SEPARATOR); } }
public class class_name { private void appendObjectPresentation(final StringBuilder stringBuilder, final Object object) { try { final String beanProperty = BeanUtils.getProperty(object, property); if (beanProperty != null) { stringBuilder.append(beanProperty); // depends on control dependency: [if], data = [(beanProperty] } else { addFallbackValue(stringBuilder, object); // depends on control dependency: [if], data = [none] } } catch (final IllegalAccessException | InvocationTargetException | NoSuchMethodException e) { LOGGER.warn("Problem getting property {}, object {} , exception {}", property, object, e); } // depends on control dependency: [catch], data = [none] stringBuilder.append(CONTENT_SEPARATOR); } }
public class class_name { public static <T extends Writer> T pump(Reader reader, T writer, boolean closeReader, boolean closeWriter) throws IOException{ char buff[] = new char[1024]; int len; Exception exception = null; try{ while((len=reader.read(buff))!=-1) writer.write(buff, 0, len); }catch(Exception ex){ exception = ex; }finally{ try{ try{ if(closeReader) reader.close(); }finally{ if(closeWriter) writer.close(); } }catch(IOException ex){ if(exception!=null) ex.printStackTrace(); else exception = ex; } } if(exception instanceof IOException) throw (IOException)exception; else if(exception instanceof RuntimeException) throw (RuntimeException)exception; return writer; } }
public class class_name { public static <T extends Writer> T pump(Reader reader, T writer, boolean closeReader, boolean closeWriter) throws IOException{ char buff[] = new char[1024]; int len; Exception exception = null; try{ while((len=reader.read(buff))!=-1) writer.write(buff, 0, len); }catch(Exception ex){ exception = ex; }finally{ try{ try{ if(closeReader) reader.close(); }finally{ if(closeWriter) writer.close(); } }catch(IOException ex){ if(exception!=null) ex.printStackTrace(); else exception = ex; } // depends on control dependency: [catch], data = [none] } if(exception instanceof IOException) throw (IOException)exception; else if(exception instanceof RuntimeException) throw (RuntimeException)exception; return writer; } }
public class class_name { @Implementation(minSdk = LOLLIPOP_MR1) @HiddenApi protected int[] getActiveSubscriptionIdList() { final List<SubscriptionInfo> infos = getActiveSubscriptionInfoList(); if (infos == null) { return new int[0]; } int[] ids = new int[infos.size()]; for (int i = 0; i < infos.size(); i++) { ids[i] = infos.get(i).getSubscriptionId(); } return ids; } }
public class class_name { @Implementation(minSdk = LOLLIPOP_MR1) @HiddenApi protected int[] getActiveSubscriptionIdList() { final List<SubscriptionInfo> infos = getActiveSubscriptionInfoList(); if (infos == null) { return new int[0]; // depends on control dependency: [if], data = [none] } int[] ids = new int[infos.size()]; for (int i = 0; i < infos.size(); i++) { ids[i] = infos.get(i).getSubscriptionId(); // depends on control dependency: [for], data = [i] } return ids; } }
public class class_name { @Override public void removeByC_SC(long CPDefinitionId, boolean skuContributor) { for (CPDefinitionOptionRel cpDefinitionOptionRel : findByC_SC( CPDefinitionId, skuContributor, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpDefinitionOptionRel); } } }
public class class_name { @Override public void removeByC_SC(long CPDefinitionId, boolean skuContributor) { for (CPDefinitionOptionRel cpDefinitionOptionRel : findByC_SC( CPDefinitionId, skuContributor, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpDefinitionOptionRel); // depends on control dependency: [for], data = [cpDefinitionOptionRel] } } }
public class class_name { public int createConversation(String subject, String text, List<Integer> participants, Reference reference) { WebResource resource; if (reference != null) { resource = getResourceFactory().getApiResource( "/conversation/" + reference.toURLFragment()); } else { resource = getResourceFactory().getApiResource("/conversation/"); } return resource .entity(new ConversationCreate(subject, text, participants), MediaType.APPLICATION_JSON_TYPE) .post(ConversationCreateResponse.class).getConversationId(); } }
public class class_name { public int createConversation(String subject, String text, List<Integer> participants, Reference reference) { WebResource resource; if (reference != null) { resource = getResourceFactory().getApiResource( "/conversation/" + reference.toURLFragment()); // depends on control dependency: [if], data = [none] } else { resource = getResourceFactory().getApiResource("/conversation/"); // depends on control dependency: [if], data = [none] } return resource .entity(new ConversationCreate(subject, text, participants), MediaType.APPLICATION_JSON_TYPE) .post(ConversationCreateResponse.class).getConversationId(); } }
public class class_name { public void setTimeInMillis(long millis) { // If we don't need to recalculate the calendar field values, // do nothing. // BEGIN Android-changed: Removed ZoneInfo support // if (time == millis && isTimeSet && areFieldsSet && areAllFieldsSet // && (zone instanceof ZoneInfo) && !((ZoneInfo)zone).isDirty()) { if (time == millis && isTimeSet && areFieldsSet && areAllFieldsSet) { // END Android-changed: Removed ZoneInfo support return; } time = millis; isTimeSet = true; areFieldsSet = false; computeFields(); areAllFieldsSet = areFieldsSet = true; } }
public class class_name { public void setTimeInMillis(long millis) { // If we don't need to recalculate the calendar field values, // do nothing. // BEGIN Android-changed: Removed ZoneInfo support // if (time == millis && isTimeSet && areFieldsSet && areAllFieldsSet // && (zone instanceof ZoneInfo) && !((ZoneInfo)zone).isDirty()) { if (time == millis && isTimeSet && areFieldsSet && areAllFieldsSet) { // END Android-changed: Removed ZoneInfo support return; // depends on control dependency: [if], data = [none] } time = millis; isTimeSet = true; areFieldsSet = false; computeFields(); areAllFieldsSet = areFieldsSet = true; } }
public class class_name { public static void compareTables(Grib2CodeTableInterface t1, Grib2CodeTableInterface t2, Formatter f) { int extra = 0; int conflict = 0; f.format("%s%n", t2.getName()); for (Grib2CodeTableInterface.Entry p1 : t1.getEntries()) { if (t1.getEntry(p1.getCode()) == null) { f.format(" ERROR %s missing own code %d%n", t1.getShortName(), p1.getCode()); } Grib2CodeTableInterface.Entry p2 = t2.getEntry(p1.getCode()); if (p2 == null) { extra++; if (verbose) { f.format(" %s missing %s%n", t2.getShortName(), p1); } } else { if (!Util.equivilantName(p1.getName(), p2.getName())) { f.format(" p1=%10s %s%n", p1.getCode(), p1.getName()); f.format(" p2=%10s %s%n", p2.getCode(), p2.getName()); conflict++; } } } int missing = 0; for (Grib2CodeTableInterface.Entry p2 : t2.getEntries()) { if (t2.getEntry(p2.getCode()) == null) { f.format(" ERROR %s missing own code %d%n", t2.getShortName(), p2.getCode()); } Grib2CodeTableInterface.Entry p1 = t1.getEntry(p2.getCode()); if (p1 == null) { missing++; f.format(" %s missing %s%n", t1.getShortName(), p2); t1.getEntry(p2.getCode()); } } if (conflict > 0 || missing > 0) { f.format(" ***Conflicts=%d extra=%d missing=%s%n", conflict, extra, missing); } } }
public class class_name { public static void compareTables(Grib2CodeTableInterface t1, Grib2CodeTableInterface t2, Formatter f) { int extra = 0; int conflict = 0; f.format("%s%n", t2.getName()); for (Grib2CodeTableInterface.Entry p1 : t1.getEntries()) { if (t1.getEntry(p1.getCode()) == null) { f.format(" ERROR %s missing own code %d%n", t1.getShortName(), p1.getCode()); // depends on control dependency: [if], data = [none] } Grib2CodeTableInterface.Entry p2 = t2.getEntry(p1.getCode()); if (p2 == null) { extra++; // depends on control dependency: [if], data = [none] if (verbose) { f.format(" %s missing %s%n", t2.getShortName(), p1); // depends on control dependency: [if], data = [none] } } else { if (!Util.equivilantName(p1.getName(), p2.getName())) { f.format(" p1=%10s %s%n", p1.getCode(), p1.getName()); // depends on control dependency: [if], data = [none] f.format(" p2=%10s %s%n", p2.getCode(), p2.getName()); // depends on control dependency: [if], data = [none] conflict++; // depends on control dependency: [if], data = [none] } } } int missing = 0; for (Grib2CodeTableInterface.Entry p2 : t2.getEntries()) { if (t2.getEntry(p2.getCode()) == null) { f.format(" ERROR %s missing own code %d%n", t2.getShortName(), p2.getCode()); // depends on control dependency: [if], data = [none] } Grib2CodeTableInterface.Entry p1 = t1.getEntry(p2.getCode()); if (p1 == null) { missing++; // depends on control dependency: [if], data = [none] f.format(" %s missing %s%n", t1.getShortName(), p2); // depends on control dependency: [if], data = [none] t1.getEntry(p2.getCode()); // depends on control dependency: [if], data = [none] } } if (conflict > 0 || missing > 0) { f.format(" ***Conflicts=%d extra=%d missing=%s%n", conflict, extra, missing); // depends on control dependency: [if], data = [none] } } }
public class class_name { public JSONArray toJSONArray() { JSONArray jsonArray = new JSONArray(); if (this.nextClean() != '[') { throw this.syntaxError("A JSONArray text must start with '['"); } if (this.nextClean() != ']') { this.back(); while (true) { if (this.nextClean() == ',') { this.back(); jsonArray.add(JSONNull.NULL); } else { this.back(); jsonArray.add(this.nextValue()); } switch (this.nextClean()) { case ',': if (this.nextClean() == ']') { return jsonArray; } this.back(); break; case ']': return jsonArray; default: throw this.syntaxError("Expected a ',' or ']'"); } } } return jsonArray; } }
public class class_name { public JSONArray toJSONArray() { JSONArray jsonArray = new JSONArray(); if (this.nextClean() != '[') { throw this.syntaxError("A JSONArray text must start with '['"); } if (this.nextClean() != ']') { this.back(); // depends on control dependency: [if], data = [none] while (true) { if (this.nextClean() == ',') { this.back(); // depends on control dependency: [if], data = [none] jsonArray.add(JSONNull.NULL); // depends on control dependency: [if], data = [none] } else { this.back(); // depends on control dependency: [if], data = [none] jsonArray.add(this.nextValue()); // depends on control dependency: [if], data = [none] } switch (this.nextClean()) { case ',': if (this.nextClean() == ']') { return jsonArray; // depends on control dependency: [if], data = [none] } this.back(); // depends on control dependency: [while], data = [none] break; case ']': return jsonArray; default: throw this.syntaxError("Expected a ',' or ']'"); } } } return jsonArray; } }
public class class_name { @FFDCIgnore(BAD_PARAM.class) private boolean isEncodingForWASClassic(ClientRequestInfo ri) { try { int IBM_PV_TC_ID = 0x49424d0a; ri.get_effective_component(IBM_PV_TC_ID); return true; } catch (BAD_PARAM bpe) { // Expected if not talking to a WAS Classic server with an IBM ORB. return false; } } }
public class class_name { @FFDCIgnore(BAD_PARAM.class) private boolean isEncodingForWASClassic(ClientRequestInfo ri) { try { int IBM_PV_TC_ID = 0x49424d0a; ri.get_effective_component(IBM_PV_TC_ID); // depends on control dependency: [try], data = [none] return true; // depends on control dependency: [try], data = [none] } catch (BAD_PARAM bpe) { // Expected if not talking to a WAS Classic server with an IBM ORB. return false; } // depends on control dependency: [catch], data = [none] } }
public class class_name { public long getRelocatedImageBase() { long imageBase = get(WindowsEntryKey.IMAGE_BASE); long sizeOfImage = get(WindowsEntryKey.SIZE_OF_IMAGE); if (imageBase + sizeOfImage >= 0x80000000L || imageBase == 0L) { return 0x10000L; } return imageBase; } }
public class class_name { public long getRelocatedImageBase() { long imageBase = get(WindowsEntryKey.IMAGE_BASE); long sizeOfImage = get(WindowsEntryKey.SIZE_OF_IMAGE); if (imageBase + sizeOfImage >= 0x80000000L || imageBase == 0L) { return 0x10000L; // depends on control dependency: [if], data = [none] } return imageBase; } }
public class class_name { @Override public EClass getIfcPolygonalBoundedHalfSpace() { if (ifcPolygonalBoundedHalfSpaceEClass == null) { ifcPolygonalBoundedHalfSpaceEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(435); } return ifcPolygonalBoundedHalfSpaceEClass; } }
public class class_name { @Override public EClass getIfcPolygonalBoundedHalfSpace() { if (ifcPolygonalBoundedHalfSpaceEClass == null) { ifcPolygonalBoundedHalfSpaceEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(435); // depends on control dependency: [if], data = [none] } return ifcPolygonalBoundedHalfSpaceEClass; } }
public class class_name { private Object prettyPrintValueString(final Object value) { if (value instanceof String) { return value.equals("") ? "\"\"" : value; } else { return value.toString(); } } }
public class class_name { private Object prettyPrintValueString(final Object value) { if (value instanceof String) { return value.equals("") ? "\"\"" : value; // depends on control dependency: [if], data = [none] } else { return value.toString(); // depends on control dependency: [if], data = [none] } } }
public class class_name { public boolean replace(final K key, final Object oldValue, final E newValue) { final V val = valueMap.get(key); if (val == null) { return false; } return replace(val, oldValue, newValue); } }
public class class_name { public boolean replace(final K key, final Object oldValue, final E newValue) { final V val = valueMap.get(key); if (val == null) { return false; // depends on control dependency: [if], data = [none] } return replace(val, oldValue, newValue); } }
public class class_name { @Override public void cacheResult(List<CProduct> cProducts) { for (CProduct cProduct : cProducts) { if (entityCache.getResult(CProductModelImpl.ENTITY_CACHE_ENABLED, CProductImpl.class, cProduct.getPrimaryKey()) == null) { cacheResult(cProduct); } else { cProduct.resetOriginalValues(); } } } }
public class class_name { @Override public void cacheResult(List<CProduct> cProducts) { for (CProduct cProduct : cProducts) { if (entityCache.getResult(CProductModelImpl.ENTITY_CACHE_ENABLED, CProductImpl.class, cProduct.getPrimaryKey()) == null) { cacheResult(cProduct); // depends on control dependency: [if], data = [none] } else { cProduct.resetOriginalValues(); // depends on control dependency: [if], data = [none] } } } }
public class class_name { public static IndexPlanner both( final IndexPlanner planner1, final IndexPlanner planner2 ) { if (planner1 == null) return planner2; if (planner2 == null) return planner1; return new IndexPlanner() { @Override public void applyIndexes( QueryContext context, IndexCostCalculator calculator ) { RuntimeException error = null; try { planner1.applyIndexes(context, calculator); } catch (RuntimeException e) { error = e; } finally { try { planner2.applyIndexes(context, calculator); } catch (RuntimeException e) { if (error == null) error = e; } finally { if (error != null) throw error; } } } }; } }
public class class_name { public static IndexPlanner both( final IndexPlanner planner1, final IndexPlanner planner2 ) { if (planner1 == null) return planner2; if (planner2 == null) return planner1; return new IndexPlanner() { @Override public void applyIndexes( QueryContext context, IndexCostCalculator calculator ) { RuntimeException error = null; try { planner1.applyIndexes(context, calculator); // depends on control dependency: [try], data = [none] } catch (RuntimeException e) { error = e; } finally { // depends on control dependency: [catch], data = [none] try { planner2.applyIndexes(context, calculator); // depends on control dependency: [try], data = [none] } catch (RuntimeException e) { if (error == null) error = e; } finally { // depends on control dependency: [catch], data = [none] if (error != null) throw error; } } } }; } }
public class class_name { public Connector[] getConnectors() { if (connectors != null) { return Arrays.copyOf(connectors, connectors.length); } else { return new Connector[]{}; } } }
public class class_name { public Connector[] getConnectors() { if (connectors != null) { return Arrays.copyOf(connectors, connectors.length); // depends on control dependency: [if], data = [(connectors] } else { return new Connector[]{}; // depends on control dependency: [if], data = [none] } } }
public class class_name { public static boolean isAvailable() { try { String osName = System.getProperty("os.name"); if (!osName.startsWith("Linux")) { LOG.info("ProcfsBasedProcessTree currently is supported only on " + "Linux."); return false; } } catch (SecurityException se) { LOG.warn("Failed to get Operating System name. " + se); return false; } return true; } }
public class class_name { public static boolean isAvailable() { try { String osName = System.getProperty("os.name"); if (!osName.startsWith("Linux")) { LOG.info("ProcfsBasedProcessTree currently is supported only on " + "Linux."); // depends on control dependency: [if], data = [none] return false; // depends on control dependency: [if], data = [none] } } catch (SecurityException se) { LOG.warn("Failed to get Operating System name. " + se); return false; } // depends on control dependency: [catch], data = [none] return true; } }
public class class_name { private void writeObject(ObjectOutputStream out) throws IOException { out.defaultWriteObject(); for (Field f : Variable.class.getDeclaredFields()) { if (Modifier.isTransient(f.getModifiers())) { try { backupForSerialization.put(new FieldOfObject(f), f.get(this)); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } } } } }
public class class_name { private void writeObject(ObjectOutputStream out) throws IOException { out.defaultWriteObject(); for (Field f : Variable.class.getDeclaredFields()) { if (Modifier.isTransient(f.getModifiers())) { try { backupForSerialization.put(new FieldOfObject(f), f.get(this)); } // depends on control dependency: [try], data = [none] catch (IllegalArgumentException e) { e.printStackTrace(); } // depends on control dependency: [catch], data = [none] catch (IllegalAccessException e) { e.printStackTrace(); } // depends on control dependency: [catch], data = [none] } } } }
public class class_name { @Override public Iterator<String> getSpaces() { DuracloudUserDetails user = getCurrentUserDetails(); if (isAdmin(user)) { return targetProvider.getSpaces(); } waitForCache(); List<String> spaces = new ArrayList<String>(); for (String space : spaceACLMap.keySet()) { Map<String, AclType> acls = spaceACLMap.get(space); if (userHasAccess(user, acls) && !spaces.contains(space)) { spaces.add(space); } } Collections.sort(spaces); return spaces.iterator(); } }
public class class_name { @Override public Iterator<String> getSpaces() { DuracloudUserDetails user = getCurrentUserDetails(); if (isAdmin(user)) { return targetProvider.getSpaces(); // depends on control dependency: [if], data = [none] } waitForCache(); List<String> spaces = new ArrayList<String>(); for (String space : spaceACLMap.keySet()) { Map<String, AclType> acls = spaceACLMap.get(space); if (userHasAccess(user, acls) && !spaces.contains(space)) { spaces.add(space); // depends on control dependency: [if], data = [none] } } Collections.sort(spaces); return spaces.iterator(); } }
public class class_name { public double getBondOverlapScore(IAtomContainer ac, Vector overlappingBonds) { overlappingBonds.removeAllElements(); double overlapScore = 0; IBond bond1 = null; IBond bond2 = null; double bondLength = GeometryUtil.getBondLengthAverage(ac);; double overlapCutoff = bondLength / 2; for (int f = 0; f < ac.getBondCount(); f++) { bond1 = ac.getBond(f); for (int g = f; g < ac.getBondCount(); g++) { bond2 = ac.getBond(g); /* bonds must not be connected */ if (!bond1.isConnectedTo(bond2)) { if (areIntersected(bond1, bond2)) { overlapScore += overlapCutoff; overlappingBonds.addElement(new OverlapPair(bond1, bond2)); } } } } return overlapScore; } }
public class class_name { public double getBondOverlapScore(IAtomContainer ac, Vector overlappingBonds) { overlappingBonds.removeAllElements(); double overlapScore = 0; IBond bond1 = null; IBond bond2 = null; double bondLength = GeometryUtil.getBondLengthAverage(ac);; double overlapCutoff = bondLength / 2; for (int f = 0; f < ac.getBondCount(); f++) { bond1 = ac.getBond(f); // depends on control dependency: [for], data = [f] for (int g = f; g < ac.getBondCount(); g++) { bond2 = ac.getBond(g); // depends on control dependency: [for], data = [g] /* bonds must not be connected */ if (!bond1.isConnectedTo(bond2)) { if (areIntersected(bond1, bond2)) { overlapScore += overlapCutoff; // depends on control dependency: [if], data = [none] overlappingBonds.addElement(new OverlapPair(bond1, bond2)); // depends on control dependency: [if], data = [none] } } } } return overlapScore; } }
public class class_name { public SparseMatrix toSparseMatrix() { int[] pos = new int[numColumns]; int[] colIndex = new int[numColumns + 1]; for (int i = 0; i < numColumns; i++) { colIndex[i + 1] = colIndex[i] + colSize[i]; } int nrows = size(); int[] rowIndex = new int[n]; double[] x = new double[n]; for (int i = 0; i < nrows; i++) { for (int j : get(i).x) { int k = colIndex[j] + pos[j]; rowIndex[k] = i; x[k] = 1; pos[j]++; } } return new SparseMatrix(nrows, numColumns, x, rowIndex, colIndex); } }
public class class_name { public SparseMatrix toSparseMatrix() { int[] pos = new int[numColumns]; int[] colIndex = new int[numColumns + 1]; for (int i = 0; i < numColumns; i++) { colIndex[i + 1] = colIndex[i] + colSize[i]; // depends on control dependency: [for], data = [i] } int nrows = size(); int[] rowIndex = new int[n]; double[] x = new double[n]; for (int i = 0; i < nrows; i++) { for (int j : get(i).x) { int k = colIndex[j] + pos[j]; rowIndex[k] = i; // depends on control dependency: [for], data = [none] x[k] = 1; // depends on control dependency: [for], data = [none] pos[j]++; // depends on control dependency: [for], data = [j] } } return new SparseMatrix(nrows, numColumns, x, rowIndex, colIndex); } }
public class class_name { public final EObject ruleXbaseConstructorCall() throws RecognitionException { EObject current = null; Token otherlv_1=null; Token otherlv_3=null; Token otherlv_5=null; Token otherlv_7=null; Token lv_explicitConstructorCall_8_0=null; Token otherlv_11=null; Token otherlv_13=null; EObject lv_typeArguments_4_0 = null; EObject lv_typeArguments_6_0 = null; EObject lv_arguments_9_0 = null; EObject lv_arguments_10_0 = null; EObject lv_arguments_12_0 = null; EObject lv_arguments_14_0 = null; enterRule(); try { // InternalSARL.g:10182:2: ( ( () otherlv_1= 'new' ( ( ruleQualifiedName ) ) ( ( ( '<' )=>otherlv_3= '<' ) ( (lv_typeArguments_4_0= ruleJvmArgumentTypeReference ) ) (otherlv_5= ',' ( (lv_typeArguments_6_0= ruleJvmArgumentTypeReference ) ) )* otherlv_7= '>' )? ( ( ( ( '(' ) )=> (lv_explicitConstructorCall_8_0= '(' ) ) ( ( ( ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) )=> (lv_arguments_9_0= ruleXShortClosure ) ) | ( ( (lv_arguments_10_0= ruleXExpression ) ) (otherlv_11= ',' ( (lv_arguments_12_0= ruleXExpression ) ) )* ) )? otherlv_13= ')' )? ( ( ( () '[' ) )=> (lv_arguments_14_0= ruleXClosure ) )? ) ) // InternalSARL.g:10183:2: ( () otherlv_1= 'new' ( ( ruleQualifiedName ) ) ( ( ( '<' )=>otherlv_3= '<' ) ( (lv_typeArguments_4_0= ruleJvmArgumentTypeReference ) ) (otherlv_5= ',' ( (lv_typeArguments_6_0= ruleJvmArgumentTypeReference ) ) )* otherlv_7= '>' )? ( ( ( ( '(' ) )=> (lv_explicitConstructorCall_8_0= '(' ) ) ( ( ( ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) )=> (lv_arguments_9_0= ruleXShortClosure ) ) | ( ( (lv_arguments_10_0= ruleXExpression ) ) (otherlv_11= ',' ( (lv_arguments_12_0= ruleXExpression ) ) )* ) )? otherlv_13= ')' )? ( ( ( () '[' ) )=> (lv_arguments_14_0= ruleXClosure ) )? ) { // InternalSARL.g:10183:2: ( () otherlv_1= 'new' ( ( ruleQualifiedName ) ) ( ( ( '<' )=>otherlv_3= '<' ) ( (lv_typeArguments_4_0= ruleJvmArgumentTypeReference ) ) (otherlv_5= ',' ( (lv_typeArguments_6_0= ruleJvmArgumentTypeReference ) ) )* otherlv_7= '>' )? ( ( ( ( '(' ) )=> (lv_explicitConstructorCall_8_0= '(' ) ) ( ( ( ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) )=> (lv_arguments_9_0= ruleXShortClosure ) ) | ( ( (lv_arguments_10_0= ruleXExpression ) ) (otherlv_11= ',' ( (lv_arguments_12_0= ruleXExpression ) ) )* ) )? otherlv_13= ')' )? ( ( ( () '[' ) )=> (lv_arguments_14_0= ruleXClosure ) )? ) // InternalSARL.g:10184:3: () otherlv_1= 'new' ( ( ruleQualifiedName ) ) ( ( ( '<' )=>otherlv_3= '<' ) ( (lv_typeArguments_4_0= ruleJvmArgumentTypeReference ) ) (otherlv_5= ',' ( (lv_typeArguments_6_0= ruleJvmArgumentTypeReference ) ) )* otherlv_7= '>' )? ( ( ( ( '(' ) )=> (lv_explicitConstructorCall_8_0= '(' ) ) ( ( ( ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) )=> (lv_arguments_9_0= ruleXShortClosure ) ) | ( ( (lv_arguments_10_0= ruleXExpression ) ) (otherlv_11= ',' ( (lv_arguments_12_0= ruleXExpression ) ) )* ) )? otherlv_13= ')' )? ( ( ( () '[' ) )=> (lv_arguments_14_0= ruleXClosure ) )? { // InternalSARL.g:10184:3: () // InternalSARL.g:10185:4: { if ( state.backtracking==0 ) { current = forceCreateModelElement( grammarAccess.getXbaseConstructorCallAccess().getXConstructorCallAction_0(), current); } } otherlv_1=(Token)match(input,48,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_1, grammarAccess.getXbaseConstructorCallAccess().getNewKeyword_1()); } // InternalSARL.g:10195:3: ( ( ruleQualifiedName ) ) // InternalSARL.g:10196:4: ( ruleQualifiedName ) { // InternalSARL.g:10196:4: ( ruleQualifiedName ) // InternalSARL.g:10197:5: ruleQualifiedName { if ( state.backtracking==0 ) { if (current==null) { current = createModelElement(grammarAccess.getXbaseConstructorCallRule()); } } if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXbaseConstructorCallAccess().getConstructorJvmConstructorCrossReference_2_0()); } pushFollow(FOLLOW_95); ruleQualifiedName(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { afterParserOrEnumRuleCall(); } } } // InternalSARL.g:10211:3: ( ( ( '<' )=>otherlv_3= '<' ) ( (lv_typeArguments_4_0= ruleJvmArgumentTypeReference ) ) (otherlv_5= ',' ( (lv_typeArguments_6_0= ruleJvmArgumentTypeReference ) ) )* otherlv_7= '>' )? int alt261=2; alt261 = dfa261.predict(input); switch (alt261) { case 1 : // InternalSARL.g:10212:4: ( ( '<' )=>otherlv_3= '<' ) ( (lv_typeArguments_4_0= ruleJvmArgumentTypeReference ) ) (otherlv_5= ',' ( (lv_typeArguments_6_0= ruleJvmArgumentTypeReference ) ) )* otherlv_7= '>' { // InternalSARL.g:10212:4: ( ( '<' )=>otherlv_3= '<' ) // InternalSARL.g:10213:5: ( '<' )=>otherlv_3= '<' { otherlv_3=(Token)match(input,40,FOLLOW_92); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_3, grammarAccess.getXbaseConstructorCallAccess().getLessThanSignKeyword_3_0()); } } // InternalSARL.g:10219:4: ( (lv_typeArguments_4_0= ruleJvmArgumentTypeReference ) ) // InternalSARL.g:10220:5: (lv_typeArguments_4_0= ruleJvmArgumentTypeReference ) { // InternalSARL.g:10220:5: (lv_typeArguments_4_0= ruleJvmArgumentTypeReference ) // InternalSARL.g:10221:6: lv_typeArguments_4_0= ruleJvmArgumentTypeReference { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXbaseConstructorCallAccess().getTypeArgumentsJvmArgumentTypeReferenceParserRuleCall_3_1_0()); } pushFollow(FOLLOW_28); lv_typeArguments_4_0=ruleJvmArgumentTypeReference(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getXbaseConstructorCallRule()); } add( current, "typeArguments", lv_typeArguments_4_0, "org.eclipse.xtext.xbase.Xtype.JvmArgumentTypeReference"); afterParserOrEnumRuleCall(); } } } // InternalSARL.g:10238:4: (otherlv_5= ',' ( (lv_typeArguments_6_0= ruleJvmArgumentTypeReference ) ) )* loop260: do { int alt260=2; int LA260_0 = input.LA(1); if ( (LA260_0==32) ) { alt260=1; } switch (alt260) { case 1 : // InternalSARL.g:10239:5: otherlv_5= ',' ( (lv_typeArguments_6_0= ruleJvmArgumentTypeReference ) ) { otherlv_5=(Token)match(input,32,FOLLOW_92); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_5, grammarAccess.getXbaseConstructorCallAccess().getCommaKeyword_3_2_0()); } // InternalSARL.g:10243:5: ( (lv_typeArguments_6_0= ruleJvmArgumentTypeReference ) ) // InternalSARL.g:10244:6: (lv_typeArguments_6_0= ruleJvmArgumentTypeReference ) { // InternalSARL.g:10244:6: (lv_typeArguments_6_0= ruleJvmArgumentTypeReference ) // InternalSARL.g:10245:7: lv_typeArguments_6_0= ruleJvmArgumentTypeReference { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXbaseConstructorCallAccess().getTypeArgumentsJvmArgumentTypeReferenceParserRuleCall_3_2_1_0()); } pushFollow(FOLLOW_28); lv_typeArguments_6_0=ruleJvmArgumentTypeReference(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getXbaseConstructorCallRule()); } add( current, "typeArguments", lv_typeArguments_6_0, "org.eclipse.xtext.xbase.Xtype.JvmArgumentTypeReference"); afterParserOrEnumRuleCall(); } } } } break; default : break loop260; } } while (true); otherlv_7=(Token)match(input,41,FOLLOW_96); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_7, grammarAccess.getXbaseConstructorCallAccess().getGreaterThanSignKeyword_3_3()); } } break; } // InternalSARL.g:10268:3: ( ( ( ( '(' ) )=> (lv_explicitConstructorCall_8_0= '(' ) ) ( ( ( ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) )=> (lv_arguments_9_0= ruleXShortClosure ) ) | ( ( (lv_arguments_10_0= ruleXExpression ) ) (otherlv_11= ',' ( (lv_arguments_12_0= ruleXExpression ) ) )* ) )? otherlv_13= ')' )? int alt264=2; alt264 = dfa264.predict(input); switch (alt264) { case 1 : // InternalSARL.g:10269:4: ( ( ( '(' ) )=> (lv_explicitConstructorCall_8_0= '(' ) ) ( ( ( ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) )=> (lv_arguments_9_0= ruleXShortClosure ) ) | ( ( (lv_arguments_10_0= ruleXExpression ) ) (otherlv_11= ',' ( (lv_arguments_12_0= ruleXExpression ) ) )* ) )? otherlv_13= ')' { // InternalSARL.g:10269:4: ( ( ( '(' ) )=> (lv_explicitConstructorCall_8_0= '(' ) ) // InternalSARL.g:10270:5: ( ( '(' ) )=> (lv_explicitConstructorCall_8_0= '(' ) { // InternalSARL.g:10274:5: (lv_explicitConstructorCall_8_0= '(' ) // InternalSARL.g:10275:6: lv_explicitConstructorCall_8_0= '(' { lv_explicitConstructorCall_8_0=(Token)match(input,49,FOLLOW_97); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(lv_explicitConstructorCall_8_0, grammarAccess.getXbaseConstructorCallAccess().getExplicitConstructorCallLeftParenthesisKeyword_4_0_0()); } if ( state.backtracking==0 ) { if (current==null) { current = createModelElement(grammarAccess.getXbaseConstructorCallRule()); } setWithLastConsumed(current, "explicitConstructorCall", true, "("); } } } // InternalSARL.g:10287:4: ( ( ( ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) )=> (lv_arguments_9_0= ruleXShortClosure ) ) | ( ( (lv_arguments_10_0= ruleXExpression ) ) (otherlv_11= ',' ( (lv_arguments_12_0= ruleXExpression ) ) )* ) )? int alt263=3; alt263 = dfa263.predict(input); switch (alt263) { case 1 : // InternalSARL.g:10288:5: ( ( ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) )=> (lv_arguments_9_0= ruleXShortClosure ) ) { // InternalSARL.g:10288:5: ( ( ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) )=> (lv_arguments_9_0= ruleXShortClosure ) ) // InternalSARL.g:10289:6: ( ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) )=> (lv_arguments_9_0= ruleXShortClosure ) { // InternalSARL.g:10314:6: (lv_arguments_9_0= ruleXShortClosure ) // InternalSARL.g:10315:7: lv_arguments_9_0= ruleXShortClosure { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXbaseConstructorCallAccess().getArgumentsXShortClosureParserRuleCall_4_1_0_0()); } pushFollow(FOLLOW_81); lv_arguments_9_0=ruleXShortClosure(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getXbaseConstructorCallRule()); } add( current, "arguments", lv_arguments_9_0, "org.eclipse.xtext.xbase.Xbase.XShortClosure"); afterParserOrEnumRuleCall(); } } } } break; case 2 : // InternalSARL.g:10333:5: ( ( (lv_arguments_10_0= ruleXExpression ) ) (otherlv_11= ',' ( (lv_arguments_12_0= ruleXExpression ) ) )* ) { // InternalSARL.g:10333:5: ( ( (lv_arguments_10_0= ruleXExpression ) ) (otherlv_11= ',' ( (lv_arguments_12_0= ruleXExpression ) ) )* ) // InternalSARL.g:10334:6: ( (lv_arguments_10_0= ruleXExpression ) ) (otherlv_11= ',' ( (lv_arguments_12_0= ruleXExpression ) ) )* { // InternalSARL.g:10334:6: ( (lv_arguments_10_0= ruleXExpression ) ) // InternalSARL.g:10335:7: (lv_arguments_10_0= ruleXExpression ) { // InternalSARL.g:10335:7: (lv_arguments_10_0= ruleXExpression ) // InternalSARL.g:10336:8: lv_arguments_10_0= ruleXExpression { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXbaseConstructorCallAccess().getArgumentsXExpressionParserRuleCall_4_1_1_0_0()); } pushFollow(FOLLOW_51); lv_arguments_10_0=ruleXExpression(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getXbaseConstructorCallRule()); } add( current, "arguments", lv_arguments_10_0, "org.eclipse.xtext.xbase.Xbase.XExpression"); afterParserOrEnumRuleCall(); } } } // InternalSARL.g:10353:6: (otherlv_11= ',' ( (lv_arguments_12_0= ruleXExpression ) ) )* loop262: do { int alt262=2; int LA262_0 = input.LA(1); if ( (LA262_0==32) ) { alt262=1; } switch (alt262) { case 1 : // InternalSARL.g:10354:7: otherlv_11= ',' ( (lv_arguments_12_0= ruleXExpression ) ) { otherlv_11=(Token)match(input,32,FOLLOW_45); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_11, grammarAccess.getXbaseConstructorCallAccess().getCommaKeyword_4_1_1_1_0()); } // InternalSARL.g:10358:7: ( (lv_arguments_12_0= ruleXExpression ) ) // InternalSARL.g:10359:8: (lv_arguments_12_0= ruleXExpression ) { // InternalSARL.g:10359:8: (lv_arguments_12_0= ruleXExpression ) // InternalSARL.g:10360:9: lv_arguments_12_0= ruleXExpression { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXbaseConstructorCallAccess().getArgumentsXExpressionParserRuleCall_4_1_1_1_1_0()); } pushFollow(FOLLOW_51); lv_arguments_12_0=ruleXExpression(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getXbaseConstructorCallRule()); } add( current, "arguments", lv_arguments_12_0, "org.eclipse.xtext.xbase.Xbase.XExpression"); afterParserOrEnumRuleCall(); } } } } break; default : break loop262; } } while (true); } } break; } otherlv_13=(Token)match(input,50,FOLLOW_89); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_13, grammarAccess.getXbaseConstructorCallAccess().getRightParenthesisKeyword_4_2()); } } break; } // InternalSARL.g:10385:3: ( ( ( () '[' ) )=> (lv_arguments_14_0= ruleXClosure ) )? int alt265=2; alt265 = dfa265.predict(input); switch (alt265) { case 1 : // InternalSARL.g:10386:4: ( ( () '[' ) )=> (lv_arguments_14_0= ruleXClosure ) { // InternalSARL.g:10392:4: (lv_arguments_14_0= ruleXClosure ) // InternalSARL.g:10393:5: lv_arguments_14_0= ruleXClosure { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXbaseConstructorCallAccess().getArgumentsXClosureParserRuleCall_5_0()); } pushFollow(FOLLOW_2); lv_arguments_14_0=ruleXClosure(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getXbaseConstructorCallRule()); } add( current, "arguments", lv_arguments_14_0, "org.eclipse.xtext.xbase.Xbase.XClosure"); afterParserOrEnumRuleCall(); } } } break; } } } if ( state.backtracking==0 ) { leaveRule(); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } }
public class class_name { public final EObject ruleXbaseConstructorCall() throws RecognitionException { EObject current = null; Token otherlv_1=null; Token otherlv_3=null; Token otherlv_5=null; Token otherlv_7=null; Token lv_explicitConstructorCall_8_0=null; Token otherlv_11=null; Token otherlv_13=null; EObject lv_typeArguments_4_0 = null; EObject lv_typeArguments_6_0 = null; EObject lv_arguments_9_0 = null; EObject lv_arguments_10_0 = null; EObject lv_arguments_12_0 = null; EObject lv_arguments_14_0 = null; enterRule(); try { // InternalSARL.g:10182:2: ( ( () otherlv_1= 'new' ( ( ruleQualifiedName ) ) ( ( ( '<' )=>otherlv_3= '<' ) ( (lv_typeArguments_4_0= ruleJvmArgumentTypeReference ) ) (otherlv_5= ',' ( (lv_typeArguments_6_0= ruleJvmArgumentTypeReference ) ) )* otherlv_7= '>' )? ( ( ( ( '(' ) )=> (lv_explicitConstructorCall_8_0= '(' ) ) ( ( ( ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) )=> (lv_arguments_9_0= ruleXShortClosure ) ) | ( ( (lv_arguments_10_0= ruleXExpression ) ) (otherlv_11= ',' ( (lv_arguments_12_0= ruleXExpression ) ) )* ) )? otherlv_13= ')' )? ( ( ( () '[' ) )=> (lv_arguments_14_0= ruleXClosure ) )? ) ) // InternalSARL.g:10183:2: ( () otherlv_1= 'new' ( ( ruleQualifiedName ) ) ( ( ( '<' )=>otherlv_3= '<' ) ( (lv_typeArguments_4_0= ruleJvmArgumentTypeReference ) ) (otherlv_5= ',' ( (lv_typeArguments_6_0= ruleJvmArgumentTypeReference ) ) )* otherlv_7= '>' )? ( ( ( ( '(' ) )=> (lv_explicitConstructorCall_8_0= '(' ) ) ( ( ( ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) )=> (lv_arguments_9_0= ruleXShortClosure ) ) | ( ( (lv_arguments_10_0= ruleXExpression ) ) (otherlv_11= ',' ( (lv_arguments_12_0= ruleXExpression ) ) )* ) )? otherlv_13= ')' )? ( ( ( () '[' ) )=> (lv_arguments_14_0= ruleXClosure ) )? ) { // InternalSARL.g:10183:2: ( () otherlv_1= 'new' ( ( ruleQualifiedName ) ) ( ( ( '<' )=>otherlv_3= '<' ) ( (lv_typeArguments_4_0= ruleJvmArgumentTypeReference ) ) (otherlv_5= ',' ( (lv_typeArguments_6_0= ruleJvmArgumentTypeReference ) ) )* otherlv_7= '>' )? ( ( ( ( '(' ) )=> (lv_explicitConstructorCall_8_0= '(' ) ) ( ( ( ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) )=> (lv_arguments_9_0= ruleXShortClosure ) ) | ( ( (lv_arguments_10_0= ruleXExpression ) ) (otherlv_11= ',' ( (lv_arguments_12_0= ruleXExpression ) ) )* ) )? otherlv_13= ')' )? ( ( ( () '[' ) )=> (lv_arguments_14_0= ruleXClosure ) )? ) // InternalSARL.g:10184:3: () otherlv_1= 'new' ( ( ruleQualifiedName ) ) ( ( ( '<' )=>otherlv_3= '<' ) ( (lv_typeArguments_4_0= ruleJvmArgumentTypeReference ) ) (otherlv_5= ',' ( (lv_typeArguments_6_0= ruleJvmArgumentTypeReference ) ) )* otherlv_7= '>' )? ( ( ( ( '(' ) )=> (lv_explicitConstructorCall_8_0= '(' ) ) ( ( ( ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) )=> (lv_arguments_9_0= ruleXShortClosure ) ) | ( ( (lv_arguments_10_0= ruleXExpression ) ) (otherlv_11= ',' ( (lv_arguments_12_0= ruleXExpression ) ) )* ) )? otherlv_13= ')' )? ( ( ( () '[' ) )=> (lv_arguments_14_0= ruleXClosure ) )? { // InternalSARL.g:10184:3: () // InternalSARL.g:10185:4: { if ( state.backtracking==0 ) { current = forceCreateModelElement( grammarAccess.getXbaseConstructorCallAccess().getXConstructorCallAction_0(), current); // depends on control dependency: [if], data = [none] } } otherlv_1=(Token)match(input,48,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_1, grammarAccess.getXbaseConstructorCallAccess().getNewKeyword_1()); // depends on control dependency: [if], data = [none] } // InternalSARL.g:10195:3: ( ( ruleQualifiedName ) ) // InternalSARL.g:10196:4: ( ruleQualifiedName ) { // InternalSARL.g:10196:4: ( ruleQualifiedName ) // InternalSARL.g:10197:5: ruleQualifiedName { if ( state.backtracking==0 ) { if (current==null) { current = createModelElement(grammarAccess.getXbaseConstructorCallRule()); // depends on control dependency: [if], data = [none] } } if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXbaseConstructorCallAccess().getConstructorJvmConstructorCrossReference_2_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_95); ruleQualifiedName(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } // InternalSARL.g:10211:3: ( ( ( '<' )=>otherlv_3= '<' ) ( (lv_typeArguments_4_0= ruleJvmArgumentTypeReference ) ) (otherlv_5= ',' ( (lv_typeArguments_6_0= ruleJvmArgumentTypeReference ) ) )* otherlv_7= '>' )? int alt261=2; alt261 = dfa261.predict(input); switch (alt261) { case 1 : // InternalSARL.g:10212:4: ( ( '<' )=>otherlv_3= '<' ) ( (lv_typeArguments_4_0= ruleJvmArgumentTypeReference ) ) (otherlv_5= ',' ( (lv_typeArguments_6_0= ruleJvmArgumentTypeReference ) ) )* otherlv_7= '>' { // InternalSARL.g:10212:4: ( ( '<' )=>otherlv_3= '<' ) // InternalSARL.g:10213:5: ( '<' )=>otherlv_3= '<' { otherlv_3=(Token)match(input,40,FOLLOW_92); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_3, grammarAccess.getXbaseConstructorCallAccess().getLessThanSignKeyword_3_0()); // depends on control dependency: [if], data = [none] } } // InternalSARL.g:10219:4: ( (lv_typeArguments_4_0= ruleJvmArgumentTypeReference ) ) // InternalSARL.g:10220:5: (lv_typeArguments_4_0= ruleJvmArgumentTypeReference ) { // InternalSARL.g:10220:5: (lv_typeArguments_4_0= ruleJvmArgumentTypeReference ) // InternalSARL.g:10221:6: lv_typeArguments_4_0= ruleJvmArgumentTypeReference { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXbaseConstructorCallAccess().getTypeArgumentsJvmArgumentTypeReferenceParserRuleCall_3_1_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_28); lv_typeArguments_4_0=ruleJvmArgumentTypeReference(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getXbaseConstructorCallRule()); // depends on control dependency: [if], data = [none] } add( current, "typeArguments", lv_typeArguments_4_0, "org.eclipse.xtext.xbase.Xtype.JvmArgumentTypeReference"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } // InternalSARL.g:10238:4: (otherlv_5= ',' ( (lv_typeArguments_6_0= ruleJvmArgumentTypeReference ) ) )* loop260: do { int alt260=2; int LA260_0 = input.LA(1); if ( (LA260_0==32) ) { alt260=1; // depends on control dependency: [if], data = [none] } switch (alt260) { case 1 : // InternalSARL.g:10239:5: otherlv_5= ',' ( (lv_typeArguments_6_0= ruleJvmArgumentTypeReference ) ) { otherlv_5=(Token)match(input,32,FOLLOW_92); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_5, grammarAccess.getXbaseConstructorCallAccess().getCommaKeyword_3_2_0()); // depends on control dependency: [if], data = [none] } // InternalSARL.g:10243:5: ( (lv_typeArguments_6_0= ruleJvmArgumentTypeReference ) ) // InternalSARL.g:10244:6: (lv_typeArguments_6_0= ruleJvmArgumentTypeReference ) { // InternalSARL.g:10244:6: (lv_typeArguments_6_0= ruleJvmArgumentTypeReference ) // InternalSARL.g:10245:7: lv_typeArguments_6_0= ruleJvmArgumentTypeReference { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXbaseConstructorCallAccess().getTypeArgumentsJvmArgumentTypeReferenceParserRuleCall_3_2_1_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_28); lv_typeArguments_6_0=ruleJvmArgumentTypeReference(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getXbaseConstructorCallRule()); // depends on control dependency: [if], data = [none] } add( current, "typeArguments", lv_typeArguments_6_0, "org.eclipse.xtext.xbase.Xtype.JvmArgumentTypeReference"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } } break; default : break loop260; } } while (true); otherlv_7=(Token)match(input,41,FOLLOW_96); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_7, grammarAccess.getXbaseConstructorCallAccess().getGreaterThanSignKeyword_3_3()); // depends on control dependency: [if], data = [none] } } break; } // InternalSARL.g:10268:3: ( ( ( ( '(' ) )=> (lv_explicitConstructorCall_8_0= '(' ) ) ( ( ( ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) )=> (lv_arguments_9_0= ruleXShortClosure ) ) | ( ( (lv_arguments_10_0= ruleXExpression ) ) (otherlv_11= ',' ( (lv_arguments_12_0= ruleXExpression ) ) )* ) )? otherlv_13= ')' )? int alt264=2; alt264 = dfa264.predict(input); switch (alt264) { case 1 : // InternalSARL.g:10269:4: ( ( ( '(' ) )=> (lv_explicitConstructorCall_8_0= '(' ) ) ( ( ( ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) )=> (lv_arguments_9_0= ruleXShortClosure ) ) | ( ( (lv_arguments_10_0= ruleXExpression ) ) (otherlv_11= ',' ( (lv_arguments_12_0= ruleXExpression ) ) )* ) )? otherlv_13= ')' { // InternalSARL.g:10269:4: ( ( ( '(' ) )=> (lv_explicitConstructorCall_8_0= '(' ) ) // InternalSARL.g:10270:5: ( ( '(' ) )=> (lv_explicitConstructorCall_8_0= '(' ) { // InternalSARL.g:10274:5: (lv_explicitConstructorCall_8_0= '(' ) // InternalSARL.g:10275:6: lv_explicitConstructorCall_8_0= '(' { lv_explicitConstructorCall_8_0=(Token)match(input,49,FOLLOW_97); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(lv_explicitConstructorCall_8_0, grammarAccess.getXbaseConstructorCallAccess().getExplicitConstructorCallLeftParenthesisKeyword_4_0_0()); // depends on control dependency: [if], data = [none] } if ( state.backtracking==0 ) { if (current==null) { current = createModelElement(grammarAccess.getXbaseConstructorCallRule()); // depends on control dependency: [if], data = [none] } setWithLastConsumed(current, "explicitConstructorCall", true, "("); // depends on control dependency: [if], data = [none] } } } // InternalSARL.g:10287:4: ( ( ( ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) )=> (lv_arguments_9_0= ruleXShortClosure ) ) | ( ( (lv_arguments_10_0= ruleXExpression ) ) (otherlv_11= ',' ( (lv_arguments_12_0= ruleXExpression ) ) )* ) )? int alt263=3; alt263 = dfa263.predict(input); switch (alt263) { case 1 : // InternalSARL.g:10288:5: ( ( ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) )=> (lv_arguments_9_0= ruleXShortClosure ) ) { // InternalSARL.g:10288:5: ( ( ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) )=> (lv_arguments_9_0= ruleXShortClosure ) ) // InternalSARL.g:10289:6: ( ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) )=> (lv_arguments_9_0= ruleXShortClosure ) { // InternalSARL.g:10314:6: (lv_arguments_9_0= ruleXShortClosure ) // InternalSARL.g:10315:7: lv_arguments_9_0= ruleXShortClosure { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXbaseConstructorCallAccess().getArgumentsXShortClosureParserRuleCall_4_1_0_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_81); lv_arguments_9_0=ruleXShortClosure(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getXbaseConstructorCallRule()); // depends on control dependency: [if], data = [none] } add( current, "arguments", lv_arguments_9_0, "org.eclipse.xtext.xbase.Xbase.XShortClosure"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } } break; case 2 : // InternalSARL.g:10333:5: ( ( (lv_arguments_10_0= ruleXExpression ) ) (otherlv_11= ',' ( (lv_arguments_12_0= ruleXExpression ) ) )* ) { // InternalSARL.g:10333:5: ( ( (lv_arguments_10_0= ruleXExpression ) ) (otherlv_11= ',' ( (lv_arguments_12_0= ruleXExpression ) ) )* ) // InternalSARL.g:10334:6: ( (lv_arguments_10_0= ruleXExpression ) ) (otherlv_11= ',' ( (lv_arguments_12_0= ruleXExpression ) ) )* { // InternalSARL.g:10334:6: ( (lv_arguments_10_0= ruleXExpression ) ) // InternalSARL.g:10335:7: (lv_arguments_10_0= ruleXExpression ) { // InternalSARL.g:10335:7: (lv_arguments_10_0= ruleXExpression ) // InternalSARL.g:10336:8: lv_arguments_10_0= ruleXExpression { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXbaseConstructorCallAccess().getArgumentsXExpressionParserRuleCall_4_1_1_0_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_51); lv_arguments_10_0=ruleXExpression(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getXbaseConstructorCallRule()); // depends on control dependency: [if], data = [none] } add( current, "arguments", lv_arguments_10_0, "org.eclipse.xtext.xbase.Xbase.XExpression"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } // InternalSARL.g:10353:6: (otherlv_11= ',' ( (lv_arguments_12_0= ruleXExpression ) ) )* loop262: do { int alt262=2; int LA262_0 = input.LA(1); if ( (LA262_0==32) ) { alt262=1; // depends on control dependency: [if], data = [none] } switch (alt262) { case 1 : // InternalSARL.g:10354:7: otherlv_11= ',' ( (lv_arguments_12_0= ruleXExpression ) ) { otherlv_11=(Token)match(input,32,FOLLOW_45); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_11, grammarAccess.getXbaseConstructorCallAccess().getCommaKeyword_4_1_1_1_0()); // depends on control dependency: [if], data = [none] } // InternalSARL.g:10358:7: ( (lv_arguments_12_0= ruleXExpression ) ) // InternalSARL.g:10359:8: (lv_arguments_12_0= ruleXExpression ) { // InternalSARL.g:10359:8: (lv_arguments_12_0= ruleXExpression ) // InternalSARL.g:10360:9: lv_arguments_12_0= ruleXExpression { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXbaseConstructorCallAccess().getArgumentsXExpressionParserRuleCall_4_1_1_1_1_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_51); lv_arguments_12_0=ruleXExpression(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getXbaseConstructorCallRule()); // depends on control dependency: [if], data = [none] } add( current, "arguments", lv_arguments_12_0, "org.eclipse.xtext.xbase.Xbase.XExpression"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } } break; default : break loop262; } } while (true); } } break; } otherlv_13=(Token)match(input,50,FOLLOW_89); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_13, grammarAccess.getXbaseConstructorCallAccess().getRightParenthesisKeyword_4_2()); // depends on control dependency: [if], data = [none] } } break; } // InternalSARL.g:10385:3: ( ( ( () '[' ) )=> (lv_arguments_14_0= ruleXClosure ) )? int alt265=2; alt265 = dfa265.predict(input); switch (alt265) { case 1 : // InternalSARL.g:10386:4: ( ( () '[' ) )=> (lv_arguments_14_0= ruleXClosure ) { // InternalSARL.g:10392:4: (lv_arguments_14_0= ruleXClosure ) // InternalSARL.g:10393:5: lv_arguments_14_0= ruleXClosure { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXbaseConstructorCallAccess().getArgumentsXClosureParserRuleCall_5_0()); // depends on control dependency: [if], data = [none] } pushFollow(FOLLOW_2); lv_arguments_14_0=ruleXClosure(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getXbaseConstructorCallRule()); // depends on control dependency: [if], data = [none] } add( current, "arguments", lv_arguments_14_0, "org.eclipse.xtext.xbase.Xbase.XClosure"); // depends on control dependency: [if], data = [none] afterParserOrEnumRuleCall(); // depends on control dependency: [if], data = [none] } } } break; } } } if ( state.backtracking==0 ) { leaveRule(); // depends on control dependency: [if], data = [none] } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; } }
public class class_name { private void replace(PersistentStore store, NodeAVL x, NodeAVL n) { if (x.isRoot()) { if (n != null) { n = n.setParent(store, null); } store.setAccessor(this, n); } else { set(store, x.getParent(store), x.isFromLeft(store), n); } } }
public class class_name { private void replace(PersistentStore store, NodeAVL x, NodeAVL n) { if (x.isRoot()) { if (n != null) { n = n.setParent(store, null); // depends on control dependency: [if], data = [null)] } store.setAccessor(this, n); // depends on control dependency: [if], data = [none] } else { set(store, x.getParent(store), x.isFromLeft(store), n); // depends on control dependency: [if], data = [none] } } }
public class class_name { public static String encrypt(String input) { try { return encrypt(input, null); } catch (GeneralSecurityException e) { e.printStackTrace(); return null; } } }
public class class_name { public static String encrypt(String input) { try { return encrypt(input, null); // depends on control dependency: [try], data = [none] } catch (GeneralSecurityException e) { e.printStackTrace(); return null; } // depends on control dependency: [catch], data = [none] } }
public class class_name { public SQLDialect determineSqlDialect(DataSource dataSource) { if (this.sqlDialect != null) { return this.sqlDialect; } return SqlDialectLookup.getDialect(dataSource); } }
public class class_name { public SQLDialect determineSqlDialect(DataSource dataSource) { if (this.sqlDialect != null) { return this.sqlDialect; // depends on control dependency: [if], data = [none] } return SqlDialectLookup.getDialect(dataSource); } }
public class class_name { @Pure public double getLength() { if (this.length < 0) { double segmentLength = 0; for (final PointGroup group : groups()) { Point2d previousPts = null; for (final Point2d pts : group.points()) { if (previousPts != null) { segmentLength += previousPts.getDistance(pts); } previousPts = pts; } } this.length = segmentLength; } return this.length; } }
public class class_name { @Pure public double getLength() { if (this.length < 0) { double segmentLength = 0; for (final PointGroup group : groups()) { Point2d previousPts = null; for (final Point2d pts : group.points()) { if (previousPts != null) { segmentLength += previousPts.getDistance(pts); // depends on control dependency: [if], data = [none] } previousPts = pts; // depends on control dependency: [for], data = [pts] } } this.length = segmentLength; // depends on control dependency: [if], data = [none] } return this.length; } }
public class class_name { private List<CompletableFuture<Channel>> getChannelPool(Address address) { List<CompletableFuture<Channel>> channelPool = channels.get(address); if (channelPool != null) { return channelPool; } return channels.computeIfAbsent(address, e -> { List<CompletableFuture<Channel>> defaultList = new ArrayList<>(size); for (int i = 0; i < size; i++) { defaultList.add(null); } return Lists.newCopyOnWriteArrayList(defaultList); }); } }
public class class_name { private List<CompletableFuture<Channel>> getChannelPool(Address address) { List<CompletableFuture<Channel>> channelPool = channels.get(address); if (channelPool != null) { return channelPool; // depends on control dependency: [if], data = [none] } return channels.computeIfAbsent(address, e -> { List<CompletableFuture<Channel>> defaultList = new ArrayList<>(size); for (int i = 0; i < size; i++) { defaultList.add(null); // depends on control dependency: [for], data = [none] } return Lists.newCopyOnWriteArrayList(defaultList); }); } }
public class class_name { private void readResourceAssignments() { for (MapRow row : m_tables.get("RES")) { Task task = m_activityMap.get(row.getString("ACTIVITY_ID")); Resource resource = m_resourceMap.get(row.getString("RESOURCE_ID")); if (task != null && resource != null) { task.addResourceAssignment(resource); } } } }
public class class_name { private void readResourceAssignments() { for (MapRow row : m_tables.get("RES")) { Task task = m_activityMap.get(row.getString("ACTIVITY_ID")); Resource resource = m_resourceMap.get(row.getString("RESOURCE_ID")); if (task != null && resource != null) { task.addResourceAssignment(resource); // depends on control dependency: [if], data = [none] } } } }
public class class_name { private boolean netKernel(final OtpMsg m) { OtpMbox mbox = null; try { final OtpErlangTuple t = (OtpErlangTuple) m.getMsg(); final OtpErlangTuple req = (OtpErlangTuple) t.elementAt(1); // actual // request final OtpErlangPid pid = (OtpErlangPid) req.elementAt(0); // originating // pid final OtpErlangObject[] pong = new OtpErlangObject[2]; pong[0] = req.elementAt(1); // his #Ref pong[1] = new OtpErlangAtom("yes"); mbox = createMbox(); mbox.send(pid, new OtpErlangTuple(pong)); return true; } catch (final Exception e) { } finally { closeMbox(mbox); } return false; } }
public class class_name { private boolean netKernel(final OtpMsg m) { OtpMbox mbox = null; try { final OtpErlangTuple t = (OtpErlangTuple) m.getMsg(); final OtpErlangTuple req = (OtpErlangTuple) t.elementAt(1); // actual // request final OtpErlangPid pid = (OtpErlangPid) req.elementAt(0); // originating // pid final OtpErlangObject[] pong = new OtpErlangObject[2]; pong[0] = req.elementAt(1); // his #Ref // depends on control dependency: [try], data = [none] pong[1] = new OtpErlangAtom("yes"); // depends on control dependency: [try], data = [none] mbox = createMbox(); // depends on control dependency: [try], data = [none] mbox.send(pid, new OtpErlangTuple(pong)); // depends on control dependency: [try], data = [none] return true; // depends on control dependency: [try], data = [none] } catch (final Exception e) { } finally { // depends on control dependency: [catch], data = [none] closeMbox(mbox); } return false; } }
public class class_name { public void addColumnMeta(ColumnMeta columnMeta) { columnMetas.add(columnMeta); columnMeta.setTableMeta(this); if (columnMeta.isPrimaryKey()) { primaryKeyColumnMetas.add(columnMeta); } } }
public class class_name { public void addColumnMeta(ColumnMeta columnMeta) { columnMetas.add(columnMeta); columnMeta.setTableMeta(this); if (columnMeta.isPrimaryKey()) { primaryKeyColumnMetas.add(columnMeta); // depends on control dependency: [if], data = [none] } } }
public class class_name { public void setGranulePosition(long position) { currentGranulePosition = position; for(OggPage p : buffer) { p.setGranulePosition(position); } } }
public class class_name { public void setGranulePosition(long position) { currentGranulePosition = position; for(OggPage p : buffer) { p.setGranulePosition(position); // depends on control dependency: [for], data = [p] } } }
public class class_name { private static void writeAttribute(String name, Object value, PrintWriter writer) { if (value != null) { String s; if (value instanceof String || value instanceof Boolean) { // for String/Boolean we can just use toString() s = value.toString(); } else { // otherwise its a String[], so space-delimit the values String[] tokens = (String[]) value; int bufLen = tokens.length - 1; for (String token: tokens) bufLen += token.length(); StringBuffer buf = new StringBuffer(bufLen); for (int i = 0; i < tokens.length; i++) { if (i > 0) { buf.append(' '); } buf.append(tokens[i]); } s = buf.toString(); } writer.print(" " + name + "=\"" + s + "\""); } } }
public class class_name { private static void writeAttribute(String name, Object value, PrintWriter writer) { if (value != null) { String s; if (value instanceof String || value instanceof Boolean) { // for String/Boolean we can just use toString() s = value.toString(); // depends on control dependency: [if], data = [none] } else { // otherwise its a String[], so space-delimit the values String[] tokens = (String[]) value; int bufLen = tokens.length - 1; for (String token: tokens) bufLen += token.length(); StringBuffer buf = new StringBuffer(bufLen); for (int i = 0; i < tokens.length; i++) { if (i > 0) { buf.append(' '); // depends on control dependency: [if], data = [none] } buf.append(tokens[i]); // depends on control dependency: [for], data = [i] } s = buf.toString(); // depends on control dependency: [if], data = [none] } writer.print(" " + name + "=\"" + s + "\""); // depends on control dependency: [if], data = [none] } } }