text:
package org.netbeans.jpa.modeler.generator.ui;

import java.awt.Component;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.ListCellRenderer;
import org.netbeans.api.project.FileOwnerQuery;
import org.netbeans.api.project.Project;
import org.netbeans.api.project.ProjectInformation;
import org.netbeans.api.project.ProjectUtils;
import org.netbeans.api.project.SourceGroup;
import org.netbeans.api.project.Sources;
import org.netbeans.api.project.ui.OpenProjects;
import org.netbeans.jpa.modeler.core.widget.ui.GenericDialog;
import org.openide.DialogDisplayer;
import org.openide.NotifyDescriptor;
import org.openide.filesystems.FileObject;
import org.openide.filesystems.FileUtil;
import org.openide.util.NbBundle;

/**
 *
 * @author Gaurav_Gupta
 */
public class GenerateCodeDialog extends GenericDialog
        implements PropertyChangeListener {

    private FileObject modelerFileObject;

    /**
     * Creates new form GenerateCodeDialog
     */
    public GenerateCodeDialog(FileObject fileObject) {
        this.modelerFileObject = fileObject;
        initComponents();
        propertyChangeSupport = new PropertyChangeSupport(this);

        populateExistingProjectElementGroup();
        backupSourcesCheck.setSelected(true);
        getPropertyChangeSupport().addPropertyChangeListener(this);
        this.setTitle("Generate Source Code");
        backupSourcesCheck.setVisible(false);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLayeredPane1 = new javax.swing.JLayeredPane();
        backupSourcesCheck = new javax.swing.JCheckBox();
        targetProjectCombo = new javax.swing.JComboBox();
        sourceFolderCombo = new javax.swing.JComboBox();
        targetProject_Label = new javax.swing.JLabel();
        sourceFolder_Label = new javax.swing.JLabel();
        jLayeredPane2 = new javax.swing.JLayeredPane();
        generateSourceCode = new javax.swing.JButton();
        cencelGenerateCode = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        backupSourcesCheck.setSelected(true);
        java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("org/netbeans/jpa/modeler/generator/ui/Bundle"); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(backupSourcesCheck, bundle.getString("GenerateCodeDialog.backupSourcesCheck.text")); // NOI18N
        backupSourcesCheck.setMargin(new java.awt.Insets(0, 0, 0, 0));

        targetProjectCombo.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                targetProjectComboItemStateChanged(evt);
            }
        });

        sourceFolderCombo.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                sourceFolderComboItemStateChanged(evt);
            }
        });

        org.openide.awt.Mnemonics.setLocalizedText(targetProject_Label, org.openide.util.NbBundle.getMessage(GenerateCodeDialog.class, "GenerateCodeDialog.targetProject_Label.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(sourceFolder_Label, org.openide.util.NbBundle.getMessage(GenerateCodeDialog.class, "GenerateCodeDialog.sourceFolder_Label.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(generateSourceCode, org.openide.util.NbBundle.getMessage(GenerateCodeDialog.class, "GenerateCodeDialog.generateSourceCode.text")); // NOI18N
        generateSourceCode.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                generateSourceCodeActionPerformed(evt);
            }
        });

        org.openide.awt.Mnemonics.setLocalizedText(cencelGenerateCode, org.openide.util.NbBundle.getMessage(GenerateCodeDialog.class, "GenerateCodeDialog.cencelGenerateCode.text")); // NOI18N
        cencelGenerateCode.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cencelGenerateCodeActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jLayeredPane2Layout = new javax.swing.GroupLayout(jLayeredPane2);
        jLayeredPane2.setLayout(jLayeredPane2Layout);
        jLayeredPane2Layout.setHorizontalGroup(
            jLayeredPane2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jLayeredPane2Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(generateSourceCode)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cencelGenerateCode))
        );
        jLayeredPane2Layout.setVerticalGroup(
            jLayeredPane2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jLayeredPane2Layout.createSequentialGroup()
                .addGroup(jLayeredPane2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(generateSourceCode)
                    .addComponent(cencelGenerateCode))
                .addGap(0, 3, Short.MAX_VALUE))
        );
        jLayeredPane2.setLayer(generateSourceCode, javax.swing.JLayeredPane.DEFAULT_LAYER);
        jLayeredPane2.setLayer(cencelGenerateCode, javax.swing.JLayeredPane.DEFAULT_LAYER);

        javax.swing.GroupLayout jLayeredPane1Layout = new javax.swing.GroupLayout(jLayeredPane1);
        jLayeredPane1.setLayout(jLayeredPane1Layout);
        jLayeredPane1Layout.setHorizontalGroup(
            jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jLayeredPane1Layout.createSequentialGroup()
                .addGap(36, 36, 36)
                .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jLayeredPane1Layout.createSequentialGroup()
                        .addComponent(backupSourcesCheck, javax.swing.GroupLayout.DEFAULT_SIZE, 352, Short.MAX_VALUE)
                        .addGap(67, 67, 67))
                    .addGroup(jLayeredPane1Layout.createSequentialGroup()
                        .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jLayeredPane1Layout.createSequentialGroup()
                                .addGap(0, 0, Short.MAX_VALUE)
                                .addComponent(jLayeredPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jLayeredPane1Layout.createSequentialGroup()
                                .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(sourceFolder_Label, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(targetProject_Label, javax.swing.GroupLayout.Alignment.LEADING))
                                .addGap(33, 33, 33)
                                .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(sourceFolderCombo, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(targetProjectCombo, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                        .addGap(44, 44, 44))))
        );
        jLayeredPane1Layout.setVerticalGroup(
            jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jLayeredPane1Layout.createSequentialGroup()
                .addGap(25, 25, 25)
                .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(targetProject_Label)
                    .addComponent(targetProjectCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(sourceFolder_Label)
                    .addComponent(sourceFolderCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(backupSourcesCheck)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLayeredPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(18, Short.MAX_VALUE))
        );
        jLayeredPane1.setLayer(backupSourcesCheck, javax.swing.JLayeredPane.DEFAULT_LAYER);
        jLayeredPane1.setLayer(targetProjectCombo, javax.swing.JLayeredPane.DEFAULT_LAYER);
        jLayeredPane1.setLayer(sourceFolderCombo, javax.swing.JLayeredPane.DEFAULT_LAYER);
        jLayeredPane1.setLayer(targetProject_Label, javax.swing.JLayeredPane.DEFAULT_LAYER);
        jLayeredPane1.setLayer(sourceFolder_Label, javax.swing.JLayeredPane.DEFAULT_LAYER);
        jLayeredPane1.setLayer(jLayeredPane2, javax.swing.JLayeredPane.DEFAULT_LAYER);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLayeredPane1)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLayeredPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents
   public final static String PROP_TARGET_PROJECT = "TARGET_PROJECT"; // NOI18N
    public final static String PROP_NO_TARGET_PROJECT = "NO_TARGET_PROJECT"; // NOI18N
    public final static String PROP_SOURCE_FOLDER = "SOURCE_FOLDER"; // NOI18N
    public final static String PROP_NO_SOURCE_FOLDER = "NO_SOURCE_FOLDER"; // NOI18N

    private Project targetPoject = null;
    private Project orignalProject = null;
    private SourceGroup sourceGroup = null;
    private boolean noTargetProject = false;
    private boolean noOpenTargets = false;

    private void targetProjectComboItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_targetProjectComboItemStateChanged
        // TODO add your handling code here:
        setTargetPoject((Project) targetProjectCombo.getSelectedItem());
        populateSourceFolderCombo(getTargetPoject());

        String prop = getTargetPoject() == null
                ? PROP_NO_TARGET_PROJECT : PROP_TARGET_PROJECT;

        getPropertyChangeSupport().firePropertyChange(prop, null, evt);
    }//GEN-LAST:event_targetProjectComboItemStateChanged

    private void sourceFolderComboItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_sourceFolderComboItemStateChanged
        // TODO add your handling code here:
        setSourceGroup((SourceGroup) sourceFolderCombo.getSelectedItem());
    }//GEN-LAST:event_sourceFolderComboItemStateChanged

    private void generateSourceCodeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateSourceCodeActionPerformed
        if (sourceGroup == null) {
            NotifyDescriptor d = new NotifyDescriptor.Message("Please select the Source Folder .", NotifyDescriptor.INFORMATION_MESSAGE);
            d.setTitle("Source Folder");
            DialogDisplayer.getDefault().notify(d);
        } else {
            setVisible(false);
            this.setDialogResult(javax.swing.JOptionPane.OK_OPTION);
            dispose();
        }
//        srcGroup.getRootFolder().getPath()
    }//GEN-LAST:event_generateSourceCodeActionPerformed

    private void cencelGenerateCodeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cencelGenerateCodeActionPerformed
        cancelActionPerformed(evt);
    }//GEN-LAST:event_cencelGenerateCodeActionPerformed

    public String getSelectedFolderName() {
        try {
            if (getSourceGroup() != null && getSourceGroup().getRootFolder() != null) {
                return FileUtil.toFile(getSourceGroup().getRootFolder()).getCanonicalPath();
            }
        } catch (IOException e) {
        }

        return null;
    }

    public boolean isBackupSources() {
        return backupSourcesCheck != null ? backupSourcesCheck.isSelected() : true;
    }

    public void propertyChange(PropertyChangeEvent event) {
        String propName = "";

        if (event != null) {
            propName = event.getPropertyName();
        }

//        if (propName.equals(TemplateModel.PROP_NO_TEMPLATES_ENABLED)) {
//            noTemplatesEnabled = true;
//        } else if (propName.equals(TemplateModel.PROP_ONE_TEMPLATE_ENABLED)) {
//            noTemplatesEnabled = false;
//        } else
        if (propName.equals(PROP_TARGET_PROJECT)) {
            noTargetProject = false;
        } else if (propName.equals(PROP_NO_TARGET_PROJECT)) {
            noTargetProject = true;
        }

        String msg = "";

        if (noOpenTargets) {
            msg = NbBundle.getMessage(
                    GenerateCodeDialog.class, "MSG_NoOpenTargets"); // NIO18N
        } else if (noTargetProject) {
            msg = NbBundle.getMessage(
                    GenerateCodeDialog.class, "MSG_NoTargetJavaProject"); // NIO18N
        }

//        statusLabel.setText(msg);
//
//        statusLabel.setVisible(
//                noTargetProject || noOpenTargets || noTemplatesEnabled);
//
//        firePropertyChange(GenerateCodeDescriptor.PROP_VALID, null,
//                !(noTargetProject || noOpenTargets || noTemplatesEnabled));
    }

    //
    // target project added elements processing
    //
    private void enableExistingProjectElementGroup(boolean enable) {
        targetProjectCombo.setEnabled(enable);
        sourceFolderCombo.setEnabled(enable);
    }

    private void populateExistingProjectElementGroup() {
        GenerateCodeDialog.ProjectCellRenderer projectCellRenderer = new GenerateCodeDialog.ProjectCellRenderer(targetProjectCombo.getRenderer());
        targetProjectCombo.setRenderer(projectCellRenderer);
        Project[] openProjects = OpenProjects.getDefault().getOpenProjects();
        ArrayList<Project> list = new ArrayList<Project>();

        if (openProjects != null) {
            for (Project prj : openProjects) {
                Sources sources = ProjectUtils.getSources(prj);
                if (sources == null) {
                    continue;
                }

                SourceGroup[] srcGrps = sources.getSourceGroups(
                        JavaProjectConstants.SOURCES_TYPE_JAVA);

                if (srcGrps != null && srcGrps.length > 0) {
                    list.add(prj);
                }
            }
        }

        if (orignalProject != null && !list.contains(orignalProject)) {
            list.add(orignalProject);
        }

        if (list == null || list.size() == 0) {
            noOpenTargets = true;
            enableExistingProjectElementGroup(false);
        } else {
            //list.add(0, null);

            DefaultComboBoxModel projectsModel
                    = new DefaultComboBoxModel(list.toArray());

            targetProjectCombo.setModel(projectsModel);

            // Issue Fix #5850 Start
            Project project = FileOwnerQuery.getOwner(modelerFileObject);
            if (project != null) {
                targetProjectCombo.setSelectedItem(project);
            } else {
                targetProjectCombo.setSelectedIndex(-1);
            }
             // Issue Fix #5850 End

            // When the selected index was set to -1 it reset the targetPrj
            // value.  Since the targetPrj was simply initialized with the
            // origPrj value, just set it again.
            setTargetPoject(orignalProject);
            selectTargetProject();
            noOpenTargets = false;
            // enableExistingProjectElementGroup(true);
        }

        propertyChange(null);
    }

    private void selectTargetProject() {
        if (getTargetPoject() == null) {
            if (targetProjectCombo.getSelectedItem() != null) {
                setTargetPoject((Project) targetProjectCombo.getSelectedItem());
                sourceFolderCombo.setEnabled(true);
            } else {
                sourceFolderCombo.setEnabled(false);
            }
        } else {
            targetProjectCombo.setSelectedItem(getTargetPoject());
            sourceFolderCombo.setEnabled(true);
        }

        if (targetProjectCombo.getSelectedItem() != null) {
            Project prj = (Project) targetProjectCombo.getSelectedItem();
            populateSourceFolderCombo(prj);
            sourceFolderCombo.setEnabled(true);
        }
    }

    private void populateSourceFolderCombo(Project prj) {
        GenerateCodeDialog.SourceRootCellRenderer srcCellRenderer
                = new GenerateCodeDialog.SourceRootCellRenderer(sourceFolderCombo.getRenderer());
        sourceFolderCombo.setRenderer(srcCellRenderer);
        ArrayList<SourceGroup> srcRoots = new ArrayList<SourceGroup>();
        int index = 0;
        FileObject sfo = null;

        if (getSourceGroup() != null) {
            sfo = getSourceGroup().getRootFolder();
        }

        if (prj != null) {
            Sources sources = ProjectUtils.getSources(prj);
            if (sources != null) {
                SourceGroup[] srcGrps = sources.getSourceGroups(
                        JavaProjectConstants.SOURCES_TYPE_JAVA);

                if (srcGrps != null) {
                    for (SourceGroup g : srcGrps) {
                        if (g != null) {
                            srcRoots.add(g);

                            if (g.getRootFolder() != null
                                    && g.getRootFolder().equals(sfo)) {
                                index = srcRoots.size() - 1;
                            }
                        }
                    }
                }
            }
        }

        DefaultComboBoxModel rootsModel
                = new DefaultComboBoxModel(srcRoots.toArray());

        sourceFolderCombo.setModel(rootsModel);

        if (srcRoots.size() > 0) {
            sourceFolderCombo.setSelectedIndex(index);
            setSourceGroup(srcRoots.get(index));
            sourceFolderCombo.setEnabled(true);
        } else {
            sourceFolderCombo.setEnabled(false);
        }
    }

    private boolean setTargetElementsFromFolder(String path) {
        if (path == null) {
            return false;
        }

        FileObject fo = null;

        try {
            File normalizedFile = FileUtil.normalizeFile(new File(path));
            fo = FileUtil.toFileObject(new File(normalizedFile.getCanonicalPath()));
        } catch (IOException ex) {
            return false;
        } catch (Exception e) {
            return false;
        }
        if (fo == null) {
            return false;
        }

        Project prj = FileOwnerQuery.getOwner(fo);
        if (prj == null) {
            return false;
        }

        Sources sources = ProjectUtils.getSources(prj);
        if (sources == null) {
            return false;
        }

        SourceGroup[] srcGrps = sources.getSourceGroups(
                JavaProjectConstants.SOURCES_TYPE_JAVA);

        if (srcGrps != null && srcGrps.length > 0) {
            for (SourceGroup g : srcGrps) {
                FileObject root = g.getRootFolder();

                if (!fo.equals(root)) {
                    continue;
                } else {
                    orignalProject = prj;
                    setSourceGroup(g);
                    return true;
                }
            }
        }

        return false;
    }

    /**
     * @return the sourceGroup
     */
    public SourceGroup getSourceGroup() {
        return sourceGroup;
    }

    /**
     * @param sourceGroup the sourceGroup to set
     */
    public void setSourceGroup(SourceGroup sourceGroup) {
        this.sourceGroup = sourceGroup;
    }

    /**
     * @return the modelerFileObject
     */
    public FileObject getModelerFileObject() {
        return modelerFileObject;
    }

    /**
     * @param modelerFileObject the modelerFileObject to set
     */
    public void setModelerFileObject(FileObject modelerFileObject) {
        this.modelerFileObject = modelerFileObject;
    }

    /**
     * @return the targetPoject
     */
    public Project getTargetPoject() {
        return targetPoject;
    }

    /**
     * @param targetPoject the targetPoject to set
     */
    public void setTargetPoject(Project targetPoject) {
        this.targetPoject = targetPoject;
    }

    /**
     * copy from ReverseEngineerPanel.java
     */
    private static class ProjectCellRenderer extends JLabel
            implements ListCellRenderer {

        ListCellRenderer renderer;

        public ProjectCellRenderer(ListCellRenderer hostRenderer) {
            renderer = hostRenderer;
        }

        public Component getListCellRendererComponent(
                JList list,
                Object value,
                int index,
                boolean isSelected,
                boolean cellHasFocus) {
            Component comp = null;

            if (renderer != null) {
                comp = renderer.getListCellRendererComponent(list, value, index,
                        isSelected, cellHasFocus);
            }

            JLabel label = null;

            if (comp instanceof JLabel) {
                label = (JLabel) comp;
            } else {
                label = this;
                if (isSelected) {
                    setBackground(list.getSelectionBackground());
                    setForeground(list.getSelectionForeground());
                } else {
                    setBackground(list.getBackground());
                    setForeground(list.getForeground());
                }
                setOpaque(true);
            }

            if (value instanceof Project) {
                ProjectInformation pi = ProjectUtils.getInformation((Project) value);

                label.setText(pi.getDisplayName());
                label.setIcon(pi.getIcon());
            } else {
                label.setText(value == null ? " " : value.toString()); // NOI18N
                label.setIcon(null);
            }
            return label;
        }
    }

    private static class SourceRootCellRenderer extends JLabel
            implements ListCellRenderer {

        ListCellRenderer renderer;

        public SourceRootCellRenderer(ListCellRenderer hostRenderer) {
            renderer = hostRenderer;
        }

        public Component getListCellRendererComponent(
                JList list,
                Object value,
                int index,
                boolean isSelected,
                boolean cellHasFocus) {

            Component comp = null;

            if (renderer != null) {
                comp = renderer.getListCellRendererComponent(list, value, index,
                        isSelected, cellHasFocus);
            }

            JLabel label = null;

            if (comp instanceof JLabel) {
                label = (JLabel) comp;
            } else {
                label = this;
                if (isSelected) {
                    setBackground(list.getSelectionBackground());
                    setForeground(list.getSelectionForeground());
                } else {
                    setBackground(list.getBackground());
                    setForeground(list.getForeground());
                }
                setOpaque(true);
            }

            if (value instanceof SourceGroup) {
                SourceGroup sg = (SourceGroup) value;
                String desc = sg.getDisplayName();
                if (desc == null || desc.length() == 0) {
                    FileObject fo = sg.getRootFolder();
                    desc = fo.getPath();
                }
                label.setText(desc);
            } else {
                label.setText(value == null ? " " : value.toString()); // NOI18N
            }
            return label;
        }
    }

    private PropertyChangeSupport propertyChangeSupport = null;

    public PropertyChangeSupport getPropertyChangeSupport() {
        return propertyChangeSupport;
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JCheckBox backupSourcesCheck;
    private javax.swing.JButton cencelGenerateCode;
    private javax.swing.JButton generateSourceCode;
    private javax.swing.JLayeredPane jLayeredPane1;
    private javax.swing.JLayeredPane jLayeredPane2;
    private javax.swing.JComboBox sourceFolderCombo;
    private javax.swing.JLabel sourceFolder_Label;
    private javax.swing.JComboBox targetProjectCombo;
    private javax.swing.JLabel targetProject_Label;
    // End of variables declaration//GEN-END:variables

}

class JavaProjectConstants {

    private JavaProjectConstants() {
    }

    /**
     * Java package root sources type.
     *
     * @see org.netbeans.api.project.Sources
     */
    public static final String SOURCES_TYPE_JAVA = "java"; // NOI18N

    /**
     * Package root sources type for resources, if these are not put together
     * with Java sources.
     *
     * @see org.netbeans.api.project.Sources
     * @since org.netbeans.modules.java.project/1 1.11
     */
    public static final String SOURCES_TYPE_RESOURCES = "resources"; // NOI18N

    /**
     * Hint for <code>SourceGroupModifier</code> to create a
     * <code>SourceGroup</code> for main project codebase.
     *
     * @see org.netbeans.api.project.SourceGroupModifier
     * @since org.netbeans.modules.java.project/1 1.24
     */
    public static final String SOURCES_HINT_MAIN = "main"; //NOI18N

    /**
     * Hint for <code>SourceGroupModifier</code> to create a
     * <code>SourceGroup</code> for project's tests.
     *
     * @see org.netbeans.api.project.SourceGroupModifier
     * @since org.netbeans.modules.java.project/1 1.24
     */
    public static final String SOURCES_HINT_TEST = "test"; //NOI18N

    /**
     * Standard artifact type representing a JAR file, presumably used as a Java
     * library of some kind.
     *
     * @see org.netbeans.api.project.ant.AntArtifact
     */
    public static final String ARTIFACT_TYPE_JAR = "jar"; // NOI18N

    /**
     * Standard artifact type representing a folder containing classes,
     * presumably used as a Java library of some kind.
     *
     * @see org.netbeans.api.project.ant.AntArtifact
     * @since org.netbeans.modules.java.project/1 1.4
     */
    public static final String ARTIFACT_TYPE_FOLDER = "folder"; //NOI18N

    /**
     * Standard command for running Javadoc on a project.
     *
     * @see org.netbeans.spi.project.ActionProvider
     */
    public static final String COMMAND_JAVADOC = "javadoc"; // NOI18N

    /**
     * Standard command for reloading a class in a foreign VM and continuing
     * debugging.
     *
     * @see org.netbeans.spi.project.ActionProvider
     */
    public static final String COMMAND_DEBUG_FIX = "debug.fix"; // NOI18N

}


text:
package alec_wam.CrystalMod.tiles.entityhopper;

import java.util.List;

import javax.annotation.Nullable;

import alec_wam.CrystalMod.CrystalMod;
import alec_wam.CrystalMod.tiles.entityhopper.TileEntityEntityHopper.FilterType;
import alec_wam.CrystalMod.util.ChatUtil;
import alec_wam.CrystalMod.util.Lang;
import alec_wam.CrystalMod.util.tool.ToolUtil;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumBlockRenderType;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

public class BlockEntityHopper extends BlockContainer {

	public BlockEntityHopper() {
		super(Material.IRON);
		setHardness(5.0F);
	    setResistance(60.0F);
	    setCreativeTab(CrystalMod.tabBlocks);
	}

	@Override
    public EnumBlockRenderType getRenderType(IBlockState state)
    {
        return EnumBlockRenderType.MODEL;
    }

	@Override
    public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) {
    	TileEntity tile = world.getTileEntity(pos);
        if (tile !=null && (tile instanceof TileEntityEntityHopper)) {
        	TileEntityEntityHopper hopper = (TileEntityEntityHopper)tile;
			if(ToolUtil.isToolEquipped(player, hand)){
				if(!world.isRemote){
					FilterType newFilter = player.isSneaking() ? hopper.getFilter().previous() : hopper.getFilter().next();
					ChatUtil.sendNoSpam(player, Lang.localize("entityhopper.filter."+newFilter.name().toLowerCase()));
					hopper.setFilter(newFilter);
				}
				return true;
			}
        }
    	return false;
    }

	@SuppressWarnings("deprecation")
	@Override
	public void addCollisionBoxToList (IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity collidingEntity, boolean bool) {
	    /*TileEntity tile = worldIn.getTileEntity(pos);
		if(tile == null || !(tile instanceof TileEntityEntityHopper)){
			super.addCollisionBoxToList(state, worldIn, pos, entityBox,
					collidingBoxes, collidingEntity);
			return;
		}
		TileEntityEntityHopper hopper = (TileEntityEntityHopper)tile;
		if (collidingEntity !=null && hopper.passesFilter(collidingEntity)) {
			return;
		}*/
		super.addCollisionBoxToList(state, worldIn, pos, entityBox,
				collidingBoxes, collidingEntity, bool);
	}

	@Override
	public TileEntity createNewTileEntity(World worldIn, int meta) {
		return new TileEntityEntityHopper();
	}

}

redpajama_set_name: RedPajamaGithub


text:
package libSB.math.vector.swizzling.accessor;

import java.util.function.DoubleSupplier;
import libSB.math.vector.vec4.Vec4;
import libSB.math.vector.vec4.Vec4Adapter;

/**
 *
 * @author Simon Berndt
 */
public class AccessorBuilder_Level5 {

    protected final DoubleSupplier xGetter;
    protected final DoubleSupplier yGetter;
    protected final DoubleSupplier zGetter;
    protected final DoubleSupplier wGetter;

    protected AccessorBuilder_Level5(DoubleSupplier xGetter, DoubleSupplier yGetter, DoubleSupplier zGetter, DoubleSupplier wGetter) {
        this.xGetter = xGetter;
        this.yGetter = yGetter;
        this.zGetter = zGetter;
        this.wGetter = wGetter;
    }

    public Vec4 build() {
        return new Vec4Adapter(xGetter, yGetter, zGetter, wGetter);
    }

    public static class VN extends AccessorBuilder_Level5 {

        VN(DoubleSupplier xGetter, DoubleSupplier yGetter, DoubleSupplier zGetter, DoubleSupplier wGetter) {
            super(xGetter, yGetter, zGetter, wGetter);
        }

    }

}


text:
package com.fkeglevich.rawdumper.controller.feature;

import com.fkeglevich.rawdumper.camera.data.Displayable;
import com.fkeglevich.rawdumper.ui.listener.ItemSelectedListener;

import java.util.List;

/**
 * TODO: Add class header
 * <p>
 * Created by Flávio Keglevich on 19/10/17.
 */

public interface DisplayableFeatureUi
{
    void setItems(List<String> items);
    void setSelectedIndex(int index);
    void displayExternalChangeNotification(Displayable newValue);
    void setListener(ItemSelectedListener listener);
    void enable();
    void disable();
}


text:
package com.treasure_data.auth;

import static org.junit.Assert.assertTrue;

import java.io.IOException;
import java.util.Properties;

import org.junit.Test;

import com.treasure_data.client.TestTreasureDataClient;

public class TestTreasureDataCredentials {

    @Test
    public void testConstructor01() throws IOException {
        Properties props = new Properties();
        props.load(TestTreasureDataClient.class.getClassLoader()
                .getResourceAsStream("mock-treasure-data.properties"));
        TreasureDataCredentials credentials = new TreasureDataCredentials(props);
        assertTrue(credentials.getAPIKey() != null);
    }

}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

    <title>Test possible values for 'calcMode="discrete"'</title>

Test different values for calcMode

				Test image
				Reference images
				Test description and test criteria

			    <object id="testimage_discrete" data="test/possible_values_for_calcmode_discrete.svg" type="image/svg+xml" alt="Image to be tested" width="480" height="360"/>
			    <object id="refimage" data="ref/ref_possible_values_for_calcmode_discrete.svg" type="image/svg+xml" alt="ref image" width="480" height="360"/>

Possible values for calcMode='discrete'

When the animation is done, the image on the left should look identical to the one on the right

			    <object id="testimage_linear" data="test/possible_values_for_calcmode_linear.svg" type="image/svg+xml" alt="image to be tested" width="480" height="360" />
			    <object id="refimage2" data="ref/ref_possible_values_for_calcmode_spline2.svg" type="image/svg+xml" alt="image to be tested" width="480" height="360" />

Possible values for calcMode='linear'

When the animation is done, the image on the left should look identical to the one on the right

			    <object id="testimage_paced" data="test/possible_values_for_calcmode_paced.svg" type="image/svg+xml" alt="image to be tested" width="480" height="360" />
			    <object id="refimage3" data="ref/ref_possible_values_for_calcmode_spline3.svg" type="image/svg+xml" alt="image to be tested" width="480" height="360" />

Possible values for calcMode='paced'

When the animation is done, the image on the left should look identical to the one on the right

			    <object id="testimage_spline" data="test/possible_values_for_calcmode_spline.svg" type="image/svg+xml" alt="image to be tested" width="480" height="360" />

			    <object id="refimage4" data="ref/ref_possible_values_for_calcmode_spline4.svg" type="image/svg+xml" alt="image to be tested" width="480" height="360" />

Possible values for calcMode='spline'

When the animation is done, the image on the left should look identical to the one on the right


text:
<?hh // strict

namespace Dust\Parse;

class ParseException extends \Dust\DustException
{
	/**
	 * @param string $message
	 * @param int    $line
	 * @param int    $col
	 */
	public function __construct(string $message, int $line, int $col) {
		parent::__construct("(" . $line . "," . $col . ") " . $message);
	}
}


text:
package x.flyspace.gradle.plugin.enumgenerator.core.impl.items;

import x.flyspace.gradle.plugin.enumgenerator.core.AbstractEnumFileGenerator;

/**
 * Created by sky91 on 1/29/15.
 */
public class FromItemsGenerator<T> extends AbstractEnumFileGenerator {
	private final Iterable<T> items;
	private final ItemsHandler<T> handler;

	public FromItemsGenerator(Iterable<T> items, ItemsHandler<T> handler) {
		this.items = items;
		this.handler = handler;
	}

	@Override
	public void generate() {
		for(T item : items) {
			handler.handle(item);
		}
		handler.finishHandle();
	}
}


text:
import Command from '../command/Command';

export default class Delay extends Command<Promise<void>> {

  className = 'Delay';

  wait: number;

  constructor(wait: number) {
    super();
    this.wait = wait;
  }

  execute() {
    return new Promise<void>(resolve => setTimeout(resolve, this.wait));
  }

}


text: export * from './base.component';


text:
namespace djinni_generated {

class NativeHttpMethod final : ::djinni::JniEnum {
public:
    using CppType = ::djinni_rest_gen::HttpMethod;
    using JniType = jobject;

    using Boxed = NativeHttpMethod;

    static CppType toCpp(JNIEnv* jniEnv, JniType j) { return static_cast<CppType>(::djinni::JniClass<NativeHttpMethod>::get().ordinal(jniEnv, j)); }
    static ::djinni::LocalRef<JniType> fromCpp(JNIEnv* jniEnv, CppType c) { return ::djinni::JniClass<NativeHttpMethod>::get().create(jniEnv, static_cast<jint>(c)); }

private:
    NativeHttpMethod() : JniEnum("com/mycompany/djinni_rest/HttpMethod") {}
    friend ::djinni::JniClass<NativeHttpMethod>;
};

}  // namespace djinni_generated


text:
Then /^I should receive a HTTP (\d+)$/ do |expected_code|
  status_code.should == expected_code.to_i
end


text:
<?xml version="1.0" encoding="UTF-8"?>

<assembly>
	<formats>
		<format>dir</format>
	</formats>

	<baseDirectory>disc</baseDirectory>

	<moduleSets>
		<moduleSet>
			<includes>
				<include>com.codefollower.douyu:douyu-api</include>
			</includes>
			<binaries>
				<unpack>false</unpack>
				<outputDirectory>douyu-api</outputDirectory>
				<dependencySets>
					<dependencySet>
						<useTransitiveFiltering>true</useTransitiveFiltering>
						<useTransitiveDependencies>true</useTransitiveDependencies>
					</dependencySet>
				</dependencySets>
			</binaries>
		</moduleSet>

		<moduleSet>
			<includes>
				<include>com.codefollower.douyu:douyu-javac</include>
			</includes>
			<binaries>
				<unpack>false</unpack>
				<outputDirectory>douyu-javac</outputDirectory>
				<dependencySets>
					<dependencySet>
						<useTransitiveFiltering>true</useTransitiveFiltering>
						<useTransitiveDependencies>true</useTransitiveDependencies>
						<excludes>
							<exclude>com.codefollower.douyu:douyu-api</exclude>
						</excludes>
					</dependencySet>
				</dependencySets>
			</binaries>
		</moduleSet>

		<moduleSet>
			<includes>
				<include>com.codefollower.douyu:douyu-core</include>
			</includes>
			<binaries>
				<unpack>false</unpack>
				<outputDirectory>douyu-core</outputDirectory>
				<dependencySets>
					<dependencySet>
						<useTransitiveFiltering>true</useTransitiveFiltering>
						<useTransitiveDependencies>true</useTransitiveDependencies>
						<excludes>
							<exclude>com.codefollower.douyu:douyu-javac</exclude>
						</excludes>
					</dependencySet>
				</dependencySets>
			</binaries>
		</moduleSet>

		<moduleSet>
			<includes>
				<include>com.codefollower.douyu:douyu-mvc</include>
			</includes>
			<binaries>
				<unpack>false</unpack>
				<outputDirectory>douyu-mvc</outputDirectory>
				<dependencySets>
					<dependencySet>
						<useTransitiveFiltering>true</useTransitiveFiltering>
						<useTransitiveDependencies>true</useTransitiveDependencies>
						<excludes>
							<exclude>com.codefollower.douyu:douyu-core</exclude>
						</excludes>
					</dependencySet>
				</dependencySets>
			</binaries>
		</moduleSet>

		<moduleSet>
			<includes>
				<include>com.codefollower.douyu:douyu-plugins</include>
			</includes>
			<binaries>
				<unpack>false</unpack>
				<outputDirectory>douyu-plugins</outputDirectory>
				<dependencySets>
					<dependencySet>
						<useTransitiveFiltering>true</useTransitiveFiltering>
						<useTransitiveDependencies>true</useTransitiveDependencies>
						<excludes>
							<exclude>com.codefollower.douyu:douyu-api</exclude>
						</excludes>
					</dependencySet>
				</dependencySets>
			</binaries>
		</moduleSet>

	</moduleSets>
</assembly>


text:
package sun.awt.motif;

import java.awt.Component;
import java.awt.peer.FramePeer;
import sun.awt.EmbeddedFrame;
import java.awt.peer.ComponentPeer;
import sun.awt.*;
import java.awt.*;

public class MEmbeddedFrame extends EmbeddedFrame {

    /**
     * Widget id of the shell widget
     */
    long handle;

    public enum IDKind {
        WIDGET,
        WINDOW
    };

    public MEmbeddedFrame() {
    }

    /**
     * Backward-compatible implementation. This constructor takes widget which represents Frame's
     * shell and uses it as top-level to build hierarchy of top-level widgets upon. It assumes that
     * no XEmbed support is provided.
     * @param widget a valid Xt widget pointer.
     */
    public MEmbeddedFrame(long widget) {
        this(widget, IDKind.WIDGET, false);
    }

    /**
     * New constructor, gets X Window id and allows to specify whether XEmbed is supported by parent
     * X window. Creates hierarchy of top-level widgets under supplied window ID.
     * @param winid a valid X window
     * @param supportsXEmbed whether the host application supports XEMBED protocol
     */
    public MEmbeddedFrame(long winid, boolean supportsXEmbed) {
        this(winid, IDKind.WINDOW, supportsXEmbed);
    }

    /**
     * Creates embedded frame using ID as parent.
     * @param ID parent ID
     * @param supportsXEmbed whether the host application supports XEMBED protocol
     * @param kind if WIDGET, ID represents a valid Xt widget pointer; if WINDOW, ID is a valid X Window
     * ID
     */
    public MEmbeddedFrame(long ID, IDKind kind, boolean supportsXEmbed) {
        super(supportsXEmbed);
        if (kind == IDKind.WIDGET) {
            this.handle = ID;
        } else {
            this.handle = getWidget(ID);
        }
        MToolkit toolkit = (MToolkit)Toolkit.getDefaultToolkit();
        setPeer(toolkit.createEmbeddedFrame(this));
        /*
         * addNotify() creates a LightweightDispatcher that propagates
         * SunDropTargetEvents to subcomponents.
         * NOTE: show() doesn't call addNotify() for embedded frames.
         */
        addNotify();
        show();
    }

    public void synthesizeWindowActivation(boolean b) {
        MEmbeddedFramePeer peer = (MEmbeddedFramePeer)getPeer();
        if (peer != null) {
            if (peer.supportsXEmbed()) {
                if (peer.isXEmbedActive()) {
                    // If XEmbed is active no synthetic focus events are allowed - everything
                    // should go through XEmbed
                    if (b) {
                        peer.requestXEmbedFocus();
                    }
                }
            } else {
                peer.synthesizeFocusInOut(b);
            }
        }
    }

    public void show() {
        if (handle != 0) {
            mapWidget(handle);
        }
        super.show();
    }

    protected boolean traverseOut(boolean direction) {
        MEmbeddedFramePeer xefp = (MEmbeddedFramePeer) getPeer();
        xefp.traverseOut(direction);
        return true;
    }

    // Native methods to handle widget <-> X Windows mapping
    //
    static native long getWidget(long winid);
    static native int mapWidget(long widget);
    public void registerAccelerator(AWTKeyStroke stroke) {
        MEmbeddedFramePeer xefp = (MEmbeddedFramePeer) getPeer();
        if (xefp != null) {
            xefp.registerAccelerator(stroke);
        }
    }
    public void unregisterAccelerator(AWTKeyStroke stroke) {
        MEmbeddedFramePeer xefp = (MEmbeddedFramePeer) getPeer();
        if (xefp != null) {
            xefp.unregisterAccelerator(stroke);
        }
    }
}


text:
package main

import (
	// "fmt"
	"log"
	"os"
)

type Job struct {
	Command string
	*log.Logger
}

func NewJob(command string, logger *log.Logger) *Job {
	return &Job{command, logger}
}

func (job *Job) Start() {
	job.Println("Starting now....")
	job.Println("end")
}

func main() {
	mylog := log.New(os.Stdout, "", log.LstdFlags)
	j := NewJob("test", mylog)
	j.Start()
}


text:
// Copyright 2007, 2008, 2009 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package org.apache.tapestry5.internal.bindings;

import org.apache.tapestry5.Binding;
import org.apache.tapestry5.ComponentResources;
import org.apache.tapestry5.FieldTranslator;
import org.apache.tapestry5.internal.services.StringInterner;
import org.apache.tapestry5.ioc.Location;
import org.apache.tapestry5.services.BindingFactory;
import org.apache.tapestry5.services.FieldTranslatorSource;

/**
 * Interprets the binding expression as the name of a {@link org.apache.tapestry5.Translator} provided by the {@link
 * org.apache.tapestry5.services.TranslatorSource}.
 */
public class TranslateBindingFactory implements BindingFactory
{
    private final FieldTranslatorSource source;

    private final StringInterner interner;

    public TranslateBindingFactory(FieldTranslatorSource source, StringInterner interner)
    {
        this.source = source;
        this.interner = interner;
    }

    public Binding newBinding(String description, ComponentResources container,
                              final ComponentResources component, final String expression, Location location)
    {
        return new InvariantBinding(location, FieldTranslator.class, interner.intern(description + ": " + expression))
        {
            public Object get()
            {
                return source.createTranslator(component, expression);
            }
        };
    }
}


text:
package org.seasar.dao.impl;

import java.lang.reflect.Array;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;

import org.seasar.dao.DtoMetaData;
import org.seasar.dao.RowCreator;

/**
 * @author jflute
 */
public class DtoArrayMetaDataResultSetHandler extends
        DtoListMetaDataResultSetHandler {

    /**
     * @param dtoMetaData Dto meta data. (NotNull)
     * @param rowCreator Row creator. (NotNull)
     */
    public DtoArrayMetaDataResultSetHandler(DtoMetaData dtoMetaData,
            RowCreator rowCreator) {
        super(dtoMetaData, rowCreator);
    }

    /**
     * @see org.seasar.extension.jdbc.ResultSetHandler#handle(java.sql.ResultSet)
     */
    public Object handle(ResultSet rs) throws SQLException {
        List list = (List) super.handle(rs);
        return list.toArray((Object[]) Array.newInstance(getDtoMetaData()
                .getBeanClass(), list.size()));
    }
}


text:
<?php foreach ($categories->results as $category) : ?>
    <li class="post" id="post-<?php echo $category->id; ?>">
        <a <?php //echo Input::get('id', 0) == $category->id ? 'class="active"' : ''; ?>
            href="<?php echo url('admin/tags?id=' . $category->id); ?>">
            <?php echo $category->name; ?>
            <time><?php echo $category->slug(); ?></time>
            <?php echo $category->taxonomy; ?>

<?php endforeach; ?>


text:
package com.github.n_i_e.dirtreedb;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.sql.DriverManager;
import java.sql.SQLException;

public class MDBDirTreeDB extends CommonSQLDirTreeDB {
	MDBDirTreeDB(String filename) throws ClassNotFoundException, SQLException, IOException {
		Class.forName("net.ucanaccess.jdbc.UcanaccessDriver");

		File fileobj = new File(filename);
		if (! fileobj.exists()) {
			InputStream inf=getClass().getResourceAsStream("/com/github/n_i_e/dirtreedb/binary/initialMDB.mdb");
			if (inf == null) { throw new IOException("!! Cannot access to resource nullMDB.mdb"); }
			OutputStream outf = new FileOutputStream(filename);

			byte[] buff = new byte[4096];
			int len;
			while ((len = inf.read(buff, 0, buff.length)) >= 0) {
				outf.write(buff, 0, len);
			}
			inf.close();
			outf.close();
		}
		conn = DriverManager.getConnection("jdbc:ucanaccess://" + filename);
		conn.setAutoCommit(true);
	}

	@Override
	public void insert(DBPathEntry basedir, PathEntry newentry) throws SQLException, InterruptedException {
		if ((basedir != null && hasSurrogatePair(basedir.getPath())) || hasSurrogatePair(newentry.getPath())) {
			return; // don't do anything for Unicode surrogate pair.
		} else {
			super.insert(basedir, newentry);
		}
	}

	private static boolean hasSurrogatePair(String str) {
		int len = str.length();
		for (int i=0; i<len; i++) {
			if (Character.isSurrogate(str.charAt(i))) {
				return true;
			}
		}
		return false;
	}
}


text:
.omni-search {
  position: fixed;
  top: 10vh;
  left: 20vw;
  width: 60vw;
  display: block;
  padding: 0;
  color: #666;
  background-color: #fafafa;
  border: 1px solid #e5e5e5;
  box-shadow: 0 0 30px rgba(102, 96, 91, 0.7);
  box-sizing: border-box;
  z-index: 9999999;
  font-family: -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
  text-rendering: optimizeLegibility; }
  .omni-search ul::-webkit-scrollbar {
    display: none; }
  .omni-search input[type="text"], .omni-search input[type="text"]:focus, .omni-search input[type="text"]:active {
    display: block;
    border: 0;
    width: 100%;
    padding: 15px;
    -webkit-appearance: none;
    border: none;
    outline: none;
    background: #fff;
    font-size: 17px;
    box-sizing: border-box;
    margin: 0;
    color: #555459;
    box-shadow: none;
    height: 50px;
    position: relative;
    z-index: 10; }
  .omni-search ul.search-results-list {
    width: 100%;
    z-index: 9;
    top: 0;
    list-style-type: none;
    margin: 0;
    padding: 0;
    max-height: 80vh;
    overflow-y: scroll;
    overflow-x: hidden; }
  .omni-search ul.search-results-list li.selected-search-result, .omni-search ul.search-results-list li:hover {
    background-color: #DFDFDF; }
  .omni-search ul.search-results-list li.selected-search-result {
    color: #000; }
  .omni-search .search-results-list li {
    padding: 15px 20px;
    box-sizing: border-box;
    cursor: pointer;
    background-color: #EFEFEF;
    line-height: 24px;
    display: flex;
    align-items: center;
    margin: 0; }
  .omni-search .search-results-list li:not(:last-of-type) {
    border-bottom: 1px dashed #ccc; }
  .omni-search .search-results-list li span.title {
    display: inline-block;
    flex: 1 1 auto;
    font-size: 14px;
    margin-left: 10px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    vertical-align: middle; }
  .omni-search .search-results-list li .search-element-img-container {
    flex: 0 0 50px;
    text-align: center; }
  .omni-search .search-results-list li .search-element-img-container img {
    width: 24px;
    height: auto;
    vertical-align: bottom; }

@media all and (max-width: 600px) {
  .omni-search {
    left: 5vw;
    width: 90vw; } }
@media all and (min-width: 1500px) {
  .omni-search {
    left: calc(50vw - 500px);
    width: 1000px; } }

/*# sourceMappingURL=omni-search.css.map */


text:
package com.reflectoring.beginnersguide.controllers.dto;

public class BookRequest {
    private String title;
    private String author;
    private String publishedOn;
    private long currentlyAvailableNumber;

    private BookRequest(String title, String author,
                         String publishedOn,
                         long currentlyAvailableNumber) {
        this.title = title;
        this.author = author;
        this.publishedOn = publishedOn;
        this.currentlyAvailableNumber = currentlyAvailableNumber;
    }

    public String getTitle() {
        return title;
    }

    public String getAuthor() {
        return author;
    }

    public String getPublishedOn() {
        return publishedOn;
    }

    public long getCurrentlyAvailableNumber() {
        return currentlyAvailableNumber;
    }

    public static Builder builder(){
        return new Builder();
    }

    public static class Builder{
        private String title;
        private String author;
        private String publishedOn;
        private long currentlyAvailableNumber;

        public Builder title(String title) {
            this.title = title;
            return this;
        }

        public Builder author(String author) {
            this.author = author;
            return this;
        }

        public Builder publishedOn(String publishedOn) {
            this.publishedOn = publishedOn;
            return this;
        }

        public Builder currentlyAvailableNumber(
                long currentlyAvailableNumber) {
            this.currentlyAvailableNumber = currentlyAvailableNumber;
            return this;
        }

        public BookRequest build(){
            return new BookRequest(title, author, publishedOn,
                    currentlyAvailableNumber);
        }
    }
}


text:
<?php

namespace Minsal\GinecologiaBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * SrgProcedimientoRealizado
 *
 * @ORM\Table(name="srg_procedimiento_realizado", indexes={@ORM\Index(name="IDX_E0692D2C35600AAE", columns={"id_procedimiento_esterilizacion"}), @ORM\Index(name="IDX_E0692D2C56558889", columns={"id_esterilizacion"})})
 * @ORM\Entity
 */
class SrgProcedimientoRealizado
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="bigint", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="SEQUENCE")
     * @ORM\SequenceGenerator(sequenceName="srg_procedimiento_realizado_id_seq", allocationSize=1, initialValue=1)
     */
    private $id;

    /**
     * @var boolean
     *
     * @ORM\Column(name="column_5", type="boolean", nullable=true)
     */
    private $column5;

    /**
     * @var string
     *
     * @ORM\Column(name="column_6", type="decimal", precision=99, scale=0, nullable=true)
     */
    private $column6;

    /**
     * @var string
     *
     * @ORM\Column(name="column_7", type="string", length=200, nullable=true)
     */
    private $column7;

    /**
     * @var \SrgCtlProcedimientoEsteriliz
     *
     * @ORM\ManyToOne(targetEntity="SrgCtlProcedimientoEsteriliz")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="id_procedimiento_esterilizacion", referencedColumnName="id")
     * })
     */
    private $idProcedimientoEsterilizacion;

    /**
     * @var \SrgEsterilizacion
     *
     * @ORM\OneToOne(targetEntity="SrgEsterilizacion")
     *   @ORM\JoinColumn(name="id_esterilizacion", referencedColumnName="id")
     */
    private $idEsterilizacion;

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set column5
     *
     * @param boolean $column5
     * @return SrgProcedimientoRealizado
     */
    public function setColumn5($column5)
    {
        $this->column5 = $column5;

        return $this;
    }

    /**
     * Get column5
     *
     * @return boolean
     */
    public function getColumn5()
    {
        return $this->column5;
    }

    /**
     * Set column6
     *
     * @param string $column6
     * @return SrgProcedimientoRealizado
     */
    public function setColumn6($column6)
    {
        $this->column6 = $column6;

        return $this;
    }

    /**
     * Get column6
     *
     * @return string
     */
    public function getColumn6()
    {
        return $this->column6;
    }

    /**
     * Set column7
     *
     * @param string $column7
     * @return SrgProcedimientoRealizado
     */
    public function setColumn7($column7)
    {
        $this->column7 = $column7;

        return $this;
    }

    /**
     * Get column7
     *
     * @return string
     */
    public function getColumn7()
    {
        return $this->column7;
    }

    /**
     * Set idProcedimientoEsterilizacion
     *
     * @param \Minsal\GinecologiaBundle\Entity\SrgCtlProcedimientoEsteriliz $idProcedimientoEsterilizacion
     * @return SrgProcedimientoRealizado
     */
    public function setIdProcedimientoEsterilizacion(\Minsal\GinecologiaBundle\Entity\SrgCtlProcedimientoEsteriliz $idProcedimientoEsterilizacion = null)
    {
        $this->idProcedimientoEsterilizacion = $idProcedimientoEsterilizacion;

        return $this;
    }

    /**
     * Get idProcedimientoEsterilizacion
     *
     * @return \Minsal\GinecologiaBundle\Entity\SrgCtlProcedimientoEsteriliz
     */
    public function getIdProcedimientoEsterilizacion()
    {
        return $this->idProcedimientoEsterilizacion;
    }

    /**
     * Set idEsterilizacion
     *
     * @param \Minsal\GinecologiaBundle\Entity\SrgEsterilizacion $idEsterilizacion
     * @return SrgProcedimientoRealizado
     */
    public function setIdEsterilizacion(\Minsal\GinecologiaBundle\Entity\SrgEsterilizacion $idEsterilizacion = null)
    {
        $this->idEsterilizacion = $idEsterilizacion;

        return $this;
    }

    /**
     * Get idEsterilizacion
     *
     * @return \Minsal\GinecologiaBundle\Entity\SrgEsterilizacion
     */
    public function getIdEsterilizacion()
    {
        return $this->idEsterilizacion;
    }
}


text:
@interface TKColorRendition ()
@property BOOL excudedFromFilter;
@end

@implementation TKColorRendition

- (instancetype)initWithColorKey:(struct colorkey)key definition:(struct colordef)definition {
    if ((self = [self init])) {
        self.name              = @(key.name);
        self.color             = [NSColor colorWithColorDef:definition];
        self.excudedFromFilter = YES;
    }

    return self;
}

- (void)computePreviewImageIfNecessary {
    if (self._previewImage)
        return;

    __weak typeof(self) weakSelf = self;
    self._previewImage = [NSImage imageWithSize:NSMakeSize(1, 1) flipped:NO drawingHandler:^BOOL(NSRect dstRect) {
        [weakSelf.color setFill];
        NSRectFill(dstRect);

        return YES;
    }];
}

+ (NSDictionary *)undoProperties {
    static NSMutableDictionary *TKColorProperties = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        TKColorProperties = [NSMutableDictionary dictionary];
        [TKColorProperties addEntriesFromDictionary:@{
                                                      TKKey(color): @"Change Color"
                                                      }];
        [TKColorProperties addEntriesFromDictionary:[super undoProperties]];
    });

    return TKColorProperties;
}

- (void)removeFromStorage {
    [self.cuiAssetStorage removeAssetForKey:self.keyData];
    if ([self.cuiAssetStorage hasColorForName:self.name.UTF8String]) {
        struct colorkey key;
        key.reserved = 0;
        strncpy(key.name, self.name.UTF8String, MIN(127, self.name.length));
        key.name[127] = '\0';

        BOMTreeRef colorTree = TKIvar(self.cuiAssetStorage, BOMTreeRef, "_colordb");
        if (colorTree != NULL) {
            BOMTreeRemoveValue(colorTree, &key, sizeof(key));
        }
    }
}

- (void)commitToStorage {
    if (!self.isDirty) {
        NSLog(@"tried to commit clean rendition %@: %@", self, self.name);
        return;
    }

    struct rgbquad rgb;
    [self.color getRGBQuad:&rgb];
    [self.cuiAssetStorage setColor:rgb
                           forName:[self.name UTF8String]
                 excludeFromFilter:self.excudedFromFilter];
}

- (NSString *)renditionHash {
    return self.name;
}

@end


text:
html, body {
    background-color: #eee;
}
body {
    padding-top: 40px; /* 40px to make the container go all the way to the bottom of the topbar */
}
/*
.container > footer p {
    text-align: center;
}
*/
.container {
    width: 820px; /* downsize our container to make the content feel a bit tighter and more cohesive. NOTE: this removes two full columns from the grid, meaning you only go to 14 columns and not 16. */
}

/* The white background content wrapper */
.content {
    background-color: #fff;
    padding: 20px;
    margin: 0 -20px; /* negative indent the amount of the padding to maintain the grid system */
    -webkit-border-radius: 0 0 6px 6px;
       -moz-border-radius: 0 0 6px 6px;
            border-radius: 0 0 6px 6px;
    -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15);
       -moz-box-shadow: 0 1px 2px rgba(0,0,0,.15);
            box-shadow: 0 1px 2px rgba(0,0,0,.15);
    min-height: 10px;
}

/* Page header tweaks */
.page-header {
    background-color: #f5f5f5;
    padding: 20px 20px 10px;
    margin: -20px -20px 20px;
}

/* Styles you shouldn't keep as they are for displaying this base example only */
.content .span10,
.content .span4 {
/*     min-height: 500px; */
}

/* Give a quick and non-cross-browser friendly divider */
.content .span4 {
    padding-left: 9px;
    margin-left: 10px;
    border-left: 1px solid #eee;
}

.topbar .btn {
    border: 0;
}

.topbar p {
    color: #888;
}

#username {
/*     width: 200px; */
}

#main {
    position: relative;
    overflow: hidden;
}

#onError, #onChat {
    display: none;
}

#messages {
/*
    position: absolute;
    bottom: 60px;
*/
}

#talk {
/*
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    height: 40px
    width : 800px;
    height: 100px;
*/
}

.message {
    padding: 4px 0;
    border-bottom: 1px solid #eee;
    position: relative;
}

.message span {
    width: 70px;
    overflow: hidden;
    text-align: right;
    font-weight: bold;
    margin-right: 5px;
    display: inline-block;
    vertical-align: top;
    position: relative;
    top: -1px;
}

.message p {
    display: inline-block;
    margin: 0;
    width: 500px;
}

.message.me {
    background: #FFC;
}

.message.join, .message.quit {
    background: #D9E7FB;
}

#reversiBoard {

}

table#reversiBoard {
    width: 500px !important;
    border: 1px #E3E3E3 solid;
    border-collapse: collapse;
    border-spacing: 0;
}

table#reversiBoard td {
    padding: 5px;
    border: 1px #E3E3E3 solid;
    border-width: 1px 1px;
    text-align: center;
    width: 60px;
    height: 60px;
    background-color: #363;
}

table#reversiBoard td:hover {
    background-color: #744;
}

table#reversiBoard td.thinkOver {
    background-color: #966;
}

table#reversiBoard td.thinkOut {
    background-color: #363;
}

table#reversiBoard td.black {
    background-image: url(../images/black.png);
    background-position: center center;
    background-repeat: no-repeat;
}
table#reversiBoard td.white {
    background-image: url(../images/white.png);
    background-position: center center;
    background-repeat: no-repeat;
}


text:
package stroom.security.identity.db;

import javax.sql.DataSource;

public interface IdentityDbConnProvider extends DataSource {

}


text:
#ifndef Py_OSDEFS_H
#define Py_OSDEFS_H
#ifdef __cplusplus
extern "C" {
#endif

/* Operating system dependencies */

#ifdef macintosh
#define SEP ':'
#define MAXPATHLEN 256
/* Mod by Jack: newline is less likely to occur in filenames than space */
#define DELIM '\n'
#endif

/* Mod by chrish: QNX has WATCOM, but isn't DOS */
#if !defined(__QNX__)
#if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DJGPP__) || defined(PYOS_OS2)
#if defined(PYOS_OS2) && defined(PYCC_GCC)
#define MAXPATHLEN 260
#define SEP '/'
#define ALTSEP '\\'
#else
#define SEP '\\'
#define ALTSEP '/'
#define MAXPATHLEN 256
#endif
#define DELIM ';'
#endif
#endif

#ifdef RISCOS
#define SEP '.'
#define MAXPATHLEN 256
#define DELIM ','
#endif

/* Filename separator */
#ifndef SEP
#define SEP '/'
#endif

/* Max pathname length */
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
#endif

/* Search path entry delimiter */
#ifndef DELIM
#define DELIM ':'
#endif

#ifdef __cplusplus
}
#endif
#endif /* !Py_OSDEFS_H */


text:
enum tarError
{
	TAR_OK = 0,
	TAR_NAME_TOO_LONG,
	TAR_SYMLINK_TOO_LONG
};

extern enum tarError tarCreateHeader(char *h, const char *filename, const char *linktarget,
									 pgoff_t size, mode_t mode, uid_t uid, gid_t gid, time_t mtime);
extern uint64 read_tar_number(const char *s, int len);
extern void print_tar_number(char *s, int len, uint64 val);
extern int	tarChecksum(char *header);
extern uint64 read_tar_number(const char *s, int len);


text:
#ifndef _3W_SAS_H
#define _3W_SAS_H

/* AEN severity table */
static char *twl_aen_severity_table[] =
{
	"None", "ERROR", "WARNING", "INFO", "DEBUG", NULL
};

/* Liberator register offsets */
#define TWL_STATUS                         0x0  /* Status */
#define TWL_HIBDB                          0x20 /* Inbound doorbell */
#define TWL_HISTAT                         0x30 /* Host interrupt status */
#define TWL_HIMASK                         0x34 /* Host interrupt mask */
#define TWL_HOBDB			   0x9C /* Outbound doorbell */
#define TWL_HOBDBC                         0xA0 /* Outbound doorbell clear */
#define TWL_SCRPD3                         0xBC /* Scratchpad */
#define TWL_HIBQPL                         0xC0 /* Host inbound Q low */
#define TWL_HIBQPH                         0xC4 /* Host inbound Q high */
#define TWL_HOBQPL                         0xC8 /* Host outbound Q low */
#define TWL_HOBQPH                         0xCC /* Host outbound Q high */
#define TWL_HISTATUS_VALID_INTERRUPT	   0xC
#define TWL_HISTATUS_ATTENTION_INTERRUPT   0x4
#define TWL_HISTATUS_RESPONSE_INTERRUPT	   0x8
#define TWL_STATUS_OVERRUN_SUBMIT	   0x2000
#define TWL_ISSUE_SOFT_RESET		   0x100
#define TWL_CONTROLLER_READY		   0x2000
#define TWL_DOORBELL_CONTROLLER_ERROR	   0x200000
#define TWL_DOORBELL_ATTENTION_INTERRUPT   0x40000
#define TWL_PULL_MODE			   0x1

/* Command packet opcodes used by the driver */
#define TW_OP_INIT_CONNECTION 0x1
#define TW_OP_GET_PARAM	      0x12
#define TW_OP_SET_PARAM	      0x13
#define TW_OP_EXECUTE_SCSI    0x10

/* Asynchronous Event Notification (AEN) codes used by the driver */
#define TW_AEN_QUEUE_EMPTY       0x0000
#define TW_AEN_SOFT_RESET        0x0001
#define TW_AEN_SYNC_TIME_WITH_HOST 0x031
#define TW_AEN_SEVERITY_ERROR    0x1
#define TW_AEN_SEVERITY_DEBUG    0x4
#define TW_AEN_NOT_RETRIEVED 0x1

/* Command state defines */
#define TW_S_INITIAL   0x1  /* Initial state */
#define TW_S_STARTED   0x2  /* Id in use */
#define TW_S_POSTED    0x4  /* Posted to the controller */
#define TW_S_COMPLETED 0x8  /* Completed by isr */
#define TW_S_FINISHED  0x10 /* I/O completely done */

/* Compatibility defines */
#define TW_9750_ARCH_ID 10
#define TW_CURRENT_DRIVER_SRL 40
#define TW_CURRENT_DRIVER_BUILD 0
#define TW_CURRENT_DRIVER_BRANCH 0

/* Phase defines */
#define TW_PHASE_INITIAL 0
#define TW_PHASE_SGLIST  2

/* Misc defines */
#define TW_SECTOR_SIZE                        512
#define TW_MAX_UNITS			      32
#define TW_INIT_MESSAGE_CREDITS		      0x100
#define TW_INIT_COMMAND_PACKET_SIZE	      0x3
#define TW_INIT_COMMAND_PACKET_SIZE_EXTENDED  0x6
#define TW_EXTENDED_INIT_CONNECT	      0x2
#define TW_BASE_FW_SRL			      24
#define TW_BASE_FW_BRANCH		      0
#define TW_BASE_FW_BUILD		      1
#define TW_Q_LENGTH			      256
#define TW_Q_START			      0
#define TW_MAX_SLOT			      32
#define TW_MAX_RESET_TRIES		      2
#define TW_MAX_CMDS_PER_LUN		      254
#define TW_MAX_AEN_DRAIN		      255
#define TW_IN_RESET                           2
#define TW_USING_MSI			      3
#define TW_IN_ATTENTION_LOOP		      4
#define TW_MAX_SECTORS                        256
#define TW_MAX_CDB_LEN                        16
#define TW_IOCTL_CHRDEV_TIMEOUT               60 /* 60 seconds */
#define TW_IOCTL_CHRDEV_FREE                  -1
#define TW_COMMAND_OFFSET                     128 /* 128 bytes */
#define TW_VERSION_TABLE                      0x0402
#define TW_TIMEKEEP_TABLE		      0x040A
#define TW_INFORMATION_TABLE		      0x0403
#define TW_PARAM_FWVER			      3
#define TW_PARAM_FWVER_LENGTH		      16
#define TW_PARAM_BIOSVER		      4
#define TW_PARAM_BIOSVER_LENGTH		      16
#define TW_PARAM_MODEL			      8
#define TW_PARAM_MODEL_LENGTH		      16
#define TW_PARAM_PHY_SUMMARY_TABLE	      1
#define TW_PARAM_PHYCOUNT		      2
#define TW_PARAM_PHYCOUNT_LENGTH	      1
#define TW_IOCTL_FIRMWARE_PASS_THROUGH        0x108  // Used by smartmontools
#define TW_ALLOCATION_LENGTH		      128
#define TW_SENSE_DATA_LENGTH		      18
#define TW_ERROR_LOGICAL_UNIT_NOT_SUPPORTED   0x10a
#define TW_ERROR_INVALID_FIELD_IN_CDB	      0x10d
#define TW_ERROR_UNIT_OFFLINE                 0x128
#define TW_MESSAGE_SOURCE_CONTROLLER_ERROR    3
#define TW_MESSAGE_SOURCE_CONTROLLER_EVENT    4
#define TW_DRIVER 			      6
#ifndef PCI_DEVICE_ID_3WARE_9750
#define PCI_DEVICE_ID_3WARE_9750 0x1010
#endif

/* Bitmask macros to eliminate bitfields */

/* opcode: 5, reserved: 3 */
#define TW_OPRES_IN(x,y) ((x << 5) | (y & 0x1f))
#define TW_OP_OUT(x) (x & 0x1f)

/* opcode: 5, sgloffset: 3 */
#define TW_OPSGL_IN(x,y) ((x << 5) | (y & 0x1f))
#define TW_SGL_OUT(x) ((x >> 5) & 0x7)

/* severity: 3, reserved: 5 */
#define TW_SEV_OUT(x) (x & 0x7)

/* not_mfa: 1, reserved: 7, status: 8, request_id: 16 */
#define TW_RESID_OUT(x) ((x >> 16) & 0xffff)
#define TW_NOTMFA_OUT(x) (x & 0x1)

/* request_id: 12, lun: 4 */
#define TW_REQ_LUN_IN(lun, request_id) (((lun << 12) & 0xf000) | (request_id & 0xfff))
#define TW_LUN_OUT(lun) ((lun >> 12) & 0xf)

/* Register access macros */
#define TWL_STATUS_REG_ADDR(x) ((unsigned char __iomem *)x->base_addr + TWL_STATUS)
#define TWL_HOBQPL_REG_ADDR(x) ((unsigned char __iomem *)x->base_addr + TWL_HOBQPL)
#define TWL_HOBQPH_REG_ADDR(x) ((unsigned char __iomem *)x->base_addr + TWL_HOBQPH)
#define TWL_HOBDB_REG_ADDR(x) ((unsigned char __iomem *)x->base_addr + TWL_HOBDB)
#define TWL_HOBDBC_REG_ADDR(x) ((unsigned char __iomem *)x->base_addr + TWL_HOBDBC)
#define TWL_HIMASK_REG_ADDR(x) ((unsigned char __iomem *)x->base_addr + TWL_HIMASK)
#define TWL_HISTAT_REG_ADDR(x) ((unsigned char __iomem *)x->base_addr + TWL_HISTAT)
#define TWL_HIBQPH_REG_ADDR(x) ((unsigned char __iomem *)x->base_addr + TWL_HIBQPH)
#define TWL_HIBQPL_REG_ADDR(x) ((unsigned char __iomem *)x->base_addr + TWL_HIBQPL)
#define TWL_HIBDB_REG_ADDR(x) ((unsigned char __iomem *)x->base_addr + TWL_HIBDB)
#define TWL_SCRPD3_REG_ADDR(x) ((unsigned char __iomem *)x->base_addr + TWL_SCRPD3)
#define TWL_MASK_INTERRUPTS(x) (writel(~0, TWL_HIMASK_REG_ADDR(tw_dev)))
#define TWL_UNMASK_INTERRUPTS(x) (writel(~TWL_HISTATUS_VALID_INTERRUPT, TWL_HIMASK_REG_ADDR(tw_dev)))
#define TWL_CLEAR_DB_INTERRUPT(x) (writel(~0, TWL_HOBDBC_REG_ADDR(tw_dev)))
#define TWL_SOFT_RESET(x) (writel(TWL_ISSUE_SOFT_RESET, TWL_HIBDB_REG_ADDR(tw_dev)))

/* Macros */
#define TW_PRINTK(h,a,b,c) { \
if (h) \
printk(KERN_WARNING "3w-sas: scsi%d: ERROR: (0x%02X:0x%04X): %s.\n",h->host_no,a,b,c); \
else \
printk(KERN_WARNING "3w-sas: ERROR: (0x%02X:0x%04X): %s.\n",a,b,c); \
}
#define TW_MAX_LUNS 16
#define TW_COMMAND_SIZE (sizeof(dma_addr_t) > 4 ? 6 : 4)
#define TW_LIBERATOR_MAX_SGL_LENGTH (sizeof(dma_addr_t) > 4 ? 46 : 92)
#define TW_LIBERATOR_MAX_SGL_LENGTH_OLD (sizeof(dma_addr_t) > 4 ? 47 : 94)
#define TW_PADDING_LENGTH_LIBERATOR 136
#define TW_PADDING_LENGTH_LIBERATOR_OLD 132
#define TW_CPU_TO_SGL(x) (sizeof(dma_addr_t) > 4 ? cpu_to_le64(x) : cpu_to_le32(x))

#pragma pack(1)

/* SGL entry */
typedef struct TAG_TW_SG_Entry_ISO {
	dma_addr_t address;
	dma_addr_t length;
} TW_SG_Entry_ISO;

/* Old Command Packet with ISO SGL */
typedef struct TW_Command {
	unsigned char opcode__sgloffset;
	unsigned char size;
	unsigned char request_id;
	unsigned char unit__hostid;
	/* Second DWORD */
	unsigned char status;
	unsigned char flags;
	union {
		unsigned short block_count;
		unsigned short parameter_count;
	} byte6_offset;
	union {
		struct {
			u32 lba;
			TW_SG_Entry_ISO sgl[TW_LIBERATOR_MAX_SGL_LENGTH_OLD];
			unsigned char padding[TW_PADDING_LENGTH_LIBERATOR_OLD];
		} io;
		struct {
			TW_SG_Entry_ISO sgl[TW_LIBERATOR_MAX_SGL_LENGTH_OLD];
			u32 padding;
			unsigned char padding2[TW_PADDING_LENGTH_LIBERATOR_OLD];
		} param;
	} byte8_offset;
} TW_Command;

/* New Command Packet with ISO SGL */
typedef struct TAG_TW_Command_Apache {
	unsigned char opcode__reserved;
	unsigned char unit;
	unsigned short request_id__lunl;
	unsigned char status;
	unsigned char sgl_offset;
	unsigned short sgl_entries__lunh;
	unsigned char cdb[16];
	TW_SG_Entry_ISO sg_list[TW_LIBERATOR_MAX_SGL_LENGTH];
	unsigned char padding[TW_PADDING_LENGTH_LIBERATOR];
} TW_Command_Apache;

/* New command packet header */
typedef struct TAG_TW_Command_Apache_Header {
	unsigned char sense_data[TW_SENSE_DATA_LENGTH];
	struct {
		char reserved[4];
		unsigned short error;
		unsigned char padding;
		unsigned char severity__reserved;
	} status_block;
	unsigned char err_specific_desc[98];
	struct {
		unsigned char size_header;
		unsigned short request_id;
		unsigned char size_sense;
	} header_desc;
} TW_Command_Apache_Header;

/* This struct is a union of the 2 command packets */
typedef struct TAG_TW_Command_Full {
	TW_Command_Apache_Header header;
	union {
		TW_Command oldcommand;
		TW_Command_Apache newcommand;
	} command;
} TW_Command_Full;

/* Initconnection structure */
typedef struct TAG_TW_Initconnect {
	unsigned char opcode__reserved;
	unsigned char size;
	unsigned char request_id;
	unsigned char res2;
	unsigned char status;
	unsigned char flags;
	unsigned short message_credits;
	u32 features;
	unsigned short fw_srl;
	unsigned short fw_arch_id;
	unsigned short fw_branch;
	unsigned short fw_build;
	u32 result;
} TW_Initconnect;

/* Event info structure */
typedef struct TAG_TW_Event
{
	unsigned int sequence_id;
	unsigned int time_stamp_sec;
	unsigned short aen_code;
	unsigned char severity;
	unsigned char retrieved;
	unsigned char repeat_count;
	unsigned char parameter_len;
	unsigned char parameter_data[98];
} TW_Event;

typedef struct TAG_TW_Ioctl_Driver_Command {
	unsigned int control_code;
	unsigned int status;
	unsigned int unique_id;
	unsigned int sequence_id;
	unsigned int os_specific;
	unsigned int buffer_length;
} TW_Ioctl_Driver_Command;

typedef struct TAG_TW_Ioctl_Apache {
	TW_Ioctl_Driver_Command driver_command;
        char padding[488];
	TW_Command_Full firmware_command;
	char data_buffer[1];
} TW_Ioctl_Buf_Apache;

/* GetParam descriptor */
typedef struct {
	unsigned short	table_id;
	unsigned short	parameter_id;
	unsigned short	parameter_size_bytes;
	unsigned short  actual_parameter_size_bytes;
	unsigned char	data[1];
} TW_Param_Apache;

/* Compatibility information structure */
typedef struct TAG_TW_Compatibility_Info
{
	char driver_version[32];
	unsigned short working_srl;
	unsigned short working_branch;
	unsigned short working_build;
	unsigned short driver_srl_high;
	unsigned short driver_branch_high;
	unsigned short driver_build_high;
	unsigned short driver_srl_low;
	unsigned short driver_branch_low;
	unsigned short driver_build_low;
	unsigned short fw_on_ctlr_srl;
	unsigned short fw_on_ctlr_branch;
	unsigned short fw_on_ctlr_build;
} TW_Compatibility_Info;

#pragma pack()

typedef struct TAG_TW_Device_Extension {
	void                     __iomem *base_addr;
	unsigned long	       	*generic_buffer_virt[TW_Q_LENGTH];
	dma_addr_t	       	generic_buffer_phys[TW_Q_LENGTH];
	TW_Command_Full	       	*command_packet_virt[TW_Q_LENGTH];
	dma_addr_t		command_packet_phys[TW_Q_LENGTH];
	TW_Command_Apache_Header *sense_buffer_virt[TW_Q_LENGTH];
	dma_addr_t		sense_buffer_phys[TW_Q_LENGTH];
	struct pci_dev		*tw_pci_dev;
	struct scsi_cmnd	*srb[TW_Q_LENGTH];
	unsigned char		free_queue[TW_Q_LENGTH];
	unsigned char		free_head;
	unsigned char		free_tail;
	int     		state[TW_Q_LENGTH];
	unsigned int		posted_request_count;
	unsigned int		max_posted_request_count;
	unsigned int		max_sgl_entries;
	unsigned int		sgl_entries;
	unsigned int		num_resets;
	unsigned int		sector_count;
	unsigned int		max_sector_count;
	unsigned int		aen_count;
	struct Scsi_Host	*host;
	long			flags;
	TW_Event                *event_queue[TW_Q_LENGTH];
	unsigned char           error_index;
	unsigned int            error_sequence_id;
	int			chrdev_request_id;
	wait_queue_head_t	ioctl_wqueue;
	struct mutex		ioctl_lock;
	TW_Compatibility_Info	tw_compat_info;
	char			online;
} TW_Device_Extension;

#endif /* _3W_SAS_H */


text:
namespace OpenLiveWriter.CoreServices.Progress
{
    /// <summary>
    /// Interface used by progress-compatible methods to report their progress back to the host operation.
    /// </summary>
    public interface IProgressHost
    {
        /// <summary>
        /// Notifies the host that progess has been made.
        /// </summary>
        /// <param name="complete">a number indicating what fraction of the total expected progress has been made
        /// (note: this number should always be less than the total)</param>
        /// <param name="total">the total expected progress that the operation will perform.</param>
        /// <param name="message">a message describing the current progress</param>
        void UpdateProgress(int complete, int total, string message);

        /// <summary>
        /// Notifies the host that progess has been made.
        /// </summary>
        /// <param name="complete">a number indicating what fraction of the total expected progress has been made</param>
        /// <param name="total">the total expected progress that the operation will perform.</param>
        void UpdateProgress(int complete, int total);

        /// <summary>
        /// Notifies the host that progess has been made.
        /// </summary>
        /// <param name="message">a message describing the current progress</param>
        void UpdateProgress(string message);

        /// <summary>
        /// Gets the operation's cancel status.  IProgressOperations should query this property frequently to determine
        /// if this operation should be aborted.  If this property returns true, the IProgressOperation should abort as
        /// quickly as possible.
        /// </summary>
        bool CancelRequested { get; }

        double ProgressCompletionPercentage { get; }
    }

    /// <summary>
    /// Delegate signature implemented by methods that can be used as part of a progress operation.
    /// The IProgressHost object can be used to report/query progress information while the operation
    /// is executing.
    /// </summary>
    public delegate object ProgressOperation(IProgressHost progress);

    /// <summary>
    /// Delegate used for notifying controlling code that an individual progress operation
    /// has completed -- the return object from the ProgressOperation is passed as a parameter
    /// </summary>
    public delegate void ProgressOperationCompleted(object result);
}


text:
namespace Hazzik.Qif.Transactions.Fields
{
    /// <summary>
    /// The memorized transaction list transaction types.
    /// </summary>
    public static class MemorizedTransactionListTransactionTypes
    {
        /// <summary>
        /// Check transaction
        /// </summary>
        public const string Check = "C";

        /// <summary>
        /// Deposit transaction
        /// </summary>
        public const string Deposit = "D";

        /// <summary>
        /// Payment transaction
        /// </summary>
        public const string Payment = "P";

        /// <summary>
        /// Investment transaction
        /// </summary>
        public const string Investment = "I";

        /// <summary>
        /// Electronic payee transaction
        /// </summary>
        public const string ElectronicPayee = "E";
    }
}


text:
package com.example.utils;

import android.os.Debug;
import android.util.Log;

import com.example.app.BuildConfig;

/**
 * Logger Class
 *
 * @author Shuhei Iwamoto
 */
public class Logged {

    /**
     *
     * @param msg
     */
    public static final void v(String msg) {
        if (BuildConfig.DEBUG) {
            Log.d(getTAG(), getMetaInfo() + ":" + msg);
        }
    }

    /**
     *
     * @param msg
     */
    public static final void d(String msg) {
        if (BuildConfig.DEBUG) {
            Log.d(getTAG(), getMetaInfo() + ":" + msg);
        }
    }

    /**
     * log e
     *
     * @param msg
     * @param e - new Throwable
     */
    public static final void e(String msg, Throwable e) {
        if (BuildConfig.DEBUG) {
            Log.e(getTAG(), getMetaInfo() + ":" + msg, e);
            printThrowable(e);
            if (e.getCause() != null) {
                printThrowable(e.getCause());
            }
        }
    }

    /** log i */
    public static final void i(String msg) {
        if (BuildConfig.DEBUG) {
            Log.i(getTAG(), getMetaInfo() + ":" + msg);
        }
    }

    /** log w */
    public static final void w(String msg) {
        if (BuildConfig.DEBUG) {
            Log.w(getTAG(), getMetaInfo() + ":" + msg);
        }
    }

    /** log heap */
    public static final void heap() {
        if (BuildConfig.DEBUG) {
            String msg = "heap : Free=" + Long.toString(Debug.getNativeHeapFreeSize() / 1024) + "kb" +
                    ", Allocated=" + Long.toString(Debug.getNativeHeapAllocatedSize() / 1024) + "kb" +
                    ", Size=" + Long.toString(Debug.getNativeHeapSize() / 1024) + "kb";
            Log.v(getTAG(), getMetaInfo() + ":" + msg);
        }
    }

    /**
     * 例外のスタックトレースをログに出力する
     *
     * @param e
     */
    private static void printThrowable(Throwable e) {
        Log.e(getTAG(), e.getClass().getName() + ": " + e.getMessage());
        for (StackTraceElement element : e.getStackTrace()) {
            Log.e(getTAG(), "  at " + Logged.getMetaInfo(element));
        }
    }

    /**
     * ログ呼び出し元のメタ情報を取得する
     *
     * @return [className#methodName:line]
     */
    private static String getMetaInfo() {
        // スタックトレースから情報を取得 // 0: VM, 1: Thread, 2: LogUtil#getMetaInfo, 3:
        // LogUtil#d など, 4: 呼び出し元
        final StackTraceElement element = Thread.currentThread().getStackTrace()[4];
        return Logged.getMetaInfo(element);
    }

    /**
     * スタックトレースからクラス名、メソッド名、行数を取得する
     *
     * @return [className#methodName:line]
     */
    public static String getMetaInfo(StackTraceElement element) {
        // クラス名、メソッド名、行数を取得
        final String methodName = element.getMethodName();
        final int lineNumber = element.getLineNumber();
        // メタ情報
        final String metaInfo = "[---METHOD---#" + methodName + ":" + lineNumber + "]";
        return metaInfo;
    }

    public static String getTAG() {
        final StackTraceElement element = Thread.currentThread().getStackTrace()[4];
        final String fullClassName = element.getClassName();
        final String simpleClassName = fullClassName.substring(fullClassName.lastIndexOf(".") + 1);
        return simpleClassName;
    }
}


text:
const Lab = require('lab');
const Code = require('code');
const Proxyquire = require('proxyquire').noPreserveCache();

const Config = Proxyquire('../../config', {
  'dotenv': {
    config: () => {
      // set environment variables that should be in .env file
      [
        'GITHUB_CLIENT_SECRET',
        'GITHUB_CLIENT_ID',
        'GITHUB_CALLBACK',
        'BELL_COOKIE_PASS',
        'COOKIE_PASS',
        'BROWSERSCOPE',
        'MYSQL_USER',
        'MYSQL_PASSWORD',
        'MYSQL_DATABASE'
      ].map((k) => {
        process.env[k] = k;
      });
    }
  }
});

const lab = exports.lab = Lab.script();

lab.experiment('Config', function () {
  lab.test('it gets config data', function (done) {
    Code.expect(Config.get('/')).to.be.an.object();
    done();
  });

  lab.test('it gets config meta data', function (done) {
    Code.expect(Config.meta('/')).to.match(/jsPerf/i);
    done();
  });

  lab.experiment('defaults', () => {
    lab.test('it gets scheme', (done) => {
      Code.expect(Config.get('/scheme')).to.equal('http');
      done();
    });

    lab.test('it gets port', (done) => {
      Code.expect(Config.get('/port')).to.equal(3000);
      done();
    });

    lab.test('it gets domain', (done) => {
      Code.expect(Config.get('/domain')).to.equal('localhost');
      done();
    });

    lab.test('it gets mysql host', (done) => {
      Code.expect(Config.get('/mysql/host')).to.equal('localhost');
      done();
    });

    lab.test('it gets mysql port', (done) => {
      Code.expect(Config.get('/mysql/port')).to.equal(3306);
      done();
    });
  });

  lab.experiment('Cookies', function () {
    lab.test('it secures the bell cookie if the scheme is https', function (done) {
      Code.expect(Config.get('/auth/oauth/secure', {scheme: 'https'})).to.equal(true);
      done();
    });

    lab.test('it does not secure the bell cookie if the scheme is http', function (done) {
      Code.expect(Config.get('/auth/oauth/secure', {scheme: 'http'})).to.equal(false);
      done();
    });

    lab.test('it does not secure the general cookie if the scheme is http', function (done) {
      Code.expect(Config.get('/auth/session/secure', {scheme: 'http'})).to.equal(false);
      done();
    });

    lab.test('it secures the general cookie if the scheme is https', function (done) {
      Code.expect(Config.get('/auth/session/secure', {scheme: 'https'})).to.equal(true);
      done();
    });
  });

  lab.test('validates process.env', (done) => {
    Code.expect(function () {
      Proxyquire('../../config', {
        'joi': {
          validate: () => ({
            error: {
              details: [
                {
                  path: 'TESTING'
                }
              ]
            }
          })
        }
      });
    }).to.throw(Error);

    done();
  });
});


text:
define(["config",
        "app/app"], function(config, App) {
  App.User = Ember.Object.extend({
    id: null,
    username: null,
    createdAt: null,
    updatedAt: null,
    statistics: {},
    admins: [],
    type: null,

    deobjectizedRSS: function() {
      if (this.get("rss")) {
        return this.get("rss").map(function(e) {
          return e.url;
        });
      }
    }.property("rss.@each.url"),

    transformRSS: function() {
      var transformed = [];
      var isAlreadyTransformed = true;

      this.get("rss").forEach(function(url) {
        if (url.url) {
          isAlreadyTransformed = isAlreadyTransformed && true;
          transformed.push(url);
        } else {
          isAlreadyTransformed = false;
          transformed.push({url: url});
        }
      });

      if (!isAlreadyTransformed) {
        this.set("rss", transformed);
      }
    }.observes("rss")
  })

  App.User.reopenClass({
    resourceUrl: config.host + '/v1/users',

    find: function(userId) {
      var user = App.User.create()

      $.ajax({
        url: this.resourceUrl + '/' + userId,
        dataType: 'jsonp',
        success: function(response) {
          user.setProperties(response)
        }
      })

      return user
    },

    save: function(params, options) {
      $.ajax({
        url: this.resourceUrl,
        type: 'post',
        data: { params: params, '_method': 'patch' },
        context: this,
        success: function(response) {
          options && options.success(response)
        },
        error: options && options.error ? options.error : null
      })
      return this
    }
  })
});


text:
package com.huawei.esdk.fusionmanager.local.impl.autogen.net;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for CreateListenerResp complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="CreateListenerResp">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="faultString" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="listenerIDs" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="taskID" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CreateListenerResp", namespace = "http://response.model.elb.soap.business.net.north.galaxmanager.com/xsd", propOrder = {
    "faultString",
    "listenerIDs",
    "taskID"
})
public class CreateListenerResp {

    protected String faultString;
    protected List<String> listenerIDs;
    protected String taskID;

    /**
     * Gets the value of the faultString property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getFaultString() {
        return faultString;
    }

    /**
     * Sets the value of the faultString property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setFaultString(String value) {
        this.faultString = value;
    }

    /**
     * Gets the value of the listenerIDs property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the listenerIDs property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getListenerIDs().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link String }
     *
     *
     */
    public List<String> getListenerIDs() {
        if (listenerIDs == null) {
            listenerIDs = new ArrayList<String>();
        }
        return this.listenerIDs;
    }

    /**
     * Gets the value of the taskID property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getTaskID() {
        return taskID;
    }

    /**
     * Sets the value of the taskID property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setTaskID(String value) {
        this.taskID = value;
    }

}


text:
$(document).ready(function() {
  // Create the list of image divs with papers using galpy
    //https://d2g2jw00kypyq.cloudfront.net = https://www.galpy.org (but latter doesn't work); ?+new Date etc. to make sure file isn't cached
    $.getJSON("https://d2g2jw00kypyq.cloudfront.net/data/papers-using-galpy.json?"+new Date().getTime())
    .done(function(data) {
    // First update the number of papers using galpy listed on the page
    let paperSpan= document.getElementById("span-number-of-papers-using-galpy");
    paperSpan.innerHTML= (Math.floor((Object.keys(data).length-1)/50)*50).toFixed(0);
    // randomize array to create random starting point, https://stackoverflow.com/a/56448185/10195320
      function shuffle(obj){
        // new obj to return
        let newObj = {};
        // create keys array
        var keys = Object.keys(obj);
        // randomize keys array
        keys.sort(function(a,b){return Math.random()- 0.5;});
        // save in new array
        keys.forEach(function(k) {
          newObj[k] = obj[k];
        });
        return newObj;
      }
      $.each(shuffle(data),function(key,bibentry) {
        if ( key != "_template" && bibentry.hasOwnProperty("img")) {
	    $("
").attr("id",`${key}-div1`).addClass("responsive").appendTo("#papers-gallery");
	    $("
").attr("id",`${key}-div2`).addClass("gallery").appendTo(`#${key}-div1`);
	    $("").attr("id",`${key}-link`).attr("href",bibentry.url).attr("target","_blank")
		.attr("alt",`Figure from ${bibentry.title}, ${bibentry.author} (${bibentry.year}), ${bibentry.journal} ${bibentry.volume}, ${bibentry.pages}`)
		.attr("title",`Figure from ${bibentry.title}, ${bibentry.author} (${bibentry.year}), ${bibentry.journal} ${bibentry.volume}, ${bibentry.pages}`).appendTo(`#${key}-div2`);
	    $("
").attr("id",key).addClass("papers-gallery-item").appendTo(`#${key}-link`);
	    $("").attr("data-src","https://d2g2jw00kypyq.cloudfront.net/data/paper-figs/"+bibentry.img).attr("loading","lazy").addClass("lazyload").appendTo(`#${key}`);
	    $("
"+`<font size="-3"><i>${bibentry.title}</i>, ${bibentry.author} (${bibentry.year}), ${bibentry.journal} ${bibentry.volume}, ${bibentry.pages}</font>`+"
").addClass("desc").appendTo(`#${key}-div2`);
	}
	  });
      // Lazy loading of images...
      if ('loading' in HTMLImageElement.prototype) {
	  const images = document.querySelectorAll("img.lazyload");
	  images.forEach(img => {
		  img.src = img.dataset.src;
	      });
      } else {
	  // Dynamically import the LazySizes library
	  let script = document.createElement("script");
	  script.async = true;
	  script.src =
	      "https://cdnjs.cloudflare.com/ajax/libs/lazysizes/4.1.8/lazysizes.min.js";
	  document.body.appendChild(script);
      }
	})
      .fail(function(jqxhr, textStatus, error ) {
        console.log( "Failed to load JSON gallery file");
	// Add div with warning that the gallery failed to load
	$("
").attr("id","papers-warning").addClass("admonition warning").appendTo("#papers-gallery");
	$("
Warning
").addClass("admonition-title").appendTo("#papers-warning");
	$("
Failed to load papers gallery.
").appendTo("#papers-warning");
	// Make sure the warning spans the page
	$("#papers-gallery").css("width","100%");
      });
});


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
null

#### Original name
Peronospora cerastii-brachypeltali Savul. & Rayss

### Remarks
null


text:
package org.openxava.test.model;

import java.util.*;

import javax.persistence.*;

import org.openxava.annotations.*;
import org.openxava.model.*;

/**
 *
 * @author Laurent Wibaux
 */

@Entity
@Views({
	@View(members="name; employees {employees}"),
	@View(name="Simple", members="name")
})
public class Corporation extends Identifiable {

	@Required
	private String name;

	@OneToMany(mappedBy="corporation", cascade=CascadeType.ALL)
	private Collection<CorporationEmployee> employees;

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setEmployees(Collection<CorporationEmployee> employees) {
		this.employees = employees;
	}

	public Collection<CorporationEmployee> getEmployees() {
		return employees;
	}

}


text:
package org.codarama.diet.event.aop;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;

/**
 * Exposes resolution related joinpoints.
 *
 * @see {@link org.codarama.diet.dependency.resolver.DependencyResolver}
 */
@Aspect
public class ResolutionAspect {

    // the resolve method of the class stream resolver
    @Pointcut(("execution(* resolve(..)) && args(org.codarama.diet.model.ClassStream) && within(org.codarama.diet.dependency.resolver.impl.ClassStreamDependencyResolver)"))
    public void classStreamResolve() {};

    // the resolve method of the source resolver
    @Pointcut(("execution(* resolve(..)) && args(org.codarama.diet.model.SourceFile) && within(org.codarama.diet.dependency.resolver.impl.ManualParseSourceDependencyResolver)"))
    public void sourceResolve() {};
}


text:
package drds

//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

import (
	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)

// SubmitSwitchTask invokes the drds.SubmitSwitchTask API synchronously
func (client *Client) SubmitSwitchTask(request *SubmitSwitchTaskRequest) (response *SubmitSwitchTaskResponse, err error) {
	response = CreateSubmitSwitchTaskResponse()
	err = client.DoAction(request, response)
	return
}

// SubmitSwitchTaskWithChan invokes the drds.SubmitSwitchTask API asynchronously
func (client *Client) SubmitSwitchTaskWithChan(request *SubmitSwitchTaskRequest) (<-chan *SubmitSwitchTaskResponse, <-chan error) {
	responseChan := make(chan *SubmitSwitchTaskResponse, 1)
	errChan := make(chan error, 1)
	err := client.AddAsyncTask(func() {
		defer close(responseChan)
		defer close(errChan)
		response, err := client.SubmitSwitchTask(request)
		if err != nil {
			errChan <- err
		} else {
			responseChan <- response
		}
	})
	if err != nil {
		errChan <- err
		close(responseChan)
		close(errChan)
	}
	return responseChan, errChan
}

// SubmitSwitchTaskWithCallback invokes the drds.SubmitSwitchTask API asynchronously
func (client *Client) SubmitSwitchTaskWithCallback(request *SubmitSwitchTaskRequest, callback func(response *SubmitSwitchTaskResponse, err error)) <-chan int {
	result := make(chan int, 1)
	err := client.AddAsyncTask(func() {
		var response *SubmitSwitchTaskResponse
		var err error
		defer close(result)
		response, err = client.SubmitSwitchTask(request)
		callback(response, err)
		result <- 1
	})
	if err != nil {
		defer close(result)
		callback(nil, err)
		result <- 0
	}
	return result
}

// SubmitSwitchTaskRequest is the request struct for api SubmitSwitchTask
type SubmitSwitchTaskRequest struct {
	*requests.RpcRequest
	DrdsInstanceId string `position:"Query" name:"DrdsInstanceId"`
	ExpandType     string `position:"Query" name:"ExpandType"`
	JobId          string `position:"Query" name:"JobId"`
	DbName         string `position:"Query" name:"DbName"`
	ParentJobId    string `position:"Query" name:"ParentJobId"`
}

// SubmitSwitchTaskResponse is the response struct for api SubmitSwitchTask
type SubmitSwitchTaskResponse struct {
	*responses.BaseResponse
	RequestId string `json:"RequestId" xml:"RequestId"`
	Success   bool   `json:"Success" xml:"Success"`
}

// CreateSubmitSwitchTaskRequest creates a request to invoke SubmitSwitchTask API
func CreateSubmitSwitchTaskRequest() (request *SubmitSwitchTaskRequest) {
	request = &SubmitSwitchTaskRequest{
		RpcRequest: &requests.RpcRequest{},
	}
	request.InitWithApiInfo("Drds", "2019-01-23", "SubmitSwitchTask", "drds", "openAPI")
	request.Method = requests.POST
	return
}

// CreateSubmitSwitchTaskResponse creates a response to parse from SubmitSwitchTask response
func CreateSubmitSwitchTaskResponse() (response *SubmitSwitchTaskResponse) {
	response = &SubmitSwitchTaskResponse{
		BaseResponse: &responses.BaseResponse{},
	}
	return
}