Input:
  private Map<String, Binding<?>> processCompleteModule(TypeElement rootModule) {
    Map<String, TypeElement> allModules = new LinkedHashMap<String, TypeElement>();
    collectIncludesRecursively(rootModule, allModules);
    Linker linker = new Linker(null, new CompileTimePlugin(processingEnv),
        new ReportingErrorHandler(processingEnv, rootModule.getQualifiedName().toString()));
    synchronized (linker) {
      Map<String, Binding<?>> baseBindings = new LinkedHashMap<String, Binding<?>>();
      Map<String, Binding<?>> overrideBindings = new LinkedHashMap<String, Binding<?>>();
      for (TypeElement module : allModules.values()) {
        Map<String, Object> annotation = CodeGen.getAnnotation(Module.class, module);
        boolean overrides = (Boolean) annotation.get("overrides");
        Map<String, Binding<?>> addTo = overrides ? overrideBindings : baseBindings;
        for (Object entryPoint : (Object[]) annotation.get("entryPoints")) {
          linker.requestBinding(GeneratorKeys.rawMembersKey((TypeMirror) entryPoint),
              module.getQualifiedName().toString(), false);
        }
        for (Element enclosed : module.getEnclosedElements()) {
          Provides provides = enclosed.getAnnotation(Provides.class);
          if (provides == null) {
            continue;
          }
          ExecutableElement providerMethod = (ExecutableElement) enclosed;
          String key = GeneratorKeys.get(providerMethod);
          ProviderMethodBinding binding = new ProviderMethodBinding(key, providerMethod);
          switch (provides.type()) {
            case UNIQUE:
              ProviderMethodBinding clobbered = (ProviderMethodBinding) addTo.put(key, binding);
              if (clobbered != null) {
                processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR,
                    "Duplicate bindings for " + key
                        + ": " + shortMethodName(clobbered.method)
                        + ", " + shortMethodName(binding.method),
                    binding.method);
              }
              break;
            case SET:
              String elementKey = GeneratorKeys.getElementKey(providerMethod);
              SetBinding.add(addTo, elementKey, binding);
              break;
            default:
              throw new AssertionError("Unknown @Provides type " + provides.type());
          }
        }
      }
      linker.installBindings(baseBindings);
      linker.installBindings(overrideBindings);
      return linker.linkAll();
    }
  }

Output:
  private Map<String, Binding<?>> processCompleteModule(TypeElement rootModule) {
    Map<String, TypeElement> allModules = new LinkedHashMap<String, TypeElement>();
    collectIncludesRecursively(rootModule, allModules);
    Linker linker = new Linker(null, new CompileTimePlugin(processingEnv),
        new ReportingErrorHandler(processingEnv, rootModule.getQualifiedName().toString()));
    synchronized (linker) {
      Map<String, Binding<?>> baseBindings = new LinkedHashMap<String, Binding<?>>();
      Map<String, Binding<?>> overrideBindings = new LinkedHashMap<String, Binding<?>>();
      for (TypeElement module : allModules.values()) {
        Map<String, Object> annotation = CodeGen.getAnnotation(Module.class, module);
        boolean overrides = (Boolean) annotation.get("overrides");
        Map<String, Binding<?>> addTo = overrides ? overrideBindings : baseBindings;
        for (Object entryPoint : (Object[]) annotation.get("entryPoints")) {
          linker.requestBinding(GeneratorKeys.rawMembersKey((TypeMirror) entryPoint),
              module.getQualifiedName().toString(), false);
        }
        for (Element enclosed : module.getEnclosedElements()) {
          Provides provides = enclosed.getAnnotation(Provides.class);
          if (provides == null) {
            continue;
          }
          ExecutableElement providerMethod = (ExecutableElement) enclosed;
          String key = GeneratorKeys.get(providerMethod);
          ProviderMethodBinding binding = new ProviderMethodBinding(key, providerMethod);
          switch (provides.type()) {
            case UNIQUE:
              ProviderMethodBinding clobbered = (ProviderMethodBinding) addTo.put(key, binding);
              if (clobbered != null) {
                String msg = "Duplicate bindings for " + key;
                if (overrides) {
                  msg += " in override module(s) - cannot override an override";
                }
                msg += ": " + shortMethodName(clobbered.method)
                    + ", " + shortMethodName(binding.method);
                processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, msg,
                    binding.method);
              }
              break;
            case SET:
              String elementKey = GeneratorKeys.getElementKey(providerMethod);
              SetBinding.add(addTo, elementKey, binding);
              break;
            default:
              throw new AssertionError("Unknown @Provides type " + provides.type());
          }
        }
      }
      linker.installBindings(baseBindings);
      linker.installBindings(overrideBindings);
      return linker.linkAll();
    }
  }


Input:
    public ClassPath getBootstrapLibraries() {
        synchronized (this) {
            ClassPath cp = (bootstrap == null ? null : bootstrap.get());
            if (cp != null)
                return cp;
            String pathSpec = getSystemProperties().get(SYSPROP_BOOT_CLASSPATH);
            if (installFolders.size() == 2) try {
                String fxRT = new File(installFolders.get(1).toURI()).getAbsolutePath();
                pathSpec = pathSpec + File.pathSeparator + fxRT;
                fxRT = Util.getExtensions(fxRT);
                if (fxRT != null) pathSpec = pathSpec + File.pathSeparator + fxRT;
            } catch (URISyntaxException e) {
                Exceptions.printStackTrace(e);
            }
            String extPathSpec = Util.getExtensions((String)getSystemProperties().get(SYSPROP_JAVA_EXT_PATH));
            if (extPathSpec != null) {
                pathSpec = pathSpec + File.pathSeparator + extPathSpec;
            }
            cp = Util.createClassPath (pathSpec);
            bootstrap = new WeakReference<ClassPath>(cp);
            return cp;
        }
    }

Output:
    public ClassPath getBootstrapLibraries() {
        synchronized (this) {
            ClassPath cp = (bootstrap == null ? null : bootstrap.get());
            if (cp != null)
                return cp;
            String pathSpec = getSystemProperties().get(SYSPROP_BOOT_CLASSPATH);
            if (installFolders.size() == 2) try {
                String fxRT = new File(installFolders.get(1).toURI()).getAbsolutePath();
                pathSpec = pathSpec + File.pathSeparator + fxRT;
                fxRT = Util.getExtensions(fxRT);
                if (fxRT != null) pathSpec = fxRT + File.pathSeparator + pathSpec;
            } catch (URISyntaxException e) {
                Exceptions.printStackTrace(e);
            }
            String extPathSpec = Util.getExtensions((String)getSystemProperties().get(SYSPROP_JAVA_EXT_PATH));
            if (extPathSpec != null) {
                pathSpec = pathSpec + File.pathSeparator + extPathSpec;
            }
            cp = Util.createClassPath (pathSpec);
            bootstrap = new WeakReference<ClassPath>(cp);
            return cp;
        }
    }


Input:
	private void tenBoundaryMove (int xStart, int yStart, int xEnd, int yEnd,
			double deltaX, double deltaY, Particle2D p) {
		double x = p.pd.x - xStart * g.cellWidth;
		double y = p.pd.y - yStart * g.cellHeight;
		if (xEnd == (xStart+1)) {
			if (yEnd == (yStart+1)) {
				double deltaX1 = (g.cellWidth / 2) - x;
				if(((deltaY / deltaX) * deltaX1 + y) < (g.cellHeight / 2)) {
					double deltaY1 = (deltaY / deltaX) * deltaX1;
					fourBoundaryMove(xStart, yStart, x, y, deltaX1, deltaY1, p);
					double deltaY2 = (g.cellHeight / 2) - y - deltaY1;
					double deltaX2 = (deltaX1 / deltaY1) * deltaY2;
					y += deltaY1;
					fourBoundaryMove(xStart+1, yStart, -(g.cellWidth / 2), y, deltaX2, deltaY2, p);
					deltaX -= (deltaX1 + deltaX2);
					deltaY -= (deltaY1 + deltaY1);
					x = deltaX2 - (g.cellWidth / 2);
					fourBoundaryMove(xEnd, yEnd, x, -(g.cellHeight / 2), deltaX, deltaY, p);
					if (Debug.asserts) {
						assert deltaX1 >= 0: deltaX1;
						assert deltaY1 >= 0: deltaY1;
						assert y >= 0 && y <= (g.cellHeight / 2);
						assert deltaX2 >= 0: deltaX2;
						assert deltaY2 >= 0: deltaY2;
						assert deltaX >= 0: deltaX;
						assert deltaY >=0: deltaY;
						assert x <= 0 && x >= -(g.cellWidth / 2);
					}
				}
				else {
					double deltaY1 = (g.cellHeight / 2) - y;
					deltaX1 = (deltaX / deltaY) * deltaY1;
					fourBoundaryMove(xStart, yStart, x, y, deltaX1, deltaY1, p);
					double deltaX2 = (g.cellWidth / 2) - x - deltaX1;
					double deltaY2 = (deltaY1 / deltaX1) * deltaX2;
					x += deltaX1;
					fourBoundaryMove(xStart, yStart+1, x, -(g.cellHeight / 2), deltaX2, deltaY2, p);
					deltaX -= (deltaX1 + deltaX2);
					deltaY -= (deltaY1 + deltaY1);
					y = deltaY2 - (g.cellHeight / 2);
					fourBoundaryMove(xEnd, yEnd, -(g.cellWidth / 2), y, deltaX, deltaY, p);
					if (Debug.asserts) {
						assert deltaX1 >= 0: deltaX1;
						assert deltaY1 >= 0: deltaY1;
						assert x >= 0 && x <= (g.cellWidth / 2);
						assert deltaX2 >= 0: deltaX2;
						assert deltaY2 >= 0: deltaY2;
						assert deltaX >=0: deltaX;
						assert deltaY >=0: deltaY;
						assert y <= 0 && y >= -(g.cellHeight / 2);
					}
				}
			}
			else {
				double deltaY1 = -((g.cellHeight / 2) + y);
				if(((deltaX / deltaY) * deltaY1 + x) < (g.cellWidth / 2)) {
					double deltaX1 = (deltaX / deltaY) * deltaY1;
					fourBoundaryMove(xStart, yStart, x, y, deltaX1, deltaY1, p);
					double deltaX2 = (g.cellWidth / 2) - x - deltaX1;
					double deltaY2 = (deltaY / deltaX) * deltaX2;
					x += deltaX1;
					fourBoundaryMove(xStart, yStart-1, x, (g.cellHeight / 2), deltaX2, deltaY2, p);
					deltaX -= (deltaX1 + deltaX2);
					deltaY -= (deltaY1 + deltaY1);
					y = -deltaY2 - (g.cellHeight / 2);
					fourBoundaryMove(xEnd, yEnd, -(g.cellWidth / 2), y, deltaX, deltaY, p);
					if (Debug.asserts) {
						assert deltaY1 <= 0: deltaY1;
						assert x >= 0 && x <= (g.cellWidth / 2);
						assert deltaX1 >= 0: deltaX1;
						assert deltaX2 >= 0: deltaX2;
						assert deltaY2 <= 0: deltaY2;
						assert deltaX >= 0: deltaX;
						assert deltaY <=0: deltaY;
						assert y >= 0 && y <= (g.cellHeight / 2);
					}
				}
				else {
					double deltaX1 = (g.cellWidth /2) - x;
					deltaY1 = (deltaY / deltaX) * deltaX1;
					fourBoundaryMove(xStart, yStart, x, y, deltaX1, deltaY1, p);
					double deltaY2 = -((g.cellHeight / 2) + y + deltaY1);
					double deltaX2 = (deltaX1 / deltaY1) * deltaY2;
					y += deltaY1;
					fourBoundaryMove(xStart+1, yStart, -(g.cellWidth / 2), y, deltaX2, deltaY2, p);
					deltaX -= (deltaX1 + deltaX2);
					deltaY -= (deltaY1 + deltaY1);
					x = deltaX2 - (g.cellWidth / 2);
					fourBoundaryMove(xEnd, yEnd, x, (g.cellHeight / 2), deltaX, deltaY, p);
					if (Debug.asserts) {
						assert deltaX1 >= 0: deltaX1;
						assert deltaY1 <= 0: deltaY1;
						assert y <= 0 && y >= -(g.cellHeight /2);
						assert deltaX2 >= 0: deltaX2;
						assert deltaY2 <= 0: deltaY2;
						assert deltaX >= 0: deltaX;
						assert deltaY <=0: deltaY;
						assert x <= 0 && x >= -(g.cellWidth / 2);
					}
				}
			}
		}
		else {
			if (yEnd == (yStart+1)) {
				double deltaX1 = -((g.cellWidth / 2) + x);
				if(((deltaY / deltaX) * deltaX1 + y) < (g.cellHeight/ 2)) {
					double deltaY1 = (deltaY / deltaX) * deltaX1;
					fourBoundaryMove(xStart, yStart, x, y, deltaX1, deltaY1, p);
					double deltaY2 = (g.cellHeight / 2) - y - deltaY1;
					double deltaX2 = (deltaX1 / deltaY1) * deltaY2;
					y += deltaY1;
					fourBoundaryMove(xStart-1, yStart, (g.cellWidth / 2), y, deltaX2, deltaY2, p);
					deltaX -= (deltaX1 + deltaX2);
					deltaY -= (deltaY1 + deltaY1);
					x = (g.cellWidth / 2) + deltaX2;
					fourBoundaryMove(xEnd, yEnd, x, -(g.cellHeight / 2), deltaX, deltaY, p);
					if (Debug.asserts) {
						assert deltaX1 <= 0: deltaX1;
						assert deltaY1 >= 0: deltaY1;
						assert y >= 0 && y <= (g.cellHeight / 2);
						assert deltaX2 <= 0: deltaX2;
						assert deltaY2 >= 0: deltaY2;
						assert deltaX <= 0: deltaX;
						assert deltaY >=0: deltaY;
						assert x >= 0 && x <= (g.cellWidth / 2);
					}
				}
				else {
					double deltaY1 = (g.cellHeight / 2) - y;
					deltaX1 = (deltaX / deltaY) * deltaY1;
					fourBoundaryMove(xStart, yStart, x, y, deltaX1, deltaY1, p);
					double deltaX2 = (g.cellWidth / 2) - x - deltaX1;
					double deltaY2 = (deltaY1 / deltaX1) * deltaX2;
					x += deltaX1;
					fourBoundaryMove(xStart, yStart+1, x, -(g.cellHeight / 2), deltaX2, deltaY2, p);
					deltaX -= (deltaX1 + deltaX2);
					deltaY -= (deltaY1 + deltaY1);
					y = deltaY2 - (g.cellHeight / 2);
					fourBoundaryMove(xEnd, yEnd, -(g.cellWidth / 2), y, deltaX, deltaY,p);
					if (Debug.asserts) {
						assert deltaX1 <= 0: deltaX1;
						assert deltaY1 >= 0: deltaY1;
						assert x <= 0 && x >= -(g.cellWidth / 2);
						assert deltaX2 <= 0: deltaX2;
						assert deltaY2 >= 0: deltaY2;
						assert deltaX <=0: deltaX;
						assert deltaY >=0: deltaY;
						assert y <= 0 && y >= -(g.cellHeight / 2);
					}
				}
			}
			else {
				double deltaY1 = -((g.cellHeight / 2) + y);
				if((-(deltaX / deltaY) * deltaY1 - x) < (g.cellWidth/ 2)) {
					double deltaX1 = (deltaX / deltaY) * deltaY1;
					fourBoundaryMove(xStart, yStart, x, y, deltaX1, deltaY1,p);
					double deltaX2 = (g.cellWidth / 2) + x + deltaX1;
					double deltaY2 = (deltaY / deltaX) * deltaX2;
					x += deltaX1;
					fourBoundaryMove(xStart, yStart-1, x, (g.cellHeight / 2), deltaX2, deltaY2, p);
					deltaX -= (deltaX1 + deltaX2);
					deltaY -= (deltaY1 + deltaY1);
					y = (g.cellHeight / 2) + deltaY2;
					fourBoundaryMove(xEnd, yEnd, (g.cellWidth / 2), y, deltaX, deltaY, p);
					if (Debug.asserts) {
						assert deltaY1 <= 0: deltaY1;
						assert deltaX1 <= 0: deltaX1;
						assert x <= 0 && x >= -(g.cellWidth / 2);
						assert deltaX2 <= 0: deltaX2;
						assert deltaY2 <= 0: deltaY2;
						assert deltaX <= 0: deltaX;
						assert deltaY <= 0: deltaY;
						assert y >= 0 && y <= (g.cellHeight / 2);
					}
				}
				else {
					double deltaX1 = -((g.cellWidth /2) + x);
					deltaY1 = (deltaY / deltaX) * deltaX1;
					fourBoundaryMove(xStart, yStart, x, y, deltaX1, deltaY1, p);
					double deltaY2 = -((g.cellHeight / 2) + y + deltaY1);
					double deltaX2 = (deltaX1 / deltaY1) * deltaY2;
					y += deltaY1;
					fourBoundaryMove(xStart+1, yStart, (g.cellWidth / 2), y, deltaX2, deltaY2, p);
					deltaX -= (deltaX1 + deltaX2);
					deltaY -= (deltaY1 + deltaY1);
					x = (g.cellWidth / 2) + deltaX2;
					fourBoundaryMove(xEnd, yEnd, x, (g.cellHeight / 2), deltaX, deltaY, p);
					if (Debug.asserts) {
						assert deltaX1 <= 0: deltaX1;
						assert deltaY1 <= 0: deltaY1;
						assert y <= 0 && y >= -(g.cellHeight /2);
						assert deltaX2 <= 0: deltaX2;
						assert deltaY2 <= 0: deltaY2;
						assert deltaX <= 0: deltaX;
						assert deltaY <= 0: deltaY;
						assert x >= 0 && x <= (g.cellWidth / 2);
					}
				}
			}
		}
	}

Output:
	private void tenBoundaryMove (int xStart, int yStart, int xEnd, int yEnd,
			double deltaX, double deltaY, Particle2D p) {
		double x = p.pd.x - xStart * g.cellWidth;
		double y = p.pd.y - yStart * g.cellHeight;
		if (xEnd == (xStart+1)) {
			if (yEnd == (yStart+1)) {
				double deltaX1 = (g.cellWidth / 2) - x;
				if(((deltaY / deltaX) * deltaX1 + y) < (g.cellHeight / 2)) {
					double deltaY1 = (deltaY / deltaX) * deltaX1;
					fourBoundaryMove(xStart, yStart, x, y, deltaX1, deltaY1, p);
					double deltaY2 = (g.cellHeight / 2) - y - deltaY1;
					double deltaX2 = (deltaX1 / deltaY1) * deltaY2;
					y += deltaY1;
					fourBoundaryMove(xStart+1, yStart, -(g.cellWidth / 2), y, deltaX2, deltaY2, p);
					deltaX -= (deltaX1 + deltaX2);
					deltaY -= (deltaY1 + deltaY2);
					x = deltaX2 - (g.cellWidth / 2);
					fourBoundaryMove(xEnd, yEnd, x, -(g.cellHeight / 2), deltaX, deltaY, p);
					if (Debug.asserts) {
						assert deltaX1 >= 0: deltaX1;
						assert deltaY1 >= 0: deltaY1;
						assert y >= 0 && y <= (g.cellHeight / 2);
						assert deltaX2 >= 0: deltaX2;
						assert deltaY2 >= 0: deltaY2;
						assert deltaX >= 0: deltaX;
						assert deltaY >=0: deltaY;
						assert x <= 0 && x >= -(g.cellWidth / 2);
					}
				}
				else {
					double deltaY1 = (g.cellHeight / 2) - y;
					deltaX1 = (deltaX / deltaY) * deltaY1;
					fourBoundaryMove(xStart, yStart, x, y, deltaX1, deltaY1, p);
					double deltaX2 = (g.cellWidth / 2) - x - deltaX1;
					double deltaY2 = (deltaY1 / deltaX1) * deltaX2;
					x += deltaX1;
					fourBoundaryMove(xStart, yStart+1, x, -(g.cellHeight / 2), deltaX2, deltaY2, p);
					deltaX -= (deltaX1 + deltaX2);
					deltaY -= (deltaY1 + deltaY2);
					y = deltaY2 - (g.cellHeight / 2);
					fourBoundaryMove(xEnd, yEnd, -(g.cellWidth / 2), y, deltaX, deltaY, p);
					if (Debug.asserts) {
						assert deltaX1 >= 0: deltaX1;
						assert deltaY1 >= 0: deltaY1;
						assert x >= 0 && x <= (g.cellWidth / 2);
						assert deltaX2 >= 0: deltaX2;
						assert deltaY2 >= 0: deltaY2;
						assert deltaX >=0: deltaX;
						assert deltaY >=0: deltaY;
						assert y <= 0 && y >= -(g.cellHeight / 2);
					}
				}
			}
			else {
				double deltaY1 = -((g.cellHeight / 2) + y);
				if(((deltaX / deltaY) * deltaY1 + x) < (g.cellWidth / 2)) {
					double deltaX1 = (deltaX / deltaY) * deltaY1;
					fourBoundaryMove(xStart, yStart, x, y, deltaX1, deltaY1, p);
					double deltaX2 = (g.cellWidth / 2) - x - deltaX1;
					double deltaY2 = (deltaY / deltaX) * deltaX2;
					x += deltaX1;
					fourBoundaryMove(xStart, yStart-1, x, (g.cellHeight / 2), deltaX2, deltaY2, p);
					deltaX -= (deltaX1 + deltaX2);
					deltaY -= (deltaY1 + deltaY2);
					y = -deltaY2 - (g.cellHeight / 2);
					fourBoundaryMove(xEnd, yEnd, -(g.cellWidth / 2), y, deltaX, deltaY, p);
					if (Debug.asserts) {
						assert deltaY1 <= 0: deltaY1;
						assert x >= 0 && x <= (g.cellWidth / 2);
						assert deltaX1 >= 0: deltaX1;
						assert deltaX2 >= 0: deltaX2;
						assert deltaY2 <= 0: deltaY2;
						assert deltaX >= 0: deltaX;
						assert deltaY <=0: deltaY;
						assert y >= 0 && y <= (g.cellHeight / 2);
					}
				}
				else {
					double deltaX1 = (g.cellWidth /2) - x;
					deltaY1 = (deltaY / deltaX) * deltaX1;
					fourBoundaryMove(xStart, yStart, x, y, deltaX1, deltaY1, p);
					double deltaY2 = -((g.cellHeight / 2) + y + deltaY1);
					double deltaX2 = (deltaX1 / deltaY1) * deltaY2;
					y += deltaY1;
					fourBoundaryMove(xStart+1, yStart, -(g.cellWidth / 2), y, deltaX2, deltaY2, p);
					deltaX -= (deltaX1 + deltaX2);
					deltaY -= (deltaY1 + deltaY2);
					x = deltaX2 - (g.cellWidth / 2);
					fourBoundaryMove(xEnd, yEnd, x, (g.cellHeight / 2), deltaX, deltaY, p);
					if (Debug.asserts) {
						assert deltaX1 >= 0: deltaX1;
						assert deltaY1 <= 0: deltaY1;
						assert y <= 0 && y >= -(g.cellHeight /2);
						assert deltaX2 >= 0: deltaX2;
						assert deltaY2 <= 0: deltaY2;
						assert deltaX >= 0: deltaX;
						assert deltaY <=0: deltaY;
						assert x <= 0 && x >= -(g.cellWidth / 2);
					}
				}
			}
		}
		else {
			if (yEnd == (yStart+1)) {
				double deltaX1 = -((g.cellWidth / 2) + x);
				if(((deltaY / deltaX) * deltaX1 + y) < (g.cellHeight/ 2)) {
					double deltaY1 = (deltaY / deltaX) * deltaX1;
					fourBoundaryMove(xStart, yStart, x, y, deltaX1, deltaY1, p);
					double deltaY2 = (g.cellHeight / 2) - y - deltaY1;
					double deltaX2 = (deltaX1 / deltaY1) * deltaY2;
					y += deltaY1;
					fourBoundaryMove(xStart-1, yStart, (g.cellWidth / 2), y, deltaX2, deltaY2, p);
					deltaX -= (deltaX1 + deltaX2);
					deltaY -= (deltaY1 + deltaY2);
					x = (g.cellWidth / 2) + deltaX2;
					fourBoundaryMove(xEnd, yEnd, x, -(g.cellHeight / 2), deltaX, deltaY, p);
					if (Debug.asserts) {
						assert deltaX1 <= 0: deltaX1;
						assert deltaY1 >= 0: deltaY1;
						assert y >= 0 && y <= (g.cellHeight / 2);
						assert deltaX2 <= 0: deltaX2;
						assert deltaY2 >= 0: deltaY2;
						assert deltaX <= 0: deltaX;
						assert deltaY >=0: deltaY;
						assert x >= 0 && x <= (g.cellWidth / 2);
					}
				}
				else {
					double deltaY1 = (g.cellHeight / 2) - y;
					deltaX1 = (deltaX / deltaY) * deltaY1;
					fourBoundaryMove(xStart, yStart, x, y, deltaX1, deltaY1, p);
					double deltaX2 = (g.cellWidth / 2) - x - deltaX1;
					double deltaY2 = (deltaY1 / deltaX1) * deltaX2;
					x += deltaX1;
					fourBoundaryMove(xStart, yStart+1, x, -(g.cellHeight / 2), deltaX2, deltaY2, p);
					deltaX -= (deltaX1 + deltaX2);
					deltaY -= (deltaY1 + deltaY2);
					y = deltaY2 - (g.cellHeight / 2);
					fourBoundaryMove(xEnd, yEnd, -(g.cellWidth / 2), y, deltaX, deltaY,p);
					if (Debug.asserts) {
						assert deltaX1 <= 0: deltaX1;
						assert deltaY1 >= 0: deltaY1;
						assert x <= 0 && x >= -(g.cellWidth / 2);
						assert deltaX2 <= 0: deltaX2;
						assert deltaY2 >= 0: deltaY2;
						assert deltaX <=0: deltaX;
						assert deltaY >=0: deltaY;
						assert y <= 0 && y >= -(g.cellHeight / 2);
					}
				}
			}
			else {
				double deltaY1 = -((g.cellHeight / 2) + y);
				if((-(deltaX / deltaY) * deltaY1 - x) < (g.cellWidth/ 2)) {
					double deltaX1 = (deltaX / deltaY) * deltaY1;
					fourBoundaryMove(xStart, yStart, x, y, deltaX1, deltaY1,p);
					double deltaX2 = (g.cellWidth / 2) + x + deltaX1;
					double deltaY2 = (deltaY / deltaX) * deltaX2;
					x += deltaX1;
					fourBoundaryMove(xStart, yStart-1, x, (g.cellHeight / 2), deltaX2, deltaY2, p);
					deltaX -= (deltaX1 + deltaX2);
					deltaY -= (deltaY1 + deltaY2);
					y = (g.cellHeight / 2) + deltaY2;
					fourBoundaryMove(xEnd, yEnd, (g.cellWidth / 2), y, deltaX, deltaY, p);
					if (Debug.asserts) {
						assert deltaY1 <= 0: deltaY1;
						assert deltaX1 <= 0: deltaX1;
						assert x <= 0 && x >= -(g.cellWidth / 2);
						assert deltaX2 <= 0: deltaX2;
						assert deltaY2 <= 0: deltaY2;
						assert deltaX <= 0: deltaX;
						assert deltaY <= 0: deltaY;
						assert y >= 0 && y <= (g.cellHeight / 2);
					}
				}
				else {
					double deltaX1 = -((g.cellWidth /2) + x);
					deltaY1 = (deltaY / deltaX) * deltaX1;
					fourBoundaryMove(xStart, yStart, x, y, deltaX1, deltaY1, p);
					double deltaY2 = -((g.cellHeight / 2) + y + deltaY1);
					double deltaX2 = (deltaX1 / deltaY1) * deltaY2;
					y += deltaY1;
					fourBoundaryMove(xStart+1, yStart, (g.cellWidth / 2), y, deltaX2, deltaY2, p);
					deltaX -= (deltaX1 + deltaX2);
					deltaY -= (deltaY1 + deltaY2);
					x = (g.cellWidth / 2) + deltaX2;
					fourBoundaryMove(xEnd, yEnd, x, (g.cellHeight / 2), deltaX, deltaY, p);
					if (Debug.asserts) {
						assert deltaX1 <= 0: deltaX1;
						assert deltaY1 <= 0: deltaY1;
						assert y <= 0 && y >= -(g.cellHeight /2);
						assert deltaX2 <= 0: deltaX2;
						assert deltaY2 <= 0: deltaY2;
						assert deltaX <= 0: deltaX;
						assert deltaY <= 0: deltaY;
						assert x >= 0 && x <= (g.cellWidth / 2);
					}
				}
			}
		}
	}


Input:
	public void setGoal(GameScene currentScene) {
		float goalScaled = 65 * goalHeight;
		float lineLength = 480;
		float linePoxX = 400 - (lineLength/2);
		float linePosY = 480 - currentScene.mPlatform.rectangle.getHeightScaled() - goalScaled;
		Line goalLine = new Line(linePoxX, linePosY, linePoxX+lineLength, linePosY, 3, currentScene.getVBOM());
		goalLine.setColor(Color.WHITE);
		currentScene.getContainer().attachChild(goalLine);
		Text goalText = new Text(0, 0, ResourceManager.mGoalFont, "Goal", currentScene.getVBOM());
		float textPosX = goalLine.getX2() - goalText.getWidth();
		float textPosY = goalLine.getY2() - goalText.getHeight();
		goalText.setPosition(textPosX, textPosY);
		currentScene.getContainer().attachChild(goalText);
	}

Output:
	public void setGoal(GameScene currentScene) {
		float goalScaled = 65 * goalHeight;
		float lineLength = 480;
		float linePoxX = 400 - (lineLength/2);
		float linePosY = currentScene.mPlatform.rectangle.getY() - goalScaled;
		Line goalLine = new Line(linePoxX, linePosY, linePoxX+lineLength, linePosY, 3, currentScene.getVBOM());
		goalLine.setColor(Color.WHITE);
		currentScene.getContainer().attachChild(goalLine);
		Text goalText = new Text(0, 0, ResourceManager.mGoalFont, "Goal", currentScene.getVBOM());
		float textPosX = goalLine.getX2() - goalText.getWidth();
		float textPosY = goalLine.getY2() - goalText.getHeight();
		goalText.setPosition(textPosX, textPosY);
		currentScene.getContainer().attachChild(goalText);
	}


Input:
	public Object execute(ExecutionEvent event) throws ExecutionException {
		boolean compareMode = Boolean.TRUE.toString().equals(
				event.getParameter(HistoryViewCommands.COMPARE_MODE_PARAM));
		IStructuredSelection selection = getSelection(getPage());
		if (selection.size() < 1)
			return null;
		Object input = getPage().getInputInternal().getSingleFile();
		if (input == null)
			return null;
		boolean errorOccured = false;
		List<ObjectId> ids = new ArrayList<ObjectId>();
		String gitPath = null;
		if (input instanceof IFile) {
			IFile resource = (IFile) input;
			final RepositoryMapping map = RepositoryMapping
					.getMapping(resource);
			gitPath = map.getRepoRelativePath(resource);
			Iterator<?> it = selection.iterator();
			while (it.hasNext()) {
				RevCommit commit = (RevCommit) it.next();
				IFileRevision rev = null;
				try {
					rev = CompareUtils.getFileRevision(gitPath, commit, map
							.getRepository(), null);
				} catch (IOException e) {
					Activator.logError(NLS.bind(
							UIText.GitHistoryPage_errorLookingUpPath, gitPath,
							commit.getId()), e);
					errorOccured = true;
				}
				if (rev != null) {
					if (compareMode) {
						ITypedElement right = CompareUtils
								.getFileRevisionTypedElement(gitPath, commit,
										map.getRepository());
						final GitCompareFileRevisionEditorInput in = new GitCompareFileRevisionEditorInput(
								SaveableCompareEditorInput
										.createFileElement(resource), right,
								null);
						try {
							openInCompare(event, in);
						} catch (Exception e) {
							errorOccured = true;
						}
					} else {
						try {
							EgitUiEditorUtils.openEditor(getPart(event)
									.getSite().getPage(), rev,
									new NullProgressMonitor());
						} catch (CoreException e) {
							Activator.logError(
									UIText.GitHistoryPage_openFailed, e);
							errorOccured = true;
						}
					}
				} else {
					ids.add(commit.getId());
				}
			}
		}
		if (input instanceof File) {
			File fileInput = (File) input;
			Repository repo = getRepository(event);
			gitPath = getRepoRelativePath(repo, fileInput);
			Iterator<?> it = selection.iterator();
			while (it.hasNext()) {
				RevCommit commit = (RevCommit) it.next();
				IFileRevision rev = null;
				try {
					rev = CompareUtils.getFileRevision(gitPath, commit, repo,
							null);
				} catch (IOException e) {
					Activator.logError(NLS.bind(
							UIText.GitHistoryPage_errorLookingUpPath, gitPath,
							commit.getId()), e);
					errorOccured = true;
				}
				if (rev != null) {
					if (compareMode) {
						try {
							ITypedElement left = CompareUtils
									.getFileRevisionTypedElement(gitPath,
											new RevWalk(repo).parseCommit(repo
													.resolve(Constants.HEAD)),
											repo);
							ITypedElement right = CompareUtils
									.getFileRevisionTypedElement(gitPath,
											commit, repo);
							final GitCompareFileRevisionEditorInput in = new GitCompareFileRevisionEditorInput(
									left, right, null);
							openInCompare(event, in);
						} catch (Exception e) {
							errorOccured = true;
						}
					} else {
						try {
							EgitUiEditorUtils.openEditor(getPart(event)
									.getSite().getPage(), rev,
									new NullProgressMonitor());
						} catch (CoreException e) {
							Activator.logError(
									UIText.GitHistoryPage_openFailed, e);
							errorOccured = true;
						}
					}
				} else {
					ids.add(commit.getId());
				}
			}
		}
		if (errorOccured)
			Activator.showError(UIText.GitHistoryPage_openFailed, null);
		if (ids.size() > 0) {
			String idList = "";
			for (ObjectId objectId : ids) {
				idList += objectId.getName() + " ";
			}
			MessageDialog.openError(getPart(event).getSite().getShell(),
					UIText.GitHistoryPage_fileNotFound, NLS.bind(
							UIText.GitHistoryPage_notContainedInCommits,
							gitPath, idList));
		}
		return null;
	}

Output:
	public Object execute(ExecutionEvent event) throws ExecutionException {
		boolean compareMode = Boolean.TRUE.toString().equals(
				event.getParameter(HistoryViewCommands.COMPARE_MODE_PARAM));
		IStructuredSelection selection = getSelection(getPage());
		if (selection.size() < 1)
			return null;
		Object input = getPage().getInputInternal().getSingleFile();
		if (input == null)
			return null;
		boolean errorOccured = false;
		List<ObjectId> ids = new ArrayList<ObjectId>();
		String gitPath = null;
		if (input instanceof IFile) {
			IFile resource = (IFile) input;
			final RepositoryMapping map = RepositoryMapping
					.getMapping(resource);
			gitPath = map.getRepoRelativePath(resource);
			Iterator<?> it = selection.iterator();
			while (it.hasNext()) {
				RevCommit commit = (RevCommit) it.next();
				IFileRevision rev = null;
				try {
					rev = CompareUtils.getFileRevision(gitPath, commit, map
							.getRepository(), null);
				} catch (IOException e) {
					Activator.logError(NLS.bind(
							UIText.GitHistoryPage_errorLookingUpPath, gitPath,
							commit.getId()), e);
					errorOccured = true;
				}
				if (rev != null) {
					if (compareMode) {
						ITypedElement right = CompareUtils
								.getFileRevisionTypedElement(gitPath, commit,
										map.getRepository());
						final GitCompareFileRevisionEditorInput in = new GitCompareFileRevisionEditorInput(
								SaveableCompareEditorInput
										.createFileElement(resource), right,
								null);
						try {
							openInCompare(event, in);
						} catch (Exception e) {
							errorOccured = true;
						}
					} else {
						try {
							EgitUiEditorUtils.openEditor(getPart(event)
									.getSite().getPage(), rev,
									new NullProgressMonitor());
						} catch (CoreException e) {
							Activator.logError(
									UIText.GitHistoryPage_openFailed, e);
							errorOccured = true;
						}
					}
				} else {
					ids.add(commit.getId());
				}
			}
		}
		if (input instanceof File) {
			File fileInput = (File) input;
			Repository repo = getRepository(event);
			gitPath = getRepoRelativePath(repo, fileInput);
			Iterator<?> it = selection.iterator();
			while (it.hasNext()) {
				RevCommit commit = (RevCommit) it.next();
				IFileRevision rev = null;
				try {
					rev = CompareUtils.getFileRevision(gitPath, commit, repo,
							null);
				} catch (IOException e) {
					Activator.logError(NLS.bind(
							UIText.GitHistoryPage_errorLookingUpPath, gitPath,
							commit.getId()), e);
					errorOccured = true;
				}
				if (rev != null) {
					if (compareMode) {
						try {
							ITypedElement left = CompareUtils
									.getFileRevisionTypedElement(gitPath,
											new RevWalk(repo).parseCommit(repo
													.resolve(Constants.HEAD)),
											repo);
							ITypedElement right = CompareUtils
									.getFileRevisionTypedElement(gitPath,
											commit, repo);
							final GitCompareFileRevisionEditorInput in = new GitCompareFileRevisionEditorInput(
									left, right, null);
							openInCompare(event, in);
						} catch (IOException e) {
							errorOccured = true;
						}
					} else {
						try {
							EgitUiEditorUtils.openEditor(getPart(event)
									.getSite().getPage(), rev,
									new NullProgressMonitor());
						} catch (CoreException e) {
							Activator.logError(
									UIText.GitHistoryPage_openFailed, e);
							errorOccured = true;
						}
					}
				} else {
					ids.add(commit.getId());
				}
			}
		}
		if (errorOccured)
			Activator.showError(UIText.GitHistoryPage_openFailed, null);
		if (ids.size() > 0) {
			String idList = "";
			for (ObjectId objectId : ids) {
				idList += objectId.getName() + " ";
			}
			MessageDialog.openError(getPart(event).getSite().getShell(),
					UIText.GitHistoryPage_fileNotFound, NLS.bind(
							UIText.GitHistoryPage_notContainedInCommits,
							gitPath, idList));
		}
		return null;
	}


Input:
	private void eObjectToPbmMarker(IResource res, EObject problem, int tabWidth) {
		EPackage pkProblem = null;
		EClass clProblem = null;
		EStructuralFeature sfSeverity = null;
		EStructuralFeature sfLocation = null;
		EStructuralFeature sfDescription = null;
		pkProblem = problem.eClass().getEPackage();
		clProblem = (EClass)pkProblem.getEClassifier("Problem");
		sfSeverity = clProblem.getEStructuralFeature("severity");
		sfLocation = clProblem.getEStructuralFeature("location");
		sfDescription = clProblem.getEStructuralFeature("description");
		String description = (String)problem.eGet(sfDescription);
		String location = (String)problem.eGet(sfLocation);
		int lineNumber = Integer.parseInt(location.split(":")[0]);
		int charStart = 0, charEnd = 0;
		try {
			AtlNbCharFile help = new AtlNbCharFile(((IFile)res).getContents());
			if (location.indexOf('-') == -1) {
				location +=  '-' + location;
			}
			int[] pos = help.getIndexChar(location, tabWidth);
			charStart = pos[0];
			charEnd = pos[1];
		} catch (CoreException e1) {
			logger.log(Level.SEVERE, e1.getLocalizedMessage(), e1);
		}
		String severity = ((EEnumLiteral)problem.eGet(sfSeverity)).getName();
		int eclipseSeverity = ((Integer)severities.get(severity)).intValue();
		try {
			IMarker pbmMarker = res.createMarker(IMarker.PROBLEM);
			pbmMarker.setAttribute(IMarker.SEVERITY, eclipseSeverity);
			pbmMarker.setAttribute(IMarker.MESSAGE, description);
			pbmMarker.setAttribute(IMarker.LINE_NUMBER, lineNumber);
			pbmMarker.setAttribute(IMarker.CHAR_START, charStart);
			pbmMarker.setAttribute(IMarker.CHAR_END, (charEnd > charStart) ? charEnd : charStart + 1);
		} catch (CoreException e) {
			logger.log(Level.SEVERE, e.getLocalizedMessage(), e);
		}
	}

Output:
	private void eObjectToPbmMarker(IResource res, EObject problem, int tabWidth) {
		EPackage pkProblem = null;
		EClass clProblem = null;
		EStructuralFeature sfSeverity = null;
		EStructuralFeature sfLocation = null;
		EStructuralFeature sfDescription = null;
		pkProblem = problem.eClass().getEPackage();
		clProblem = (EClass)pkProblem.getEClassifier("Problem");
		sfSeverity = clProblem.getEStructuralFeature("severity");
		sfLocation = clProblem.getEStructuralFeature("location");
		sfDescription = clProblem.getEStructuralFeature("description");
		String description = (String)problem.eGet(sfDescription);
		String location = (String)problem.eGet(sfLocation);
		int lineNumber = Integer.parseInt(location.split(":")[0]);
		int charStart = 0, charEnd = 0;
		try {
			AtlNbCharFile help = new AtlNbCharFile(((IFile)res).getContents());
			if (location.indexOf('-') == -1) {
				location +=  '-' + location;
			}
			int[] pos = help.getIndexChar(location, tabWidth);
			charStart = pos[0];
			charEnd = pos[1];
		} catch (CoreException e1) {
			logger.log(Level.SEVERE, e1.getLocalizedMessage(), e1);
		} catch(Exception e) {
			description += " [location \"" + location + "\" incorrectly reported because of error]";
		}
		String severity = ((EEnumLiteral)problem.eGet(sfSeverity)).getName();
		int eclipseSeverity = ((Integer)severities.get(severity)).intValue();
		try {
			IMarker pbmMarker = res.createMarker(IMarker.PROBLEM);
			pbmMarker.setAttribute(IMarker.SEVERITY, eclipseSeverity);
			pbmMarker.setAttribute(IMarker.MESSAGE, description);
			pbmMarker.setAttribute(IMarker.LINE_NUMBER, lineNumber);
			pbmMarker.setAttribute(IMarker.CHAR_START, charStart);
			pbmMarker.setAttribute(IMarker.CHAR_END, (charEnd > charStart) ? charEnd : charStart + 1);
		} catch (CoreException e) {
			logger.log(Level.SEVERE, e.getLocalizedMessage(), e);
		}
	}


Input:
    public AboutWindow(Frame owner)
    {
        super(owner);
        ResourceManagementService resources = BrandingActivator.getResources();
        String applicationName
            = resources.getSettingsString("service.gui.APPLICATION_NAME");
        this.setTitle(
            resources.getI18NString("plugin.branding.ABOUT_WINDOW_TITLE",
                new String[]{applicationName}));
        setModal(false);
        setDefaultCloseOperation(DISPOSE_ON_CLOSE);
        JPanel mainPanel = new WindowBackground();
        mainPanel.setLayout(new BorderLayout());
        JPanel textPanel = new JPanel();
        textPanel.setPreferredSize(new Dimension(470, 280));
        textPanel.setLayout(new BoxLayout(textPanel, BoxLayout.Y_AXIS));
        textPanel.setBorder(BorderFactory
                .createEmptyBorder(15, 15, 15, 15));
        textPanel.setOpaque(false);
        JLabel titleLabel = new JLabel(applicationName);
        titleLabel.setFont(titleLabel.getFont().deriveFont(Font.BOLD, 28));
        titleLabel.setForeground(Constants.TITLE_COLOR);
        titleLabel.setAlignmentX(Component.RIGHT_ALIGNMENT);
        JLabel versionLabel =
            new JLabel(" " + System.getProperty("sip-communicator.version"));
        versionLabel.setFont(versionLabel.getFont().deriveFont(Font.BOLD, 18));
        versionLabel.setForeground(Constants.TITLE_COLOR);
        versionLabel.setAlignmentX(Component.RIGHT_ALIGNMENT);
        int logoAreaFontSize
            = resources.getSettingsInt("plugin.branding.ABOUT_LOGO_FONT_SIZE");
        JTextArea logoArea =
            new JTextArea(resources.getI18NString("plugin.branding.LOGO_MESSAGE"));
        logoArea.setFont(
            logoArea.getFont().deriveFont(Font.BOLD, logoAreaFontSize));
        logoArea.setForeground(Constants.TITLE_COLOR);
        logoArea.setOpaque(false);
        logoArea.setLineWrap(false);
        logoArea.setWrapStyleWord(true);
        logoArea.setEditable(false);
        logoArea.setPreferredSize(new Dimension(100, 20));
        logoArea.setAlignmentX(Component.RIGHT_ALIGNMENT);
        logoArea.setBorder(BorderFactory
            .createEmptyBorder(30, DEFAULT_TEXT_INDENT, 0, 0));
        StyledHTMLEditorPane rightsArea = new StyledHTMLEditorPane();
        rightsArea.setContentType("text/html");
        rightsArea.appendToEnd(resources.getI18NString("plugin.branding.COPYRIGHT",
            new String[]
            { Constants.TEXT_COLOR }));
        rightsArea.setPreferredSize(new Dimension(50, 20));
        rightsArea
                .setBorder(BorderFactory
                    .createEmptyBorder(0, DEFAULT_TEXT_INDENT, 0, 0));
        rightsArea.setOpaque(false);
        rightsArea.setEditable(false);
        rightsArea.setAlignmentX(Component.RIGHT_ALIGNMENT);
        rightsArea.addHyperlinkListener(this);
        StyledHTMLEditorPane licenseArea = new StyledHTMLEditorPane();
        licenseArea.setContentType("text/html");
        licenseArea.appendToEnd(resources.
            getI18NString("plugin.branding.LICENSE",
            new String[]{Constants.TEXT_COLOR}));
        licenseArea.setPreferredSize(new Dimension(50, 20));
        licenseArea.setBorder(
            BorderFactory.createEmptyBorder(
                resources.getSettingsInt("plugin.branding.ABOUT_PARAGRAPH_GAP"),
                DEFAULT_TEXT_INDENT,
                0, 0));
        licenseArea.setOpaque(false);
        licenseArea.setEditable(false);
        licenseArea.setAlignmentX(Component.RIGHT_ALIGNMENT);
        licenseArea.addHyperlinkListener(this);
        textPanel.add(titleLabel);
        textPanel.add(versionLabel);
        textPanel.add(logoArea);
        textPanel.add(rightsArea);
        textPanel.add(licenseArea);
        JButton okButton = new JButton(resources.getI18NString("service.gui.OK"));
        this.getRootPane().setDefaultButton(okButton);
        okButton.setMnemonic(resources.getI18nMnemonic("service.gui.OK"));
        okButton.addActionListener(this);
        JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
        buttonPanel.add(okButton);
        buttonPanel.setOpaque(false);
        mainPanel.add(textPanel, BorderLayout.CENTER);
        mainPanel.add(buttonPanel, BorderLayout.SOUTH);
        this.getContentPane().add(mainPanel);
        this.pack();
        this.setResizable(false);
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        setLocation(screenSize.width / 2 - getWidth() / 2, screenSize.height
            / 2 - getHeight() / 2);
    }

Output:
    public AboutWindow(Frame owner)
    {
        super(owner);
        ResourceManagementService resources = BrandingActivator.getResources();
        String applicationName
            = resources.getSettingsString("service.gui.APPLICATION_NAME");
        this.setTitle(
            resources.getI18NString("plugin.branding.ABOUT_WINDOW_TITLE",
                new String[]{applicationName}));
        setModal(false);
        setDefaultCloseOperation(DISPOSE_ON_CLOSE);
        JPanel mainPanel = new WindowBackground();
        mainPanel.setLayout(new BorderLayout());
        JPanel textPanel = new JPanel();
        textPanel.setPreferredSize(new Dimension(470, 280));
        textPanel.setLayout(new BoxLayout(textPanel, BoxLayout.Y_AXIS));
        textPanel.setBorder(BorderFactory
                .createEmptyBorder(15, 15, 15, 15));
        textPanel.setOpaque(false);
        JLabel titleLabel = new JLabel(applicationName);
        titleLabel.setFont(titleLabel.getFont().deriveFont(Font.BOLD, 28));
        titleLabel.setForeground(Constants.TITLE_COLOR);
        titleLabel.setAlignmentX(Component.RIGHT_ALIGNMENT);
        JLabel versionLabel =
            new JLabel(" " + System.getProperty("sip-communicator.version"));
        versionLabel.setFont(versionLabel.getFont().deriveFont(Font.BOLD, 18));
        versionLabel.setForeground(Constants.TITLE_COLOR);
        versionLabel.setAlignmentX(Component.RIGHT_ALIGNMENT);
        int logoAreaFontSize
            = resources.getSettingsInt("plugin.branding.ABOUT_LOGO_FONT_SIZE");
        JTextArea logoArea =
            new JTextArea(resources.getI18NString("plugin.branding.LOGO_MESSAGE"));
        logoArea.setFont(
            logoArea.getFont().deriveFont(Font.BOLD, logoAreaFontSize));
        logoArea.setForeground(Constants.TITLE_COLOR);
        logoArea.setOpaque(false);
        logoArea.setLineWrap(true);
        logoArea.setWrapStyleWord(true);
        logoArea.setEditable(false);
        logoArea.setPreferredSize(new Dimension(100, 20));
        logoArea.setAlignmentX(Component.RIGHT_ALIGNMENT);
        logoArea.setBorder(BorderFactory
            .createEmptyBorder(30, DEFAULT_TEXT_INDENT, 0, 0));
        StyledHTMLEditorPane rightsArea = new StyledHTMLEditorPane();
        rightsArea.setContentType("text/html");
        rightsArea.appendToEnd(resources.getI18NString("plugin.branding.COPYRIGHT",
            new String[]
            { Constants.TEXT_COLOR }));
        rightsArea.setPreferredSize(new Dimension(50, 20));
        rightsArea
                .setBorder(BorderFactory
                    .createEmptyBorder(0, DEFAULT_TEXT_INDENT, 0, 0));
        rightsArea.setOpaque(false);
        rightsArea.setEditable(false);
        rightsArea.setAlignmentX(Component.RIGHT_ALIGNMENT);
        rightsArea.addHyperlinkListener(this);
        StyledHTMLEditorPane licenseArea = new StyledHTMLEditorPane();
        licenseArea.setContentType("text/html");
        licenseArea.appendToEnd(resources.
            getI18NString("plugin.branding.LICENSE",
            new String[]{Constants.TEXT_COLOR}));
        licenseArea.setPreferredSize(new Dimension(50, 20));
        licenseArea.setBorder(
            BorderFactory.createEmptyBorder(
                resources.getSettingsInt("plugin.branding.ABOUT_PARAGRAPH_GAP"),
                DEFAULT_TEXT_INDENT,
                0, 0));
        licenseArea.setOpaque(false);
        licenseArea.setEditable(false);
        licenseArea.setAlignmentX(Component.RIGHT_ALIGNMENT);
        licenseArea.addHyperlinkListener(this);
        textPanel.add(titleLabel);
        textPanel.add(versionLabel);
        textPanel.add(logoArea);
        textPanel.add(rightsArea);
        textPanel.add(licenseArea);
        JButton okButton = new JButton(resources.getI18NString("service.gui.OK"));
        this.getRootPane().setDefaultButton(okButton);
        okButton.setMnemonic(resources.getI18nMnemonic("service.gui.OK"));
        okButton.addActionListener(this);
        JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
        buttonPanel.add(okButton);
        buttonPanel.setOpaque(false);
        mainPanel.add(textPanel, BorderLayout.CENTER);
        mainPanel.add(buttonPanel, BorderLayout.SOUTH);
        this.getContentPane().add(mainPanel);
        this.pack();
        this.setResizable(false);
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        setLocation(screenSize.width / 2 - getWidth() / 2, screenSize.height
            / 2 - getHeight() / 2);
    }


Input:
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        if (sender.hasPermission("libsdisguises.undisguiseplayer")) {
            if (args.length > 0) {
                Player p = Bukkit.getPlayer(args[0]);
                if (p != null) {
                    if (DisguiseAPI.isDisguised(p)) {
                        DisguiseAPI.undisguiseToAll(p);
                        sender.sendMessage(ChatColor.RED + "He is no longer disguised");
                    } else
                        sender.sendMessage(ChatColor.RED + "He is not disguised!");
                } else
                    sender.sendMessage(ChatColor.RED + "Player not found");
            } else
                sender.sendMessage(ChatColor.RED + "/undisguiseplayer <Name>");
        } else
            sender.sendMessage(ChatColor.RED + "You are forbidden to use this command!");
        return true;
    }

Output:
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        if (sender.hasPermission("libsdisguises.undisguiseplayer")) {
            if (args.length > 0) {
                Player p = Bukkit.getPlayer(args[0]);
                if (p != null) {
                    if (DisguiseAPI.isDisguised(p)) {
                        DisguiseAPI.undisguiseToAll(p);
                        sender.sendMessage(ChatColor.RED + "The player is no longer disguised");
                    } else
                        sender.sendMessage(ChatColor.RED + "The player is not disguised!");
                } else
                    sender.sendMessage(ChatColor.RED + "Player not found");
            } else
                sender.sendMessage(ChatColor.RED + "/undisguiseplayer <Name>");
        } else
            sender.sendMessage(ChatColor.RED + "You are forbidden to use this command!");
        return true;
    }


Input:
    public KitsComponent(UsefulCommandPlugin plugin) {
        super(plugin);
        this.kits = new HashMap<String, Kit>();
        File folder = getFolder();
        if (folder == null) {
            return;
        }
        GConfLoader loader = plugin.getGConfLoader();
        for (File file : folder.listFiles()) {
            String filename = file.getName();
            try {
                Kit kit = loader.loadOrCreate(filename, Kit.class);
                kits.put(getKitNameFor(filename), kit);
            } catch (GConfLoadException exc) {
                plugin.getLogger().severe("Unable to read "
                        + filename + " kit file.");
            }
        }
    }

Output:
    public KitsComponent(UsefulCommandPlugin plugin) {
        super(plugin);
        this.kits = new HashMap<String, Kit>();
        File folder = getFolder();
        if (folder == null) {
            return;
        }
        GConfLoader loader = plugin.getGConfLoader();
        for (File file : folder.listFiles()) {
            String filename = folder.getName()
                    + File.separator + file.getName();
            System.out.println(filename);
            try {
                Kit kit = loader.loadOrCreate(filename, Kit.class);
                kits.put(getKitNameFor(filename), kit);
            } catch (GConfLoadException exc) {
                plugin.getLogger().severe("Unable to read "
                        + filename + " kit file.");
            }
        }
    }


Input:
	public static ROIList<?> createNewROIList(Class<? extends IROI> clazz) {
		if (clazz == null)
			return null;
		if (PolygonalROI.class.equals(clazz))
			return new PolygonalROIList();
		else if (PolylineROI.class.equals(clazz))
			return new PolylineROIList();
		else if (PointROI.class.equals(clazz))
			return new PointROIList();
		else if (LinearROI.class.equals(clazz))
			return new LinearROIList();
		else if (RectangularROI.class.equals(clazz))
			return new RectangularROIList();
		else if (SectorROI.class.equals(clazz))
			return new SectorROIList();
		else if (CircularROI.class.equals(clazz))
			return new CircularROIList();
		else if (EllipticalFitROI.class.equals(clazz))
			return new EllipticalFitROIList();
		else if (EllipticalROI.class.equals(clazz))
			return new EllipticalROIList();
		throw new UnsupportedOperationException("No corresponding ROI list class");
	}

Output:
	public static ROIList<?> createNewROIList(Class<? extends IROI> clazz) {
		if (clazz == null)
			return null;
		if (PolygonalROI.class.isAssignableFrom(clazz))
			return new PolygonalROIList();
		else if (PolylineROI.class.isAssignableFrom(clazz))
			return new PolylineROIList();
		else if (PointROI.class.isAssignableFrom(clazz))
			return new PointROIList();
		else if (LinearROI.class.isAssignableFrom(clazz))
			return new LinearROIList();
		else if (RectangularROI.class.isAssignableFrom(clazz))
			return new RectangularROIList();
		else if (SectorROI.class.isAssignableFrom(clazz))
			return new SectorROIList();
		else if (CircularROI.class.isAssignableFrom(clazz))
			return new CircularROIList();
		else if (EllipticalFitROI.class.isAssignableFrom(clazz))
			return new EllipticalFitROIList();
		else if (EllipticalROI.class.isAssignableFrom(clazz))
			return new EllipticalROIList();
		throw new UnsupportedOperationException("No corresponding ROI list class");
	}


Input:
	public static void main(String[] args) throws ClassNotFoundException, SQLException {
		SimpleConnectionPool pool = (args != null && args.length >= 4) ?
		 		SimpleConnectionPool.createDefaultPool(args[0],args[1], args[2], args[3])
		 	:
		 		SimpleConnectionPool.createDefaultPool("org.hsqldb.jdbc.JDBCDriver",
				"jdbc:hsqldb:mem:power-test", "sa", "");
		Connection connection = pool.getConnection();
		doSomethingWithDatabase(connection);
		pool.releaseConnection(connection);
		pool.stop();
	}

Output:
	public static void main(String[] args) throws ClassNotFoundException, SQLException {
		SimpleConnectionPool pool = (args != null && args.length >= 4) ?
		 		SimpleConnectionPool.createDefaultPool(args[0],args[1], args[2], args[3])
		 	:
		 		SimpleConnectionPool.createDefaultPool("org.hsqldb.jdbc.JDBCDriver",
				"jdbc:hsqldb:mem:power-test", "sa", "");
		Connection connection = pool.getConnection();
		doSomethingWithDatabase(connection);
		pool.releaseConnection(connection);
		pool.stop();
	}


Input:
	public void onPlayerInteract(PlayerInteractEvent event)
	{
		Action action = event.getAction();
		if(action == Action.RIGHT_CLICK_AIR||action == Action.RIGHT_CLICK_BLOCK)
		{
			int pickid = 278;
			if(event.getItem()!=null)
			if(event.getItem().getTypeId()==pickid)
			{
				if (plugin.lightningpick.containsKey(event.getPlayer()))
				{
					Block targetBlock = event.getPlayer().getTargetBlock(null, 35);
					if (targetBlock!=null)
					{
						Location strikeloc = targetBlock.getLocation();
						event.getPlayer().getWorld().strikeLightning(strikeloc);
					}
					else
					{
						event.getPlayer().sendMessage("No block in sight");
					}
				}
			}
		}
	}

Output:
	public void onPlayerInteract(PlayerInteractEvent event)
	{
		if(!event.isCancelled())
		{
			Action action = event.getAction();
			if(action == Action.RIGHT_CLICK_AIR||action == Action.RIGHT_CLICK_BLOCK)
			{
				int pickid = 278;
				if(event.getItem()!=null)
					if(event.getItem().getTypeId()==pickid)
					{
						if (plugin.lightningpick.containsKey(event.getPlayer()))
						{
							Block targetBlock = event.getPlayer().getTargetBlock(null, 35);
							if (targetBlock!=null)
							{
								Location strikeloc = targetBlock.getLocation();
								event.getPlayer().getWorld().strikeLightning(strikeloc);
							}
							else
							{
								event.getPlayer().sendMessage("No block in sight");
							}
						}
					}
			}
		}
	}


Input:
	public Object wrapper(int count, String methodName, Object... arguments){
		if (count > 5){
			System.out.println("Giving up after many tries!");
			return null;
		}
		Object result=null;
		try {
			Method method = getMethod(methodName);
			Object res =  method.invoke(askPort, arguments);
			Method error = res.getClass().getMethod("getError");
			if ( (Integer)error.invoke(res) == 101){
				this.startSession();
				res = method.invoke(askPort, arguments);
			}
			return res;
		} catch (IllegalArgumentException e) {
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		} catch (InvocationTargetException e) {
			if (e.getCause().getCause().getClass().getName().equals("java.net.SocketTimeoutException")){
				System.out.println("Timeout, re-trying "+count);
				return wrapper(count++,methodName,arguments);
			} else {
				e.printStackTrace();
			}
		} catch (SecurityException e) {
			e.printStackTrace();
		} catch (NoSuchMethodException e) {
			e.printStackTrace();
		}
		return result;
	}

Output:
	public Object wrapper(int count, String methodName, Object... arguments){
		count++;
		if (count > 5){
			System.out.println("Giving up after many tries!");
			return null;
		}
		Object result=null;
		try {
			Method method = getMethod(methodName);
			Object res =  method.invoke(askPort, arguments);
			Method error = res.getClass().getMethod("getError");
			if ( (Integer)error.invoke(res) == 101){
				this.startSession();
				res = method.invoke(askPort, arguments);
			}
			return res;
		} catch (IllegalArgumentException e) {
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		} catch (InvocationTargetException e) {
			if (e.getCause().getCause().getClass().getName().equals("java.net.SocketTimeoutException")){
				System.out.println("Timeout, re-trying:"+count);
				return wrapper(count,methodName,arguments);
			} else {
				e.printStackTrace();
			}
		} catch (SecurityException e) {
			e.printStackTrace();
		} catch (NoSuchMethodException e) {
			e.printStackTrace();
		}
		return result;
	}


Input:
    public static void registerCustomCodecs()
    {
        if(codecsRegistered)
            return;
        @SuppressWarnings("unchecked")
        Collection<String> registeredPlugins
                = new HashSet<String>(
                PlugInManager.getPlugInList(
                        null,
                        null,
                        PlugInManager.CODEC));
        boolean commit = false;
        PlugInManager.removePlugIn(
                "com.sun.media.codec.video.colorspace.JavaRGBToYUV",
                PlugInManager.CODEC);
        PlugInManager.removePlugIn(
                "com.sun.media.codec.video.colorspace.JavaRGBConverter",
                PlugInManager.CODEC);
        PlugInManager.removePlugIn(
                "com.sun.media.codec.video.colorspace.RGBScaler",
                PlugInManager.CODEC);
        PlugInManager.removePlugIn(
                "com.sun.media.codec.video.vh263.NativeDecoder",
                PlugInManager.CODEC);
        PlugInManager.removePlugIn(
                "com.ibm.media.codec.video.h263.NativeEncoder",
                PlugInManager.CODEC);
        String gsmCodecPackage = "com.ibm.media.codec.audio.gsm.";
        String[] gsmCodecClasses
                = new String[]
                {
                        "JavaDecoder",
                        "JavaDecoder_ms",
                        "JavaEncoder",
                        "JavaEncoder_ms",
                        "NativeDecoder",
                        "NativeDecoder_ms",
                        "NativeEncoder",
                        "NativeEncoder_ms",
                        "Packetizer"
                };
        for(String gsmCodecClass : gsmCodecClasses)
        {
            PlugInManager.removePlugIn(
                    gsmCodecPackage + gsmCodecClass,
                    PlugInManager.CODEC);
        }
        PlugInManager.removePlugIn(
                "net.sf.fmj.media.codec.JavaSoundCodec",
                PlugInManager.CODEC);
        for (String className : CUSTOM_CODECS)
        {
            if (className == null)
                continue;
            if (registeredPlugins.contains(className))
            {
                if (logger.isDebugEnabled())
                    logger.debug(
                            "Codec " + className + " is already registered");
            }
            else
            {
                commit = true;
                boolean registered;
                Throwable exception = null;
                try
                {
                    Codec codec = (Codec)
                            Class.forName(className).newInstance();
                    registered =
                            PlugInManager.addPlugIn(
                                    className,
                                    codec.getSupportedInputFormats(),
                                    codec.getSupportedOutputFormats(null),
                                    PlugInManager.CODEC);
                }
                catch (Throwable ex)
                {
                    registered = false;
                    exception = ex;
                }
                if (registered)
                {
                    if (logger.isDebugEnabled())
                    {
                        logger.debug(
                                "Codec "
                                    + className
                                    + " is successfully registered");
                    }
                }
                else
                {
                    if (logger.isDebugEnabled())
                    {
                        logger.debug(
                                "Codec "
                                    + className
                                    + " is NOT succsefully registered",
                                exception);
                    }
                }
            }
        }
        @SuppressWarnings("unchecked")
        Vector<String> codecs
                = PlugInManager.getPlugInList(null, null, PlugInManager.CODEC);
        if (codecs != null)
        {
            boolean setPlugInList = false;
            for (int i = CUSTOM_CODECS.length - 1; i >= 0; i--)
            {
                String className = CUSTOM_CODECS[i];
                if (className != null)
                {
                    int classNameIndex = codecs.indexOf(className);
                    if (classNameIndex != -1)
                    {
                        codecs.remove(classNameIndex);
                        codecs.add(0, className);
                        setPlugInList = true;
                    }
                }
            }
            if (setPlugInList)
                PlugInManager.setPlugInList(codecs, PlugInManager.CODEC);
        }
        if (commit && !MediaServiceImpl.isJmfRegistryDisableLoad())
        {
            try
            {
                PlugInManager.commit();
            }
            catch (IOException ex)
            {
                logger.error("Cannot commit to PlugInManager", ex);
            }
        }
        codecsRegistered = true;
    }

Output:
    public static void registerCustomCodecs()
    {
        if(codecsRegistered)
            return;
        @SuppressWarnings("unchecked")
        Collection<String> registeredPlugins
                = new HashSet<String>(
                PlugInManager.getPlugInList(
                        null,
                        null,
                        PlugInManager.CODEC));
        boolean commit = false;
        PlugInManager.removePlugIn(
                "com.sun.media.codec.video.colorspace.JavaRGBToYUV",
                PlugInManager.CODEC);
        PlugInManager.removePlugIn(
                "com.sun.media.codec.video.colorspace.JavaRGBConverter",
                PlugInManager.CODEC);
        PlugInManager.removePlugIn(
                "com.sun.media.codec.video.colorspace.RGBScaler",
                PlugInManager.CODEC);
        PlugInManager.removePlugIn(
                "com.sun.media.codec.video.vh263.NativeDecoder",
                PlugInManager.CODEC);
        PlugInManager.removePlugIn(
                "com.ibm.media.codec.video.h263.NativeEncoder",
                PlugInManager.CODEC);
        String gsmCodecPackage = "com.ibm.media.codec.audio.gsm.";
        String[] gsmCodecClasses
                = new String[]
                {
                        "JavaDecoder",
                        "JavaDecoder_ms",
                        "JavaEncoder",
                        "JavaEncoder_ms",
                        "NativeDecoder",
                        "NativeDecoder_ms",
                        "NativeEncoder",
                        "NativeEncoder_ms",
                        "Packetizer"
                };
        for(String gsmCodecClass : gsmCodecClasses)
        {
            PlugInManager.removePlugIn(
                    gsmCodecPackage + gsmCodecClass,
                    PlugInManager.CODEC);
        }
        PlugInManager.removePlugIn(
                "net.sf.fmj.media.codec.JavaSoundCodec",
                PlugInManager.CODEC);
        for (String className : CUSTOM_CODECS)
        {
            if (className == null)
                continue;
            if (registeredPlugins.contains(className))
            {
                if (logger.isDebugEnabled())
                    logger.debug(
                            "Codec " + className + " is already registered");
            }
            else
            {
                commit = true;
                boolean registered;
                Throwable exception = null;
                try
                {
                    Codec codec = (Codec)
                            Class.forName(className).newInstance();
                    registered =
                            PlugInManager.addPlugIn(
                                    className,
                                    codec.getSupportedInputFormats(),
                                    codec.getSupportedOutputFormats(null),
                                    PlugInManager.CODEC);
                }
                catch (Throwable ex)
                {
                    registered = false;
                    exception = ex;
                }
                if (registered)
                {
                    if (logger.isDebugEnabled())
                    {
                        logger.debug(
                                "Codec "
                                    + className
                                    + " is successfully registered");
                    }
                }
                else
                {
                    if (logger.isDebugEnabled())
                    {
                        logger.debug(
                                "Codec "
                                    + className
                                    + " is NOT successfully registered",
                                exception);
                    }
                }
            }
        }
        @SuppressWarnings("unchecked")
        Vector<String> codecs
                = PlugInManager.getPlugInList(null, null, PlugInManager.CODEC);
        if (codecs != null)
        {
            boolean setPlugInList = false;
            for (int i = CUSTOM_CODECS.length - 1; i >= 0; i--)
            {
                String className = CUSTOM_CODECS[i];
                if (className != null)
                {
                    int classNameIndex = codecs.indexOf(className);
                    if (classNameIndex != -1)
                    {
                        codecs.remove(classNameIndex);
                        codecs.add(0, className);
                        setPlugInList = true;
                    }
                }
            }
            if (setPlugInList)
                PlugInManager.setPlugInList(codecs, PlugInManager.CODEC);
        }
        if (commit && !MediaServiceImpl.isJmfRegistryDisableLoad())
        {
            try
            {
                PlugInManager.commit();
            }
            catch (IOException ex)
            {
                logger.error("Cannot commit to PlugInManager", ex);
            }
        }
        codecsRegistered = true;
    }


Input:
    public void validate() throws LdapException
    {
        StringBuilder sb = new StringBuilder();
        int errCount = 0;
        if ( pwdMinAge < 0 )
        {
            sb.append( ++errCount ).append( ". password minimum age cannot be negative\n" );
        }
        if ( pwdMaxAge < 0 )
        {
            sb.append( ++errCount ).append( ". password maximum age cannot be negative\n" );
        }
        if ( ( pwdMaxAge > 0 ) && ( pwdMaxAge < pwdMinAge ) )
        {
            sb.append( ++errCount ).append( ". password maximum age should be greater than the minimum age\n" );
        }
        if ( pwdInHistory < 0 )
        {
            sb.append( ++errCount ).append( ". password history count cannot be negative\n" );
        }
        if ( ( pwdCheckQuality < 0 ) || ( pwdCheckQuality > 2 ) )
        {
            sb.append( ++errCount ).append( ". invalid password quality check value, valid values are 0, 1 and 2 \n" );
        }
        if ( pwdMinLength < 0 )
        {
            sb.append( ++errCount ).append( ". password minimum length cannot be negative\n" );
        }
        if ( pwdMaxLength < 0 )
        {
            sb.append( ++errCount ).append( ". password maximum length cannot be negative\n" );
        }
        if ( pwdMaxLength < pwdMinLength )
        {
            sb.append( ++errCount ).append( ". password maximum length should be greater than minimum length\n" );
        }
        if ( pwdExpireWarning < 0 )
        {
            sb.append( ++errCount ).append( ". password expire warning time cannot be negative\n" );
        }
        if ( pwdGraceAuthNLimit < 0 )
        {
            sb.append( ++errCount ).append( ". password grace authentication limits cannot be negative\n" );
        }
        if ( pwdGraceExpire < 0 )
        {
            sb.append( ++errCount ).append( ". password grace expiration time cannot be negative\n" );
        }
        if ( pwdLockoutDuration < 0 )
        {
            sb.append( ++errCount ).append( ". password lockout duration time cannot be negative\n" );
        }
        if ( pwdMaxFailure < 0 )
        {
            sb.append( ++errCount ).append( ". password maximum failure count cannot be negative\n" );
        }
        if ( pwdFailureCountInterval < 0 )
        {
            sb.append( ++errCount ).append( ". password failure count interval time cannot be negative\n" );
        }
        if ( ( ( pwdMinDelay > 0 ) && ( pwdMaxDelay <= 0 ) )
            || ( ( pwdMaxDelay > 0 ) && ( pwdMinDelay <= 0 ) ) )
        {
            sb
                .append( ++errCount )
                .append(
                    ". if password minimum or maximum delay time is specified then the correspomding maximu or minimum delay time should also be specified\n" );
        }
        else
        {
            if ( pwdMinDelay < 0 )
            {
                sb.append( ++errCount ).append( ". password minimum delay time cannot be negative\n" );
            }
            if ( pwdMaxDelay < 0 )
            {
                sb.append( ++errCount ).append( ". password maximum delay time cannot be negative\n" );
            }
        }
        if ( pwdMaxIdle < 0 )
        {
            sb.append( ++errCount ).append( ". password maximum idle time cannot be negative\n" );
        }
        if ( errCount > 0 )
        {
            throw new LdapException( "There are errors in password policy configuration\n" + sb.toString() );
        }
    }

Output:
    public void validate() throws LdapException
    {
        StringBuilder sb = new StringBuilder();
        int errCount = 0;
        if ( pwdMinAge < 0 )
        {
            sb.append( ++errCount ).append( ". password minimum age cannot be negative\n" );
        }
        if ( pwdMaxAge < 0 )
        {
            sb.append( ++errCount ).append( ". password maximum age cannot be negative\n" );
        }
        if ( ( pwdMaxAge > 0 ) && ( pwdMaxAge < pwdMinAge ) )
        {
            sb.append( ++errCount ).append( ". password maximum age should be greater than the minimum age\n" );
        }
        if ( pwdInHistory < 0 )
        {
            sb.append( ++errCount ).append( ". password history count cannot be negative\n" );
        }
        if ( ( pwdCheckQuality < 0 ) || ( pwdCheckQuality > 2 ) )
        {
            sb.append( ++errCount ).append( ". invalid password quality check value, valid values are 0, 1 and 2 \n" );
        }
        if ( pwdMinLength < 0 )
        {
            sb.append( ++errCount ).append( ". password minimum length cannot be negative\n" );
        }
        if ( pwdMaxLength < 0 )
        {
            sb.append( ++errCount ).append( ". password maximum length cannot be negative\n" );
        }
        if ( ( pwdMaxLength > 0 ) && ( pwdMaxLength < pwdMinLength ) )
        {
            sb.append( ++errCount ).append( ". password maximum length should be greater than minimum length\n" );
        }
        if ( pwdExpireWarning < 0 )
        {
            sb.append( ++errCount ).append( ". password expire warning time cannot be negative\n" );
        }
        if ( pwdGraceAuthNLimit < 0 )
        {
            sb.append( ++errCount ).append( ". password grace authentication limits cannot be negative\n" );
        }
        if ( pwdGraceExpire < 0 )
        {
            sb.append( ++errCount ).append( ". password grace expiration time cannot be negative\n" );
        }
        if ( pwdLockoutDuration < 0 )
        {
            sb.append( ++errCount ).append( ". password lockout duration time cannot be negative\n" );
        }
        if ( pwdMaxFailure < 0 )
        {
            sb.append( ++errCount ).append( ". password maximum failure count cannot be negative\n" );
        }
        if ( pwdFailureCountInterval < 0 )
        {
            sb.append( ++errCount ).append( ". password failure count interval time cannot be negative\n" );
        }
        if ( ( ( pwdMinDelay > 0 ) && ( pwdMaxDelay <= 0 ) )
            || ( ( pwdMaxDelay > 0 ) && ( pwdMinDelay <= 0 ) ) )
        {
            sb
                .append( ++errCount )
                .append(
                    ". if password minimum or maximum delay time is specified then the correspomding maximu or minimum delay time should also be specified\n" );
        }
        else
        {
            if ( pwdMinDelay < 0 )
            {
                sb.append( ++errCount ).append( ". password minimum delay time cannot be negative\n" );
            }
            if ( pwdMaxDelay < 0 )
            {
                sb.append( ++errCount ).append( ". password maximum delay time cannot be negative\n" );
            }
        }
        if ( pwdMaxIdle < 0 )
        {
            sb.append( ++errCount ).append( ". password maximum idle time cannot be negative\n" );
        }
        if ( errCount > 0 )
        {
            throw new LdapException( "There are errors in password policy configuration\n" + sb.toString() );
        }
    }


Input:
    public void run() {
        while (!shutdown) {
            if (paused) {
                try {
                    Thread.sleep(100);
                } catch (InterruptedException e) {
                }
            } else {
                if (!photosToLoad.isEmpty()) {
                    for (final ImageView icon : photosToLoad.keySet()) {
                        Long contactId = photosToLoad.get(icon);
                        Drawable drawable = null;
                        InputStream photoStream;
                        if ((photoStream = BirthdayProvider.openPhoto(ctx, contactId)) != null) {
                            drawable = Drawable.createFromStream(photoStream, "src");
                        }
                        cache.put(contactId, drawable == null ? DEFAULT_PHOTO : drawable);
                        photosToLoad.remove(icon);
                        updateImage(icon, drawable);
                    }
                }
            }
        }
    }

Output:
    public void run() {
        while (!shutdown) {
            if (paused) {
                try {
                    Thread.sleep(100);
                } catch (InterruptedException e) {
                }
            } else {
                if (!photosToLoad.isEmpty()) {
                    for (final ImageView icon : photosToLoad.keySet()) {
                        Long contactId = photosToLoad.get(icon);
                        Drawable drawable = null;
                        InputStream photoStream;
                        if ((photoStream = BirthdayProvider.openPhoto(ctx, contactId)) != null) {
                            try {
                                drawable = Drawable.createFromStream(photoStream, "src");
                            } catch (Throwable e) {
                                Log.i("PhotoLoader", "Error loading photo.", e);
                            }
                        }
                        cache.put(contactId, drawable == null ? DEFAULT_PHOTO : drawable);
                        photosToLoad.remove(icon);
                        updateImage(icon, drawable);
                    }
                }
            }
        }
    }


Input:
    private void writeWaveHeader() throws IOException {
        RandomAccessFile file = new RandomAccessFile(this.output, "rw");
        file.seek(0);
        int bytesPerSec = (sampleBits + 7) / 8;
        file.writeBytes("RIFF");
        file.writeInt(Integer.reverseBytes(bytesWritten + 36));
        file.writeBytes("WAVEfmt ");
        file.writeInt(Integer.reverseBytes(16));
        file.writeShort(Short.reverseBytes((short) 1));
        file.writeShort(Short.reverseBytes((short) channels));
        file.writeInt(Integer.reverseBytes(sampleRate));
        file
                .writeInt(Integer.reverseBytes(sampleRate * channels
                        * bytesPerSec));
        file.writeShort(Short.reverseBytes((short) (channels * bytesPerSec)));
        file.writeShort(Short.reverseBytes((short) sampleBits));
        file.writeBytes("data");
        file.writeInt(Integer.reverseBytes(bytesWritten));
        file.close();
        file = null;
    }

Output:
    private void writeWaveHeader() throws IOException {
        RandomAccessFile file = new RandomAccessFile(this.output, "rw");
        file.seek(0);
        int bytesPerSec = (sampleBits + 7) / 8;
        file.writeBytes("RIFF");
        file.writeInt(Integer.reverseBytes(bytesWritten + 36));
        file.writeBytes("WAVEfmt ");
        file.writeInt(Integer.reverseBytes(16));
        file.writeShort(Short.reverseBytes((short) 1));
        file.writeShort(Short.reverseBytes((short) channels));
        file.writeInt(Integer.reverseBytes(sampleRate));
        file.writeInt(Integer.reverseBytes(sampleRate * channels * bytesPerSec));
        file.writeShort(Short.reverseBytes((short) (channels * bytesPerSec)));
        file.writeShort(Short.reverseBytes((short) sampleBits));
        file.writeBytes("data");
        file.writeInt(Integer.reverseBytes(bytesWritten));
        file.close();
        file = null;
    }


Input:
	public String getMethodOne(
            HttpServletResponse response,
			HttpServletRequest request,
			ModelMap model)  {
		 try{
		 logger.warning("Entering application via GEt");
		 GetBeansFromContext gcfc = new GetBeansFromContext();
		 con = gcfc.myConnection();
	      Statement statement = con.createStatement();
	      ResultSet resultSet = null;
	      HttpSession session = request.getSession(true);
	      User user = (User) session.getAttribute("myUser");
	 		 if (user==null ) {
	   		      model.addAttribute("errortext","You must logon before you can access IDS");
	   		   	  return "login";
	   		 }
	 		 if (request.getParameter("exit")!= null ){
	 			 if (session.getAttribute("myUser") != null) {
	 			    session.setAttribute("myUser",null);
	 			 }
	 			return "login";
	 		 }
	 		String      query = " select 'found' as found from ids_users where userId = '"+user.getUserName()
					  +"' and passwordId = '"+user.getPassword()+"'";
			 resultSet = statement.executeQuery(query);
	           boolean found = false;
			   while (resultSet.next()) {
				   if (resultSet.getString("found").equals("found")) {
					   found = true;
					   break;
				   }
				   break;
			   }
			   if (!found) {
		   		      model.addAttribute("errortext","Invalid user credentials");
		   		   	  return "login";
			   }
			   model.addAttribute("openOrClose","close");
			    String access = request.getParameter("access");
			    logger.warning("access: "+access);
			   if (request.getParameter("save")!= null ) {
				   PreparedStatement statement2 = (PreparedStatement) con.prepareStatement("insert into Facts_"+access+" " +
				   		" select * from FactsEdit_"+access + " WHERE flag ='I' ");
				   statement2.executeUpdate();
				   statement2 = (PreparedStatement) con.prepareStatement("delete from Facts_"+access+"  " +
					   		" where exists (select 1 from  FactsEdit_"+access+" cc " +
					   		 " where  cc.year= Facts_"+access+".year and cc.countryId = Facts_"+access+".countryId and cc.companyId = Facts_"+access+".companyId " +
					   		" and cc.sales_production = Facts_"+access+".sales_production and Facts_"+access+".productId = cc.productId  " +
					   		" and cc.flag = 'X' ) ");
				   logger.warning("delete from Facts_"+access+"  " +
					   		" where exists (select 1 from  FactsEdit_"+access+" cc " +
					   		 " where  cc.year= Facts_"+access+".year and cc.countryId = Facts_"+access+".countryId and cc.companyId = Facts_"+access+".companyId " +
					   		" and cc.sales_production = Facts_"+access+".sales_production and Facts_"+access+".productId = cc.productId " +
					   		" and cc.flag = 'X') ");
					   statement2.executeUpdate();
					   statement2 = (PreparedStatement) con.prepareStatement("update Facts_"+access +" aa INNER JOIN " +
					      " FactsEdit_"+access+" bb ON ( aa.year= bb.year and aa.countryId = bb.countryId and aa.companyId = aa.companyId " +
					   		" and aa.sales_production = bb.sales_production and bb.productId = aa.productId) " +
					   		" set aa.quantity = bb.quantity " +
				            " WHERE bb.flag = 'U'");
					   statement2.executeUpdate();
					   con.commit();
					   statement2 = (PreparedStatement) con.prepareStatement("delete from FactsEdit_"+access+" where flag = 'X' ");
						   statement2.executeUpdate();
						   statement2 = (PreparedStatement) con.prepareStatement("update FactsEdit_"+access+" set flag = '' where flag in ( 'I','D','U' ");
						   statement2.executeUpdate();
				   statement2 = (PreparedStatement) con.prepareStatement("update editing set flag = '0' ");
				   statement2.executeUpdate();
				   con.commit();
				   model.addAttribute("saveBut","none");
				   model.addAttribute("openOrClose","open");
				   return "redirect:editor";
			   }
			   String year = "";
			   String productId = "";
			   String countryId = "";
			   String companyId = "";
			   String PorS ="";
			   String SQL = "";
			   String value = request.getParameter("dimension1Name");
			   value = WordUtils.capitalize(value);
               if (value.equals("Year")) {
            	   year =  request.getParameter("dimension1Val");
               } else {
            	  SQL = " select id from "+value+ " where name = '" +request.getParameter("dimension1Val") +"' ";
            	  logger.warning("SQL1: "+SQL);
            	  resultSet = statement.executeQuery(SQL);
            	  while (resultSet.next()) {
            		  if (value.equals("Country")) {
            			  countryId= resultSet.getString("id");
            			  break;
            		  }
            		  if (value.equals("Company")) {
            			  companyId= resultSet.getString("id");
            			  break;
            		  }
            		  if (value.equals("Product")) {
            			  productId= resultSet.getString("id");
            			  break;
            		  }
            	  }
               }
               value = request.getParameter("dimension2Name");
               value =WordUtils.capitalize(value) ;
               if (value.equals("Year")) {
            	   year =  request.getParameter("dimension2Val");
               } else {
            	   if (request.getParameter("dimension2Name").trim().equals("Country")){
            		   SQL = " select id from "+value+ " where country = '" +request.getParameter("dimension2Val").trim() +"' ";
            	   } else {
             	      SQL = " select id from "+value+ " where name = '" +request.getParameter("dimension2Val").trim() +"' ";
            	   }
             	 logger.warning("SQL2: "+SQL);
             	logger.warning("value2: "+value);
             	if (resultSet != null) {
             		resultSet.close();
             	}
             	  resultSet = statement.executeQuery(SQL);
             	  while (resultSet.next()) {
             		  logger.warning("got in here ok");
             		  if (value.trim().equals("Country")) {
             			  logger.warning("come one we must have got in here");
             			  countryId= Integer.toString(resultSet.getInt("id"));
             			  break;
             		  }
             		  if (value.equals("Company")) {
             			  companyId=Integer.toString(resultSet.getInt("id"));
             			  break;
             		  }
             		  if (value.equals("Product")) {
             			  productId= Integer.toString(resultSet.getInt("id"));
             			  break;
             		  }
             	  }
               }
               value = request.getParameter("dimension3Name");
               value =WordUtils.capitalize(value) ;
               if (value.equals("Year")) {
            	   year =  request.getParameter("dimension3Val");
               } else {
            	   if (value.equals("Country")) {
            	       SQL = " select id from "+value+ " where country = '" +request.getParameter("dimension3Val").trim() +"' ";
            	   }else{
            		   SQL = " select id from "+value+ " where name = '" +request.getParameter("dimension3Val").trim() +"' ";
            	   }
              	  resultSet = statement.executeQuery(SQL);
              	  while (resultSet.next()) {
              		  if (value.equals("Country")) {
              			  countryId= Integer.toString(resultSet.getInt("id"));
              			  break;
              		  }
              		  if (value.equals("Company")) {
              			  companyId= Integer.toString(resultSet.getInt("id"));
              			  break;
              		  }
              		  if (value.equals("Product")) {
              			  productId= Integer.toString(resultSet.getInt("id"));
              			  break;
              		  }
              	  }
               }
               if (request.getParameter("dimension4Val").equals("Sales") ) {
            	   PorS= "1";
               } else {
            	   PorS = "2";
               }
               value = request.getParameter("dimension5Name");
               value =WordUtils.capitalize(value) ;
               if (value.equals("Year")) {
            	   year =  request.getParameter("dimension5Val");
               } else {
            	   value = value.substring(0,value.indexOf(" "));
            	   SQL = " select id from "+value+ " where shortname = '" +request.getParameter("dimension5Val") +"' ";
               	  resultSet = statement.executeQuery(SQL);
               	  while (resultSet.next()) {
               		  if (value.equals("Country")) {
               			  countryId= resultSet.getString("id");
               			  break;
               		  }
               		  if (value.equals("Product")) {
               			  productId= resultSet.getString("id");
               			  break;
               		  }
               	  }
               }
               logger.warning("year: "+year);
               logger.warning("productId: "+productId);
               logger.warning("countryId: "+countryId);
               logger.warning("companyId: "+companyId);
               logger.warning("PorS: "+PorS);
               int quant =0;
               if (!request.getParameter("FactVal").trim().equals("")) {
                   quant = Integer.parseInt(request.getParameter("FactVal"));
               }
               if (quant==0) {
            	   PreparedStatement statement2 = (PreparedStatement) con.prepareStatement("Update FactsEdit_"+access+" set flag='X' where "+
                		    " productId = "+productId + " and year = "+year+ " and access = '"+access+"' "+
                		   " and companyId = "+companyId + " and countryId = "+countryId+ " and sales_production = "+PorS);
                   int retval = statement2.executeUpdate();
               }else {
               PreparedStatement statement2 = (PreparedStatement) con.prepareStatement("Update FactsEdit_"+access+" set quantity = "+
            		   request.getParameter("FactVal")+ ",flag='U' where productId = "+productId + " and access= '"+access+"' and year = "+year+
            		   " and companyId = "+companyId + " and countryId = "+countryId+ " and sales_production = "+PorS);
               logger.warning("SQL: "+"Update FactsEdit_"+access+" set quantity = "+
            		   request.getParameter("FactVal")+ " where productId = "+productId + " and access= '"+access+"' and year = "+year+
            		   " and companyId = "+companyId + " and countryId = "+countryId+ " and sales_production = "+PorS);
               int retval = statement2.executeUpdate();
               if (retval==0) {
            	   String newSQL = "Insert into FactsEdit_"+access+" (quantity, productId, year, companyId, countryId," +
            	   		" sales_production, access,flag) values ("+request.getParameter("FactVal")+","+productId
            	   		+","+year+","+companyId+","+countryId+","+PorS+",'"+access+"','I')";
            	   logger.warning("InsertSQL: "+newSQL);
            	   statement2 = (PreparedStatement) con.prepareStatement(newSQL);
            	   retval = statement2.executeUpdate();
               }
               }
        	   String newSQL = "update editing set flag = '1' ";
        	   PreparedStatement statement3 = (PreparedStatement) con.prepareStatement(newSQL);
           	   statement3.executeUpdate();
                con.commit();
		 }
                catch(Exception e) {
                	logger.log(Level.SEVERE,"error",e);
                }
			   return "login";
	 }

Output:
	public String getMethodOne(
            HttpServletResponse response,
			HttpServletRequest request,
			ModelMap model)  {
		 try{
		 logger.warning("Entering application via GEt");
		 GetBeansFromContext gcfc = new GetBeansFromContext();
		 con = gcfc.myConnection();
	      Statement statement = con.createStatement();
	      ResultSet resultSet = null;
	      HttpSession session = request.getSession(true);
	      User user = (User) session.getAttribute("myUser");
	 		 if (user==null ) {
	   		      model.addAttribute("errortext","You must logon before you can access IDS");
	   		   	  return "login";
	   		 }
	 		 if (request.getParameter("exit")!= null ){
	 			 if (session.getAttribute("myUser") != null) {
	 			    session.setAttribute("myUser",null);
	 			 }
	 			return "login";
	 		 }
	 		String      query = " select 'found' as found from ids_users where userId = '"+user.getUserName()
					  +"' and passwordId = '"+user.getPassword()+"'";
			 resultSet = statement.executeQuery(query);
	           boolean found = false;
			   while (resultSet.next()) {
				   if (resultSet.getString("found").equals("found")) {
					   found = true;
					   break;
				   }
				   break;
			   }
			   if (!found) {
		   		      model.addAttribute("errortext","Invalid user credentials");
		   		   	  return "login";
			   }
			   model.addAttribute("openOrClose","close");
			    String access = request.getParameter("access");
			    logger.warning("access: "+access);
			   if (request.getParameter("save")!= null ) {
				   PreparedStatement statement2 = (PreparedStatement) con.prepareStatement("insert into Facts_"+access+" " +
				   		" select * from FactsEdit_"+access + " WHERE flag ='I' ");
				   statement2.executeUpdate();
				   statement2 = (PreparedStatement) con.prepareStatement("delete from Facts_"+access+"  " +
					   		" where exists (select 1 from  FactsEdit_"+access+" cc " +
					   		 " where  cc.year= Facts_"+access+".year and cc.countryId = Facts_"+access+".countryId and cc.companyId = Facts_"+access+".companyId " +
					   		" and cc.sales_production = Facts_"+access+".sales_production and Facts_"+access+".productId = cc.productId  " +
					   		" and cc.flag = 'X' ) ");
				   logger.warning("delete from Facts_"+access+"  " +
					   		" where exists (select 1 from  FactsEdit_"+access+" cc " +
					   		 " where  cc.year= Facts_"+access+".year and cc.countryId = Facts_"+access+".countryId and cc.companyId = Facts_"+access+".companyId " +
					   		" and cc.sales_production = Facts_"+access+".sales_production and Facts_"+access+".productId = cc.productId " +
					   		" and cc.flag = 'X') ");
					   statement2.executeUpdate();
					   statement2 = (PreparedStatement) con.prepareStatement("update Facts_"+access +" aa INNER JOIN " +
					      " FactsEdit_"+access+" bb ON ( aa.year= bb.year and aa.countryId = bb.countryId and aa.companyId = aa.companyId " +
					   		" and aa.sales_production = bb.sales_production and bb.productId = aa.productId) " +
					   		" set aa.quantity = bb.quantity " +
				            " WHERE bb.flag = 'U'");
					   statement2.executeUpdate();
					   con.commit();
					   statement2 = (PreparedStatement) con.prepareStatement("delete from FactsEdit_"+access+" where flag = 'X' ");
						   statement2.executeUpdate();
						   statement2 = (PreparedStatement) con.prepareStatement("update FactsEdit_"+access+" set flag = '' where flag in ( 'I','D','U' )");
						   statement2.executeUpdate();
				   statement2 = (PreparedStatement) con.prepareStatement("update editing set flag = '0' ");
				   statement2.executeUpdate();
				   con.commit();
				   model.addAttribute("saveBut","none");
				   model.addAttribute("openOrClose","open");
				   return "redirect:editor";
			   }
			   String year = "";
			   String productId = "";
			   String countryId = "";
			   String companyId = "";
			   String PorS ="";
			   String SQL = "";
			   String value = request.getParameter("dimension1Name");
			   value = WordUtils.capitalize(value);
               if (value.equals("Year")) {
            	   year =  request.getParameter("dimension1Val");
               } else {
            	  SQL = " select id from "+value+ " where name = '" +request.getParameter("dimension1Val") +"' ";
            	  logger.warning("SQL1: "+SQL);
            	  resultSet = statement.executeQuery(SQL);
            	  while (resultSet.next()) {
            		  if (value.equals("Country")) {
            			  countryId= resultSet.getString("id");
            			  break;
            		  }
            		  if (value.equals("Company")) {
            			  companyId= resultSet.getString("id");
            			  break;
            		  }
            		  if (value.equals("Product")) {
            			  productId= resultSet.getString("id");
            			  break;
            		  }
            	  }
               }
               value = request.getParameter("dimension2Name");
               value =WordUtils.capitalize(value) ;
               if (value.equals("Year")) {
            	   year =  request.getParameter("dimension2Val");
               } else {
            	   if (request.getParameter("dimension2Name").trim().equals("Country")){
            		   SQL = " select id from "+value+ " where country = '" +request.getParameter("dimension2Val").trim() +"' ";
            	   } else {
             	      SQL = " select id from "+value+ " where name = '" +request.getParameter("dimension2Val").trim() +"' ";
            	   }
             	 logger.warning("SQL2: "+SQL);
             	logger.warning("value2: "+value);
             	if (resultSet != null) {
             		resultSet.close();
             	}
             	  resultSet = statement.executeQuery(SQL);
             	  while (resultSet.next()) {
             		  logger.warning("got in here ok");
             		  if (value.trim().equals("Country")) {
             			  logger.warning("come one we must have got in here");
             			  countryId= Integer.toString(resultSet.getInt("id"));
             			  break;
             		  }
             		  if (value.equals("Company")) {
             			  companyId=Integer.toString(resultSet.getInt("id"));
             			  break;
             		  }
             		  if (value.equals("Product")) {
             			  productId= Integer.toString(resultSet.getInt("id"));
             			  break;
             		  }
             	  }
               }
               value = request.getParameter("dimension3Name");
               value =WordUtils.capitalize(value) ;
               if (value.equals("Year")) {
            	   year =  request.getParameter("dimension3Val");
               } else {
            	   if (value.equals("Country")) {
            	       SQL = " select id from "+value+ " where country = '" +request.getParameter("dimension3Val").trim() +"' ";
            	   }else{
            		   SQL = " select id from "+value+ " where name = '" +request.getParameter("dimension3Val").trim() +"' ";
            	   }
              	  resultSet = statement.executeQuery(SQL);
              	  while (resultSet.next()) {
              		  if (value.equals("Country")) {
              			  countryId= Integer.toString(resultSet.getInt("id"));
              			  break;
              		  }
              		  if (value.equals("Company")) {
              			  companyId= Integer.toString(resultSet.getInt("id"));
              			  break;
              		  }
              		  if (value.equals("Product")) {
              			  productId= Integer.toString(resultSet.getInt("id"));
              			  break;
              		  }
              	  }
               }
               if (request.getParameter("dimension4Val").equals("Sales") ) {
            	   PorS= "1";
               } else {
            	   PorS = "2";
               }
               value = request.getParameter("dimension5Name");
               value =WordUtils.capitalize(value) ;
               if (value.equals("Year")) {
            	   year =  request.getParameter("dimension5Val");
               } else {
            	   value = value.substring(0,value.indexOf(" "));
            	   SQL = " select id from "+value+ " where shortname = '" +request.getParameter("dimension5Val") +"' ";
               	  resultSet = statement.executeQuery(SQL);
               	  while (resultSet.next()) {
               		  if (value.equals("Country")) {
               			  countryId= resultSet.getString("id");
               			  break;
               		  }
               		  if (value.equals("Product")) {
               			  productId= resultSet.getString("id");
               			  break;
               		  }
               	  }
               }
               logger.warning("year: "+year);
               logger.warning("productId: "+productId);
               logger.warning("countryId: "+countryId);
               logger.warning("companyId: "+companyId);
               logger.warning("PorS: "+PorS);
               int quant =0;
               if (!request.getParameter("FactVal").trim().equals("")) {
                   quant = Integer.parseInt(request.getParameter("FactVal"));
               }
               if (quant==0) {
            	   PreparedStatement statement2 = (PreparedStatement) con.prepareStatement("Update FactsEdit_"+access+" set flag='X' where "+
                		    " productId = "+productId + " and year = "+year+ " and access = '"+access+"' "+
                		   " and companyId = "+companyId + " and countryId = "+countryId+ " and sales_production = "+PorS);
                   int retval = statement2.executeUpdate();
               }else {
               PreparedStatement statement2 = (PreparedStatement) con.prepareStatement("Update FactsEdit_"+access+" set quantity = "+
            		   request.getParameter("FactVal")+ ",flag='U' where productId = "+productId + " and access= '"+access+"' and year = "+year+
            		   " and companyId = "+companyId + " and countryId = "+countryId+ " and sales_production = "+PorS);
               logger.warning("SQL: "+"Update FactsEdit_"+access+" set quantity = "+
            		   request.getParameter("FactVal")+ " where productId = "+productId + " and access= '"+access+"' and year = "+year+
            		   " and companyId = "+companyId + " and countryId = "+countryId+ " and sales_production = "+PorS);
               int retval = statement2.executeUpdate();
               if (retval==0) {
            	   String newSQL = "Insert into FactsEdit_"+access+" (quantity, productId, year, companyId, countryId," +
            	   		" sales_production, access,flag) values ("+request.getParameter("FactVal")+","+productId
            	   		+","+year+","+companyId+","+countryId+","+PorS+",'"+access+"','I')";
            	   logger.warning("InsertSQL: "+newSQL);
            	   statement2 = (PreparedStatement) con.prepareStatement(newSQL);
            	   retval = statement2.executeUpdate();
               }
               }
        	   String newSQL = "update editing set flag = '1' ";
        	   PreparedStatement statement3 = (PreparedStatement) con.prepareStatement(newSQL);
           	   statement3.executeUpdate();
                con.commit();
		 }
                catch(Exception e) {
                	logger.log(Level.SEVERE,"error",e);
                }
			   return "login";
	 }