title: Got ArrayIndexOutOfBoundsException
body: <p>I am getting time, value, weights from database and related methods are available in ExperimenalImpl. The values are displayed in a table. when we select particular row, the related getXxx()method will call. But some rows are getting data properly. only one row given this exception.</p>
  
  <pre><code>Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException
              at java.lang.System.arraycopy(Native Method)
              at com.integrativebioinformatics.processdb.pdbnt.IBExperimentalDataImpl.getWeights(IBExperimentalDataImpl.java:103)
              at com.insilicalabs.processdb.ui.controllers.ExperimentalDataController.showExperiment(ExperimentalDataController.java:197)
              at com.insilicalabs.processdb.ui.controllers.ExperimentalDataController.showExperimentAtIndex(ExperimentalDataController.java:184)   
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>    public void setWeights(double[] experimentWeigths) {
              if (experimentWeigths == null) throw new IllegalArgumentException("cannot take a null argument");
              this.experimentWeigths = new double[experimentWeigths.length];
              System.arraycopy(experimentWeigths, 0, this.experimentWeigths, 0, experimentWeigths.length);
              for(int i=0;i&lt;this.experimentWeigths.length;i++){
                  System.out.println("Weights : "+ experimentWeigths[i]);
              }
          }
  
  
  public double[] getWeights() {
          double[] newWeights = new double[this.experimentTimeValuePairs[0].length];
          if(this.experimentTimeValuePairs[0].length != 0){
              System.arraycopy(this.experimentWeigths, 0, newWeights, 0, this.experimentWeigths.length);//Here, the ArrayIndexOutOfBoundsException occured.
  
              for (int i = this.experimentWeigths.length; i &lt; this.experimentTimeValuePairs[0].length; ++i) {
                  newWeights[i] = (0.0D / 0.0D);
              }
          }   
  
          return newWeights;
      }
  
  
      public double[][] getTimeValuePairs() {
              double[][] newPairs = new double[2][this.experimentTimeValuePairs[0].length];
              System.arraycopy(this.experimentTimeValuePairs[0], 0, newPairs[0], 0, this.experimentTimeValuePairs[0].length);
              System.arraycopy(this.experimentTimeValuePairs[1], 0, newPairs[1], 0, this.experimentTimeValuePairs[1].length);
  
              return newPairs;
          }
  
  
  public double[][] getTimeValuePairs() {
          double[][] newPairs = new double[2][this.experimentTimeValuePairs[0].length];
          System.arraycopy(this.experimentTimeValuePairs[0], 0, newPairs[0], 0, this.experimentTimeValuePairs[0].length);
          System.arraycopy(this.experimentTimeValuePairs[1], 0, newPairs[1], 0, this.experimentTimeValuePairs[1].length);
          System.out.println("Called getTimeValuePairs() from IBExperimentalDataImpl : "+this.experimentTimeValuePairs);
          return newPairs;
      }
  </code></pre>