WARNING: THERE IS ONE MORE COPY OF THIS CODE IN VERTEX
975645
@Override
    public <T> Property<T> property(String key) {
        T value = value(key);
        if (value == null) {
            return Property.<T>empty();
        } else {
            return new BitsyProperty<T>(this, key, value);
        }
    }
938733
def remove_vertex(u)
      u.clear_edges
      looked_up = self[u]
      # looked_up.successors.each do |succ|
      #   self[succ].remove_predecessor looked_up
      #   self[looked_up].delete_all_flags succ
      # end
      # looked_up.predecessors.each do |pred|
      #   self[pred].remove_successor looked_up
      #   self[pred].delete_all_flags looked_up
      # end
      @vertex_lookup.delete looked_up.name
      vertices.delete looked_up
    end
778222
def get_vertex_string(self, i):
        """"""
        number = self.numbers[i]
        if number == 0:
            return Graph.get_vertex_string(self, i)
        else:
            # pad with zeros to make sure that string sort is identical to number sort
            return "%03i" % number
144043
def go_in(self, vertex):
        
        if self.vertex_in:
            self.vertex_in.edges_in.remove(self)
        self.vertex_in = vertex
        vertex.edges_in.add(self)
675040
public static TemporaryWriteException indexOverlap(Vertex vertex, Exception e){
        return new TemporaryWriteException(String.format("Index overlap has led to the accidental sharing of a partially complete vertex {%s}", vertex), e);
    }
1321800
function compile(gl, vertSource, fragSource, attribs, verbose) {
    var log = "";

    var vert = loadShader(gl, gl.VERTEX_SHADER, vertSource, verbose);
    var frag = loadShader(gl, gl.FRAGMENT_SHADER, fragSource, verbose);

    var vertShader = vert.shader;
    var fragShader = frag.shader;

    log += vert.log + "\n" + frag.log;

    var program = gl.createProgram();

    gl.attachShader(program, vertShader);
    gl.attachShader(program, fragShader);

    //TODO: Chrome seems a bit buggy with attribute bindings...
    if (attribs) {
        for (var key in attribs) {
            if (attribs.hasOwnProperty(key)) {
                gl.bindAttribLocation(program, Math.floor(attribs[key]), key);
            }
        }
    }

    gl.linkProgram(program); 

    log += gl.getProgramInfoLog(program) || "";

    if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
        if (verbose) {
            console.error("Shader error:\n"+log);
            console.error("Problematic shaders:\nVERTEX_SHADER:\n"+addLineNumbers(vertSource)
                    +"\n\nFRAGMENT_SHADER:\n"+addLineNumbers(fragSource));
        }
        //delete before throwing error    
        gl.detachShader(program, vertShader);
        gl.detachShader(program, fragShader);
        gl.deleteShader(vertShader);
        gl.deleteShader(fragShader);
        
        throw new Error("Error linking the shader program:\n" + log);

    }
    return {
        program: program,
        vertex: vertShader,
        fragment: fragShader,
        log: log.trim()
    };
}
407122
private static int findOther(int[] vs, int u, int x) {
        for (int v : vs) {
            if (v != u && v != x) return v;
        }
        throw new IllegalArgumentException("vs[] did not contain another vertex");
    }
698288
private static void checkDuplication(String[] list, String orig) throws DevFailed {
        Vector<String> dupli = new Vector<String>();
        //	For each string
        for (int i = 0 ; i<list.length ; i++) {
            String str = list[i];
            //	Check if it is a duplication
            for (int j = i + 1 ; j<list.length ; j++) {
                if (list[j].equalsIgnoreCase(str))
                    //	Check if not already found
                    if (dupli.indexOf(str)<0)
                        dupli.add(str);
            }
        }

        if (dupli.size()>0) {
            String message =
                    "Several times the same attribute in required attribute list: ";
            for (int i = 0 ; i<dupli.size() ; i++) {
                message += dupli.get(i);
                if (i<dupli.size() - 1) {
                    message += ", ";
                }
            }
            Except.throw_exception("",
                    message, orig);
        }
    }
218767
function it_leavesNewVertexWithNewValue() {
			it("leaves a new vertex in the graph with a new value", function () {
				callItWith('newKey', 'newValue');
				expect(graph.hasVertex('newKey')).toBeTruthy();
				expect(graph.vertexValue('newKey')).toBe('newValue');
				expect(graph.vertexCount()).toBe(originalVertexCount + 1);
			});
		}
653885
@Override
    public void visitCode(Code obj) {
        stack.resetForMethodEntry(this);
        changedAttributes.clear();
        savedAttributes.clear();
        super.visitCode(obj);
        for (Integer pc : changedAttributes.values()) {
            bugReporter.reportBug(new BugInstance(this, BugType.SCSS_SUSPICIOUS_CLUSTERED_SESSION_SUPPORT.name(), NORMAL_PRIORITY).addClass(this)
                    .addMethod(this).addSourceLine(this, pc.intValue()));
        }
    }
161253
@Override
    public void visitCode(Code obj) {

        Method m = getMethod();
        if (m.isSynthetic()) {
            return;
        }

        if (isEnum && "values".equals(m.getName())) {
            return;
        }

        String sig = m.getSignature();
        int sigPos = sig.indexOf(")[");
        if (sigPos < 0) {
            return;
        }
        if (INITIAL_VALUE.equals(m.getName())) {
            try {
                if ((THREAD_LOCAL_CLASS == null) || getClassContext().getJavaClass().instanceOf(THREAD_LOCAL_CLASS)) {
                    return;
                }
            } catch (ClassNotFoundException e) {
                bugReporter.reportMissingClass(e);
                return;
            }
        }

        stack.resetForMethodEntry(this);
        returnArraySig = sig.substring(sigPos + 1);
        uninitializedRegs.clear();
        arrayAliases.clear();
        storedUVs.clear();
        super.visitCode(obj);
    }
509463
@Override
    public void sawOpcode(int seen) {

        if (!sawAload0) {
            if (seen == Const.ALOAD_0) {
                sawAload0 = true;
            } else {
                throw new StopOpcodeParsingException();
            }
        } else if (nextParmIndex < parmTypes.length) {
            if (isExpectedParmInstruction(seen, nextParmOffset, parmTypes[nextParmIndex])) {
                nextParmOffset += SignatureUtils.getSignatureSize(parmTypes[nextParmIndex].getSignature());
                nextParmIndex++;
            } else {
                throw new StopOpcodeParsingException();
            }

        } else if (!sawParentCall) {

            if ((seen == Const.INVOKESPECIAL) && getNameConstantOperand().equals(getMethod().getName())
                    && getSigConstantOperand().equals(getMethod().getSignature())) {
                sawParentCall = true;
            } else {
                throw new StopOpcodeParsingException();
            }
        } else {
            int expectedInstruction = getExpectedReturnInstruction(getMethod().getReturnType());
            if ((seen == expectedInstruction) && (getNextPC() == getCode().getCode().length)) {
                bugReporter.reportBug(
                        new BugInstance(this, BugType.COM_PARENT_DELEGATED_CALL.name(), NORMAL_PRIORITY).addClass(this).addMethod(this).addSourceLine(this));
            } else {
                throw new StopOpcodeParsingException();
            }
        }
    }
696961
void registerExecutionVertex(final ExecutionVertex vertex) {

		if (this.vertexMap.put(vertex.getID(), vertex) != null) {
			throw new IllegalStateException("There is already an execution vertex with ID " + vertex.getID()
				+ " registered");
		}
	}
127690
public void mergeVertexDescription(VertexDescription src) {
		_touch();
		if (src == m_description)
			return;

		// check if we need to do anything (if the src has same attributes)
		VertexDescription newdescription = VertexDescriptionDesignerImpl.getMergedVertexDescription(m_description, src);
		if (newdescription == m_description)
			return;
		
		_assignVertexDescriptionImpl(newdescription);
	}
390812
public void delete(Vertex vtx1, Vertex vtx2) {
        if (vtx1.prev == null) {
            head = vtx2.next;
        } else {
            vtx1.prev.next = vtx2.next;
        }
        if (vtx2.next == null) {
            tail = vtx1.prev;
        } else {
            vtx2.next.prev = vtx1.prev;
        }
    }
638745
protected function _duplicate()
    {
        $this->dupAllDocComments();
        if ($this->node instanceof Stmt\Class_) {
            $this->setModifier($this->node->flags);
            if ($this->node->extends) {
                $this->extend($this->node->extends);
            }
            exec_method_array($this, 'implement', $this->node->implements);
        }
        $this->addStmts($this->node->stmts);
    }
9516
private void checkDuplicate() {
		KeyboardShortcut ks = this.getDuplicate();
		if (ks != null) {
			this.setFieldValue(FIELD_INFO, Constant.messages.getString("keyboard.dialog.warning.dup", ks.getName()));
		} else {
			this.setFieldValue(FIELD_INFO, "");
		}
	}